It is possible to select where to save compiled pdfs from .tex files after compiling from the terminal. But, what commands in the preamble of a .tex file will give me explicit control over where the a compiled pdf will be saved after I have clicked the compile button?
Below is an arbitrary example. I am really just interested in how to specify the location the resulting pdf will be saved.
\documentclass[12pt,a4paper]{article}
% For increasing size of page (margins)
\usepackage[bottom=1.5cm,top=1.5cm]{geometry}
% Increase space between caption and table
\usepackage{caption}
\captionsetup[table]{skip=10pt}
\begin{document}
\begin{tabular}{SSSSSSSS} \toprule
{$m$} & {$\Re\{\underline{\mathfrak{X}}(m)\}$} & {$-\Im\{\underline{\mathfrak{X}}(m)\}$} & {$\mathfrak{X}(m)$} & {$\frac{\mathfrak{X}(m)}{23}$} & {$A_m$} & {$\varphi(m)\ /\ ^{\circ}$} & {$\varphi_m\ /\ ^{\circ}$} \\ \midrule
1 & 16.128 & +8.872 & 16.128 & 1.402 & 1.373 & -146.6 & -137.6 \\
2 & 3.442 & -2.509 & 3.442 & 0.299 & 0.343 & 133.2 & 152.4 \\
3 & 1.826 & -0.363 & 1.826 & 0.159 & 0.119 & 168.5 & -161.1 \\
4 & 0.993 & -0.429 & 0.993 & 0.086 & 0.08 & 25.6 & 90 \\ \midrule
5 & 1.29 & +0.099 & 1.29 & 0.112 & 0.097 & -175.6 & -114.7 \\
6 & 0.483 & -0.183 & 0.483 & 0.042 & 0.063 & 22.3 & 122.5 \\
7 & 0.766 & -0.475 & 0.766 & 0.067 & 0.039 & 141.6 & -122 \\
8 & 0.624 & +0.365 & 0.624 & 0.054 & 0.04 & -35.7 & 90 \\ \midrule
9 & 0.641 & -0.466 & 0.641 & 0.056 & 0.045 & 133.3 & -106.3 \\
10 & 0.45 & +0.421 & 0.45 & 0.039 & 0.034 & -69.4 & 110.9 \\
11 & 0.598 & -0.597 & 0.598 & 0.052 & 0.025 & 92.3 & -109.3 \\ \bottomrule
\end{tabular}
\end{document}
Seems like a straight forward function but I have not found anything after hours of searching.
pdflatex? Command line? If editor, which one? – Peter Grill May 10 '22 at 16:32pdflatex. Replace that with a script which runs thatpdflatex -output-directory=<some/path> .... This should create all files in that directory. Then, if the pdf was created your script will need to move that to the approriate directory. But, note that the temporary files are often required for subsequent runs, so don't expect to be able to delete all the temporary files that are created. If you need to access that in the .tex file see Access value of -output-directory. – Peter Grill May 12 '22 at 02:34pdflatex. Rstudio must have a perferences settings where you can pass options topdflatex. There are several optons you can specify on the command line to control the executable. – Peter Grill May 14 '22 at 08:26