[oXygen-user] Is there a way to stop oxygen from reformatting lines of text marked with <codeblock> or <lines>?
Radu Coravu
Wed Feb 3 02:10:23 CST 2010
Hi Steve,
What Oxygen version are you using?
Both the Text and Author pages should interpret <codeblock> as space
preserve by Oxygen 11.1 because they are declared in the DITA DTD as
having the xml:space="preserve" attribute.
If you are using an older Oxygen version:
How do you reformat the text? Do you use the "Format and indent" button
in the Text page?
Can you go to the Oxygen "Preferences->Editor / Format / XML" page and
check the "Preserve space elements" list?
"codeblock" should be present there and you can also add "lines" to the
list.
Regards,
Radu
--
Radu Coravu
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
On 2/2/2010 9:48 PM, Steve Matlock wrote:
> I am writing documentation that includes code samples. I currently am
> putting them in the concept type marked with <codeblock> or <lines>
> (I've not decided yet which is the best solution).
>
> But, if I reformat the text (because other content I'm placing in the
> <p> blocks comes in as one very long line) so I can more easily edit
> the xml, the content in the <codeblock> or <lines> section is
> reformatted, losing all the carefully placed indents in the code.That
> is, the code that would appear in the PDF or HTML is reformatted so
> that it is all flush left with an indent of about 1 inch. I want it to
> remain indented hierarchically.
>
> So for example, a code sample as it appears in the Author view
> <script>
> Some script here
> A subroutine here
> More stuff
> </script>
>
> etc.
>
> It becomes this
> <script> Some script here A subroutine here More stuff </script>
>
> which, technically, would work as code, but it hard to read in the
> documentation.
>
> The code in the Editor view looks like this:
> <codeblock>
> <script>
> Some script here
> A subroutine here
> More stuff
> >/script>
> </codeblock>
>
> and so on. When it's reformated it looks like this
> <codeblock>
> <script> Some script here A subroutine here More stuff >/script>
> </codeblock>
>
>
> --
> Steve Matlock
> http://nohomeformyblog.blogspot.com/
>
>
> _______________________________________________
> oXygen-user mailing list
>
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.oxygenxml.com/pipermail/oxygen-user/attachments/20100203/d3456784/attachment.html
More information about the oXygen-user
mailing list