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
Close #9985: LaTeX: Separate term and description of definition list by a new line #9988
Conversation
…tion list by a new line
Perhaps we will need some more subtle approach due to nesting case:
produces extra whitespace with this PR: What do you think @tk0miya, is it needed to think about some other approach to avoid above whitespace? Right now I can think of some approach needing some LaTeX macros but I have not worked out the details. |
@tk0miya @marxin I remember now I thus tested their hack
where I find there is too much whitespace between terms and definitions. I wonder by the way if this was already the case two or three years ago, or if something changed. whatever we do we must perhaps be careful not to break important projects such as https://github.comnumpy/numpy or at least tell them about needed adjustments. Because it seems #9985 is about making default behaviour such as in numpy pdf docs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I combine this with the current status of numpy doc which patches LaTeX it creates build failure:
! LaTeX Error: There's no line here to end.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.110 \sphinxAtStartPar
?
(using the test as in #9988 (comment), or even as in original #9985 example without nesting)
only to mention that checking a 2019 build from source I had on my disk of numpy-ref.pdf the generous vertical whitespace between (general) term in a description list and description of term was already there I feel if we do upstream at Sphinx something with same effect it should give less whitespace. memo: any change in this area may be breaking to numpy or projects having copied its LaTeX hack and will require proper announce or test. |
I think adopting numpy's way is better to us. It's simple and consistent to fix the behavior of description environment from LaTeX side. We can put a CR code just before a paragraph to avoid extra whitespace before nested list. But I worry about it makes LaTeX code inconsistent, and it will prevent to fix other problems in the future. BTW, indeed, this would be a breaking change. So it would be better to merge into the master branch (v5.0). |
MEMO: the An alternative to imitating |
I think the best style is different for each medium. So it's okay that description lists are represented in different styles between LaTeX and HTML. I did not collect statistics about preferred styles from people. But I guess many people would be familiar with the HTML style (because HTML browsers are always around in our life). TBH, I also prefer the HTML one. So I think it's better to change the style of the description lists. It would be much better if we can switch the style easily :-) |
Good suggestion! I need to do some work on this to check all instances for description lists. I find in writers/latex.py With #9999, the behaviour of definition lists will be much similar to the In the case of multi-line terms (as is possibly in glossaries and now better supported for LaTeX by #9999, and as is possible in object signatures), the task of not inserting a CR between a multi-line "label" and the item "contents" will need some modifications of LaTeX macros of #9999 or of current |
Feature or Bugfix
Purpose