[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: texi2dvi: -O/--output-format
From: |
Akim Demaille |
Subject: |
FYI: texi2dvi: -O/--output-format |
Date: |
Wed, 15 Apr 2009 15:40:53 +0200 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.95 (gnu/linux) |
Index: ChangeLog
from Akim Demaille <address@hidden>
* bin/texi2dvi (out_lang_set): New.
Use it.
(usage): Document --html, --info, --text, --ps, DVIPS and DVIPDF.
(run_tex_suite): Honor DVIPS.
(main): Support -O/--output-format.
Undocumented for now.
Index: util/texi2dvi
===================================================================
RCS file: /cvsroot/texinfo/texinfo/util/texi2dvi,v
retrieving revision 1.141
diff -u -u -r1.141 texi2dvi
--- util/texi2dvi 15 Apr 2009 13:32:55 -0000 1.141
+++ util/texi2dvi 15 Apr 2009 13:40:03 -0000
@@ -315,13 +315,10 @@
TeX tuning:
-@ use @input instead of \input for preloaded Texinfo
- --dvi output a DVI file [default]
- --dvipdf output a PDF file via DVI (using dvipdf)
-e, -E, --expand force macro expansion using makeinfo
-I DIR search DIR for Texinfo files
-l, --language=LANG specify LANG for FILE, either latex or texinfo
--no-line-error do not pass --file-line-error to TeX
- -p, --pdf use pdftex or pdflatex for processing
-r, --recode call recode before TeX to translate input
--recode-from=ENC recode from ENC to the @documentencoding
--src-specials pass --src-specials to TeX
@@ -329,6 +326,14 @@
or --texinfo=CMD multiple values accumulate
--translate-file=FILE use given charset translation file for TeX
+Output format:
+ --dvi output a DVI file [default]
+ --dvipdf output a PDF file via DVI (using dvipdf)
+ --info output an Info file. Use HeVeA for LaTeX files
+ -p, --pdf use pdftex or pdflatex for processing
+ --ps output a PDF file via DVI (using dvips)
+ --text output a plain text file. Use HeVeA for LaTeX files
+
Build modes:
--build=MODE specify the treatment of auxiliary files [$build_mode]
--tidy same as --build=tidy
@@ -370,10 +375,10 @@
using \\graphicspath): in that case use -I to specify the additional
directories to consider.
-The values of the BIBTEX, LATEX (or PDFLATEX), MAKEINDEX, MAKEINFO, TEX
-(or PDFTEX or DVIPDF), TEXINDEX, and THUMBPDF environment variables are
-used to run those commands, if they are set. Any CMD strings are added
-after @setfilename for Texinfo input, in the first line for LaTeX input.
+The values of the BIBTEX, DVIPDF, DVIPS, LATEX, MAKEINDEX, MAKEINFO,
+PDFLATEX, PDFTEX, TEX, TEXINDEX, and THUMBPDF environment variables are used
+to run those commands, if they are set. Any CMD strings are added after
address@hidden for Texinfo input, in the first line for LaTeX input.
Report bugs to address@hidden,
general questions and discussion to address@hidden
@@ -520,6 +525,18 @@
## Language auxiliary functions. ##
## ------------------------------ ##
+
+# out_lang_set LANG
+# -----------------
+out_lang_set ()
+{
+ case $1 in
+ dvi|dvipdf|html|info|pdf|ps|text) out_lang=$1;;
+ *) error 1 "invalid output format: $1";;
+ esac
+}
+
+
# out_lang_tex
# ------------
# Return the tex output language (DVI or PDF) for $OUT_LANG.
@@ -953,7 +970,7 @@
# Other special (non-active) characters could be supported by
# resetting their catcodes to other on the command line and changing
# texinfo.tex to initialize everything to plain catcodes. Maybe someday.
-
+
# append the \input command.
cmd="$cmd '${escape}input'"
@@ -1143,7 +1160,8 @@
move_to_dest "$in_noext.`out_lang_ext`"
;;
ps)
- dvips -o "$in_noext.`out_lang_ext`" "$in_noext.`out_lang_tex`"
+ : {DVIPS=dvips}
+ $DVIPS -o "$in_noext.`out_lang_ext`" "$in_noext.`out_lang_tex`"
move_to_dest "$in_noext.`out_lang_ext`"
;;
esac
@@ -1547,13 +1565,9 @@
--build-dir) shift; build_dir=$1; build_mode=tidy;;
-c | --clean) build_mode=clean;;
-D | --debug) debug=true;;
- --dvi) out_lang=dvi;;
- --dvipdf) out_lang=dvipdf;;
-e | -E | --expand) expand=t;;
-h | --help) usage;;
- --html) out_lang=html;;
-I) shift; list_concat_dirs includes "$1";;
- --info) out_lang=info;;
-l | --lang | --language) shift; set_language=$1;;
--mostly-clean) action=mostly-clean;;
--no-line-error) no_line_error=true;;
@@ -1561,15 +1575,19 @@
shift
# Make it absolute, just in case we also have --clean, or whatever.
oname=`absolute "$1"`;;
- -p | --pdf) out_lang=pdf;;
- --ps) out_lang=ps;;
+
+ # Output formats.
+ -O|--output-format) shift; out_lang_set "$1";;
+ --dvi|--dvipdf|--html|--info|--pdf|--ps|--text)
+ out_lang_set `echo "x$1" | sed 's/^x--//'`;;
+
+ -p) out_lang_set pdf;;
-q | -s | --quiet | --silent) quiet=true; batch=true;;
-r | --recode) recode=true;;
--recode-from) shift; recode=true; recode_from="$1";;
--src-specials) src_specials=--src-specials;;
-t | --texinfo | --command ) shift; textra="$textra\\
"`echo "$1" | sed 's/\\\\/\\\\\\\\/g'`;;
- --text) out_lang=text;;
--translate-file ) shift; translate_file="$1";;
--tidy) build_mode=tidy;;
-v | --vers*) version;;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: texi2dvi: -O/--output-format,
Akim Demaille <=