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

Allow matrix delimiter to be smaller than content like latex/plaintex does #4181

Open
1 task done
Enter-tainer opened this issue May 18, 2024 · 1 comment
Open
1 task done
Labels
math Related to math syntax, layout, etc. proposal You think that something is a good idea or should work differently.

Comments

@Enter-tainer
Copy link
Contributor

Enter-tainer commented May 18, 2024

Description

In tex, the delimiter doesn't have to cover all the matrix content. But in typst it always does.

Typst

$ mat(c;c;c;c;delim: "[") mat(f;f;f;f;delim: "[") $

image

LaTeX

image

\documentclass{article}
\usepackage{lua-visual-debug}
\title{test}
\begin{document}
$$\pmatrix{c\cr c\cr c\cr c}\pmatrix{f\cr f\cr f\cr f}$$
\end{document}

Reproduction URL

No response

Operating system

Web app, Windows, Linux, macOS

Typst version

  • I am using the latest version of Typst
@Enter-tainer Enter-tainer added the bug Something isn't working label May 18, 2024
@Enter-tainer
Copy link
Contributor Author

Enter-tainer commented May 18, 2024

I suspect this is because typst use a special algorithm to determine the size of the matrix delimiter. AFAIK in texbook, the size of the delimiter is max(inner-size - 5pt, inner-size * 0.901) (\delimiterfactor and \delimitershortfall). And typst use something different: The size is set to 1.1 * inner-size and a 0.1x shortfall.

But i don't really understand it yet. Maybe it's because tex and typst follows somehow different layout model

@Enivex Enivex added math Related to math syntax, layout, etc. proposal You think that something is a good idea or should work differently. and removed bug Something isn't working labels May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
math Related to math syntax, layout, etc. proposal You think that something is a good idea or should work differently.
Projects
None yet
Development

No branches or pull requests

2 participants