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

Derivative delimiter matching #26

Open
th1j5 opened this issue Apr 3, 2024 · 0 comments
Open

Derivative delimiter matching #26

th1j5 opened this issue Apr 3, 2024 · 0 comments

Comments

@th1j5
Copy link

th1j5 commented Apr 3, 2024

When writing out a formula, I would want to achieve something like (3).
Only (1),(2) and (4) are easily feasible in typst (with physica), without the manual size adjustment in (3) and (5), which is still not exactly the same as automatic typesetting would have it (compare the size of the parentheses in (5)).

I know little about typesetting (and typst), but I thought it might be an improvement upon things when one doesn't have to manually 'guess' the size for these parentheses, but let it be done automatically by the dv function?
image

// No aligment, see e.g. https://github.com/typst/typst/pull/1849
$ &dv(          (f(x) plus.minus g(x)) ,x, s:#none)  &= ... $
$ &dv(          (f(x) plus.minus g(x)) ,x, s:slash)  &= ... $
$ &dv(,x)   lr( (f(x) plus.minus g(x)) ,size: #200%) &= ... $
$ &(dv(,x))     (f(x) plus.minus g(x))               &= ... $
$ &(dv(,x)) lr( (f(x) plus.minus g(x)) ,size: #200%) &= ... $
  1. What is your opinion on this? Should this be supported by physica, or is my way (lr(... ,size: #200%)) the 'best' way (I'd like to think not...)?
  2. If this could be supported by physica, how would one do this?
    • I would suggest to have another option in the s: argument of dv (and similar commands).
      This option would ask that the function is pretty large and thus needs this particular typesetting.
      How would we call this option? large_function, ...
    • The implementation could look something like the following pseudo-code?
      size = maximum(height of the content box, height of the d/dx box)
      where size is the height of the parentheses.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant