Pablo-Gonzalez-Calderon / chic-header-package

Typst package for creating elegant headers and footers
MIT License
5 stars 0 forks source link

[BUG] How to use hydra in chic #13

Open marcfir opened 4 months ago

marcfir commented 4 months ago

Describe the bug Using hydra requires a context. But when using a context, I get the warning warning: layout did not converge within 5 attempts.

To Reproduce

Configuration which reports a hydra error to use a context:

show: chic.with(
    even:(
      chic-footer(
        left-side: chic-page-number(),
      ),
      chic-header(
        left-side: emph(hydra(1)), 
      ),
      chic-separator(on:"header",stroke(dash:"solid")),
    ),
    odd:(
      chic-footer(
        right-side: chic-page-number(),
      ),
      chic-header(
        right-side:emph(hydra(2)), 
      ),
      chic-separator(on:"header",stroke(dash:"solid")),
    ),

    chic-offset(7pt),
    chic-height(1.5cm)
  )

Configuration which gives the warning:

 show: chic.with(
    even:(
      chic-footer(
        left-side: chic-page-number(),
      ),
      chic-header(
        left-side: context{ emph(hydra(1))}, 
      ),
      chic-separator(on:"header",stroke(dash:"solid")),
    ),
    odd:(
      chic-footer(
        right-side: chic-page-number(),
      ),
      chic-header(
        right-side:context{ emph(hydra(2))}, 
      ),
      chic-separator(on:"header",stroke(dash:"solid")),
    ),

    chic-offset(7pt),
    chic-height(1.5cm)
  )

BTW: Very nice work :)

Pablo-Gonzalez-Calderon commented 2 months ago

Hi!

Thanks for reporting the bug. I've been quite absent from this project for a while. I think this bug may be caused because Typst has been updated a lot since the last stable version. I'll try to make a refactor to the code and have a new stable version in the following weeks (or, hopefully, days)

Thank you 🍀