lbeckman314 / mdbook-latex

An mdbook backend for generating LaTeX and PDF documents.
https://liambeckman.com/code/mdbook-latex/
Mozilla Public License 2.0
104 stars 11 forks source link

Allow for date TOML option to get date into LaTeX #8

Closed jpgoldberg closed 4 years ago

jpgoldberg commented 4 years ago

Resolves #6

tectonic::latex_to_pdf does not look at the system time, and so the \today TeX macro will use the beginning of the Unix epoch, resulting in documents with dates of January 1, 1970 or December 31, 1969 (depending on time zone).

This allows one to specify a date string in the [output.latex] section of the TOML so that, for example,

[output.latex]
pdf = true
date = "18 January, 2038"

could all one to specify a date that would appear as specified in the output's title page.

The changes should be fully backwards compatible. TOMLs that do not specify the date will continue to work as before.

Documentation change

This also includes a documentation change, illustrating the use of the new configuration option as well as documenting previously undocumented options.

Code tidy

During the course of working on this, I did some minor tidying of eliminating compiler and clips warnings.