Re: [xep-support] <PRE> tag like behavior?

From: Alexander Peshkov (peshkov@renderx.com)
Date: Wed Jun 02 2004 - 08:17:33 PDT

  • Next message: Nikolai Grigoriev: "Re: [xep-support] Suppressing validation errors"

    Hello Chris,

    The common way to achieve <pre>-like effect is:

    <fo:block white-space="pre">
      This text will be formatted as it is,
        with all line-breaks and white spaces.
    </fo:block>

    Here 'white-space' is a shorthand property. Its value 'pre'
    corresponds to:

      linefeed-treatment="preserve"
      white-space-collapse="false"
      white-space-treatment="preserve"
      wrap-option="no-wrap"

    If you need finer control over your preformatted text (e.g. you want
    lines to be wrapped) you may want to set those properties
    individually.

    Best regards,
    Alexander Peshkov mailto:peshkov@renderx.com
    RenderX

    CC> Is there an easy (relatively) way to use XEP to create <PRE>-like
    CC> formatted text?

    CC> We currently have an inline element called <examplecode>. When
    CC> rendered through XEP the data is output in monospace bold font.

    CC> If line breaks were required, we would wrap it in para tags.

    CC> The problem we have is that we want to render example code with proper
    CC> indentation. The simple solution (although time consuming for the
    CC> writer), is to create some kind of "tab" formatting tag, and have the
    CC> writer insert the proper number of tabs for indentation. During render
    CC> the tab tag would be rendered into X amount of space per tab.

    CC> Is there an easier way?

    CC> Thanks,
    CC> Chris

    -------------------
    (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
    in the body of the message to majordomo@renderx.com from the address
    you are subscribed from.
    (*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html



    This archive was generated by hypermail 2.1.5 : Wed Jun 02 2004 - 08:31:21 PDT