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

Inline math blocks don't render edge of tall expressions #17

Open
jac0b-w opened this issue Aug 3, 2023 · 2 comments
Open

Inline math blocks don't render edge of tall expressions #17

jac0b-w opened this issue Aug 3, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@jac0b-w
Copy link

jac0b-w commented Aug 3, 2023

$|e^(i(arrow(k) dot arrow(r)))|^2_7$ incorrectly renders the superscript and subscript numbers like so:
image

@fenjalien fenjalien added the bug Something isn't working label Aug 3, 2023
@fenjalien
Copy link
Owner

It'll be because the Typst content is too tall for the page size (which is set to the line height). I'll look into allowing the page height for inline math to be auto.

@fenjalien
Copy link
Owner

Unfortuntaly this doesn't look like it can be fixed until #5 as a known length is required to size the image correctly. For a block its the width of the page and for inline elements its the line height. So by removing the line height you can't really size its width, you also won't be able to align the baseline.

The best workaround I can think of is to just change the line height but you can't really do that on a line-by-line basis. One idea I have though is to create a typst html element whose body is some Typst source and gets rendered as such. It would allow the passing of a custom height to the element. (fyi you can write pure html in Obsidian files)

<typst height="30">some typst source here</typst>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants