3 # gendocs.sh --email bug-texinfo@gnu.org -o <output-file-name> <tex-file-name> "GNU Texinfo manual"
4 # gendocs --texi2html -o texinfo texinfo "GNU Texinfo manual"
5 # info, text, html, dvi, pdf,
29 tex & docbook are src doc file, they are used to generate other docs.
30 generally, txt/tex/dvi/pdf/html is used for GNU standard doc, and man/info
31 are the standard cmd helper file.
32 md file is nearly equal to txt file, but it append light weight punct
33 signature, to seperate doc in text, and to display good appearence in html.
35 for a srcpkg, there are different kinds of doc:
43 man & info is the default helper file for cmd. it generated by tex file.
44 dvi/ps/pdf/html are usually used for manual doc. but some srcpkg uses md or
45 rst file, it can be viewed directly, and also can be generated to html file for
47 apidoc is generated by src code, normally, we uses doxygen.
48 online src is generated by src code, normally, we uses pmccabe and others.
49 gendocs.sh in gnutils/aux generate html website pages.
60 * texi2html in split charpter
62 : ${SETLANG="env LANG= LC_MESSAGES= LC_ALL= LANGUAGE="}
63 : ${MAKEINFO="makeinfo"}
64 : ${TEXI2DVI="texi2dvi"}
65 : ${DOCBOOK2HTML="docbook2html"}
66 : ${DOCBOOK2PDF="docbook2pdf"}
67 : ${DOCBOOK2TXT="docbook2txt"}
68 : ${GENDOCS_TEMPLATE_DIR="."}
70 : ${TEXI2HTML="texi2html"}
76 cmd="$SETLANG $MAKEINFO -o $PACKAGE.info $commonarg $infoarg \"$srcfile\""
77 echo "Generating info... ($cmd)"
78 rm -f $PACKAGE.info* # get rid of any strays
85 cmd="$SETLANG $TEXI2DVI $dirargs $texarg \"$srcfile\""
86 printf "\nGenerating dvi... ($cmd)\n"
92 cmd="$SETLANG $TEXI2DVI --pdf $dirargs $texarg \"$srcfile\""
93 printf "\nGenerating pdf... ($cmd)\n"
99 opt="-o $PACKAGE.txt --no-split --no-headers $commonarg"
100 cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
101 printf "\nGenerating ascii... ($cmd)\n"
108 opt="--split=$1 --node-files $commonarg $htmlarg"
109 cmd="$SETLANG $TEXI2HTML --output $PACKAGE.html $opt \"$srcfile\""
110 printf "\nGenerating html by $1... ($cmd)\n"
113 # texi2html by makeinfo
114 opt="--no-split --html -o $PACKAGE.html $commonarg $htmlarg"
115 cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
116 printf "\nGenerating monolithic html... ($cmd)\n"
117 rm -rf $PACKAGE.html # in case a directory is left over
121 ## texi2html in split charpter
122 ------------------------------
125 opt="--html -o $PACKAGE.html $split_arg $commonarg $htmlarg"
126 cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
127 printf "\nGenerating html by $split... ($cmd)\n"
131 opt="--output $PACKAGE.html $commonarg $htmlarg"
132 cmd="$SETLANG $TEXI2HTML $opt \"$srcfile\""
133 printf "\nGenerating monolithic html with texi2html... ($cmd)\n"
134 rm -rf $PACKAGE.html # in case a directory is left over
160 opt="-o - --docbook $commonarg"
161 cmd="$SETLANG $MAKEINFO $opt \"$srcfile\" >${srcdir}/$PACKAGE-db.xml"
162 printf "\nGenerating docbook XML... ($cmd)\n"
169 opt="$commonarg -o $split_html_db_dir"
170 cmd="$DOCBOOK2HTML $opt \"${outdir}/$PACKAGE-db.xml\""
171 printf "\nGenerating docbook HTML... ($cmd)\n"
178 cmd="$DOCBOOK2TXT \"${outdir}/$PACKAGE-db.xml\""
179 printf "\nGenerating docbook ASCII... ($cmd)\n"
186 cmd="$DOCBOOK2PDF \"${outdir}/$PACKAGE-db.xml\""
187 printf "\nGenerating docbook PDF... ($cmd)\n"
264 + md ==> html£¬discount
267 + html ==> chm£¬htmldoc/chmcmd/htmldoc2chm
268 + html ==> pdf£¬wkhtmltopdf/htmldoc
269 + man ==> html£¬man2www
270 man -t --html=/usr/bin/firefox diff
271 firefox /tmp/hmanLSa2jh/diff.html
272 + info ==> html£¬info2www
276 pdflatex example1.tex
277 »òtex ==> dvi ==> pdf
279 man ¨Ct diff |ps2pdf ¨C diff_man.pdf
281 dvipdfm[x] example1.dvi # =>£» °Ñexample1.dvi תΪexample1.pdf
283 ps2pdf example1.ps =>£» ÓÃexample1.ps Éú³Éexample1.pdf
286 + tex ==> dvi£¬texi2dvi/texi2any
287 latex example1.tex # ==> example1.dvi
292 + tex ==> html£¬texi2html/texi2any
301 dvips -ppdf example1.dvi # =>£» Éú³Éexample1.ps
305 man ¨Ct diff |col ¨Cb > diff_man.txt
307 man ¨Ct diff |ps2pdf ¨C diff_man.pdf
309 man -t --html=/usr/bin/firefox diff
310 firefox /tmp/hmanLSa2jh/diff.html
315 1¡¢ÈçºÎÓÃCtex»òÕßLatexÊä³öPDF¸ñʽµÄÎļþ ¿ÉÒԵģ¬³ýÁËÊä³öPDF¸ñʽ»¹Ö§³ÖÉú³ÉpsÎļþ
319 documentclass{report}
321 This is my first {atex} typesetting example.
322 this is my first atex{} typesetting example.
323 this is my first atex typesetting example.
324 i am mr. edward g.j. lee, g.j. is a abbreviation of my name.
325 i am mr. edward g.j. lee, g.j. is a abbreviation of my name.
326 please see appendix a. we will be there soon.
327 please see appendix a
328 ull. we will be there soon.
331 ±ÈÈçÒÔÉÏÕâ¸ötexÎĵµ£¬¿ÉÒÔÕâÑù±àÒëÉú³Épdf:
335 pdflatex example1.tex
337 2.ÓÃdviÎļþÉú³ÉÉú³Épdf
339 latex example1.tex =>£» Éú³Éexample1.dvi
340 dvipdf example1.dvi =>£» °Ñexample1.dvi תΪexample1.pdf
344 latex example1.tex =>£» Éú³Éexample1.dvi
345 dvips -ppdf example1.dvi =>£» Éú³Éexample1.ps
346 ps2pdf example1.ps =>£» ÓÃexample1.ps Éú³Éexample1.pdf