4 ms·
When I'm OK with the defaults, LaTeX is a breeze. When I want to change something nontrivial about the formatting or style, it's a nightmare. For example, ther
by spekcular 6y ago
When I'm OK with the defaults, LaTeX is a breeze.
When I want to change something nontrivial about the formatting or style, it's a nightmare. For example, there are zero mature fonts besides the default computer modern that also have math rendering that's aesthetically acceptable to me. And I forget the details, but typesetting is handled in such a way that the kerning around things like hyphens is broken. I've fixed it manually before in places where it was particularly egregious.
Also on this point: an ungodly number of hours are wasted every year by academics figuring out how to contort LaTeX so the resulting document complies with NSF grant specifications, which you must meet or be auto-rejected. In particular, NSF requires one-inch margins, but there's no way to force the typesetting engine to strictly respect the margins you set. So at the end you're left to turn the visual margin guides on and check there are no margin overruns, or you risk getting your proposal set to the trash (theoretically, at least).
I've also heard that LaTeX editors are development disasters with a bus factor of one. The NSF really ought to fund them, because if we wake up one day after the maintainers of all the popular editors die and Apple/Microsoft force an operating system update that breaks compatibility, paper writing in the physical sciences will grind to a halt.
- leephillips 6y ago“typesetting is handled in such a way that the kerning around things like hyphens is broken” Can you give more details about this? I’ve never heard this complaint before, nor noticed this myself. Also, I’m not sure I understand what you are saying about “LaTeX editors”; I use Vim, and it works quite well.
- spekcular 6y agoThe 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.
- zauguin 6y ago"In particular, NSF requires one-inch margins, but there's no way to force the typesetting engine to strictly respect the margins you set. So at the end you're left to turn the visual margin guides on and check there are no margin overruns, or you risk getting your proposal set to the trash (theoretically, at least)." TeX should always give you warnings like "Overfull \hbox (0.43386pt too wide) in paragraph at lines 42--45" and the text of theaffected line when it "disrespects your margins", so I don't see why you have to check for them visually?
- spekcular 6y agoOh, I forgot about the console. I still find it annoying I have to worry about this at all and can't enforce it.
- svat 6y agoBut you can enforce it in many ways; for example you can set `\emergencystretch=\maxdimen` (or any reasonably large value) and you'll never have overfull boxes (what you called margin overruns), unless of course you have a single unbreakable "word" longer than a line by itself. (On the TeX.SE website here are a couple of answers of mine about related stuff and alternative approaches: https://tex.stackexchange.com/a/422652 https://tex.stackexchange.com/a/422652 https://tex.stackexchange.com/a/401315 https://tex.stackexchange.com/a/401315 though the canonical question with good answers is probably this: https://tex.stackexchange.com/q/50830 https://tex.stackexchange.com/q/50830 .) So this complaint of "I can't enforce that there are no margin overruns" is (to use the same word) actually something like "If I don't take any steps to avoid overruns, and moreover ignore the warnings that are specifically about overruns, then there are overruns". This complaint is not specific to you and is surprisingly common actually, which brings me to my main point, which is that the majority of people seem to use TeX/LaTeX without ever having read the manual. Some of them even joke about "incomprehensible" messages like "overfull hbox". But the whole point of TeX, what TeX is at its core, is this breaking-paragraphs-into-lines (in my view, the rest of TeX is just a large wrapper around this basic function of setting boxes). The preface of the TeXbook describes it as "TeX, a new typesetting system intended for the creation of beautiful books", and for its initial design goals, it does make sense that it chooses by default to declare defeat in impossible situations and overflow margins with a warning to the user so that they can take appropriate action, instead of silently producing an "ugly" paragraph with lines subtly looser than whatever tolerance settings the user has specified. What is remarkable here is that a lot of people are using TeX who do not care about meticulous typesetting of "beautiful books" at all, and will blithely ignore warnings related to such matters. The lesson may be that such a state of affairs is inevitable, so perhaps a better default for similar software today would be to produce loose lines to fit in the margin, so that results are good even for the users who don't read the manual, or even the warnings, or even proofread the final result.
- 1-more 6y ago> there are zero mature fonts besides the default computer modern that also have math rendering that's aesthetically acceptable to me The only one I like is URW Garamond but it's a breeze to install and use and I think it stands head and shoulders above everything else. It also matches the math pretty well imho. I feel you though: Computer Modern is pretty ugly and most other fonts really clash with the math rendering by default. https://tug.org/FontCatalogue/garamond https://tug.org/FontCatalogue/garamond
- diarrhea 6y agoI've been extremely happy with the TeX Gyre family. Its Pagella font comes with a math sibling and both together cover a wide range of symbols at high quality.
- bradrn 6y ago> I've also heard that LaTeX editors are development disasters with a bus factor of one. In case anyone else is wondering about this: > The bus factor is a measurement of the risk resulting from information and capabilities not being shared among team members, derived from the phrase "in case they get hit by a bus." (https://en.wikipedia.org/wiki/Bus_factor https://en.wikipedia.org/wiki/Bus_factor)