[Tex/LaTex] What shell commands are executed by LyX View menus

build-systemcompilinglyx

For a variety of reasons, I'm using LyX as my primary LaTeX document creation tool, but I want to avoid doing things or relying on features of LyX that make it hard to use other tools as well. While I've been able to configure LyX to make it possible to move the generated TeX into any other editor (e.g., I can simply paste my TeX code into TeXShop, and it works) I'm unclear on what command lines are required to perform various build tasks.

Is there a way to find out what command lines correspond to the various LyX "View" menu commands? Are these listed somewhere? For example, what commands (pdflatex? biblatex? etc.; with what arguments?) does the View > View [PDF (pdflatex)] menu command execute?

Best Answer

I think these are the ones listed in Tools --> Preferences --> File Handling --> Converters (see screenshot at the bottom). There you can see the command line arguments used.

$$-variables

The $$<letter> variables refer to the following (from the LyX Customization manual, found under Help --> Customization, section 3.3):

  • $$s The LyX system directory
  • $$i The input file
  • $$o The output file
  • $$b The base filename of the input file (i.e., without the extension)
  • $$p The path to the input file
  • $$r The path to the original input file (this is different from $$p when a chain of converters is called)
  • $$e The iconv name for the encoding of the document.

Extra flag

Quoting the manual mentioned above:

In the Extra Flag field you can enter the following flags, separated by commas:

  • latex This converter runs some form of LaTeX. This will make LyX's LaTeX error logs available.
  • needaux Needs the LaTeX .aux file for the conversion.
  • xml Output is XML.

The following three flags are not really flags at all because they take an argument in the key = value format:

  • parselog If set, the converter's standard error will be redirected to a file infile.out, and the script given as argument will be run as:

    script < infile.out > infile.log.  The argument may contain `$$s`.
    
  • resultdir The name of the directory in which the converter will dump the generated files. LyX will not create this directory, and it does not copy anything into it, though it will copy this directory to the destination. The argument may contain $$b, which will be replaced by the base name of the input and output files, respectively, when the directory is copied. Note that resultdir and usetempdir make no sense together. The latter will be ignored if the former is given.
  • resultfile Determines the output file name and may, contain $$b. Sensible only with resultdir and optional even then; if not given, it defaults to index.

enter image description here