If you want to write executable SGML code in LyX, e.g. to implement an admonition (see Section 5.8) or a callout (see Section 5.9), there is no problem: just create an environment of type “SGML” and enter your code there. It will be part of the exported SGML file.
But if you want to give some example SGML code, like in a program listing, then it might be a better idea to move the code in a separate file and include that file per reference. This is because if the SGML code contains “<![CDATA[” and “]]>”, it is likely to interefere with the normal SGML processing, causing errors like the following:
/usr/bin/openjade:<OSFD>0:382:323:E: marked section end not in marked section declaration |
To include a file, choose from the menu Insert-->Include file. In the dialog box, choose “Verbatim” and enter the file name. The file should best be located in the same directory as the SGML file exported from LyX (but need not necessarily to).
LyX will use the “inlinegraphic” SGML tag to include the file. This will collide with inline graphics, if you want to include them using this method too (see Section 5.7.1 and Section 7.1.6).
| Last updated Mon Sep 24 01:19:25 CEST 2007 | Permalink: http://www.karakas-online.de/mySGML/lyx-sgml-code.html | All contents © 2002-2007 Chris Karakas |