When I compile a tex document, the compilation process usually leaves some temporary files, like .aux and .log.  I have got a small document that can be compiled in just one single run - can I tell the compiler to remove all the remnant temporary files?
37407
If I create just a basic hello.tex file an compile it using   pdflatex hello.tex   The pdflatex program is creating a plethora of file which is a little annoying. Currently it writes all those files about which I really don't care:  hello.aux, hello.log, hello.nav, hello.out, hello.snm, hello.toc   Is there a way to tell pdflatex to only write hello.pdf if the build is successful ? If not, can I specify the output directory of those files ? Maybe I could just write them in /tmp.
123746
I have a problem compiling the following document.  First, I have a file macros.sty that consists of :  \newcommand{\test}{ \xymatrix@R=0mm{x} }   Then, I have an auxiliary file out.aux that consists of :  \test   Finally, the main file is :  \documentclass{article} \usepackage[all]{xy} \usepackage{macros} \begin{document} \input{out.aux} \end{document}   The error message is :  ./out.aux:1: Undefined control sequence. \xymatrix@R -&gt;\Addop@@                     \xymatrixrowsep@ \dimen@ii    Note that if you remove the R=0mm, the problem no longer holds.  Is that a bug ?  It is very strange because I remember to have already used a command similar to \test in an input file without any problem.  Does it come from my distribution ?  Thank you :)
36525
I am a programmer and as part of a website I need to be able to take LaTeX source files and compile them, then return the pdf to the user. This seems dangerous since a malicious user could e.g. read and write files on server this way. Is it possible to 'clean' a LaTeX file so it's safe to compile or is it too complicated?
32082
Is there a variant of cat that outputs syntax-highlighted lines of code when used on a source file?  An idea: maybe vi[m] or another editor can be asked to dump the syntax-highlighted contents of said files to stdout and exit immediately?
37191
Why is it recommended to split a large document into several parts and include them with \include? Is it only a relic of the past times when computers and LaTeX compilers were slower, or is it still up-to-date? What are the pros and cons of this practice, also in terms of interaction with other external tools (version control, find/replace, et cetera)?  Motivation: I've found a recent discussion that mentions this practice ( , ), as well as a comment that criticizes it in an answer to . A couple of months ago, I asked the same question in a comment to , but it's probably better to ask this here again as a "real question".
73988
Everybody knows :-) that in Windows plain text files lines are terminated with CR+LF, and in Unix&amp;Linux - with LF only. How can I quickly convert all my source code files from one format to another and back?
64834
I see that there a number of questions (, , , , ) on best practices, none of them answer the issue I am going to talk about.  We all need to prepare large documents (or slides) from time-to-time. And once you have reached a certain number of pages, you find that compiling the whole document takes a substantial time, which you need to do to check that the part you have written is error free, specially if it contains a number of images.   To circumvent the situation, I have used the following practices over years to keep compile time at minimum.   Divide the document in to many chapters: The chapters are put in separate files. Only the one I am working one is uncommented.  \documentclass{book}  \begin{document}  %\input {chapterone.tex} \input {chaptertwo.tex} %\input {chapterthree.tex} %\input {chapterfour.tex}  \end{document}    The above technique can also be used for \include.   Keep a preamble replica of the main file in a temporary file (build file): I use this technique when I am preparing a presentation with many slides, say a hundred. Prepare a main file, copy it to another build file. Delete everything between  \begin{document} and \end{document} in the build file. Prepare a slide (or a group of slides) in the build file. Cut and paste the contents between \begin{document} and \end{document} in the build file to relevant location in the main file only when satisfied with the output (image locations, overfull boxes etc.)     We can hear your inputs about the best practices you practice when a you are preparing a document or presentation from scratch.    Now, I have failed to find a good answer in the case when you have finished the whole document or presentation and now you need tweaking the small things, may be edit a text here, add an image there. What will be your best practice?  Perhaps, again keeping only one chapter uncommented will be usable here. But what about large presentations? May be adding a \end{document} just after the point-of-change will be beneficial, but only if you can put that before midpoint of the file.  Commenting a part of the file will also work, but that is error-prone, at least for me.
26967
I am editing my PhD thesis using Emacs &amp; Auctex, but my elisp is quite weak. Additionally, I build my thesis in a subdirectory, using makefiles generated by CMake and the UseLATEX CMake package, which I highly recommend.  I can’t figure out how to tell auctex that when I build the document it should do something like: make -C build/digital and that the pdf file being output is going to be at build/digital/thesis.pdf even though the source is at ./thesis.tex  p.s. I HIGHLY recommend checking out UseLATEX, the CMake package for easily compiling LaTeX documents.
38393
When compiling with pdflatex we need the *.aux files in a separate folder.
80475
I would like to include part of the contents of a .tex file into a different .tex file. I don't have the option of modifying the file to include. The file to include may change so simply copying and pasting the part I need is not ideal.  Essentially, I'm wondering if there is something that would work like  \input[start-end]{file.tex}   where start and end are the first and last lines to include from the file?
39074
Are there some limitations regarding the pdflatex command with respect to the count of pages of the input files?  My highest page count, when compiling, was 90 without any troubles. (2008)  Currently another document will be prepared which will be approx. 170 pages in sum.  EDIT: Thanks to all answers. They were helpful.
83431
Is there a way to directly compile TeX code into the SVG image format (rather than going the detour over TeX => PDF => SVG)?  I found this question:   But I don't want to do it online - it should be a command-line call.
5463
I have observed that in gedit if I edit a file, another file is created in the same directory (the one with the same filename and a tilde '~' suffix). The extra file remains even if I close gedit.  I understand the need for a temp file (eg. in case of a crash), but vim for example deletes the extra file it creates, when I close it.  Is there a way to do the same with gedit? Some configuration perhaps?
62018
I'm contemplating writing a script that does this:   Goes through each file in /usr/lib Does a dpkg -s search on each file. Reports a list of "orphan" files not belonging to any .deb package.   The idea is that over time, I've installed a lot of make install software and I'd like to get a list of leftover files from manually installed software I've since deleted.
13643
I need to delete all compiled data:   directories called build, directories called obj, *.so files.   I wrote a command   find \( -name build -o -name obj -o -name *.so \) -exec rm -rf {} \;   that goes through all the directories recursively and deletes all I need.  Why do I have such an output at the end? Maybe I should write a different command.  find: `./3/obj': No such file or directory find: `./3/build': No such file or directory find: `./1/obj': No such file or directory find: `./1/build': No such file or directory find: `./2/obj': No such file or directory find: `./2/build': No such file or directory
68503
cat package.yaml &gt; package.yaml   The above will truncate package.yaml, and hence the file will be empty - cat will have empty output.  How can I avoid truncating the file? Is there an alternative to using a temporary file? A variable maybe?
63966
I'm trying to debug a program which is not logging the information I need. Fortunately, it does write temporary files which should contain the information. These files are written to a directory like: program/temp/{someGUID} on one of ten machines. Neither {someGUID} nor which machine will contain the temp files is known in advance of the run. After the run is complete, the temporary files are deleted. The time from beginning to end is too fast for manual intervention.  I kick off the runs through a client program, but it is the server which writes the files. I am unable to manipulate the server program and once a run is kicked off I am unable to stop it. I do have root access to the all the machines on which the temp files could be written. I'm running CentOS 6.  Is there a way to allow the server user to write files to the temp directory but not remove them? It would probably crash the run, but it would give me the information I need. Is there a way to copy the contents of the temp folder right after they are written/before they are deleted? Must I install a program for recovery of deleted files?