andreasKroepelin / polylux

A package for creating slides in Typst
https://polylux.dev/book
MIT License
1.17k stars 53 forks source link

Indented List breaks by `#line-by-line` #187

Open JeffreyAnimal opened 6 days ago

JeffreyAnimal commented 6 days ago

Bug Report

Summary

Indentation of Lists break the #line-by-line function.

Code Example

#polylux-slide[
  - bullet point 1
  #line-by-line[
      - indent bullet point 1
      - indent bullet point2
      - indent bullet point 3
    ]
  - bullet point 2
  - bullet point 3
]

Expected Result

Uncovered indented Bullet Points to be Indented.

bug_expected

Actual Result

All Bullet Points are at the Same Level.

bug1 bug2 bug3

Environment

Additional Information

Not shure if this is related or similar to Issues #128 or #162, therefore created this Issue.

andreasKroepelin commented 5 days ago

#line-by-line is a hack and will fail in many situations... Prefer using the more explicit variants.

JeffreyAnimal commented 4 days ago

Alright thank you.

I now used the following Code instead to solve my Problem:


#polylux-slide[
  - bullet point 1
      #list-one-by-one(marker:[-])[
      indent bullet point 1][
      indent bullet point 2][
      indent bullet point 3]
  - bullet point 2
  - bullet point 3
]
``
GabrielDTB commented 3 days ago

Your first list wasn't properly indented because you didn't indent the line-by-line function. Your second list was properly indented because you did indent the list-one-by-one function.

The first snippet works for me when indented like:

#polylux-slide[
  - bullet point 1
    #line-by-line[
      - indent bullet point 1
      - indent bullet point2
      - indent bullet point 3
    ]
  - bullet point 2
  - bullet point 3
]

The second snippet doesn't work for me if I don't indent the function:


#polylux-slide[
  - bullet point 1
  #list-one-by-one(marker:[-])[
    indent bullet point 1][
    indent bullet point 2][
    indent bullet point 3]
  - bullet point 2
  - bullet point 3
]```