Do you want to create professionally formatted documents? Tired of always having to change the font settings, to insert or delete pagebreaks, to format your text for printing, monitor, or web view? Do you find yourself spending hours of your life into formatting issues that you wish you never had to be conftonted with? Did you, during your editing efforts, ever get the uncomforting feeling that you are inventing the wheel for th 39th time?
Well, in fact you are! You can use the power of Open Source tools like LyX and sgmltools to create the documents you've dreamed of, while, as a nice side effect, concentrating on what deserves most of your attention: Content, not Formatting! In Document processing with LyX and SGML, Chris Karakas describes a method by which all you have to do is to write your document in LyX, then run the .lyx file through a script that will produce the SGML source and, from it, the HTML, TXT, RTF, PDF and PS formatted documents (as in Section 1.2), complete with table of contents, embedded pictures, fonts, thumbnails (for PDF) and other goodies - just as in the document you are reading right now!
That is, to learn how to produce a book like this one, you have to read the book behind the book.
When writing LyX documents, formatting should be the last thing on your mind. Concentrate on writing a clear and c oncise document. The sgml parser will take care of the formatting.We've all heard of WYSIWYG. LyX is WYGIWYM. WYGIWYM stands for "What You Get Is What You Mean". This means if you mean for text to represent source code you assign it a source code environment (Lyxese for style), and it formats the way you meant it to. You needn't worry about formatting during the writing of your document. If you don't like the way it looks upon finishing and printing it out, you can change the way styles map to formatting, and those styles will consistently change throughout the document.
The method described in Document processing with LyX and SGML follows a line of attack defined by the following:
We put everything in a shell script. We don't want to bother about anything else. We want to ponder comfortably upon the meaning of life while drinking some coffee or tea, watching our computer do the work for us - personally, a very rewarding experience :-)
We use sed to correct LyX' SGML output. The more we are able to correct, the more SGML features we get out of our plain vanilla LyX.
We use the sgmltools package which hides a lot of details from the end user, giving nonetheless all the power of the involved tools.[1]
We will adapt the DocBook DSSSL stylesheets to our personal needs and taste..
The end product shall be a directory ready to upload to our web server with all files, links, images and formats necessary.
So you got appetite and want to delve into the gory details? Read the book behind this book: Document processing with LyX and SGML!
[1] | The current version of the lyxtox script make less use of sgmltools, due to the need of processing intermediate results for the integration of Mathematics, Bibliography etc. The originally used calls to sgmltools are nonetheless included in the comments of that script to demonstrate alternative ways of achieving the same result. |