which results in .
This is the method widely used in the internet and many LaTeX users, but it does not satisfy me, because if you would write it per hand, you would write the second right ker a bit more under the first and not on the same level. Also the size of the slash does not increase automatically, and e.g. here it lools off: .
I’m not sure what’s the best you can do in the current version, but in the next release (0.14) you will be able to set the style of fractions (see merged PR here):
#set math.frac(style: "horizontal")
$ ker(H^n) / ker(H^(n-1)) $
// Or the same with a local switch:
$ frac(style: "horizontal", ker(H^n), ker(H^(n-1))) $
This looks the same as a \/ b or a slash b though. Maybe you want the skewed style:
You can automatically replace fractions with lr using a show rule:
#show math.frac: it => $lr(it.num mid(slash) it.denom, size: #125%)$
This one is a bit harder; I have a solution for your use case, but it affects sizing of math in general. I guess the general-purpose solution is waiting for 0.14.
Anyway, here 's my imperfect approach using move for skewed fractions:
#show math.frac: it => {
let offset = 2pt
let num = move(dy: -offset, it.num)
let denom = move(dy: offset, it.denom)
$lr(num mid(slash) denom, size: #(125% + 2*offset))$
}
$
ker(H^n) / ker(H^(n-1)) \
a^2/(sum b) \
$
One question regarding the 0.14 release solution:
Is it possible to define an over such that
$ ker(H^n) over ker(H^(n-1)) $
expands automatically to
$ frac(style: "skewed", ker(H^n), ker(H^(n-1))) $
?
With other words, to “in between functions”, f(a,b) that can be written as a f bexist? If not, is it planned to include them?
Or alternatively, since the / case is special even today, if it is possible to define multiple /s with different default settings?
For this use case the benefit over defining let over(a,b)=frac(style: "skewed", a, b) is small, but indeed notable.