latex-maven
Maven plugin that allows you to create PDF documentation from LaTeX source code (fork of https://github.com/mojohaus/latex-maven)
For your pom.xml:
<build>
<pluginManagement>
<plugins>
...
<plugin>
<groupId>com.github.fracpete</groupId>
<artifactId>latex-maven-plugin</artifactId>
<version>1.4.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>latex</goal>
</goals>
</execution>
</executions>
<configuration>
<forceBuild>true</forceBuild>
</configuration>
</plugin>
...
</plugins>
</pluginManagement>
...
<plugins>
<plugin>
<groupId>com.github.fracpete</groupId>
<artifactId>latex-maven-plugin</artifactId>
</plugin>
...
</plugins>
</build>
Goals
Use the following command to build the LaTeX documentation:
mvn latex:latex
FAQs
- My references are undefined: Check if your backend in LaTeX is the same as specified in the pom (bibtex configuration)
- I have no references at all: The name of the bibtex file needs to be the same as the main latex file. If your main latex file is named sample.tex, the bibfile needs to be sample.bib.
Options
latex.docsRoot=...the directory with the documentation, default:src/main/latexlatex.commonsDirName=...the directory with the common LaTeX sources, default:commonlatex.binariesPath=...the directory with LaTeX binarieslatex.bibtex=...the name of the bibtex binary (egbibtex8orbiberinstead ofbibtex)latex.skipBuild=true|falsefor skipping the build, default:falselatex.forceBuild=true|falsefor forcing the build, default:falselatex.dummyBuild=true|falsefor creating dummy PDFs (eg if no LaTeX present), default:falselatex.extraRuns=...to run pdflatex more times than normal, default:0