Live data from Hacker News

Sile: A Modern Rewrite of TeX

sile-typesetter.org

151–160 of 181 posts

Re: Sile: A Modern Rewrite of TeX

#151
post #146

Earlier quoted context omitted.

Proper programming language that is not meant to carry old silliness such as "oh back in the day memory was important so you have 256 registers" or "fixed point arithmetic should be fine" or "it's meant for typesetting don't use it for complicated stuff so a figure can float 15 pages whatever". We have PDF as de facto media for handling output and text files for holding the source files. Better TeX means we are not u…

So... XeLaTeX? Which has been around for over 15 years now? Modern unicode support out of the box? check. Compiles to PDF instead of DVI because obviously? Check. Normal system font support? very check. More than 256 registers? "what the fuck is a register and why would you ever need to care, it's not 1980 anymore." Equal disclaimer: low-key maintainer of ucharclasses.

No difference, same TeX behavior with font support. Using system fonts cannot be a highlight of a tool in 2020s. Mostdef not modern. Also cough... "xdvi"... Cough

Re: Sile: A Modern Rewrite of TeX

#152
post #108

TeX and Literate Programming (and Lisp) are my fundamental, day-to-day tools. Code it, explain it, generate a Literate PDF containing the code. The programming cycle is simple. Write the code in a latex block. Run make. The makefile extracts the code from the latex, compiles it, runs the test cases (also in the latex), and regenerates the PDF. Code and explanations are always up to date and in sync. I have found no b…

The literate macro is just standard latex. The command line extraction functions are:

Lisp program to extract latex chunks: https://github.com/daly/axiom/blob/master/books/tangle.lisp

C program to extract latex chunks: https://github.com/daly/axiom/blob/master/books/tanglec.c

Note that the C program is just a hand translation of the Lisp code.

The lisp code has an explanation and the necessary latex macros. The idea is to scan the latex, find each named code 'chunk', and add each one to a hash table. Then the hash table is scanned to dump the requested chunk to stdout. For example:

\begin{chunk}{part1} code for part 1 \end{chunk}

Ordinary latex code between chunks.

\begin{chunk}{part2} code for part 2 \end{chunk}

\begin{chunk}{part1} this code will be appended to the prior chunk \end{chunk}

\begin{chunk}{getall} \getchunk{part1} \getchunk{part2} \end{chunk}

Assuming the above chunks are in the file foo.tex then

tanglec foo.tex getall >getall.code

will print out the named chunk (getall). For an individual chunk use

tanglec foo.tex part2 >getsome.code

Re: Sile: A Modern Rewrite of TeX

#153

I didn't touch latex in years and I don't regret it one minute. Yes the result looks very clean, and yes it's the best system for writing math, but controlling the layout was an everyday fight.

I've never attempted to change the layout substantially except for using different document classes. I just hand off the manuscript at some point to professional editors and type setters at an academic publisher and they do their thing. It still beats everything else as an authoring tool and source for professionals to start working from.

Re: Sile: A Modern Rewrite of TeX

#154

Earlier quoted context omitted.

> TeX is a program for typesetting, and IMO if one is a programmer, it is best used as a target or output format That's the only thing I ever found it to be good for. Even then, it's a PITA. The world would not be a poorer place if it disappeared and was replaced something that that separated style definition, markup, and content in a reasonable fashion, and used modern language techniques (just a CFG would be a star…

And Computer Modern Roman is as ugly as fudge.

Not totally disagreeing but note that it is expected to be printed, and modern readers often just look at a PDF which makes the weights too light. Also it has some aliasing problem (or may be named differently, but basically when you view the PDF some words look like a line is skipped but when you zoom or print it out it has no problem.)

Also modern LaTeX is supposed to not use computer modern anymore, but the Latin Modern (which imitates computer modern but fixes some of its shortcomings.)

Re: Sile: A Modern Rewrite of TeX

#155
post #14

Earlier quoted context omitted.

TeX itself is not really complex. The implementation is fine. The hard part is the ecosystem. Any contender is going to face a daunting task of explaining why adopters should throw away 50 years of collective work of thousands of people that went into TeX packages in CTAN. Math notation is at best 1% of the reasons why people use TeX. Packages are.

Working as a mathematician, the math notation is 100% why I use (La)TeX. Packages are just a bonus.

amsthm, mathtools, etc.? I doubt one can survive long in typesetting math without the La part of TeX.

Re: Sile: A Modern Rewrite of TeX

#156
post #97

Earlier quoted context omitted.

Sile will take Docbook XML as an input format. Close enough?

This is the most exciting feature of Sile to me -- since I currently rely on a slow and memory hungry Java toolchain to convert docbook to pdf with fop -- but I just tried it on two docbook documents (a book and also a short article) and it failed to convert both. Apparently the docbook support is currently very incomplete: https://github.com/sile-typesetter/sile/issues/1338

Yes, I think Sile has a lot of promise but it really needs some work done to bring these features up to scratch for end users. And inevitably volunteer time is in short supply...

Re: Sile: A Modern Rewrite of TeX

#157
post #56

Earlier quoted context omitted.

It's damning that there no truly functional grammar or spellchecker for latex, even ignoring crazy things that can be done with macros. If some billionaire wanted to 'move the needle' and change society for the better I think building a truly better latex would be worth it. Each year some of the most brilliant people in the world sacrifice on the altar of latex, that could instead be spent on more productive research…

I'd like to know what a "better LaTeX" means, and how that would move the needle, given that the only things you can't easily do in modern (Xe)LaTeX are things that you shouldn't be using TeX itself for in the first place, but have other tools do so you can simply embed their output. Especially given the availability of WYSIWYG-esque editors with "one-click" compile buttons that run all the nonsense that we used to h…

OP mentioned spellchecking. That alone would save much money. One cannot do spellchecking in a (La)TeX "document" because one cannot parse it.

Re: Sile: A Modern Rewrite of TeX

#158
post #85
post #79

I'm excited for the project, but disappointed that they kept the arcane syntax of TeX/LaTeX. Math expressions are hideous to write and read in LaTeX syntax.

I actually love the TeX syntax for math! What I do hate about LaTeX is the arcane document formatting options—i.e. drawing a figure in place requires an entire package to be imported!

Weird, for me it's entirely the other way around. At least there exists a package for drawing a figure in place, but consistently defining and using semantic commands for math is pretty much impossible. Whenever I'm able to actually use semantic commands, I can write LaTeX math pretty much as quickly as I can write math by hand, but getting these commands to work has been a consistently terrible experience for me.

Re: Sile: A Modern Rewrite of TeX

#159
post #108

TeX and Literate Programming (and Lisp) are my fundamental, day-to-day tools. Code it, explain it, generate a Literate PDF containing the code. The programming cycle is simple. Write the code in a latex block. Run make. The makefile extracts the code from the latex, compiles it, runs the test cases (also in the latex), and regenerates the PDF. Code and explanations are always up to date and in sync. I have found no b…

You may be interested in using Org [1], in conjunction with literate-lisp [2] (for Common Lisp) and literate-elisp [3] (for Emacs Lisp). Org provides various outlining commands (among other things), letting you view your program at different levels of granularity. literate-lisp/elisp advise the Lisp reader so the Org file can be loaded and/or compiled directly, without requiring tangling. Consequently, tools like xref will jump to the source block in your Org file, rather than the tangled source. I wrote a little hack/guide to extend this to errors raised in Emacs' compilation-mode. [4]

(Unfortunately, the package that lets each Org source block behave as though it was using the corresponding language's Emacs major mode - poly-org-mode - has a ton of bugs. It was part of why I stopped using literate programming entirely for later projects.)

[1] https://orgmode.org/ [2] https://github.com/jingtaozf/literate-lisp [3] https://github.com/jingtaozf/literate-elisp [4] https://contrapunctus.codeberg.page/blog/literate-programmin...

Re: Sile: A Modern Rewrite of TeX

#160
post #108

TeX and Literate Programming (and Lisp) are my fundamental, day-to-day tools. Code it, explain it, generate a Literate PDF containing the code. The programming cycle is simple. Write the code in a latex block. Run make. The makefile extracts the code from the latex, compiles it, runs the test cases (also in the latex), and regenerates the PDF. Code and explanations are always up to date and in sync. I have found no b…

You may be interested in using Org [1], in conjunction with literate-lisp [2] (for Common Lisp) and literate-elisp [3] (for Emacs Lisp). Org provides various outlining commands (among other things), letting you view your program at different levels of granularity. literate-lisp/elisp advise the Lisp reader so the Org file can be loaded and/or compiled directly, without requiring tangling. Consequently, tools like xre…

I work with the author of your link [2], and his literate programming documents for Common Lisp are awesome. Watching him during Zoom screen-shares is fun. I am not currently a user of literate-lisp but it is on my non-urgent to-do list.
Post reply on HN