# LaTeX (and documents) as first-class citizen

**URL:** <https://discourse.cmake.org/t/latex-and-documents-as-first-class-citizen/248>\
**Category:** Community\
**Created:** [November 24, 2019, 9:07pm UTC](https://discourse.cmake.org/t/latex-and-documents-as-first-class-citizen/248 "2019-11-24T21:07:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MathiasMagnus](https://discourse.cmake.org/user_avatar/discourse.cmake.org/mathiasmagnus/32/431_2.png) [@MathiasMagnus](https://discourse.cmake.org/u/MathiasMagnus)\
**Post date:** [November 24, 2019, 9:07pm UTC](https://discourse.cmake.org/t/latex-and-documents-as-first-class-citizen/248/1 "2019-11-24T21:07:49Z")

</div>

Hi!

Google does lead me astray on this, as I’m sure this has been brough up multiple times, but does anyone know the history of LaTeX as a language understood by CMake?

As with all languages, when not explicitly supported by CMake, it becomes cumbersome to use, as the declarative style immediately breaks down to old-school imperative scripting. Modules like [UseLATEX](https://gitlab.kitware.com/kmorel/UseLATEX) of @kmorel are extremely useful, but that is as far as LaTeX can go without backing support into CMake.

Is there any fundemental reason why no `add_document` command exists yet? LaTeX, Doxygen could be prime targets for such support and it would simplify the lives of many.

---

<div class="post-metadata">

**Author:** ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)\
**Post date:** [November 25, 2019, 4:41pm UTC](https://discourse.cmake.org/t/latex-and-documents-as-first-class-citizen/248/2 "2019-11-25T16:41:08Z")

</div>

There are far too many ways to do documentation to possibly provide a simple `add_document` abstraction in general.

The `UseLATEX` project’s README explains why it isn’t in CMake upstream.

---

<div class="post-metadata">

**Author:** ![serghei](https://discourse.cmake.org/user_avatar/discourse.cmake.org/serghei/32/6246_2.png) [@serghei](https://discourse.cmake.org/u/serghei)\
**Post date:** [November 28, 2019, 8:53pm UTC](https://discourse.cmake.org/t/latex-and-documents-as-first-class-citizen/248/3 "2019-11-28T20:53:06Z")

</div>

> [@brad.king](#):
>
> The `UseLATEX` project’s README explains why it isn’t in CMake upstream.

From UseLATEX readme:

> Nobody thinks this is a bad idea, but it hasn’t yet happened mostly out of laziness.

😂
