3 ms·
The issue that immediately came to mind was that if you change the kerning settings, then you can't input em dashes as --- anymore. See, for example, this Tex.S
by spekcular 6y ago
The issue that immediately came to mind was that if you change the kerning settings, then you can't input em dashes as --- anymore. See, for example, this Tex.SE question: https://tex.stackexchange.com/questions/315822/unwanted-kerning-inside-em-dash-when-using-microtype https://tex.stackexchange.com/questions/315822/unwanted-kern....
But after a while I remembered the more fundamental point that bothered me:
> one might add that it's not just microtype that doesn't offer optical kerning -- it's structural limitations in TeX's typesetting that prevent it. To TeX, each glyph is contained inside a (I guess: black) box. TeX knows the outer dimensions of those boxes, but has no clue (and doesn't care) about what the glyph looks like that's inside it.
https://tex.stackexchange.com/questions/139926/optical-kerning-with-microtype https://tex.stackexchange.com/questions/139926/optical-kerni...
And this led to bad spacing for hyphens, which led to me experimenting with manual kerning, which led to the issue that I recalled first.
Also, I am not really convinced of the merits of Vim for LaTeX. Most of my time writing is spent revising, which requires a lot of "random access edits," and I'm at least twice as fast at jumping to arbitrary locations on screen using a mouse as I am with vim (even with the usual tricks).
(I tend to think of vim as something that was purpose-built for programming in C and with usefulness inversely proportional to how far a given task is from that purpose. While I realize that's not entirely accurate, I've found it a good heuristic. Programming: vim works decently for me. General purpose writing: not so much.)
Further, the ability to control-click .pdfs and skip to the corresponding place in the .tex file, and vice versa, is an amazing convenience. I understand that there are technically ways to do this in vim, but then at that point I'm using the mouse a ton anyway and I don't really see the point of vim (which is usually proposed to be "hands don't go off keyboard = write faster" in my experience).
So, yes, I could survive if forced to use vim. I just wouldn't like it.
Given this, and given I feel I'm much more willing to experiment with these things than the average person writing papers in the physical sciences. I can't even imagine how the conversation would go if I tried to tell my 72-year-old advisor that TeXShop's not going to work anymore because he updated his computer and it's time to get friendly with the command line. These people want to do science, they don't want to learn vim shortcuts.
- drfuchs 6y agoTeX finds out about character widths and kerning pairs and ligature replacements from outside of TeX itself. TeX is perfectly happy to ligature together "--" into an en-dash, and "---" into an em-dash, and to then kern either one of them with whatever characters you like, if instructed to do so by these externally-supplied per-font instructions. So, it seems like you're being troubled by the externally-provided font info rather than any limitation of TeX per se. Boring details: TeX, as it comes from Knuth, reads TFM ("TeX Font Metric") files to supply this per-font information. Knuth's Computer Modern fonts do not contain any kerning pairs that contain dash characters, which one may be pleased or displeased about. Various enhanced-TeXs get font info from the OS or perhaps directly from, say, OpenType font files. If the ligature and kern info isn't passed into TeX from there properly, or doesn't exist in the font itself, then of course you won't get the results you're looking for.
- spekcular 6y agoYes, but there's no way to get optical kerning, right?
- leephillips 6y agoI think this information would be built in to any high-quality font. As drfuchs tried to explain, TeX has no information about letterforms; that’s not its job.
- drfuchs 6y agoArguably, there is no algorithmic way to compute high-quality kerning based on character shapes (just as there's no way to determine, say, character width just from an outline). If there were, then Apple would build it into MacOS and iOS, and Microsoft would build it into Windows, and Google would build it into Android, and then all applications from TextEdit to Word, Safari to Chrome, and troff to TeX would automatically get told about these synthetic kerning pairs, and use them by default. That said, Adobe does have a proprietary optical kerning scheme that they use in their applications. But it's turned off by default (hint, hint), and their documentation is a bit defensive about it: "Optical kerning adjusts the spacing between adjacent characters based on their shapes, and is optimized for use with Roman glyphs. Some fonts include robust kern-pair specifications. However, when a font includes only minimal built-in kerning or none at all, or if you use two different typefaces or sizes in one or more words on a line, you may want to use the optical kerning option for the Roman text in your document." Loosely translated: Fonts from real type foundries have kerning pairs carefully created by their designers; if you have slap-dash one where they didn't bother, we'll do the best we can if you want. YMMV.