Live data from Hacker News

Modern LaTeX

github.com

211–220 of 224 posts

Re: Modern LaTeX

#211

Earlier quoted context omitted.

They did call it Latek, the X in the name is the Greek letter χ (Chi) and in my opinion, it's not an elitist shibboleth but a way to showcase the advantages of their typesetting system over existing, at the time, methods that didn't invest a lot in rendering non ASCII character sets.

So it's not actually LaTaX, it's LaTeχ. Make sure you type it properly i guess.

It's a capital Chi.

Re: Modern LaTeX

#212

Earlier quoted context omitted.

LaTeX isn't intended to take layout control away from the author so much as it is intended to automatically produce a good-enough layout allowing a single author to produce a very large document without employing a designer. HTML by contrast explicitly does remove control over layout from the author and place it in the hands of the user (and their chosen user agent). Both languages have mechanisms to (somewhat) separ…

Both claims are incorrect. LaTeX would rather produce a bad document if it cannot produce a good one. Example: overfull hbox. A designer is still required who creates the documentclass, it is just that LaTeX comes with some predefined ones intended for scientific publishing. HTML+CSS require pixel-perfect rendering. Example: ACID2 test. While it might have been the idea of plain HTML at some point ( instead of ), con…

You're badly mischaracterizing tests like ACID2. The test definition includes a long list of things that invalidate the test, including things like changing the zoom level. So it's wrong to construe that test as requiring pixel-perfect rendering when it explicitly doesn't cover exactly the kind of user agent controls I'm talking about.

Your comments about LaTeX do not seem to contradict anything I said.

Re: Modern LaTeX

#213
post #38

Earlier quoted context omitted.

Its the same reason that Markdown became popular. I want my document to primarily contain content. Not a sea of handwritten tags. I don't want to manually type (or read past) HTML tags littered around the place. I don't want to manually put tags on my text, or worry about how indentation will affect my rendered output. (For example, foo and foo render differently). If I'm writing a blog post, I also don't want my pos…

Markdown as specified lets you break out HTML whenever you want, and even understands the difference between inline and block tags. Most places where you can use markdown support this. Personally I’m also a fan of https://github.com/pugjs/pug , which is an alternate syntax for HTML that I find easier to work with when I need the full power of HTML but don’t want a thicket of angle brackets.

> Markdown as specified lets you break out HTML whenever you want

I know, but breaking into raw html isn’t as useful as you’d hope. You need a lot of html just to make an image with a caption. And all that ugly html needs to be copy pasted each time it’s needed, since there’s no way to reuse it.

And there’s lots of problems you can’t really solve like that at all. For example, I want latex style automatic numbering of figures (Figure 8: Xxx) and I want to link to that figure elsewhere in the document (“for detail, see Figure 8”). I want the numbers to be automatically generated based on document order. I also want numbered sections / headings. You can sort of do with css. But you can’t automatically label the links to those sections. Markdown also doesn’t support comments. You can use html comments but then my internal notes / removed sections end up in the generated html!

Even trying to do some of this stuff makes your document become - as you said - a thicket of angle brackets. I want to retain the readability of my document along the way. Even with a tool like pug, do I have to type a P before each paragraph? Gross. I just want to write my paragraphs with line breaks, like markdown. I don’t want it peppered with stuff like that. And I don’t want forced indentation on my prose.

      p This is not a natural
      p way to write a series of paragraphs of text

Re: Modern LaTeX

#214
I glanced at the document and feel as though the author is not being very convincing on the advantages of LaTeX over WYSIWYG editors like Microsoft Word or LibreOffice Writer.

> This might seem strange if you haven’t worked with markup before, but it comes with a few advantages:

> 1. You can handle your writing’s content and its presentation separately. At the start of each document, you describe the design you want. LATEX takes it from there, consistently formatting your whole text just the way you asked. Compare this to a wysiwyg system, where you constantly deal with appearances as you write. If you changed the look of a caption, were you sure to find all the other captions and do the same? If the program arranges something in a way you don’t like, is it hard to fix?

> 2. You can define your own commands, then tweak them to instantly adjust every place they’re used. For example, the \introduce and \acronym commands in the example above are my own creations. One italicizes text, and the other sets words in small caps with a bit of extra l e t t e r s p a c i n g so the characters don’t look too crowded. If I decide that I’d prefer new terms to have this look, or that acronyms should be formatted LIKE THIS, I just change the two lines that define those commands, and every instance in this book immediately takes on the new look.

> 3. Being able to save the document as plain text has its own benefits:

> • You can edit it with any basic text editor.

> • Structure is immediately visible and simple to replicate.

> • You can automate content creation using scripts and programs.

> • You can track your changes with version control software, like Git or Mercurial.

I find the author's criticisms not convincing, particularly points 1 and 2 but some aspects of point 3 as well.

"If you changed the look of a caption, were you sure to find all the other captions and do the same?" That applies equally to LaTeX as it does to Word or Writer. In Word/Writer, you can use manual bold formatting and italics formatting for emphasis in two or so places. You can also find yourself in this situation using LaTeX by using \textbf or \textit for emphasis in different places. You can avoid this by following a convention like by defining and using something like \emphasis in LaTeX and using a character style in Word.

"If the program arranges something in a way you don’t like, is it hard to fix?" From my experience, text wrap style in Word or anchors in Writer behave roughly similar to float specifiers in LaTeX (unsure if that is the correct term).

"You can define your own commands, then tweak them to instantly adjust very place they’re used." This is the essence of using styles in Word or Writer.

"You can edit it with any basic text editor." Word can be opened/extracted like a zip, and you can access the XML if you really want to mess with the markup language under the hood, though I've never seen anybody actually do this. "You can automate content creation using scripts and programs." If you feel so motivated, I don't see how this cannot apply to Word or Writer documents alike.

"You can track your changes with version control software, like Git or Mercurial." I consider how Git or Mercurial can't handle container formats as a limitation of those software more so than a limitation of the document itself.

Re: Modern LaTeX

#215

Earlier quoted context omitted.

Note that this won't prevent the page from being displayed in other sizes, where it will most likely have a broken layout instead.

True, but with CSS you define one layout for the web format alongside a different layout for the print format, using the @page rule.

If I want only the print format this will require double the effort though.

Re: Modern LaTeX

#216
post #110

Earlier quoted context omitted.

> For latex, you choose your target at the start: A4 paper? Screen presentation? A0 poster? You can change that as you go along.

> You can change that as you go along. that's not the point they were trying to make. you may need to change the display target for every viewer .

That's an interesting point.

HTML is usually distributed 'as source'. TeX (or LaTeX) is usually compiled to some other format first, before being distributed.

Re: Modern LaTeX

#217
post #216

Earlier quoted context omitted.

> You can change that as you go along. that's not the point they were trying to make. you may need to change the display target for every viewer .

That's an interesting point. HTML is usually distributed 'as source'. TeX (or LaTeX) is usually compiled to some other format first, before being distributed.

Yeah, I wonder how good TeX renderers would have gotten if page rendering happened client side in a browser.

Re: Modern LaTeX

#218
post #216

Earlier quoted context omitted.

That's an interesting point. HTML is usually distributed 'as source'. TeX (or LaTeX) is usually compiled to some other format first, before being distributed.

Yeah, I wonder how good TeX renderers would have gotten if page rendering happened client side in a browser.

TeX worked (and works) in batch mode on ancient hardware. Today's computers are so much faster, that this should actually be fast enough to run interactively without having to change or optimise too much.

Re: Modern LaTeX

#219

Earlier quoted context omitted.

True, but with CSS you define one layout for the web format alongside a different layout for the print format, using the @page rule.

If I want only the print format this will require double the effort though.

No it doesn't? If you only want the print format, just do the print format layout, ignore the web format. Why do you care that it's broken there?
Post reply on HN