]> git.lyx.org Git - lyx.git/blobdiff - src/tex2lyx/tex2lyx.1in
Update tex2lyx tests for format 519.
[lyx.git] / src / tex2lyx / tex2lyx.1in
index 3e49003fc70045d8769e3fdafe306a525551c508..3f219622a4602647970234d73f6d803d18d5b2e8 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...]]
-\fIinputfile\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...]]
@@ -34,33 +38,41 @@ creates a file of textclass \*[lq]foo\*[rq] and reads the LyX layout file for th
 (something like /usr/local/share/lyx/layouts/foo.layout \s-1OR\s0
 \fB\s-1HOME\s0\fR/.lyx/layouts/foo.layout).  Use \fB\-c\fR to declare a different textclass
 (and read a different layout file).
+.IP ""
+This option is needed if the input file is a LaTeX fragment, with no preamble
+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 \-p
-.\" Partial file. The input files are LaTeX fragments, with no preamble matter or
-.\" \f(CW\ebegin{document}\fR commands. This option requires the \fB\-c\fR option, since there
-.\" are no \f(CW\edocumentclass\fR commands in the files \fBtex2lyx\fR is translating. When
-.\" using this option, you can translate more than one file, as long as all files
-.\" are the same class. The LyX file created by \fBtex2lyx\fR can be included in an
-.\" existing LyX file using the \*[lq]Include LyX File\*[rq] command from
-.\" LyX's Insert menu. (\fBNOTE\fR: this feature of the older \fBreLyX\fR script has
-.\" not yet been implemented in \fBtex2lyx\fR).
-.\" .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
@@ -74,11 +86,31 @@ chosen. Cf. the section \f(CWFILES\fR for details.
 Specify a user directory. Normally, you shouldn't need this. Your LyX user directory is
 chosen. Cf. the section \f(CWFILES\fR for details.
 .TP
+.BI \-roundtrip
+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
+.BI \-version
+Print out the version number and build information and quit.
 .SH "DESCRIPTION"
 .SS "Introduction"
-\fBtex2lyx\fR will create a LyX file \fIdir/foo.lyx\fR from the LaTeX file
+\fBtex2lyx\fR will create a LyX file with the specified name (or
+\fIdir/foo.lyx\fR if no name was given) from the LaTeX file
 \fIdir/foo.tex\fR.
 .PP
 Suffixes .tex, .ltx and .latex are supported. If \fIinputfile\fR
@@ -109,7 +141,7 @@ Run \fBtex2lyx\fR.
 you don't want any output at all, try (in csh) `tex2lyx foo.tex >& /dev/null'.
 You should \s-1NOT\s0 redirect standard output to \fIfoo.lyx\fR.
 .IP "\(bu" 4
-Run LyX (version 1.4 or later) on the resulting .lyx file.
+Run LyX (version 2.1 or later) on the resulting .lyx file.
 .IP ""
 In theory, most of the file will have been translated, and anything that's
 untranslatable will be transferred to TeX code (ERT in LyX-speak). In theory, LyX will be
@@ -195,8 +227,6 @@ should thus be conserved in printed documents, although it will not of
 course show up in the LyX window. Check Document->Settings->LaTeX Preamble to see the result.
 .SS "What tex2lyx Can't Handle --- But it's \s-1OK\s0"
 .IP "\(bu" 4
-tabular* tables
-.IP "\(bu" 4
 some spacing commands (\f(CW\ehspace\fR, \f(CW\epagebreak\fR and \f(CW\elinebreak\fR)
 .IP "\(bu" 4
 \f(CW\ecentering\fR, \f(CW\eraggedleft\fR, \f(CW\eraggedright\fR
@@ -239,12 +269,12 @@ The foil document class has a couple of bugs. \fBtex2lyx\fR may do weird things
 arguments to \f(CW\efoilhead\fR commands. Also, it may handle \f(CW\ebegin{dinglist}\fR
 incorrectly (although the stuff in the environment should translate normally).
 .PP
-All known bugs of \fBtex2lyx\fR can be found on \fI\s-1http://bugzilla.lyx.org\s0\fR.
+All known bugs of \fBtex2lyx\fR can be found on \fI\s-1http://www.lyx.org/trac/wiki/BugTrackerHome\s0\fR.
 .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://bugzilla.lyx.org\s0\fR---please report the issue as described in the section 
+\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
@@ -280,7 +310,7 @@ document. A user would do this if the noweb document had documentclass
 article.
 .SH "NOTES"
 .SS "Bug Reports"
-Bugs should be reported to the LyX bug tracker at http://bugzilla.lyx.org. Additionally,
+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 
@@ -400,10 +430,14 @@ is your personal LyX directory, then the following files are read by tex2lyx:
 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"