hmemcpy / milewski-ctfp-pdf

Bartosz Milewski's 'Category Theory for Programmers' unofficial PDF and LaTeX source
https://bartoszmilewski.com/2014/10/28/category-theory-for-programmers-the-preface/
Other
10.84k stars 572 forks source link

Use `\mathit` for multi-letter identifiers #322

Closed EFanZh closed 8 months ago

EFanZh commented 8 months ago

By default, in math environment, each letter is a separate identifier or variable, so a consecutive sequence of letters typically means multiplication of several variables. To represent a multi-letter identifier, it’s better to wrap it in \mathit{}. Without \mathit{}, the result identifier would have awkward spacings between each letter.

drupol commented 8 months ago

Thanks again for your contribution!

Could you post an image before/after so we can visually see the changes you're trying to propose?

EFanZh commented 8 months ago

Sure.

image

The left one is before this change, the right one is after the change. Note the spacing around the l letter in coalg, the e in get, the e in set and the t letter in Store.

Here is another one:

image

The top one is before this change, the bottom one is after this change. Note spacings around the s in fst and the n in snd.

For other comparisons, here are the full PDFs before and after this change, you can compare each change yourself:

drupol commented 8 months ago

I don't see the difference between the two images, except in the last line... Same thing for the linked PDFs :(

image

drupol commented 8 months ago

I fail to see the changes for the e in get, the e in set and the t letter in Store.

Anyway, I got your point by looking at the the spacing around the l letter in coalg.

So, that's enough for me :)

drupol commented 8 months ago

Thanks for your contribution :)

EFanZh commented 8 months ago

Although it is a bit too late, here I have added some auxiliary lines for comparing the spacings:

image

The get to set change is a typo that I accidentally introduced. I have fixed it in the latest commit.

This is the new PDF with the fix above: after.pdf.

drupol commented 8 months ago

Excellent, very nice, thank you very much, we need more PR like this :)