SGML means Standard Generalized Markup Language. This language is used to generate files in LaTeX, HTML, GNU info, LyX, RTF and ASCII (via groff).
Before to read this section is important to explain the that DocBook DTD are the new mode to use SGML documents. FTLinuxCourse covers DocBook DTD in Chapter 10. An Introduction to XML, in WebMaster Course.
This language is used by the LDP (Linux Documentation Project) to write the documentation for Linux. An example of this documentation is in the HOW-TO files, an up-to-date version of which is on this CD: "HOWTO/other-formats". In this directory are all the versions of the HOW-TO, the source code in SGML, and the versions for HTML, LaTeX, DVI, and Postscript; while the ASCII versions are installed in the main directory.
Let's see how an SGML file can be converted to all these formats:
The "sgml-tools" package under Linux contains a series of programs to achieve this objective.
[root@heaven /root]# rpm -ql sgml-tools
| grep bin
/usr/bin/nsgmls
/usr/bin/rtf2rtf
/usr/bin/sgml2html
/usr/bin/sgml2info
/usr/bin/sgml2latex
/usr/bin/sgml2lyx
/usr/bin/sgml2rtf
/usr/bin/sgml2txt
/usr/bin/sgmlcheck
/usr/bin/sgmlpre
/usr/bin/sgmlsasp
/usr/bin/sgmltools
[root@heaven /root]#
We will look at a file in SGML format, "Optical-Disk-HOWTO" and see the model:
[root@heaven sgml]# more Optical-Disk-HOWTO.sgml
<!doctype linuxdoc system>
<article>
<!-- Title information -->
<title>Linux - Optical Disk HOWTO
<author>Skip Rye, <htmlurl url="mailto:Skip_Rye@faneuil.com"
name="Skip_Rye@faneuil.com">
<date>v1.4, 22 December 1997
<abstract>
This document describes the installation
and configuration of
optical disk drives for Linux. Currently,
the only drive covered well is
the Panasonic LF1000 PD Phase change optical
drive with the SCSI-II interface.
Please, if any one has experiences with
optical storage under Linux, send
it and I will update it in SGML and forward
it to the Linux community.
</abstract>
<!-- Table of contents -->
<toc>
<!-- Begin the document -->
<p>
<sect>Disclaimer
<p>
Neither the author nor the distributors
of this HOWTO are in any way
responsible for physical, financial, moral
or any other type of damage
incurred by following the suggestions
in this text.
<sect>Copyright
<p>
The "Optical Disk-HOWTO" and "LF1000 mini-HOWTO"
are copyrighted.
<sect1>LF1000 mini-HOWTO
<p>
(C) 1996,1997 by Skip Rye, abr@brspc_0064.msd.ray.com
<sect1>Optical Disk-HOWTO
<p>
(C) 1997 by Skip Rye, abr@brspc_0064.msd.ray.com
<p>
Linux HOWTO documents may be reproduced
and
distributed in whole or in part, in any
medium physical or electronic, as long
as this copyright notice is retained on
all copies. Commercial redistribution
is allowed and encouraged. The author,
however, would like to be notified
--More--(9%)
We note that the previous file includes some primitives, equivalent to those for an article :
For example,for transforming this file SGML in a simple ASCII file, we can run the command :
[root@heaven sgml]# sgml2txt Optical-Disk-HOWTO.sgml
Processing file Optical-Disk-HOWTO.sgml
/usr/bin/nsgmls:<OSFD0:351:0:E: non
SGML character number 255
/usr/bin/nsgmls:<OSFD0:351:0:E: character
data is not allowed here
/usr/bin/nsgmls:<OSFD0:351:1:E: non
SGML character number 255
<standard input:643: warning: can't
find character with input code 255
[root@heaven sgml]# ll Optical-Disk-HOWTO.*
-rw-r--r-- 1 670
1002 15800 Sep 25 02:49 Optical-Disk-HOWTO.sgml
-rw-r--r-- 1 root
root 17157 Nov 21 09:28 Optical-Disk-HOWTO.txt
[root@heaven sgml]#
Look at the high quality of the standardization !
[root@heaven sgml]# more *.txt
Optical Disk HOWTO
Skip Rye abr@preferred.com
v1.5, 1 September 1998
This document describes the installation
and configuration of optical
disk drives for Linux. Currently,
the only drive covered well is the
Panasonic LF1000 PD Phase change
optical drive with the SCSI-II inter-
face. Please, if any one has experiences
with optical storage under
Linux, send it and I will update
it in SGML and forward it to the
Linux community.
______________________________________________________________________
Table of Contents
1. Disclaimer
2. Copyright
2.1 LF1000 mini-HOWTO
2.2 Optical Disk-HOWTO
3. Phase Change Optical Technology
3.1 Introduction
3.2 Panasonic
LF1000
3.2.1 POINTS OF INTEREST
3.2.2 THINGS YOU SHOULD KNOW
3.2.3 Installation
3.2.4 Installation steps
3.2.5 Usage hints
3.3 Additional
Configuration concerns by Jeff Rooze
4. Magneto Optical Technology
4.1 Introduction
5. Optical Jukeboxes
______________________________________________________________________
1. Disclaimer
Neither the author nor the distributors
of this HOWTO are in any way
--More--(7%)
To convert this file to HTML and LaTeX, we can run the respective commands sgml2html or sgml2latex :
[root@heaven sgml]# sgml2html Optical-Disk-HOWTO.sgml
Processing file Optical-Disk-HOWTO.sgml
[root@heaven sgml]# ^html^latex
sgml2latex Optical-Disk-HOWTO.sgml
Processing file Optical-Disk-HOWTO.sgml
This is TeX, Version 3.14159 (C version
6.1)
LaTeX2e <1996/12/01> patch level 1
Babel <v3.6h> and hyphenation patterns
for american, german, loaded.
(Optical-Disk-HOWTO.tex (/usr/TeX/texmf/tex/latex/base/article.cls
Document Class: article 1996/10/31 v1.3u
Standard LaTeX document class
(/usr/TeX/texmf/tex/latex/base/size10.clo))
(/usr/lib/sgml-tools/linuxdoc-sgml.sty)
(/usr/lib/sgml-tools/qwertz.sty)
(/usr/TeX/texmf/tex/latex/misc/url.sty)
(/usr/TeX/texmf/tex/latex/base/inputenc.sty
beta test version
(/usr/TeX/texmf/tex/latex/base/latin1.def))
(/usr/TeX/texmf/tex/latex/base/t1enc.sty)
(/usr/TeX/texmf/tex/generic/babel/babel.sty)
(/usr/TeX/texmf/tex/latex/graphics/epsfig.sty
(/usr/TeX/texmf/tex/latex/graphics/graphicx.sty
(/usr/TeX/texmf/tex/latex/graphics/keyval.sty)
(/usr/TeX/texmf/tex/latex/graphics/graphics.sty
(/usr/TeX/texmf/tex/latex/graphics/trig.sty)
(/usr/TeX/texmf/tex/latex/config/graphics.cfg)
(/usr/TeX/texmf/tex/latex/graphics/dvips.def))))
(/usr/lib/sgml-tools/null.sty)
(Optical-Disk-HOWTO.aux) (/usr/TeX/texmf/tex/latex/base/t1cmss.fd)
Underfull \hbox (badness 10000) in paragraph
at lines 22--22
(Optical-Disk-HOWTO.toc) [1] (/usr/TeX/texmf/tex/latex/base/omscmr.fd)
[2]
[3] (/usr/TeX/texmf/tex/latex/base/t1cmtt.fd)
[4] [5] [6]
(Optical-Disk-HOWTO.aux) )
(see the transcript file for additional
information)
Output written on Optical-Disk-HOWTO.dvi
(6 pages, 25236 bytes).
Transcript written on Optical-Disk-HOWTO.log.
[root@heaven sgml]#
The sgml2latex program creates the DVI version and the corresponding HTML pages, linked together:
[root@heaven sgml]# ll Optical-Disk-HOWTO*
-rw-r--r-- 1 root
root 781 Nov 21 09:33
Optical-Disk-HOWTO-1.html
-rw-r--r-- 1 root
root 2064 Nov 21 09:33
Optical-Disk-HOWTO-2.html
-rw-r--r-- 1 root
root 11786 Nov 21 09:33 Optical-Disk-HOWTO-3.html
-rw-r--r-- 1 root
root 2263 Nov 21 09:33
Optical-Disk-HOWTO-4.html
-rw-r--r-- 1 root
root 1649 Nov 21 09:33
Optical-Disk-HOWTO-5.html
-rw-r--r-- 1 root
root 25220 Nov 21 09:33 Optical-Disk-HOWTO.dvi
-rw-r--r-- 1 root
root 1859 Nov 21 09:33
Optical-Disk-HOWTO.html
-rw-r--r-- 1 670
1002 15800 Sep 25 02:49 Optical-Disk-HOWTO.sgml
-rw-r--r-- 1 root
root 17157 Nov 21 09:28 Optical-Disk-HOWTO.txt
[root@heaven sgml]#
To convert the DVI file to Postscript we apply the normal procedure:
[root@heaven sgml]# dvips -oOptical-Disk-HOWTO.ps
Optical-Disk-HOWTO.dvi
This is dvipsk 5.58f Copyright 1986, 1994
Radical Eye Software
' TeX output 1998.11.21:0933' - Optical-Disk-HOWTO.ps
<tex.pro>. [1] [2] [3] [4] [5] [6]
[root@heaven sgml]#
Through the SGML tools we can produce a RTF version to read it in a WordProcessor, like MS-Word for MS-Windows or MAC :
[root@heaven sgml]# sgml2rtf Optical-Disk-HOWTO.sgml
Processing file Optical-Disk-HOWTO.sgml
[root@heaven sgml]# ll *.rtf
-rw-r--r-- 1 root
root 20551 Nov 21 09:43 Optical-Disk-HOWTO-0.rtf
-rw-r--r-- 1 root
root 1648 Nov 21 09:43
Optical-Disk-HOWTO.rtf
[root@heaven sgml]#
There are two files. The file that includes the "0" in the name is the converted file while the other file includes the table of contents.
These RTF files can also be read with StarOffice, included in RedHat Linux. The RTF file can be transformed into Hypertext Help.
We finish this section showing how this file is presented in "lyx" format:
[root@heaven sgml]# sgml2lyx Optical-Disk-HOWTO.sgml
Processing file Optical-Disk-HOWTO.sgml
[root@heaven sgml]# lyx Optical-Disk-HOWTO.lyx

In the conversion to "lyx" you can have some errors as in the previous case.
GNU also uses the hypertext format introduced in Chapter 7: "info". All the latest documentation is updated to this format. However, the manual pages in HTML are easier to read, can include figures, and are frequently used by the Linux community.
For our FTLinuxCourse we have chosen the HTML format, as it is easy, good and concise. We include also a Postscript version in the PDF format that you may read or print.
The PDF format was developed by Adobe Inc. In the last few years these files were read with the "xpdf" program . Some months ago Adobe Inc. did its own Linux port of the Acrobat Reader (acroread) for Linux, included in this course.
The Postscript files can be easily transformed to PDF with the program "ps2pdf" :
[root@heaven /root]# ps2pdf chap12.ps
[root@heaven /root]#
A wonderfull and updated news is the latest Adobe.com download: Adobe FrameMaker for Linux (beta). FTLinuxCourse includes it in the ExternalContribs dir. For normal people this news means nothing but for Linux enthusiast, this is a great news.
Adobe Systems Incorporated based in San Jose - CA (USA), is the most
important company that works on graphics on Mac, then MS Windows and now
also "our" Linux. FrameMaker is the most used program to write documentation,
manuals, books, memo and other text documentation.

The program was developed on OSF/Motif (R) libraries and includes all the necessary libraries. To run the program, simply execute the program from the command line.
bash# ./FM556_linux/bin/maker
Frame product licensing not configured; perhaps try demomaker.
starting maker ...
bash# maker: Using /root/FM556_linux/fminit
maker: For reporting bugs, refer to:
maker: FM_VERSION: xm 5.5.6b225
02-Dec-99 soft Linux
maker: Using DEBUG mode
maker: This Adobe Systems Incorporated Pre-release software
expires on 12/31/2000.
maker: Starting FrameMaker 5.5.6. Copyright (c) 1986-1998 Adobe
Systems Incorporated.
Warning: Cannot convert string "-adobe-helvetica-bold-r-normal--12-*-iso8859-1"
to type FontSet
Warning: Unable to load any useable fontset
Warning: Cannot convert string "-adobe-helvetica-bold-r-normal--12-*-iso8859-1"
to type FontList
Warning: Cannot convert string "-adobe-helvetica-bold-r-normal--12-*-iso8859-1:"
to type FontList
Before using FrameMaker for the first time, be sure to read
the online manual "Customizing FrameMaker Products" for information
on
configuring FrameMaker products for use with various window
managers.
maker: Finished loading
maker: FrameServer/LiveLinks not available because you are running
as root.
Adobe FrameMaker can be used to publish books, letters and other documents.

Something different from the "excellent" but rudimental TeX, at the beginning of this chapter.
From a Motif-like menu, we can choose the operation to apply:

After you open a document will apears the "classical" program with menu
pop-up.
![]() |
![]() |
| One of the better FrameMaker uses is the development
of software manuals or books. |
In Feb 1999, Adobe release its first program for Linux,
the well know, Acrobat Reader to read PDF documents. |

The next screen show the high-quality of the product to be used in the
daily working. The printing results looks with the same quality.

Check the Interactive Exam Cram BASE:
Internet Resources for this chapter.