I don't want the .aux, .log and .synctex.gz files when using pdflatex

后端 未结 10 808
庸人自扰
庸人自扰 2020-12-23 16:58

I just want to have a .tex file which I compile with pdflatex and end up with a .pdf file. I don\'t want all the other .aux

相关标签:
10条回答
  • 2020-12-23 17:00

    I always build my PDF files like this:

    pdflatex -aux-directory=/some/temp/dir <additional options>
    

    That way, I don't have too see all the additional files. Those files should not be removed, as they are important for cross referencing, bibliographies, table of contents etc. To run pdflatex several times and then remove the files takes too much time.

    The -aux-directory unfortunately does not exist in the linux version of pdflatex. Tested on Ubuntu Lucid.

    0 讨论(0)
  • 2020-12-23 17:03

    For MikTeX:

    texify -cp  file.tex
    

    It will run pdflatex as many times as necessairy and clean temp files afterwards. Very useful.

    0 讨论(0)
  • 2020-12-23 17:03

    How are you creating/editing your LaTex document? If you are using Sublime Text 2, you can edit the project file to suppress opening the file types of your choosing. They will still be created upon compile but won't be loaded into your project, keeping them invisible.

    0 讨论(0)
  • 2020-12-23 17:06

    latexmk -c will remove the unnecessary files. latexmk is a great way to manage the compile too!

    0 讨论(0)
  • 2020-12-23 17:15

    A well crafted wrapper script seems to be the best answer. Something along these lines, which I've tested on Ubuntu using texlive-latex (pdftex 1.40.10) :

    #!/bin/bash
    TMPDIR=$(mktemp -d)
    trap "rm -fr $TMPDIR; exit 255;" SIGINT SIGTERM SIGKILL
    
    /usr/bin/latex -interaction=batchmode -output-directory=$TMPDIR $1
    cp $TMPDIR/$1.dvi .
    rm -fr $TMPDIR
    
    0 讨论(0)
  • 2020-12-23 17:18

    If anyone using TeXnicCenter has the same desire to only get a *.pdf file for the given *.tex file (no *.aux, *.bbl, *.blg and *.log files), here is a quick solution: Choose from the menu: Build | Define Output Profiles, copy the "LaTeX => PDF" profile to a new profile "LaTeX => PDF ONLY", then on the Postprocessor tab create four new postprocessors:

    Name: delete *.XXX

    Executable: "C:\WINDOWS\system32\cmd.exe"

    Arguments: /C del "%bm.XXX"

    Replace XXX with aux, bbl, blg, log, respectively.

    0 讨论(0)
提交回复
热议问题