Questions tagged [makefile]

{makefile} tells the operating system how to derive the target program.

Filter by
Sorted by
Tagged with
138
votes
26answers
30k views

Tools for automating document compilation

A lot of people write makefiles that say something like paper.pdf: paper.tex pdflatex paper bibtex paper pdflatex paper pdflatex paper To handle re-running TeX to get ...
126
votes
2answers
77k views

How to properly 'make' a latex project?

I've got a latex project that looks like this: project/ |-- main.tex |-- main.bib |-- preamble.tex |-- preamble.fmt |-- makefile The preamble (preamble.tex) is being precompiled into ...
18
votes
4answers
5k views

How to create PDF and HTML output from the same source

I'm working on a document that has been published only as a PDF file until now. To utilize some of PDF's features, it uses the packages pdfpages and pdftex and commands like includepdf{}. But soon ...
15
votes
5answers
2k views

Changing LaTeX headers via a makefile

I recently created a makefile to use with my TeX documents and am quite happy with the discovery. When I create Beamer slides to use in class, I create both a set of slides and a handout to go along ...
15
votes
2answers
5k views

How can I keep a clean document folder with custom .cls, .sty, .bst files in a separate subfolder?

I am using a Makefile for generating a document from its tex source. The whole project consisting of own input files (.tex, .bib, .eps, ...) and non-pre-installed static input files (.cls, .sty, .bst) ...
12
votes
3answers
2k views

What do Sweave/knitr offer that make doesn't?

I use LaTeX to write papers and R for data analysis and visualization, so I've been looking into Sweave and knitr. The Sweave website says: The purpose is to create dynamic reports, which can be ...
11
votes
3answers
593 views

how to cause unix 'make' to know how many times to run *tex

Is there a clever way to cause the unix make command to run a tex variant as many times as are required to resolve all references? I've used tex for a long time, and I still don't know which of all ...
11
votes
1answer
2k views

Can I pass LaTeX commands to latexmk instead of a filename?

This is a follow-up to How can I automate the workflow for producing multiple versions of a document? Here is toy example of my problem. I want to automate the generation of two slightly different ...
10
votes
2answers
2k views

What is makefile and when do I need to use it along with latexmk?

I was looking for a tool that can look for changes in my TeX files then compiles them whenever a change is registered. So, I came across latexmk and managed to make it do what I want. However, I ...
9
votes
2answers
3k views

Is there any way to build a LaTeX document from a parent directory?

I've written a makefile for my current project which produces all deliverables (executable, written in C, and report, written in LaTeX). I have a directory structure whereby the Makefile and outputs (...
7
votes
1answer
1k views

What is the most elegant way to provide a cross-platform project with automated compilation routine?

There are many different ways to automate the compilation of a LaTeX project. I would like to start a discussion, what would be the most flexible and elegant and omnipotent way to provide a project ...
7
votes
1answer
1k views

How to only output dependencies from latexmk?

I'd like to use latexmk in a Makefile, so I've read the manual section on that. However, the dependency generation step seems less than ideal. Specifically, it seems that latexmk can only show ...
6
votes
1answer
265 views

Controlling draft options from a Makefile

I would like to control class options such as draft and geometry package's showframe from a Makefile. Is there a way I can parameterise a document using LaTeX itself, or will I need to preprocess the ...
6
votes
2answers
6k views

Making MiKteX pdflatex on Windows available to cygwin

I currently have a project with a workflow that uses pandoc in its Makefile to convert text from Markdown to LaTeX to PDF. This requires that a LaTeX engine be present in my path, or specified with ...
6
votes
1answer
2k views

pgf: 'externalize' with 'list and make' on windows [closed]

In the pgfmanual I found today under Section 50.4.4 Customizing the Externalization that you can have multicore support during externalization using the mode list and make. % step 1: generate main....
5
votes
1answer
925 views

Auctex support for building using makefile in subdirectory?

I am editing my PhD thesis using Emacs & 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, ...
5
votes
1answer
2k views

Makefile for a latex report

Not sure if this belongs here - but its bugging me. I have a makefile : DOCNAME=SI16-SC13B038 D1=Abstract D2=Bonafide D3=Declaration D4=Introduction DBIB=References TEXDEP=$(D1)/*tex $(D2)/*tex $(D3)...
5
votes
1answer
1k views

asymptote giving me an error: could not load module 'example_01'

On page 3 of Dario Teixeira's Asymptote and LaTeX, the following simple example is provided: \documentclass[10pt]{article} \usepackage{graphicx} \usepackage{asymptote} \begin{document} \begin{figure} ...
4
votes
3answers
2k views

How can I highlight text before a character with listing?

All is in the title. I would like to add a color to the text before a character with listing package. For example, I would like to add a color to text between the beginning of a line and : or =, in a ...
4
votes
1answer
1k views

How to build a Makefile that builds a LaTeX document with dependencies in one run

I am trying to create a Makefile for my paper where I can type just make and it will compile everything in one go. The paper has several figures which are generated from scripts. However, everything I'...
4
votes
0answers
352 views

Makefile in packages with UNIX commands and latexmk?

What are the rules regarding writing Makefiles to be part of CTAN packages? I would like to include a Makefile in a package I wrote. The package is in .dtx format with its .ins file embedded. When I ...
4
votes
0answers
649 views

tikz externalization: list and make forces make to recompile the tikz images every time

I'm trying to speed up my latex development by parallelising as much tasks as possible and by redoing as little work as possible on every run. Amongst other things, I want to externalise my tikz ...
3
votes
3answers
379 views

What is “sepdflatexmk”?

A colleague gave me a .tex file and said it needed to be compiled with sepdflatexmk, which she had on her Mac. She didn't know anything more about this compiler. I did some Googling and it seems ...
3
votes
1answer
551 views

latexmk: jobname option and clean up incompatibility?

I'm using latexmk in a Makefile to compile my document. Since I want my output filename to be different from the input filename, I use latexmk's option jobname. The problem is: it seems to be ...
3
votes
1answer
450 views

Redefine existing commands outside preamble

I have a Latex document where a lot of the text and figures is generated automatically by a program. In a minimal example, the final document is like this: \documentclass{memoir} %% This file is ...
3
votes
1answer
162 views

Tools for project delivery?

This is another in a long line of Project directory organization questions of mine. I'm trying to build a project directory organization structure which follows best-practices. I'd like the structure ...
3
votes
1answer
275 views

Biblatex remakes bcf and bbl files despite no change to bib files

Any change to my project tex files, even those that do not involve bib files or citations, result in biblatex recompiling the bcf and bbl files. How to prevent this behavior in order to save time ...
3
votes
1answer
726 views

Bibtex fails without citations… (test for citations? or invisible dummy cite)

I have a LaTeX folder where I use the same makefile and preamble for building either a part of the report or the entire report. This is achieved by a hack in the makefile where I substitute the file ...
3
votes
1answer
58 views

write a make file to compile all standalone tikz file

I wrote several standalone tex files for drawing a figure with tikz, I named them with the pattern tikz_*.tex, and now I want to compile them all at once using a make file. First I tried the following ...
3
votes
0answers
31 views

Howto force UseLATEX to clean temporary files between changing configurations? [closed]

I have a multiple-output LaTeX file, and created a CMake environment to produce all requested outputs as result of running a single command. Basically, it works. However, since I do have bibliography, ...
3
votes
0answers
2k views

listings: How can I highlight Makefiles?

I am trying to typeset a makefile using listings. Now I would like some differential highlighting, e.g. for variables and ordinary commands in the target body. In this snippet, want to have different ...
2
votes
2answers
596 views

Is there a makefile system for LaTeX, etc? [duplicate]

Possible Duplicate: Tools for automating document compilation How do I handle building complicated and large LaTeX projects? Is there a makefile system (like GNU Make) or should I just write my ...
2
votes
1answer
89 views

UseLATEX (for CMake) doesn't accept compiler flags

I'm using UseLATEX.cmake with CMake and it works pretty well except for passing compiler flags. For example, in the main directory I have a basic TeX file main.tex, the UseLATEX.cmake file, and this ...
2
votes
1answer
270 views

Make utility deletes PDF when Ctrl-C'ing out of continuous preview

I am using a Makefile together with the latexmk utility to build PDFs from LaTeX files. My question is at the bottom. Here is some background: The relevant parts of my Makefile are the following: ...
2
votes
2answers
398 views

How can I execute pdflatex when I'm not in the directory?

I am currently experimenting with lilypod. To generate a PDF from the source, I have to enter mkdir -p charts-out lilypond-book --output=charts-out/ --pdf charts.tex cd charts-out pdflatex charts....
2
votes
1answer
1k views

How to write a Makefile in Windows to compile a Latex document using a loop

I need to write several documents that are fairly close to each other, i.e.same structure of header/footer, call a common set of forms. I wrote a Main.tex document with a set of \if\x 1 { my document ...
2
votes
1answer
282 views

GNU Makefile for compiling each chapter with its own reference

My book structure is like: book.tex chapter/ch1.tex /ch2.tex ref/ch1.bib /ch2.bib As each chapter of my book is required to has its own reference thus I used chapterbib package and fed ...
2
votes
3answers
2k views

Makefile that prevents tex directory from being cluttered with build output

I am using xelatex, biber and makeglossaries to generate my bachelor thesis. All of them are creating a huge amount of temporary files that are cluttering, not only my root document directory, but the ...
2
votes
1answer
1k views

vim and the Makefile

I'm trying to use a Makefile to compile latex files within vim (and update the view of my current pdf file within my favourite viewer). Here is a little example (I'd like to expand that lateron): ...
2
votes
0answers
66 views

Call GNU Make from AucTeX [duplicate]

In most Emacs major modes targetting compiled programming languages, C-c C-c invokes make. In AucTeX, it lets me choose between any of BibTeX Biber Check ChkTeX Clean Clean All File Index ...
2
votes
0answers
31 views

What is the recommended approach to compile sequentially some variants of code? [duplicate]

Continuing experimenting with conditional text, I am getting a code with a number of options: some dialogs in english are translated, some other options (not shown in the MWE) enable the document be ...
2
votes
0answers
338 views

Parallel make with standalone package [closed]

This question is a LaTeX question, although it might actually be resolved by changing the build procedure of the document instead of the document itself. I have a document that includes a bunch of ...
1
vote
1answer
226 views

How to give arguments to a tex file during compilation?

I have a file called main.tex, which looks like this: \begin{document} \input{a.tex} \end{document} I want to know if it is possible to have it take this file a.tex in argument, such that I could ...
1
vote
2answers
70 views

Trying to use \MakePerPage{footnote} kills the build of my LaTeX doc

The standard LaTeX footnote behavior is to mark footnotes using superscript numbers. I can't use that, since all of my citations are superscript numbers. What I'd like is for my footnotes to be marked ...
1
vote
1answer
42 views

Makefile for arbitrary latex document

I wanna use automatic variables to prepare a Makefile for several latex documents. In other words, i have foo.tex, bar.tex, bee.tex, otherdoc.tex ... I wanna use a single Makefile to process all of ...
1
vote
1answer
900 views

Latexmk fails to compile citing missing .bbl file with biblatex

I am trying to use the excellent and well-maintained template/framework here for my phd thesis. https://github.com/holgern/TUB_PhDThesisTemplate since this meets all the requirements of my university. ...
1
vote
1answer
48 views

How to generate a Makefile from dtx // keeping the tab width

For a complete documentation I would like to maintain and explain the Makefile within my dtx-file. Two problems occur: docstrip always adds an extension to the generated file (\file{Makefile}{\from{\...
1
vote
1answer
499 views

Set correct path for BibTeX via Rubber

Setup I am using Rubber to compile my LaTeX document. In my root folder I have main.tex, mybib.bib (both coming from here) and Makefile. main.tex \documentclass[11pt]{article} \usepackage{cite} \...
1
vote
1answer
790 views

Create an exec on mac to compile [duplicate]

I'm trying to create an exec on mac to compile Latex, MakeIndex and BibTex in same time. Here my make file : latex -output-directory=build -interaction=nonstopmode sample.tex makeindex build/sample....
1
vote
2answers
263 views

tests for defined labels (r@) and infinite passes with Makefile

My question probably has to do with .aux files and \newlabel therein. Here is what I can describe. The way my .PDF builds is via a Makefile; I inserted an MWE to show what happens. The situation is ...