8000 Refactor some internal LaTeX code by jfbu · Pull Request #9000 · sphinx-doc/sphinx · GitHub
[go: up one dir, main page]

Skip to content

Refactor some internal LaTeX code #9000

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

Merged
merged 1 commit into from
Mar 14, 2021
Merged

Conversation

jfbu
Copy link
Contributor
@jfbu jfbu commented Mar 14, 2021

Codeline wrapping in literal blocks (possibly hard-wrap in presence of
unbreakable long strings) requires a measurement step. Spring 2021 LaTeX
adds overhead to each and every paragraph to insert hooks at
begin and end of paragraphs. For technical reasons, our measurement
(which uses a paragraph in a scratch box) could be broken by the "after
para" hook. Work around that. Perhaps actual Spring 2021 LaTeX will
have some interface to not execute hook, but this should still work.

Feature or Bugfix

  • Refactoring

@jfbu jfbu added this to the 4.0.0 milestone Mar 14, 2021
Codeline wrapping in literal blocks (possibly hard-wrap in presence of
unbreakable long strings) requires a measurement step. Spring 2021 LaTeX
adds quite some overhead to each and every paragraph to insert hooks at
begin and end of paragraphs. For technical reasons, our measurement
(which uses a paragraph in a scratch box) could be broken by the "after
para" hook. Work around that.
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.

+1 :-)

@jfbu
Copy link
Contributor Author
jfbu commented Mar 14, 2021

Thanks for rev B3FA iew, merging!

@jfbu jfbu merged commit 64ad5b5 into sphinx-doc:master Mar 14, 2021
@jfbu jfbu deleted the latex_2021_par branch March 14, 2021 20:45
jfbu added a commit to jfbu/sphinx that referenced this pull request Mar 15, 2021
Reason is that mark-up such as this:

   .. attribute:: state
                  state_machine

      The state and state machine which controls the parsing.  Used for
      ``nested_parse``.

generates two `\pysigline` each with `\phantomsection`. The latex code
to get good vertical spacing between label and its description, if label
``\parbox`` is multi-line, cause in this context the two (generally,
single-line) labels to be stacked vertically with no spacing.

This commit keeps the ``\parbox`` which fixes sphinx-doc#8980, but drops the
attempt to correct vertical distance to description, so as to not alter
the possibly more common use case of items with common description.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 13, 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.

2 participants
0