MacTeX -aux-directory = DIR (Deutsch)

Ich verwende Textmate und MacTeX (texLive 1.12). In MiKTeX (Windows) gibt es die Option, den Befehl zu verwenden -aux-directory=DIR und -output-directory=DIR. Der Ausgabeteil funktioniert in TeXLive, aber das PDF wird nicht automatisch geöffnet, und es befindet sich noch eine Aux-Datei in den Hauptordner und auch eine .fdb_latexmk -Datei.

Weiß jemand, ob es einen -aux-directory=DIR -Befehl für TeXLive gibt ?

Kommentare

  • Problemumgehung: Verwenden Sie -output-directory = AUX_DIR und richten Sie einen Soft / Hard-Link von AUX_DIR / out.pdf zu OUT_DIR / ein out.pdf. (ln [-s] AUX_DIR / out.pdf OUT_DIR / out.pdf) Jetzt haben Sie alle Hilfsdateien in AUX_DIR und die Ausgabedatei im erforderlichen Verzeichnis. Die automatische Aktualisierung des Viewers funktioniert immer dann, wenn die ursprüngliche PDF-Datei in AUX_DIR vorhanden ist aktualisiert.
  • @Sameer Ich habe nicht verstanden, dass " eine weiche / harte Verbindung von AUX_DIR / out.pdf zu OUT_DIR / out.pdf eingerichtet hat. (ln [ -s] AUX_DIR / out .pdf OUT_DIR / out.pdf). " Könnten Sie es bitte für einen Anfänger wie mich formulieren? Ich benutze TeX-Studio mit Texlive. Danke!
  • Es gab eine gute Erklärung, warum manchmal ein Aux-Verzeichnis sinnvoll ist, siehe hier: tex.stackexchange.com/a/445301/ 4736 . Kurz gesagt: PDF wird an den Server gesendet, Aux-Dateien bleiben lokal.
  • Verwandte tex.stackexchange.com/q/420573/35864

Antwort

Kurze Antwort: „nein“. Die Option -aux-directory ist MiKTeX-spezifisch, wie Sie beispielsweise an pdftex --help mit 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]. 

Beachten Sie, dass es -output-directory gibt, aber keine -aux-directory, was durch a überprüft werden kann Schnelltest (da das dokumentierte und das tatsächliche Verhalten unterschiedlich sein können!).

Kommentare

  • Weiß jemand, warum MacTeX so ist? Gibt es eine Aussicht auf eine Änderung?
  • @Tom Sie stellen die falsche Frage 🙂 TeX Live hatte noch nie eine -aux-directory -Einstellung, es ' ist etwas, das Christian Schenk für MiKTeX hinzugefügt hat. Eine ebenso gültige Frage lautet also ' Warum macht MiKTeX das? '!
  • warum sie machen das? Die Idee eines Ausgabeverzeichnisses ist allgemein genug, dass es eine Standardoption sein könnte und sollte.

Antwort

Etwas Nach dem Vorbild von Sameer funktioniert dies für mich mit TeXstudio.

Ändern Sie den Befehl pdflatex (gefunden in Preferences » Commands) auf folgende Weise:

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

Dadurch wird ein verstecktes Verzeichnis .temp erstellt (falls nicht) dort bereits), um die Hilfsdateien darin zu speichern, während die PDF-Ausgabe im selben Verzeichnis bleibt. Sie können das Obige nach Ihren Wünschen ändern und jede gewünschte Verzeichnisstruktur erhalten.

Kommentare

  • Ich habe dies versucht, aber es funktioniert nicht ' funktioniert nicht – sagt Could not start Build & View:PdfLaTeX:...

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.