]> git.lyx.org Git - lyx.git/blobdiff - src/tex2lyx/tex2lyx.1in
Small update of TODO
[lyx.git] / src / tex2lyx / tex2lyx.1in
index 1ac5161efbf086090a1156fa385394eb2ffac121..358a51fd2f02310a9091d3c9ccd61295b456959d 100644 (file)
@@ -20,8 +20,12 @@ call it from the command line only if you need to use more complicated
 options.
 .PP
 \fBtex2lyx\fR [ \fB\-userdir\fR \fIuserdir\fR ] [ \fB\-systemdir\fR \fIsystemdir\fR ]
-[ \fB\-n\fR ] [ \fB\-c\fR \fItextclass\fR ] [\ \fB\-s\fR\ \fIsfile1\fR[,\fIsfile2\fR...]] [
-\fB\-roundtrip\fR ] \fIinputfile\fR [ \fIoutputfile\fR ]
+[ \fB\-f\fR ] [ \fB\-n\fR ] [ \fB\-c\fR \fItextclass\fR ]
+[ \fB\-e\fR \fIencoding\fR ]
+[ \fB\-fixedenc\fR \fIencoding\fR ]
+[\ \fB\-m\fR \fImodule1\fR[,\fImodule2\fR...]]
+[\ \fB\-s\fR\ \fIsfile1\fR[,\fIsfile2\fR...]] [ \fB\-skipchildren\fR ] [
+\fB\-roundtrip\fR ] [ \fB\-copyfiles\fR ] \fIinputfile\fR [ \fIoutputfile\fR ]
 .\" .PP
 .\" \fBtex2lyx\fR [ \fB\-userdir\fR \fIuserdir\fR ] [ \fB\-systemdir\fR \fIsystemdir\fR ]
 .\" [\ \fB\-r\fR\ \fIrenv1\fR[,\fIrenv2\fR...]] [\ \fB\-s\fR\ \fIsfile1\fR[,\fIsfile2\fR...]]
@@ -40,22 +44,35 @@ matter or \f(CW\ebegin{document}\fR command. LyX files created by
 \fBtex2lyx\fR from partial files can be included in an existing LyX file using
 the \*[lq]Include LyX File\*[rq] command from LyX's Insert menu.
 .TP
+.BI \-m
+Module. Load the given modules. This is useful if \fBtex2lyx\fR does not
+automatically detect a given module, but you know the modules that provide
+some commands or environments that are used in the imported file. The modules
+are loaded in the given order. If a module \fIfoo\fR depends on a module
+\fIbar\fR, \fIbar\fR must be given before \fIfoo\fR.
+.TP
 .BI \-f
 Force. \fBtex2lyx\fR will not run if the .lyx file it would generate already exists.
 Use the \fB\-f\fR option (carefully) to clobber any existing files.
 .TP
+.BI \-e
+Specify the default encoding using the LaTeX name as defined in the encodings
+file.  \fBtex2lyx\fR will use this encoding, but switch if it finds any encoding
+changing commands in the input.
+.TP
+.BI \-fixedenc
+Specify the encoding using the LaTeX name as defined in the encodings file.
+\fBtex2lyx\fR will ignore any encoding changing commands in the input.
+.TP
 .BI \-n
 Noweb. Translate a noweb (aka literate programming) file. This should be
 (almost?) equivalent to running \*[lq]noweb2lyx foo.tex foo.lyx\*[rq]. This option
 requires the \fB\-c\fR option.
-.\" .TP
-.\" .BI \-r
-.\" Regular environments (see the section on \fISyntax Files\fR).  If you give more than one
-.\" environment, separate them with commas (not spaces). You'll probably need to
-.\" quote the environment list, especially if it has asterisk environments (foo*)
-.\" in it. If you use this command often, considering creating a personal syntax
-.\" file. (\fBNOTE\fR: this feature of the older \fBreLyX\fR script has
-.\" not yet been implemented in \fBtex2lyx\fR).
+.TP
+.BI \-skipchildren
+Do not translate child documents included via \f(CW\einclude\fR and \f(CW\einput\fR.
+This option is useful if the child documents are generated files and/or contain many
+commands that \fBtex2lyx\fR does not understand yet.
 .TP
 .BI \-s
 Syntax files. Input (one or more quoted, comma-separated) syntax files to read
@@ -70,12 +87,21 @@ Specify a user directory. Normally, you shouldn't need this. Your LyX user direc
 chosen. Cf. the section \f(CWFILES\fR for details.
 .TP
 .BI \-roundtrip
-Call LyX to re-export the created output file to LaTeX. The output file name
-is always determined automatically to avoid over-writing the input file by
-accident: If the input file is named \fIfoo.tex\fR the output file will be
+Call LyX to re-export the created output file to LaTeX. If the output file name
+is not given it is determined automatically to avoid over-writing the input file
+by accident: If the input file is named \fIfoo.tex\fR the output file will be
 named \fIfoo.lyx.lyx\fR, and the re-exported file will be named
 \fIfoo.lyx.tex\fR.
 .TP
+.BI \-copyfiles
+Copy all included files \fBtex2lyx\fR is
+aware of to the output directory if the output file is located in a different
+directory than the input file. This is useful if you want to ensure that no
+included file is overwritten (either in roundtrip mode or by a later export
+from LyX). Please note that the resulting document may be uncompilable. This
+happens if it needs files that \fBtex2lyx\fR does not know about and therefore
+does not copy to the output directory.
+.TP
 .BI \-help
 Help. Print out usage information and quit.
 .TP
@@ -222,8 +248,8 @@ Since \fBtex2lyx\fR is relatively new, it's got a number of problems.  As it
 matures, these bugs will be squished.
 .IP "\(bu" 4
 \*[lq]Exact\*[rq] copying of unknown environments and commands isn't quite exact.
-This will yield ugly LyX, but in almost all cases the output will be the same. 
-However, most parts of the file will be copied perfectly, including whitespace 
+This will yield ugly LyX, but in almost all cases the output will be the same.
+However, most parts of the file will be copied perfectly, including whitespace
 and comments. This includes: the LaTeX preamble, verbatim environments as well as
 \f(CW\everb\fR commands, and skip blocks.
 .IP "\(bu" 4
@@ -234,9 +260,9 @@ More importantly, \fBtex2lyx\fR doesn't translate \f(CW\enewcommands\fR, unknown
 \f(CW\eusepackage\fR commands and other unknown code in the preamble. It
 simply copies that into the LaTeX preamble. If you use special commands, e.g. to
 specify the text layout in a way that that is not understood by LyX, tex2lyx won't
-recognize it. Note that these settings will be overwritten if you modify the text 
-layout in LyX's document settings. Better remove these special options from the LaTeX 
-preamble (Document->Settings->LaTeX Preamble) and use the corresponding LyX document 
+recognize it. Note that these settings will be overwritten if you modify the text
+layout in LyX's document settings. Better remove these special options from the LaTeX
+preamble (Document->Settings->LaTeX Preamble) and use the corresponding LyX document
 settings, if possible.
 .IP "\(bu" 4
 The foil document class has a couple of bugs. \fBtex2lyx\fR may do weird things with optional
@@ -247,8 +273,8 @@ All known bugs of \fBtex2lyx\fR can be found on \fI\s-1http://www.lyx.org/trac/w
 .PP
 \fBtex2lyx\fR is rather robust. As mentioned above, it may not translate
 your file perfectly, but the result should be usable and it shouldn't crash. If you encounter
-problems---and the problem is not one of those mentioned above or on 
-\fI\s-1http://www.lyx.org/trac/wiki/BugTrackerHome\s0\fR---please report the issue as described in the section 
+problems---and the problem is not one of those mentioned above or on
+\fI\s-1http://www.lyx.org/trac/wiki/BugTrackerHome\s0\fR---please report the issue as described in the section
 on \fIBug Reports\fR.
 .SS "What LyX Can't Handle"
 LyX itself is missing a couple of features, such that even if \fBtex2lyx\fR translates
@@ -264,10 +290,10 @@ environment.
 LyX support for tables isn't perfect. For complicated tables, use a \*[lq]skip\*[rq]
 block, so that they will be copied in TeX mode.
 .IP "\(bu" 4
-LyX allows figures to have sizes in the units known to TeX, such as in, cm, etc. It also 
-translates percentages of \etextwidth, \etextheight, \ecolumnwidth, but no other lengths 
-(e.g. if you wanted to scale a figure to size \etopmargin for some reason). \fBtex2lyx\fR 
-will copy figures with untranslatable sizes in TeX mode. Again, you might be able to fix 
+LyX allows figures to have sizes in the units known to TeX, such as in, cm, etc. It also
+translates percentages of \etextwidth, \etextheight, \ecolumnwidth, but no other lengths
+(e.g. if you wanted to scale a figure to size \etopmargin for some reason). \fBtex2lyx\fR
+will copy figures with untranslatable sizes in TeX mode. Again, you might be able to fix
 that within LyX.
 .SH "EXAMPLES"
 tex2lyx \fB\-f\fR \fB\-r\fR \*[lq]myenv\*[rq] foo.tex
@@ -286,10 +312,10 @@ article.
 .SS "Bug Reports"
 Bugs should be reported to the LyX bug tracker at http://www.lyx.org/trac/wiki/BugTrackerHome. Additionally,
 you can post a message to the LyX developers' mailing list. Its address is currently
-lyx-devel@lists.lyx.org. If your message bounces, you can check the LyX home page, 
-http://www.lyx.org/. If you are running \fBtex2lyx\fR on a huge file, please do not send all of the output in 
-your bug report. Just include the last ten or twenty lines of output, along with 
-the piece of the LaTeX file it crashed on.  Or, even better, attach a small but 
+lyx-devel@lists.lyx.org. If your message bounces, you can check the LyX home page,
+http://www.lyx.org/. If you are running \fBtex2lyx\fR on a huge file, please do not send all of the output in
+your bug report. Just include the last ten or twenty lines of output, along with
+the piece of the LaTeX file it crashed on.  Or, even better, attach a small but
 complete file which causes the same problem as your original file.
 .SS "Layout Files"
 \fBtex2lyx\fR reads a LyX layout file to know how to handle LaTeX environments and
@@ -398,16 +424,20 @@ The user directory is, in order of precedence:
 .SH "FILES"
 .PP
 If \fI\s-1LIBDIR\s0\fR is the system-wide LyX directory and
-\fI\s-1MY_LYXDIR\s0\fR 
+\fI\s-1MY_LYXDIR\s0\fR
 is your personal LyX directory, then the following files are read by tex2lyx:
 .IP "\fI\s-1MY_LYXDIR\s0\fR/layouts/*.layout" 4
 User's personal layout files for document classes
 .IP "\fI\s-1MY_LYXDIR\s0\fR/syntax.default" 4
 User's personal syntax file
+.IP "\fI\s-1MY_LYXDIR\s0\fR/encodings" 4
+User's personal encoding definition file
 .IP "\fI\s-1LIBDIR\s0\fR/layouts/*.layout" 4
 System-wide layout files for document classes
 .IP "\fI\s-1LIBDIR\s0\fR/lib/syntax.default" 4
 System-wide LaTeX syntax file
+.IP "\fI\s-1LIBDIR\s0\fR/lib/encodings" 4
+System-wide encoding definition file
 .SH "SEE ALSO"
 \fIlyx@version_suffix@\fR\|(1), \fIlatex\fR\|(1)
 .SH "AUTHORS"