Advanced ways to build LaTeX documentsΒΆ
There is an advanced way to build your LaTeX documents using a
Makefile
. A Makefile
build is in particular very convenient
and saves lots of efforts if you need to deal with multiple source
files.
In general, Makefile
is a way to build/compile source files/codes
in scientific computing. To see more, please take a look at
Prof. Dongwook Lee’s
AMS 209 class notes
on Makefile
.
Let’s take a look at a case study where you now want to merge the
previous two LaTeX files into one, plus, want to add a new section.
What you can do is to make a new master file (or caller, or driver),
say, master.tex
from which you include
those two existing LaTeX files,
first_latex.tex
(line 28) and linuxCommands.tex
(line 30):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 \documentclass[11pt]{article} \usepackage{graphicx} \usepackage{natbib} \usepackage{amssymb} \usepackage{amsmath} \usepackage{color} \usepackage[x11names]{xcolor} \usepackage{colortbl} %\usepackage{multirow} \setlength{\textwidth}{6.5in} \setlength{\textheight}{9.0in} \setlength{\oddsidemargin}{0.0cm} \setlength{\evensidemargin}{0.0cm} \setlength{\topmargin}{-0.5in} \setlength{\headheight}{0.2in} \setlength{\headsep}{0.3in} \setlength{\textfloatsep}{0.1in} \renewcommand{\floatpagefraction}{0.9} \input macros.tex \begin{document} \include{useMacros} \include{first_latex} \include{linuxCommands} \end{document}Note
What is the difference between
input
andinclude
? Check out this link: input vs. include:
You also see that in lines 22 and 26, we included two new files,
macros.tex
and useMacros.tex
. The first is analogous to the
style file ams200.sty
, but including a bunch of definitions only
that a user would wish to use frequently in documents.
In the below, you see many user-defined macro definitions
newcommands
that provide shorthand notations
for their standard (and longer) command lines:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 \newcommand{\devnote}[1]{\textcolor{red}{{\bf#1}}} \newcommand{\bff}{\mathbf{f}} \newcommand{\bfg}{\mathbf{g}} \newcommand{\bfk}{\mathbf{k}} \newcommand{\bfq}{\mathbf{q}} \newcommand{\bfw}{\mathbf{w}} \newcommand{\bfx}{\mathbf{x}} \newcommand{\bfy}{\mathbf{y}} \newcommand{\bfz}{\mathbf{z}} % \newcommand{\bfC}{\mathbf{C}} \newcommand{\bfF}{\mathbf{F}} \newcommand{\bfG}{\mathbf{G}} \newcommand{\bfH}{\mathbf{H}} \newcommand{\bfI}{\mathbf{I}} \newcommand{\bfJ}{\mathbf{J}} \newcommand{\bfK}{\mathbf{K}} \newcommand{\bfL}{\mathbf{L}} \newcommand{\bfN}{\mathbf{N}} \newcommand{\bfQ}{\mathbf{Q}} \newcommand{\bfR}{\mathbf{R}} \newcommand{\bfT}{\mathbf{T}} \newcommand{\bfY}{\mathbf{Y}} % \newcommand{\bfone}{\mathbf{1}} \newcommand{\bfzero}{\mathbf{0}} % \newcommand{\bfeta}{\mbox{\boldmath$\eta$}} \newcommand{\bfPsi}{\mbox{\boldmath$\Psi$}} \newcommand{\bfOmega}{\mbox{\boldmath$\Omega$}} \newcommand{\bfPhi}{\mbox{\boldmath$\Phi$}} \newcommand{\samp}{\sigma_{\mbox{amp}}} \newcommand{\ssca}{\sigma_{\mbox{scale}}} \newcommand{\slam}{\sigma_\lambda} \newcommand{\st}{\sigma_t} \newcommand{\snia}{SN~Ia } \newcommand{\HALF}{\frac{1}{2}} \newcommand{\pd}[2]{\frac{\partial #1}{\partial #2}} \newcommand{\DS}{\displaystyle} \renewcommand{\vec}[1]{\mathbf{#1}} \newcommand{\Pivec}{\boldsymbol{\Pi}} \newcommand{\Lvec}{\boldsymbol{\cal L}} \newcommand{\hvec}[1]{\hat{\mathbf{#1}}} \newcommand{\mm}[1]{\rm mm} \newcommand{\tens}[1]{\mathsf{#1}} %\newcommand{\tens}[1]{\mathbf{#1}} \newcommand{\red}[1]{\color{red} #1 \color{black}} \newcommand{\blue}[1]{\color{blue} #1 \color{black}} \newcommand{\yes}{1} \newcommand{\no}{0} \newcommand{\vol}{{\cal V}} %\newcommand{\red}[1]{\color{red} #1 \color{black}} %\newcommand{\blue}[1]{\color{blue} #1 \color{black}} \newcommand{\green}[1]{\color{green} #1 \color{black}} \newcommand{\mbf}[1]{\mathbf{#1}} \newcommand{\mcal}[1]{\mathcal{#1}} \newcommand{\mbb}[1]{\mathbb{#1}} \newcommand{\noteb}[1]{\textcolor{blue}{{\bf#1}}} \newcommand{\noter}[1]{\textcolor{red}{{\bf#1}}} \newcommand{\beq}{\begin{equation}} \newcommand{\eeq}{\end{equation}} \newcommand{\bea}{\begin{eqnarray}} \newcommand{\eea}{\end{eqnarray}} \newcommand{\ttt}[1]{\textttt{#1}} \newcommand{\note}{\noindent {\bf{Note: }}} \newcommand{\remark}{\noindent {\bf{Remark: }}} \newcommand{\ex}{\noindent {\bf{Example: }}} \newcommand{\qs}{\noindent {\bf{Quick summary: }}} \newcommand{\alg}{\noindent {\bf{Algorithm: }}} \newcommand{\stitle}[1]{{\bf{#1: }}} \newcommand{\hw}[1]{\noindent {\bf{Homework }#1}} \newcommand{\defn}{\noindent {\bf{Definition: }}} \newcommand{\thm}{\noindent {\bf{Theorem: }}} \newcommand{\pf}{\noindent {\bf{Proof: }}} \newcommand{\fhalf}{\frac{1}{2}} \newcommand{\itf}[1]{{\it{#1}}} \newcommand{\dt}{\Delta t} \newcommand{\dx}{\Delta x} \newcommand{\dy}{\Delta y} \newcommand{\dz}{\Delta z} \newcommand{\nm}{{n-1}} \newcommand{\np}{{n+1}} \newcommand{\nph}{{n+\frac{1}{2}}} \newcommand{\nphh}{{n+{1}/{2}}} \newcommand{\im}{{i-1}} \newcommand{\ip}{{i+1}} \newcommand{\iphh}{{i+1/2}} \newcommand{\imhh}{{i-1/2}} \newcommand{\iph}{{i+\frac{1}{2}}} \newcommand{\imh}{{i-\frac{1}{2}}} %\newcommand{\pd}{\partial} \newcommand{\bpl}{\Big(} \newcommand{\bpr}{\Big)} \newcommand{\bit}{\begin{itemize}} \newcommand{\eit}{\end{itemize}} \newcommand{\ben}{\begin{enumerate}} \newcommand{\een}{\end{enumerate}} \newcommand{\dline}{\noindent\rule{5.3 in}{0.4pt}\\} \newcommand{\indone}{\indent} \newcommand{\indtwo}{\indent \indent} \newcommand{\indthree}{\indent \indent \indent} \newcommand{\indfour}{\indent \indent \indent\indent} \newcommand{\qed}{\;$\Box$} \newcommand{\bA}{\mathbf{A}} \newcommand{\bB}{\mathbf{B}} \newcommand{\bD}{\mathbf{D}} \newcommand{\bF}{\mathbf{F}} \newcommand{\bH}{\mathbf{H}} \newcommand{\bI}{\mathbf{I}} \newcommand{\bK}{\mathbf{K}} \newcommand{\bL}{\mathbf{L}} \newcommand{\bM}{\mathbf{M}} \newcommand{\bP}{\mathbf{P}} \newcommand{\bQ}{\mathbf{Q}} \newcommand{\bR}{\mathbf{R}} \newcommand{\bT}{\mathbf{T}} \newcommand{\bU}{\mathbf{U}} \newcommand{\bV}{\mathbf{V}} \newcommand{\bW}{\mathbf{W}} \newcommand{\bX}{\mathbf{X}} \newcommand{\bY}{\mathbf{Y}} \newcommand{\ba}{\mathbf{a}} \newcommand{\bb}{\mathbf{b}} \newcommand{\bc}{\mathbf{c}} \newcommand{\be}{\mathbf{e}} %\newcommand{\bff}{\mathbf{f}} \newcommand{\bg}{\mathbf{g}} \newcommand{\bq}{\mathbf{q}} \newcommand{\br}{\mathbf{r}} \newcommand{\buu}{\mathbf{u}} \newcommand{\bvv}{\mathbf{v}} \newcommand{\bx}{\mathbf{x}} \newcommand{\by}{\mathbf{y}} \newcommand{\bz}{\mathbf{z}} \newcommand{\bsig}{\mathbf{\Sigma}} \newcommand{\bzero}{\mathbf{0}} \newcommand{\inv}{^{-1}} \newcommand{\iter}[1]{^{(#1)}}
With this, we can conviently call these macros from any other places
in documents, for instance, in useMacros.tex
:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 \section{Let's use handy macros in the document body} Please take a look at the macro file \verb|macros.tex| to see how the macros are used in this file.\\ \qs This is a quick summary. \\ \thm This is a theorem. \\ \ex A permutation matrix $\mbf P$, a square matrix having exactly one 1 in each row and column and zeros elsewhere -- which is also always a nonsingular -- can always be multiplied without affecting the original solution to the system. For instance, \beq \mbf P = \left [ \begin{array}{ccc} 0 & 0 & 1 \\ 1 & 0 & 0 \\ 0 & 1 & 0 \end{array} \right ] \eeq permutes $\mbf v$ as \beq \mbf P \left [ \begin{array}{c} v_1\\v_2\\v_3 \end{array} \right] = \left [ \begin{array}{ccc} 0 & 0 & 1 \\ 1 & 0 & 0 \\ 0 & 1 & 0 \end{array} \right ] \left [ \begin{array}{c} v_1\\v_2\\v_3 \end{array} \right] = \left [ \begin{array}{c} v_3\\v_1\\v_2 \end{array} \right]. \eeq \qed\\ And there are many more macro options you can grab and use.
Note here that, when including first_latex.tex
and
linuxCommands.tex
, you now need to comment out
the first couple of lines which define the begining and end of the
documents because you now define them in master.tex
.
Therefore the two files now should look like:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 %\documentclass[11pt]{article} %\usepackage{graphicx} % %%%%%%%%%%%%%%%%%%%%%%%%%%% %% Let's start writing your report %\begin{document} % %%%%%%%%%%%%%%%%%%%%%%%%%% \section{Spacing, new lines, comments} This is your first LaTeX document! \indent \indent Math is fun.\\ This is your first LaTeX document! % \indent \indent Math is fun.\\ This is your first LaTeX document! \indent \indent Math is fun.\\ %%%%%%%%%%%%%%%%%%%%%%%%%% \section{Itemized list} An itemized list of font styles: \begin{itemize} % \item {\rm{Roman character}} \item {\it{italic character}} \item {\bf{bold character}} \item {\em{emphasized}} \item {\tt{typewriter}} % \end{itemize} %%%%%%%%%%%%%%%%%%%%%%%%%% \section{Enumerated list} An enumerated list of mathematical expressions: \begin{enumerate} % \item \begin{equation} ax = b \end{equation} % \item \begin{eqnarray} f(x) &=& x^2 + e^{-x} + log_{10}2x \\ g(x) &=& f(x-3)\\ &h(x)& = f(\alpha x) + \gamma - \frac{\kappa}{x-9} \end{eqnarray} % \item You can also write inline mathematical expressions using dollar signs, $f(x) = \sqrt{x}$. \end{enumerate} %%%%%%%%%%%%%%%%%%%%%%%%%% \section{Figures} Including a figure is easy. Make sure you have \verb|\usepackage{graphicx}| before \verb|\begin{document}| \begin{flushleft} \includegraphics[width=2.0in]{./figures/baskin-logo-banner.jpg} \end{flushleft} \begin{center} \includegraphics[width=2.0in]{./figures/baskin-logo-banner.jpg} \end{center} \begin{flushright} \includegraphics[width=2.0in]{./figures/baskin-logo-banner.jpg} \end{flushright} You can change the size of your figure and add caption to it. \begin{figure}[h] %you need \begin{figure} in order to put caption of your figure %"h" is for a command option to put your figure "HERE!!!" \begin{center} \includegraphics[width=4.0in]{./figures/baskin-logo-banner.jpg} \end{center} \caption{A bigger figure.} \end{figure} % %\end{document}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 %\documentclass[11pt,twoside]{article} % %\usepackage{ams200} %\usepackage{epsf} %\usepackage{epsfig} %\usepackage{lscape} %\usepackage{subfigure} %\usepackage{color} %\usepackage{courier} % %\newcommand{\mbf}[1]{\mathbf{#1}} %\newcommand{\noteb}[1]{\textcolor{blue}{{\bf#1}}} %\newcommand{\noter}[1]{\textcolor{red}{{\bf#1}}} % % %\pagestyle{myheadings} %\setcounter{equation}{0} %\setcounter{figure}{0} %\setcounter{footnote}{0} %\setcounter{section}{0} %\setcounter{table}{0} % % %%%% MAIN PART OF DOCUMENT % %\begin{document} %{\centering{ % %\includegraphics[width=5.0in]{./figures/baskin-logo-banner.jpg} % %$\mbf{}$\\ %\title{AMS 200: Working on Linux/Unix Machines} %$\mbf{}$\\ %$\mbf{}$\\ % % %Prof. Dongwook Lee (dlee79@ucsc.edu)}} %$\mbf{}$\\ %$\mbf{}$\\ %{\centering{ %Department of Applied Mathematics and Statistics}}\\ %{\centering{ %University of California, Santa Cruz}} \section{Remote login via SSH} First of all, you will need to install an SSH (secure shell) client in order to access one of cluster machines (i.e., computing resources such as grape) remotely. \\ * If you're a PC user, you can download PuTTY from \\(http://www.chiark.greenend.org.uk/$\sim$sgtatham/putty/download.html). \\ * If you're a Mac or Linux user, you can simply use a terminal that is already available for you. For example, in Mac, go to $\mbf{Applications}$ $\rightarrow$ $\mbf{Utilities}$ and open $\mbf{Terminal}$ application. In Linux, $\mbf{Terminal}$ can be found under $\mbf{System}$ in general.\\ Next step is to log in yourself to one of the AMS machines. For today, you are logging in to a cluster named ``grape". To log in to the cluster, you need to use a command \texttt{ssh} using the terminal we just mentioned. In the command line, you type in\\ \texttt{ssh -X your\_name@grape.soe.ucsc.edu}\\ \noindent with your SOE login password. At the step, you're logging into a master node or login node. As you login for the first time to the master node, you are asked to enter a passphrase. You can enter a very secured if you wish, or you can simply press enter. This process is to generate, so-called, ``SSH keys", which is a way to identify trusted computers, i.e., the rest of compute nodes, without having to enter password every time you run parallel jobs on these compute nodes. Note that running a parallel job means that you run multiple jobs on multiple processors, which actually require you to login to the requested compute nodes with password. This SSH key generation save you from doing this process. Your login is successful if you see something like the following on your terminal: \includegraphics[width=5.0in]{./figures/firstLogIn.png} \section{Basic Linux Commands} There are few rules in using command lines in Linux. Several important rules are\\ * Commands are case-sensitive.\\ * Make sure you always logout yourself by typing \texttt{exit} when you're done.\\ * The Linux command lines enables you to create complex functions by combining built in command lines together. This capability gives you countless ways to make your commands work in various different ways. \\ {\it{Exercise 1:}} Please run matlab by typing in a command \texttt{matlab} on a command prompt. \\ {\it{Exercise 2:}} Please exit your current session and try to login again without having \texttt{-X} option. Please run matlab again. Is there any difference from the case with \texttt{-X}? You can use \texttt{-Y} instead of \texttt{-X}.\\ {\it{Answer to 1 \& 2:}} \texttt{-X} or \texttt{-Y} option enables X11 forwarding in SSH, which provides you not only a command line interface from the console, but also a variety of graphical-user-interfaces (GUIs). With the X forwarding option in login, you can enjoy a full set of interface display functions remotely.\\ Here you're introduced to learn very basic Linux command lines. For more comprehensive studies, you can use to display a manual page using the \texttt{man} command, or you can come to ask the instructors for more help and resources. \subsection{Managing Files} \texttt{> ls} --- lists your files\\ \texttt{> ls -l} --- ls in long format\\ \texttt{> ls -a} --- ls all files\\ \texttt{> mv filename1 filename2} --- remane filename1 to filemane2\\ \texttt{> mv filename1 dirname} --- move filename1 to a directory called dirname\\ \texttt{> cp filename1 filename2} --- copy filename1 to filename2\\ \texttt{> rm filename} --- remove a file\\ \texttt{> more filename} --- display the contents of a file as much as will fit on your screen\\ \texttt{> less filename} --- similar to \texttt{more} with the extended navigation capability allowing both forward and backward navigations\\ \texttt{> wc filename} --- tells you number of lines, words and characters in a file\\ \texttt{> touch filename} --- creating an empty file (multiple filenames after \texttt{touch} command will create multiple empty files)\\ {\it{Exercise 3:}} See if you can find \texttt{ls -l} and \texttt{ls -a} when you execute \texttt{man ls}.\\ \subsection{Managing Directories} \texttt{> mkdir dirname} --- create a new directory called dirname\\ \texttt{> cd dirname} --- change directory, meaning you go to a directory called dirname\\ \texttt{> pwd} --- tells you where you currently are in the directory tree\\ \texttt{> rmdir} --- an empty directory deletion\\ {\it{Exercise 4:}} Create a directory called \texttt{dirA}, then under \texttt{dirA}, create an empty file named \texttt{filenameNull}. \\ {\it{Exercise 5:}} Delete the file \texttt{filenameNull}. Also delete the directory \texttt{dirA} using \texttt{rm} command. {\it{Hint: Please look up man page of}} \texttt{rm} {\it{and find a useful option for directory deletion}}. \\ \section{Editors} The following text editors are available on grape. You can choose whichever you want to use.\\ (1) vim (or vi): \\ To start --- \texttt{> vi filename1}\\ To edit --- enter ``i" and start inserting text until $<$Esc$>$ hit \\ To delete single character --- \texttt{x}\\ To delete entire current line --- \texttt{dd}\\ To exit --- pressing $<$Esc$>$ key followed by \texttt{:x <Return>} or \texttt{:wq <Return>} will quit \texttt{vi} saving the content to filename1, whereas pressing $<$Esc$>$ key followed by \texttt{:q! <Return>} will quit \texttt{vi} without saving the latest change to filename1\\ \noindent See more basic commands for \texttt{vi} in http://www.cs.colostate.edu/helpdocs/vi.html\\ \indent (2) emacs:\\ To start --- \texttt{> emacs -nw filename1}\\ To edit --- unlike \texttt{vi}, you can type in any characters in the editor\\ To save the current buffer-- press hold down Control key and type in ``x" and ``s"\\ To save the current buffer with different file name --- press hold down Control key and type in ``x" and "w" and then enter new file name To exit the buffer --- press hold down Control key and type in ``x" and ``c"\\ \noindent See more basic commands for \texttt{emacs} in http://www.cs.colostate.edu/helpdocs/emacs.html \section{Parallel Computing} Please read the pdf file by Prof. Nic Brummell:\\ https://ams.soe.ucsc.edu/sites/default/files/AMS\_cluster\_grape\_evennewer\_0.pdf \section{Two Examples} In both tests, you demonstrate one of the most basic tasks such as printing ``hello world". \subsection{Running a short program in R -- Statistic Computing} Use your preferred editor to implement the following lines and save it to a file named ``test.R":\\ \texttt{print(date())\\ \indent set.seed(43678)\\ \indent print("Hello World")\\ \indent print("Random number from standard normal")\\ \indent print(rnorm(1, 0,1))\\ } \noindent There are two ways to run your R script. If you want to run the program using an R batch command, type from the Linux shell:\\ \texttt{> R CMD BATCH test.R}\\ Or, you can also run it by first start R (by typing ``R" at the Linux command prompt) and once inside the R program, you can execute your source file with the command:\\ \texttt{> source(`test.R')}\\ In the first approach, you can see your results written out to a default output file \texttt{test.Rout}. In the second example, you should be able to see the output on your screen such as\\ \texttt{[1] "Mon Oct 20 00:43:37 2014"\\ \indent [1] "Hello World"\\ \indent [1] "Random number from standard normal"\\ \indent [1] 0.7932329\\ } \subsection{Running a short program in Fortran -- Scientific Programming Language} Again, please use your preferred text editor and implement the following short fortran program:\\ \texttt{\noindent program hello\\ \indent real :: n,m\\ \indent integer :: i,j\\ \indent i = 10\\ \indent j = 2014\\ \indent n=real(i)\\ \indent m=159.e0\\ \indent print *,"i+j=",i+j\\ \indent print *,"n-m=",n-m\\ \indent print *, "Hello World"\\ \indent end program hello\\ } \noindent You save it to hello.f90. Now you are going to compile it in order to generate an executable binary. On grape, you can do this using gfortran compiler:\\ \texttt{> gfortran hellow.f90}\\ After compiling your program, you should be able to see an executable binary file with a default name, \texttt{a.out}. Run it by entering a command line: \texttt{> ./a.out} \\ {\it{Exercise 6:}} What does your result look like from running hello.f90? \\ {\it{Exercise 7:}} Can you give a different name for the executable instead of the default \texttt{a.out}? \\ {\it{Exercise 8:}} Can you extend the previous serial run of test.R (and/or hello.f90) to a parallel job, say 2 nodes with 8 processors on each node (i.e., a total of 16 parallel tasks)?\\ %\end{document}
Finally, we use a Makefile
to build multiple LaTeX source files as
follow:
1 2 3 4 5 6 7 8 9 10 11 12 DESCFILES = master.tex first_latex.tex linuxCommands.tex figures/* OUTPUT = master.pdf master.pdf: $(DESCFILES) pdflatex master.tex clean: rm -f *.{toc,aux,out,log} cleanall: clean rm -f $(OUTPUT)
To build, you simply type in make
in your terminal:
$ make
In order to rebuild you type in:
$ make clean
When there is a master.pdf
file already built from a
previous make
, you won’t be able to make
it again.
In this case you need to build it from fresh by typing in:
$ make cleanall
You can download all of the files in this section as a tarball:
To untar it, run a command:
$ tar xvf master.tar