| Download
Github repo cloud-examples: https://github.com/sagemath/cloud-examples
Project: Support and Testing
Views: 8058License: MIT
\documentclass[master.tex]{subfiles}12\setcounter{chapter}{0}34\begin{document}56\chapter{Makefile}78\section{\texttt{latexmk}}910\texttt{latexmk} is a versatile utility for building \LaTeX documents.11It automatically handles table of content, indices,12references and bibliography.1314To make it also work well with SageTeX (see page \ref{sec:sagetex}),15you have to add the file \texttt{latexmkrc}16into the current directory.17It defines additional dependencies and instructions for18building the whole document using SageTeX.1920For more information, type a terminal \texttt{man latexmk}.2122\section{Use \texttt{make} to build the PDF}2324Finally, one has to tell the SMC environment to use25instead of the default build command26the much more sophisticated Makefile.27In order to do so,28first add the Makefile to your project,29modify it to match your filenames,30and then click on the `build`-button (top right)31and change the command to \texttt{make 'filename.pdf'}.32In our case here, this is \texttt{make '10-make.pdf'}33or \texttt{make 'master.pdf'} for the master document.3435Then, SageMathCloud will call the Makefile's definition to build the PDF document.3637When enabled correctly, at the bottom of each file (like this one here),38this configuration string will appear:3940\begin{verbatim}41%sagemathcloud={"latex_command":"make '10-make.pdf'"}42\end{verbatim}4344Do not delete it!4546\end{document}47%sagemathcloud={"latex_command":"make '10-make.pdf'"}4849