Live data from Hacker News

Towards LaTeX in the Browser

hackernoon.com

41–50 of 68 posts

Re: Towards LaTeX in the Browser

#41
post #39

Earlier quoted context omitted.

It's an interesting idea. At what point, though, do we draw the line between what a character set (like Unicode) should handle, and what should be handled by a higher-level layer? I'm thinking that things like boldness, italicisation, and super script aren't really the job for a character set.

Unicode already has 𝐛𝐨𝐥𝐝, 𝘪𝘵𝘢𝘭𝘪𝘤 and ˢᵘᵖᵉʳˢᶜʳⁱᵖᵗ variants of the Latin alphabet.

Maybe it’s just iOS, but the “bold” characters are serifed and the “superscript” one’s aren’t a consistent size between each other.

Re: Towards LaTeX in the Browser

#42
post #4

Are there any other solutions to document typesetting with latex-like features? TeX is very obtuse for someone who hasn't been using it for a long time.

For lightweight stuff, there's vanilla Markdown, but you have no control over formatting. For more serious work using markdown, you can try out Ulysses[0] or Scribus[1]. And, if you feel like spending an obscene amount of money, on the order of $10k, there's Arbortext APP[2]. (I don't know why this even exists?) [0]: https://ulyssesapp.com/ [1]: https://www.scribus.net/ [2]: https://en.wikipedia.org/wiki/Arbortext_Ad…

> but you have no control over formatting

Can’t CSS make up for that to some extent?

Re: Towards LaTeX in the Browser

#43
post #39

Earlier quoted context omitted.

It's an interesting idea. At what point, though, do we draw the line between what a character set (like Unicode) should handle, and what should be handled by a higher-level layer? I'm thinking that things like boldness, italicisation, and super script aren't really the job for a character set.

Unicode already has 𝐛𝐨𝐥𝐝, 𝘪𝘵𝘢𝘭𝘪𝘤 and ˢᵘᵖᵉʳˢᶜʳⁱᵖᵗ variants of the Latin alphabet.

yuck https://i.imgur.com/EqKh7qC.png

Re: Towards LaTeX in the Browser

#44

I love the output of LaTeX but the language itself (and it’s dependencies and packages) are an absolute horror show. I’ve never understood how people can learn be it so, writing it is painful, it’s tooling is abysmal , and it rarely seems to work except on the person who wrote its machine. We’ve got to be able to do better.

> it’s tooling is abysmal

It seems like you haven't tried many editors. Have you tried TeXStudio (https://www.texstudio.org/)?

> it rarely seems to work except on the person who wrote its machine.

I and many others edit the same documents at the university where I work, without significant issues. Distributions like TeXLive (https://www.tug.org/texlive/) provide a consistent all-inclusive cross-platform solution.

Re: Towards LaTeX in the Browser

#45
post #39

Earlier quoted context omitted.

Unicode already has 𝐛𝐨𝐥𝐝, 𝘪𝘵𝘢𝘭𝘪𝘤 and ˢᵘᵖᵉʳˢᶜʳⁱᵖᵗ variants of the Latin alphabet.

Maybe it’s just iOS, but the “bold” characters are serifed and the “superscript” one’s aren’t a consistent size between each other.

Unicode only defines the codepoints for characters, it doesn't require anyone to actually make them look good. Since those characters were specifically only included to represent mathematical texts where formatting needs to be preserved, it's unlikely anyone is spending much effort on making them look good as text.

Regarding serifs: there are actually two variants of both bold and italic (and bold italic), one serifed and one not. Wikipedia has a chart of the different options here: https://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symb...

Re: Towards LaTeX in the Browser

#46
I read the post but I still don't understand: is it possible to define new commands using \def or \newcommand? At first I thought these are what the other meant by "macro", but later he says

> We are exploring ways for users to define non-default environment behaviors in the browser. The same goes for macros used outside the dollar and double-dollar fences.

But I can't use \def or \newcommend to define things that appear inside dollar signs either.

Re: Towards LaTeX in the Browser

#47
post #39

Earlier quoted context omitted.

It's an interesting idea. At what point, though, do we draw the line between what a character set (like Unicode) should handle, and what should be handled by a higher-level layer? I'm thinking that things like boldness, italicisation, and super script aren't really the job for a character set.

Unicode already has 𝐛𝐨𝐥𝐝, 𝘪𝘵𝘢𝘭𝘪𝘤 and ˢᵘᵖᵉʳˢᶜʳⁱᵖᵗ variants of the Latin alphabet.

Yes, and I'm not convinced that it is the right thing to do.

Re: Towards LaTeX in the Browser

#48
post #44

I love the output of LaTeX but the language itself (and it’s dependencies and packages) are an absolute horror show. I’ve never understood how people can learn be it so, writing it is painful, it’s tooling is abysmal , and it rarely seems to work except on the person who wrote its machine. We’ve got to be able to do better.

> it’s tooling is abysmal It seems like you haven't tried many editors. Have you tried TeXStudio ( https://www.texstudio.org/ )? > it rarely seems to work except on the person who wrote its machine. I and many others edit the same documents at the university where I work, without significant issues. Distributions like TeXLive ( https://www.tug.org/texlive/ ) provide a consistent all-inclusive cross-platform solution.

TeXStudio would be a perfect example of its abysmal tooling. It’s better than the CLI tools but it’s an awful editor and highlights how incompatible with a good writing experience LaTeX is.

Yes, many people produce good work in it - it’s output is fantastic after all - but an editor that would have been a substandard user experience in the 90s is the best LaTeX has in tooling.

That’s exactly what I mean!

Re: Towards LaTeX in the Browser

#49

I read the post but I still don't understand: is it possible to define new commands using \def or \newcommand? At first I thought these are what the other meant by "macro", but later he says > We are exploring ways for users to define non-default environment behaviors in the browser. The same goes for macros used outside the dollar and double-dollar fences. But I can't use \def or \newcommend to define things that ap…

Here is an example:

$$ \newcommand{\bra}{\left} $$

$$ \bra a | b \ket $$

If you go to https://jxxcarlson.github.io/app/minilatex/src/index.html, press the "Clear" button, then paste the above text, then press "Render", you should see the macros \bra and \ket properly rendered.

Re: Towards LaTeX in the Browser

#50

I love the output of LaTeX but the language itself (and it’s dependencies and packages) are an absolute horror show. I’ve never understood how people can learn be it so, writing it is painful, it’s tooling is abysmal , and it rarely seems to work except on the person who wrote its machine. We’ve got to be able to do better.

A task easier said than done. Also, it should be considered that it's impossible to make breaking changes in the LaTeX language otherwise you lost the ability to compile a paper from 30 years ago. But if you're trying to do something simple, I would say go for pandoc and use whatever format you're comfortable, then convert it to TeX: https://pandoc.org/

At that point... why use TeX at all?
Post reply on HN