MacTeX -aux-directory = DIR (Español)

Estoy usando Textmate y MacTeX (texLive 1.12). Existe la opción en MiKTeX (Windows) para usar el comando -aux-directory=DIR y -output-directory=DIR. La parte de salida funciona en TeXLive, pero el PDF no se abre automáticamente y todavía hay un archivo auxiliar en la carpeta principal, y también un archivo .fdb_latexmk.

¿Alguien sabe si hay un comando -aux-directory=DIR para TeXLive ?

Comentarios

  • Solución alternativa: Utilice -output-directory = AUX_DIR y configure un enlace suave / duro desde AUX_DIR / out.pdf a OUT_DIR / out.pdf. (ln [-s] AUX_DIR / out.pdf OUT_DIR / out.pdf) Ahora tiene todos los archivos auxiliares en AUX_DIR y el archivo de salida en el directorio requerido. La actualización automática del visor funciona siempre que el archivo pdf original en AUX_DIR está actualizado.
  • @Sameer No entendí " configuró un enlace suave / duro desde AUX_DIR / out.pdf a OUT_DIR / out.pdf. (en [ -s] AUX_DIR / salida .pdf OUT_DIR / out.pdf). " ¿Podría deletrearlo para un principiante como yo? Estoy usando TeX-Studio con Texlive. ¡Gracias!
  • Ha habido una buena explicación, por qué a veces un directorio auxiliar tiene sentido, vea aquí: tex.stackexchange.com/a/445301/ 4736 . En resumen: PDF va al servidor, los archivos auxiliares permanecen locales.
  • Relacionados tex.stackexchange.com/q/420573/35864

Respuesta

Respuesta corta: «no». La opción -aux-directory es específica de MiKTeX, como puede ver al hacer, por ejemplo, pdftex --help con 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]. 

Observe que hay -output-directory pero no -aux-directory, algo que puede ser verificado por un prueba rápida (¡ya que el comportamiento documentado y el real pueden ser diferentes!).

Comentarios

  • ¿Alguien sabe por qué MacTeX es así? ¿Existe alguna posibilidad de cambio?
  • @Tom Está haciendo la pregunta incorrecta 🙂 TeX Live nunca ha tenido una configuración -aux-directory, es ' s algo que Christian Schenk agregó para MiKTeX. Entonces, una pregunta igualmente válida es ' ¿Por qué MiKTeX hace esto? '!
  • ¿Por qué ellos hacen esto? la idea de un directorio de salida es lo suficientemente general como para que pueda y deba ser una opción estándar

Respuesta

Algo en la línea de lo que comentó Sameer, esto es lo que me funciona usando TeXstudio.

Modifique el comando pdflatex (que se encuentra en Preferences » Commands) de la siguiente manera:

sh -c "mkdir -p .temp & pdflatex -synctex=1 -interaction=nonstopmode -output-directory=.temp %.tex && cp .temp/%.pdf %.pdf" 

Esto creará un directorio oculto .temp (si no ya existe) para almacenar los archivos auxiliares en él, mientras se mantiene la salida en pdf en el mismo directorio. Puede modificar lo anterior a su gusto y obtener la estructura de directorio que desee.

Comentarios

  • Intenté esto pero no ' t funciona – dice Could not start Build & View:PdfLaTeX:...

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *