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

LaTeX: improve docs of 'printindex' and 'makeindex' #8851

Merged
merged 1 commit into from
Feb 9, 2021

Conversation

jfbu
Copy link
Contributor

@jfbu jfbu commented Feb 8, 2021

Closes #8055

@jfbu jfbu added this to the 3.5.0 milestone Feb 8, 2021
generate the index differently, append some content after the index, or
change the font. As LaTeX uses two-column mode for the index it is
often advisable to set this key to
``'\\footnotesize\\raggedright\\printindex'``. Or, to obtain a one-column
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The jsbook.cls does this automatically, but not the ujbook.cls used with uplatex. As uplatex will be default at next major release I did not add this information. But note that the switch to uplatex has the after effect that index for Japanese document does not use \footnotesize setting... so the advice here might be useful to Japanese users in future :)

change the font. As LaTeX uses two-column mode for the index it is
often advisable to set this key to
``'\\footnotesize\\raggedright\\printindex'``. Or, to obtain a one-column
index, use ``'\\def\\twocolumn[#1]{#1}\\printindex'`` (this trick may fail
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This trick works with our default 'manual' and 'howto' also with Japanese, but for the latter either with 'howto' or with uplatex. With platex and 'manual' (jsbook.cls) it will not work because since #8779 (support for hlist directive) we load multicol package and jsbook.cls in that case does not use \twocolumn macro in theindex environment.

I figured it was not worthwile adding these details as anyhow uplatex will soon be default.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I figured it was not worthwile adding these details as anyhow uplatex will soon be default.

+1

@@ -527,7 +538,6 @@ Keys that are set by other options and therefore should not be overridden are:
``'title'``
``'release'``
``'author'``
``'makeindex'``
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have searched througout our files and I see no reason why this 'makeindex' was said to be set by other options. There may have been some confusion with the makeindex step which uses mendex with Japanese class, or it was right in the past, but something changed.

@jfbu jfbu mentioned this pull request Feb 8, 2021
Copy link
Member

@tk0miya tk0miya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

change the font. As LaTeX uses two-column mode for the index it is
often advisable to set this key to
``'\\footnotesize\\raggedright\\printindex'``. Or, to obtain a one-column
index, use ``'\\def\\twocolumn[#1]{#1}\\printindex'`` (this trick may fail
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I figured it was not worthwile adding these details as anyhow uplatex will soon be default.

+1

@jfbu
Copy link
Contributor Author

jfbu commented Feb 9, 2021

Merging, thanks!

@jfbu jfbu merged commit 1c08467 into sphinx-doc:3.x Feb 9, 2021
@jfbu jfbu deleted the latex_enhance_docs_about_index branch February 9, 2021 15:21
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A potential display bug with the LaTeX generation step in Sphinx
2 participants