TeX 直播

TeX 直播

有什么区别

pdflatex -shell-escape myFile.tex

pdflatex --shell-escape myFile.tex

答案1

TeX 直播

TeX Live 基于Web2C,从其文档

3.1 选项约定

为了提供干净且一致的行为,我们选择让所有这些程序使用 GNU 函数getopt_long_only来解析命令行。但是,我们确实在受限模式下使用,其中所有选项都必须位于其余参数之前。因此,您可以:

  • 使用---来开始选项名称;

  • 使用任何明确的缩写作为选项名称;

  • =用一个或多个空格分隔选项名称和值;

  • 通过将文件名放在选项之后,可以使文件名看起来更像选项--

按照惯例,非选项参数(如果指定)通常定义输入文件的名称,如每个程序所记录的。

如果某个带有值的特定选项出现多次,则以最后一个值为准。

例如,以下命令行指定选项foobar和;为选项verbose提供值,为选项提供值;并指定文件名 。bazabcxyzquux-myfile-

-foo --bar -verb -abc=baz -quux karl --quux xyz -- -myfile-

微特克斯

MiKTeX--在 TeX 选项描述中使用了文档

--enable-write18

  完全启用\write18{command}构造。[...]

  • 单连字符形式也-有效。文档甚至包含单连字符形式的实例(除非是拼写错误):

    当被调用为 initex 时(或当-initialize给出选项时)

    但我没有找到官方的说法。

  • MiKTeX 在许多情况下使用不同的选项名称,但 TeX LaTeX 等效项大多有效(我尚未测试所有情况)。据我所知,这是一个未记录的功能。从 TeX Live 到 MiKTeX 名称的映射示例:

    • --shell-escape--enable-write18

    • --shell-restricted--restrict-write18

    • --no-shell-escape--disable-write18

答案2

如果我pdflatex -help在装有 TeX Live 的机器上运行,我会得到

Usage: pdftex [OPTION]... [TEXNAME[.tex]] [COMMANDS]
   or: pdftex [OPTION]... \FIRST-LINE
   or: pdftex [OPTION]... &FMT ARGS
  Run pdfTeX on TEXNAME, usually creating TEXNAME.pdf.
  Any remaining COMMANDS are processed as pdfTeX input, after TEXNAME is read.
  If the first line of TEXNAME is %&FMT, and FMT is an existing .fmt file,
  use it.  Else use `NAME.fmt', where NAME is the program invocation name,
  most commonly `pdftex'.

  Alternatively, if the first non-option argument begins with a backslash,
  interpret all non-option arguments as a line of pdfTeX input.

  Alternatively, if the first non-option argument begins with a &, the
  next word is taken as the FMT to read, overriding all else.  Any
  remaining arguments are processed as above.

  If no arguments or options are specified, prompt for input.

-draftmode              switch on draft mode (generates no output PDF)
-enc                    enable encTeX extensions such as \mubyte
-etex                   enable e-TeX extensions
[-no]-file-line-error   disable/enable file:line:error style messages
-fmt=FMTNAME            use FMTNAME instead of program name or a %& line
-halt-on-error          stop processing at the first error
-ini                    be pdfinitex, for dumping formats; this is implicitly
                          true if the program name is `pdfinitex'
-interaction=STRING     set interaction mode (STRING=batchmode/nonstopmode/
                          scrollmode/errorstopmode)
-ipc                    send DVI output to a socket as well as the usual
                          output file
-ipc-start              as -ipc, and also start the server at the other end
-jobname=STRING         set the job name to STRING
-kpathsea-debug=NUMBER  set path searching debugging flags according to
                          the bits of NUMBER
[-no]-mktex=FMT         disable/enable mktexFMT generation (FMT=tex/tfm/pk)
-mltex                  enable MLTeX extensions such as \charsubdef
-output-comment=STRING  use STRING for DVI file comment instead of date
                          (no effect for PDF)
-output-directory=DIR   use existing DIR as the directory to write files in
-output-format=FORMAT   use FORMAT for job output; FORMAT is `dvi' or `pdf'
[-no]-parse-first-line  disable/enable parsing of first line of input file
-progname=STRING        set program (and fmt) name to STRING
-recorder               enable filename recorder
[-no]-shell-escape      disable/enable \write18{SHELL COMMAND}
-shell-restricted       enable restricted \write18
-src-specials           insert source specials into the DVI file
-src-specials=WHERE     insert source specials in certain places of
                          the DVI file. WHERE is a comma-separated value
                          list: cr display hbox math par parend vbox
-synctex=NUMBER         generate SyncTeX data for previewers if nonzero
-translate-file=TCXNAME use the TCX file TCXNAME
-8bit                   make all characters printable by default
-help                   display this help and exit
-version                output version information and exit

Email bug reports to [email protected].

这表明选项可以用一个连字符开头;但为了符合 GNU 准则,两个连字符也是合法的。您会发现没有一个字母的选项,因此区分“短”选项和“长”选项并不重要。

选项可以缩写,只要它们没有歧义。所以

pdflatex -shell-e

相当于

pdflatex -shell-escape

相关内容