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

Alexander Peshkov peshkov at renderx.com
Wed Jun 2 08:17:33 PDT 2004


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 at 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 at 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



More information about the Xep-support mailing list