Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dokempf/uselatexmk
LatexMk-based tool to build Latex documents from cmake
https://github.com/dokempf/uselatexmk
cmake latex latexmk
Last synced: 3 months ago
JSON representation
LatexMk-based tool to build Latex documents from cmake
- Host: GitHub
- URL: https://github.com/dokempf/uselatexmk
- Owner: dokempf
- Created: 2017-02-23T13:12:01.000Z (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2023-12-02T07:27:25.000Z (about 1 year ago)
- Last Synced: 2023-12-02T08:27:09.439Z (about 1 year ago)
- Topics: cmake, latex, latexmk
- Language: CMake
- Size: 53.7 KB
- Stars: 12
- Watchers: 3
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# What is UseLatexMk?
UseLatexMk is a cmake tool to build Latex documents from cmake projects.
Instead of doing the tedious work of implementing all the logic on how to
build Latex files in the CMake language (like the better known [UseLATEX](https://github.com/kmorel/UseLATEX)
does), it uses the LatexMk tool found on the system. As a result, there are
some advantages of using UseLatexMk.cmake over using UseLATEX.cmake:
* Additional input files, like e.g. code listing, do not have to be
manually listed anymore. Dependency tracking is done by LatexMk instead
of cmake.
* The generation procedure is more robust, because
it relies on an upstream tool with a wider userbase.
* Additional (sophisticated) build logic can be provided to latexmkrc
through configuration files without touching the CMake code. Note,
you need to do this to build non-PDF documents.
* A target `clean_latex` to clean the build directory from all latex output
and auxiliary latex files is available.**Please note the following restrictions**:
UseLatexMk relies on latexmk separating input and output directory correctly.
This includes using an absolute path for the output directory. On some TeX
systems this requires the disabling of a security measure by setting `openout_any = a`.
See UseLatexMk.cmake for additional information on the matter.UseLatexMk is mainly designed to build PDF documents. You may enable building
other types of documents by providing a custom latexmkrc template, but you may
experience incompatibilities with other parts of UseLatexMk, such as installation.The `minted` package is a bit special regarding its placement of auxiliary files.
In order to use it with `UseLatexMk` you should use the following parameters to
`\usepackage`:```
\usepackage[outputdir=@CMAKE_CURRENT_BINARY_DIR@]{minted}
```# What is needed to use UseLatexMk from my project?
You just need to
* copy all the CMake modules (`*.cmake`) from this project into your project
* Include them with `include(UseLatexMk)`. This is best done from the top-level
directory of your project, to make the `clean_latex` target available on that level.
* Use CMake 3.10 or newer.Now, you are ready to use it!
# How do I use it?
Just use the following CMake function `add_latex_document` from anywhere in your project.
For an explanation of parameters, check `UseLatexMk.cmake`.To clean the build directory from all latex files, use the target `clean_latex`.
# License
This software is provided under a BSD license, you can find it in the `.cmake` files of the project.