Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Views: 29877
1
\documentclass[master.tex]{subfiles}
2
3
\setcounter{chapter}{0}
4
5
\begin{document}
6
7
\chapter{Makefile}
8
9
\section{\texttt{latexmk}}
10
11
\texttt{latexmk} is a versatile utility for building \LaTeX documents.
12
It automatically handles table of content, indices,
13
references and bibliography.
14
15
To make it also work well with SageTeX (see page \ref{sec:sagetex}),
16
you have to add the file \texttt{latexmkrc}
17
into the current directory.
18
It defines additional dependencies and instructions for
19
building the whole document using SageTeX.
20
21
For more information, type a terminal \texttt{man latexmk}.
22
23
\section{Use \texttt{make} to build the PDF}
24
25
Finally, one has to tell the CoCalc environment to use
26
instead of the default build command
27
the much more sophisticated Makefile.
28
In order to do so,
29
first add the Makefile to your project,
30
modify it to match your filenames,
31
and then click on the `build`-button (top right)
32
and change the command to \texttt{make 'filename.pdf'}.
33
In our case here, this is \texttt{make '10-make.pdf'}
34
or \texttt{make 'master.pdf'} for the master document.
35
36
Then, SageMathCloud will call the Makefile's definition to build the PDF document.
37
38
When enabled correctly, at the bottom of each file (like this one here),
39
this configuration string will appear:
40
41
\begin{verbatim}
42
%sagemathcloud={"latex_command":"make '10-make.pdf'"}
43
\end{verbatim}
44
45
Do not delete it!
46
47
\end{document}
48
%sagemathcloud={"latex_command":"make '10-make.pdf'"}
49