-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Latex] \today does not do anything #7905
Comments
This is by design. Pandoc allows you to include raw LaTeX in markdown, but it gets passed through only to LaTeX, not to HTML, which wouldn't know what to do with it. |
Sorry, I assumed your source was markdown, not LaTeX; you didn't say. |
|
We could think about changing the first output above to
Of course there's the question what date format to use. We don't have awareness of localized date formats, so it's probably best just to use something like YYYY-mm-dd, even though this is a bit different from what you'd get in LaTeX. |
I think Latex uses dots rather than hyphens. But it's still better than producing nothing at all. |
The format LaTeX uses depends on your locale. When I use |
Aside: there's an example in the Lua filters docs that adds a (localized) date: https://pandoc.org/lua-filters.html#setting-the-date-in-the-metadata |
We can easily generate a formatted date if we know what format to use. The missing piece is figuring out what format to use, e.g., based on the LOCALE environment variable or the |
Explain the problem.
Latex has a special
\today
command to print today's date, and it is not outputting anything in the HTML format. This command can be very useful for serving documentations via a CI, for example.Current workaround is to create a placeholder for a date and replace it with the date generated by other means (e.g. UNIX
date
).Pandoc version?
The text was updated successfully, but these errors were encountered: