otini discovers math typesetting 

These fraction rules are too thick; but which value am I to use? The math constants table of my math font (XITS) says 0.66, but 0.66 what? 😕

otini discovers math typesetting 

i can haz debuggin

Show thread

otini discovers math typesetting 

@otini Wow. That looks very similar to what I did. What did you base it on? I went through many iterations before I figured out some basics with respect to for example how a faction should be aligned with respect to the baseline.

Most of the time I was generating an expression using LaTeX and then checking how it's done there.

I even went to the source code of TeX to see how they did some things.

Is there some documentation somewhere?

otini discovers math typesetting 

@loke So this is all based on the work by Rui Xia at github.com/simoncozens/sile/pu, where he implemented the base typesetting algorithm as described by the TeXbook.

As for me, to style things I read chapters 16 to 18 in the TeXbook for general guidelines, and I use the “math constants” included in my math font. For instance, the height of the fraction rule relatively to the baseline (what Knuth calls “the axis”) is one of the constants.

otini discovers math typesetting 

@loke And I found documentation about OpenType math features, such as the constants table, there: docs.microsoft.com/en-us/typog
But it is not very satisfactory, as I complained in my initial toot.

otini discovers math typesetting 

@otini Wow. That's a lot of detail, and certainly not something I've paid attention to. 🙂 I've basically just picked measurements that seems to make sense, and the end result is OK, although not perfect by any definition.

otini discovers math typesetting 

@otini What is next for me is to try to somehow implement a line-breaking system for long expressions. I really don't know how to get started on that.

otini discovers math typesetting 

@loke @otini Honestly, anyone doing computer typesetting should read the TeXbook. You don't need to do everything Knuth's way, but understanding his work is a good place to start.

otini discovers math typesetting 

@tfb
I have read parts of it. But it talks about TeX, and as far as I remember doesn't go into the rules for laying out equations. After all, this knowledge is encoded in TeX itself, so if you're using that tool, there is no need to know all of that.

The place I found that contains all of this is the TeX source code. It's written using literate programming and can be typeset as a book. It's very detailed though and it takes time to find things.
@otini

otini discovers math typesetting 

@tfb @otini
I will look up the book again though. Since both of you are saying there is useful information in there, it's pretty clear I didn't read that part.

It's unsurprising, since when I read it I wasn't interested in maths layout

otini discovers math typesetting 

@loke @tfb I would advice the beginning of chapter 17 (More About Math) which talks about the 8 possible styles (that determine font size and sub–superscript positions). This way of doing things has become so standard that it is directly present in the math features of OpenType.

Follow

otini discovers math typesetting 

@otini
I see. Extra opentype information isn't exposed to McCLIM at the moment, and I didn't even know such information was available in opentype.

I guess I'll have to investigate this some more, and perhaps improve the McCLIM interface to it.

However, I've managed to get a decent result even without it so perhaps it's acceptable.
@tfb

Sign in to participate in the conversation
Functional Café

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!