Show HN: SugarTeX – readable LaTeX language extension and transcompiler to LaTeX
1–10 of 52 posts
Re: Show HN: SugarTeX – readable LaTeX language extension and transcompiler to LaTeX
#2I use Markdown with Python code blocks for document programming via [Pandoctools](https://github.com/kiwi0fruit/pandoctools) (like R-Markdown).
Both Python and Markdown are very readable languages. Unfortunately LaTeX is not like this. So I wrote SugaTeX extension+transpiler that is highly readable. In order to achieve this it heavily uses Unicode so that SugarTeX install instructions even have recommended monospace font fallback chains.
[SugarTeX repo](https://github.com/kiwi0fruit/sugartex) with description.
Example of input to output conversion is at the end of [this PDF](https://github.com/kiwi0fruit/sugartex/blob/master/sugartex....).
Re: Show HN: SugarTeX – readable LaTeX language extension and transcompiler to LaTeX
#3A comparison to UnicodeMath (which seems very similar and is an existing standard which already works in Latex) would also be useful.
Re: Show HN: SugarTeX – readable LaTeX language extension and transcompiler to LaTeX
#4SugarTeX is a more readable LaTeX language extension and transcompiler to LaTeX. Designed to be used instead of $formula$ insertions to Markdown. I use Markdown with Python code blocks for document programming via [Pandoctools]( https://github.com/kiwi0fruit/pandoctools ) (like R-Markdown). Both Python and Markdown are very readable languages. Unfortunately LaTeX is not like this. So I wrote SugaTeX extension+transpi…
What's the downside of having $formula$ blocks in Markdown?
Re: Show HN: SugarTeX – readable LaTeX language extension and transcompiler to LaTeX
#5Hi, this desperately needs examples of formulas (code and rendered) front and center. It's pretty hard to understand how this could be useful without that. A comparison to UnicodeMath (which seems very similar and is an existing standard which already works in Latex) would also be useful.
I'm not sure about this whole concept of unicode. It is more readable for sure, but harder to write (to remember which unicode to use, and how to get it).
Perhaps surprisingly, java allows unicode identifiers etc, so I experimented with variables like δx and δt, and even ½i for PIC grids in CFG. It's cute, but I'm not really sure it's a good idea.
Re: Show HN: SugarTeX – readable LaTeX language extension and transcompiler to LaTeX
#6The idea makes sense, though I'm not sure if it's... better. Do you expect people to input " ⃗E" and "⨌" as text? Or ... what? Do you type the TeX and then have Atom autocomplete it into the Unicode symbols?
Re: Show HN: SugarTeX – readable LaTeX language extension and transcompiler to LaTeX
#7Hi, this desperately needs examples of formulas (code and rendered) front and center. It's pretty hard to understand how this could be useful without that. A comparison to UnicodeMath (which seems very similar and is an existing standard which already works in Latex) would also be useful.
https://github.com/kiwi0fruit/sugartex/blob/master/sugartex....
Re: Show HN: SugarTeX – readable LaTeX language extension and transcompiler to LaTeX
#8ˎˎ ˱∇ × [ ⃗B] - 1∕c ∂[ ⃗E]∕∂t ˳= 4π∕c [ ⃗j] ¦# ∇ ⋅ [ ⃗E]\ ˳= 4πρ ¦ ∇ × [ ⃗E] + 1∕c ∂[ ⃗B]∕∂t ˳= [ ⃗0] ¦ ∇ ⋅ [ ⃗B]\ ˳= 0 ˲ ,ˎˎ{#eq:max}
where ˎ[ ⃗B], [ ⃗E], [ ⃗j]: ℝ⁴ → ℝ³ˎ – vector functions of the form
ˎ(t,x,y,z) ↦ [ ⃗f](t,x,y,z), [ ⃗f] = (f_˹x˺, f_˹y˺, f_˹z˺)ˎ.
renders to:
$$ \begin{aligned}∇ × {\mathbf{B}} - \frac{1}{c} \frac{∂{\mathbf{E}}}{∂t} &= \frac{4π}{c} {\mathbf{j}}\ ∇ ⋅ {\mathbf{E}}\ &= 4πρ \ ∇ × {\mathbf{E}} + \frac{1}{c} \frac{∂{\mathbf{B}}}{∂t} &= {\mathbf{0}} \ ∇ ⋅ {\mathbf{B}}\ &= 0 \end{aligned} ,$${#eq:max}
where ${\mathbf{B}},,{\mathbf{E}},,{\mathbf{j}}:,ℝ^{4} → ℝ^{3}$ -- vector functions of the form $(t,x,y,z) ↦ {\mathbf{f}}(t,x,y,z),,{\mathbf{f}} = (f_{\mathrm{x}}, f_{\mathrm{y}}, f_{\mathrm{z}})$.
Re: Show HN: SugarTeX – readable LaTeX language extension and transcompiler to LaTeX
#9SugarTeX is a more readable LaTeX language extension and transcompiler to LaTeX. Designed to be used instead of $formula$ insertions to Markdown. I use Markdown with Python code blocks for document programming via [Pandoctools]( https://github.com/kiwi0fruit/pandoctools ) (like R-Markdown). Both Python and Markdown are very readable languages. Unfortunately LaTeX is not like this. So I wrote SugaTeX extension+transpi…
> Designed to be used instead of $formula$ insertions to Markdown. What's the downside of having $formula$ blocks in Markdown?
Re: Show HN: SugarTeX – readable LaTeX language extension and transcompiler to LaTeX
#10Hi, this desperately needs examples of formulas (code and rendered) front and center. It's pretty hard to understand how this could be useful without that. A comparison to UnicodeMath (which seems very similar and is an existing standard which already works in Latex) would also be useful.
I guess Unicode Math is a part of SugarTeX as every valid LaTeX is a valid SugarTeX (unless it has new SugarTeX meaning, otherwise it's a bug). Or maybe there's something I do not know about Unicode Math? I thought it simply replaces/treats some Unicode characters with LaTeX commands. So I used this feature and didn't bother replacing some Unicode.