Skip to content
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

Warning: Automatically setting /Lang (en) or /Lang (en-US) without \DocumentMetadata{} would be a bad idea #51

Closed
ghost opened this issue May 19, 2023 · 1 comment

Comments

@ghost
Copy link

ghost commented May 19, 2023

Severity: a warning, not a bug yet.

In the Abstract of “The LaTeX PDF management testphase bundle” version 0.95x, it's unclear whether after the test phase of the pdfmanagement, the command \DocumentMetadata{} (without any contents) is needed to activate the PDF management, or whether the PDF management is activated even without \DocumentMetadata{}.

In the second case, it would be a bad idea to force /Lang (en) or /Lang (en-US) into the Catalogs of the PDF files obtained by simply re-compiling old, unchanged LaTeX documents. This would make the PDF files produced from all non–US-English LaTeX documents worse. As of now, compiling

\documentclass{article}%or \documentclass[ngerman]{article}
\pdfcompresslevel=0
% you may add \usepackage[ngerman]{babel} here
\begin{document}
Bratpfanne% German contents
\end{document}

does NOT put /Lang (en) or /Lang (en-US) into the output PDF, regardless of whether the author specifies the language ngerman as a class option or via babel or not at all. This (not specifying the English language in the Catalog) is jolly good and should stay this way. Of course, if the language option ngerman is specified in as the main language in a clear way in the input LaTeX document, we may opt for specifying /Lang (de) or /Lang (de-DE) in the Catalog, and it would probably be a wise thing to do (cf. http://github.com/latex3/babel/issues/244). However, we should NOT generate /Lang (en) or /Lang (en-US) automatically for such old, pre-pdfmanagement documents, since the resulting PDF file would be worse (because it'd specify a language inconsistent with the contents) than before the advent of the pdfmanagement code.

@u-fischer
Copy link
Member

I doubt that we will activate the pdfmanagement if \DocumentMetadata is not used. In any case: the code that sets the /Lang entry is not in the pdfmanagement code, but in the \DocumentMetadata implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant