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

Em-nesting, alignment-nesting, greek arithmetic numbering #1913

Merged

Conversation

Omikhleia
Copy link
Member

@Omikhleia Omikhleia commented Nov 19, 2023

Proposed features from silex.sile - precisely, the subset from silex.fixes

Motivated by #1866

  • Nesting-aware \em (Does SILE (intend to) support nesting \em? #1048) - breaking
  • Nesting-aware (i.e. honoring the margins) center, raggedright and raggedleft + the latter two no longer cancelling paragraph indent1 - breaking
    • The "blockquote" example in the manual is fixed to also properly honor alignment, and the command is provided in the plain class
  • Greek alphabetical numbering special case (similar to "alpha").
  • Small robustness fix/refactor for inputter options

Each topic is a separate commit, with detailed commit logs/

Still to do if we agree on the solution:

  • Check failing tests
  • Add new tests
  • Check the manual (obvious change done in the above commits, but maybe we can improve other places)

Footnotes

  1. This is a bold move, but the two things are somewhat orthogonal here, and parindent-cancellation is doable by other means.

@Omikhleia Omikhleia added the enhancement Software improvement or feature request label Nov 19, 2023
@Omikhleia
Copy link
Member Author

This is a bold move, but the two things are somewhat orthogonal here, and parindent-cancellation is doable by other means

But i'm not strongly attached to it either. It makes things simpler when one would nest various alignments, but that's kind of an edge case anyway.

@alerque alerque added this to the v0.15.0 milestone Nov 20, 2023
@alerque
Copy link
Member

alerque commented Nov 20, 2023

A cursory glance suggests I'll be up for most of this. I targeted it for v0.15.0 since I'd like to resolve especially the inputter changes by then as well as bathing as many breaking changes as we can without making migration too hard. If we cherry-pick some and not other bits that's fine too, but lets try to sort out yes now/no never/maybe later answers on breaking changes sooner rather than later.

@alerque
Copy link
Member

alerque commented Nov 20, 2023

I cherry picked the obvious wins of the inputter touchup and Greek numbering (with a couple new tests) to develop directly, that should leave just the intertwined margin/nesting stuff for this PR.

BREAKING CHANGE: The former implementation of the "em" command did not
support nesting and was just setting the font style to italic. The
command now alternates italic and regular when nested.
@alerque alerque force-pushed the feat-backport-silex-fixes-develop branch from 7d714c9 to c91d9a7 Compare November 20, 2023 19:35
@Omikhleia Omikhleia mentioned this pull request Nov 26, 2023
3 tasks
classes/plain.lua Outdated Show resolved Hide resolved
@alerque alerque linked an issue Dec 6, 2023 that may be closed by this pull request
@alerque alerque removed the request for review from simoncozens December 13, 2023 11:58
@Omikhleia Omikhleia self-assigned this Dec 13, 2023
Omikhleia and others added 5 commits January 10, 2024 15:35
BREAKING CHANGE: The "center", "raggedleft" and "raggedright"
environments formerly reset the margins (left or right skips), meaning
they'd take the full frame width. They all cancelled the paragraph
indent. The new behaviour honors the fixed part of the parent context's
margins, meaning that if you have an environment playing with margins
such as an epigraph or an indented quote, those margins are not lost.
The raggedleft and raggedright environment also now no longer cancel the
pararagraph indent.
The plain class now provides a "blockquote" environment for indented
(and possibly nested) quotations.
The command being now proposed in the plain class, align the example
code with it (i.e. keep the stretchability of the nesting context)
@alerque
Copy link
Member

alerque commented Jan 10, 2024

I think we'll move ahead with the current breaking change that does not cancel parindent, but we'll add a shim to the retrograde package that restores the old behavior. This should be relatively easy to shim this way, and since the actual value of parindent is also changing in this release I think it makes sense to allow the breakage but also support old documents with the same mechanism.

Obviously the retrograde shim will not be expected to also support nested use cases the way the new code does, just cover the very basic case of a single level usage and simulate the old behavior. This will probably mean either stashing a private setting, having some private hook, or registering a wrapper/replacement function.

@alerque alerque force-pushed the feat-backport-silex-fixes-develop branch from 73d09f6 to 958353e Compare January 10, 2024 12:47
@alerque alerque force-pushed the feat-backport-silex-fixes-develop branch from 958353e to 4f291da Compare January 10, 2024 19:43
@alerque alerque force-pushed the feat-backport-silex-fixes-develop branch from 4f291da to 139e47d Compare January 10, 2024 19:50
@alerque alerque merged commit c00eb7e into sile-typesetter:develop Jan 10, 2024
17 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Software improvement or feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Does SILE (intend to) support nesting \em?
2 participants