Skip to content

Can't use over-/underline() with any space symbol or h() #1716

@Andrew15-5

Description

@Andrew15-5

Description

I need to extend underline to the end of the line like this:

\documentclass{article}
\usepackage{ulem}
\begin{document}
Text or no text \uline{\hfill}
\end{document}

But neither #underline(h(100%)) (or 1fr) nor #underline(sym.space) is working. I didn't find any of the settings that can replicate the same behavior, and #line() ignores any text + it is drawn automatically on the next line (not inline).

I consider this a bug, since it should work in theory, and it does work in LaTeX.

Update (v0.12.0)

Now #underline(sym.space) does work and as was pointed out in #1716 (comment) #underline(box(width: 1fr, repeat(sym.space))) now also works. I tried pretty much all fonts that I use, and they all work. I think this should simplify some of my underline util functions.

Reproduction URL

No response

Operating system

Linux

Typst version

  • I am using the latest version of Typst

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtextRelated to the text category, which is all about text handling, shaping, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions