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

Support footnotes #1509

Merged
merged 37 commits into from Dec 11, 2021
Merged

Support footnotes #1509

merged 37 commits into from Dec 11, 2021

Commits on Nov 15, 2021

  1. Configuration menu
    Copy the full SHA
    88e589b View commit details
    Browse the repository at this point in the history
  2. Remove footnotes from the flow

    liZe committed Nov 15, 2021
    Configuration menu
    Copy the full SHA
    75e3435 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    20fdc45 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    da1cd5e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b36671b View commit details
    Browse the repository at this point in the history

Commits on Nov 19, 2021

  1. Configuration menu
    Copy the full SHA
    1c3fd97 View commit details
    Browse the repository at this point in the history

Commits on Nov 23, 2021

  1. Configuration menu
    Copy the full SHA
    fe5fa64 View commit details
    Browse the repository at this point in the history
  2. Put markers in footnotes

    liZe committed Nov 23, 2021
    Configuration menu
    Copy the full SHA
    9f61ce9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2da0a6c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c90886c View commit details
    Browse the repository at this point in the history

Commits on Nov 26, 2021

  1. Configuration menu
    Copy the full SHA
    b633bef View commit details
    Browse the repository at this point in the history

Commits on Nov 27, 2021

  1. Configuration menu
    Copy the full SHA
    a3b7f7f View commit details
    Browse the repository at this point in the history
  2. Replace max_position_y by bottom_space

    As the bottom of the page is now dynamic (because it changes with footnotes),
    passing the max_position_y is difficult: it would require the value to be
    passed to layout functions, and returned (possibly updated) by these functions.
    
    The new solution is to store the page bottom in the context, and to update it
    when a footnote is included. The new max position y is calculated when needed,
    using the updated position of the page bottom.
    
    To handle extra bottom spaces (bottom padding/border/margin of a parent box for
    example), a bottom_space parameter is given when needed. This value can be set
    to -inf when we don’t want to take care of the page bottom (that’s equivalent
    to max_position_y=inf).
    liZe committed Nov 27, 2021
    Configuration menu
    Copy the full SHA
    6a9dac4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    36b7452 View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2021

  1. Configuration menu
    Copy the full SHA
    f5e520e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8f60b81 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b5d3475 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e6da2c9 View commit details
    Browse the repository at this point in the history
  5. Some footnotes tests

    grewn0uille committed Nov 29, 2021
    Configuration menu
    Copy the full SHA
    d42b0fa View commit details
    Browse the repository at this point in the history

Commits on Nov 30, 2021

  1. More footnotes tests

    grewn0uille committed Nov 30, 2021
    Configuration menu
    Copy the full SHA
    c5f03c2 View commit details
    Browse the repository at this point in the history

Commits on Dec 4, 2021

  1. Remove useless import

    grewn0uille committed Dec 4, 2021
    Configuration menu
    Copy the full SHA
    dfc3d0a View commit details
    Browse the repository at this point in the history

Commits on Dec 7, 2021

  1. Configuration menu
    Copy the full SHA
    6f190a2 View commit details
    Browse the repository at this point in the history
  2. Make footnote call’s style inherit from the footnote’s parent

    There’s nothing in the specification about that, but here’s what we do now:
    
    - The style of a footnote inherits from its parent’s style, it doesn’t inherit
    from the footnote area’s style. That’s how cascade works for real elements, and
    there’s no real reason or way to avoid this.
    
    - The style of a footnote marker inherits from the footnote style. The marker
    is just like a ::before block regarding to its style, even if it is actually
    put before the footnote element in the footnote body.
    
    - The style of a footnote call inherits from the footnote parent’s style. It
    doesn’t inherit from the footnote’s style, that’s actually applied to the
    footnote and inherited by its marker.
    
    This way, we keep the "normal" cascade for "normal" elements, and have
    everything else being quite obvious.
    
    The 1st point is annoying in real-life use cases, because we’d really like to
    see the footnote’s style inherit from the footnote area’s style. But we really
    don’t want to break the cascade. Do we? No, we don’t.
    
    The 3rd point is probably the most disturbing one, mainly because
    .footnote::footnote-call doesn’t match the call: to match a footnote call in a
    paragraph, for example, we have to use p::footnote-call instead.
    liZe committed Dec 7, 2021
    Configuration menu
    Copy the full SHA
    7aa0860 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    232d9ef View commit details
    Browse the repository at this point in the history
  4. Handle footnote-display

    Handling footnote-display requires the footnote area children to be recreated
    each time one footnote is added: as footnotes can be blocks or inlines, we have
    to create anonymous boxes each time, and thus to do the whole footnote area
    layout.
    liZe committed Dec 7, 2021
    Configuration menu
    Copy the full SHA
    313a09d View commit details
    Browse the repository at this point in the history

Commits on Dec 8, 2021

  1. Fix inline footnotes test

    liZe committed Dec 8, 2021
    Configuration menu
    Copy the full SHA
    a702292 View commit details
    Browse the repository at this point in the history
  2. Fix more tests for footnotes

    liZe committed Dec 8, 2021
    Configuration menu
    Copy the full SHA
    ed0916d View commit details
    Browse the repository at this point in the history
  3. Fix last tests for footnotes

    liZe committed Dec 8, 2021
    Configuration menu
    Copy the full SHA
    5e6b21c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7c8c291 View commit details
    Browse the repository at this point in the history
  5. Remove useless color from tests

    liZe committed Dec 8, 2021
    Configuration menu
    Copy the full SHA
    7126f1b View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f54da35 View commit details
    Browse the repository at this point in the history

Commits on Dec 9, 2021

  1. Handle footnote-policy

    liZe committed Dec 9, 2021
    Configuration menu
    Copy the full SHA
    8cc6b25 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d457486 View commit details
    Browse the repository at this point in the history
  3. Add test for footnotes margins

    liZe committed Dec 9, 2021
    Configuration menu
    Copy the full SHA
    1800bb5 View commit details
    Browse the repository at this point in the history

Commits on Dec 10, 2021

  1. Configuration menu
    Copy the full SHA
    3f596ce View commit details
    Browse the repository at this point in the history

Commits on Dec 11, 2021

  1. Configuration menu
    Copy the full SHA
    21484fa View commit details
    Browse the repository at this point in the history
  2. Update documentation

    liZe committed Dec 11, 2021
    Configuration menu
    Copy the full SHA
    87e4765 View commit details
    Browse the repository at this point in the history