[HN Gopher] Sile: A Modern Rewrite of TeX
       ___________________________________________________________________
        
       Sile: A Modern Rewrite of TeX
        
       Author : signa11
       Score  : 187 points
       Date   : 2022-11-03 11:02 UTC (11 hours ago)
        
 (HTM) web link (sile-typesetter.org)
 (TXT) w3m dump (sile-typesetter.org)
        
       | choeger wrote:
       | Does it come with a context-free syntax? If not, that would be a
       | grave mistake. Being unparseable is one of the biggest problems
       | of TeX, IMO. Not the least because you cannot automatically work
       | with TeX "documents".
        
         | svat wrote:
         | TeX is a program for typesetting, and IMO if one is a
         | programmer, it is best used as a target or output format: do
         | all your "document" stuff somewhere else (don't use LaTeX), and
         | use TeX just for typesetting. You can have your document in
         | some parsable format, but not require it of the output .tex
         | file, just as we expect high-level programming-language source
         | code to be parsable but don't really expect to get much utility
         | out of parsing assembly or object code.
         | 
         | Knuth initially added macros to TeX just as a convenience to
         | save some typing here and there, and the tradition of (ab)using
         | that macro ability as a language in which to program,
         | inaugurated in a small way by Knuth himself and later taken to
         | dizzying heights by others (such as Leslie Lamport with LaTeX,
         | and hundreds/thousands of assorted "package" authors since, and
         | the LaTeX team currently), is IMO a mistake.
         | 
         | If you use TeX just for typesetting, it is quite a nice program
         | that does what you want, and has very good error messages (yes)
         | and debugging output.
        
           | walnutclosefarm wrote:
           | > 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 start) for the first two.
        
             | jeffrallen wrote:
             | And Computer Modern Roman is as ugly as fudge.
        
         | chrisseaton wrote:
         | I work with TeX quite a lot and I can't even really understand
         | intuitively the _principles_ of the language design let alone
         | the grammar. Like 15 years later and I 'm still copy and
         | pasting spells. I'd love to see an CST of my document and
         | figure out why I'm writing the characters I'm writing!
        
           | zzless wrote:
           | My experience with TeX is a complete opposite. I feel like I
           | can do pretty much anything in plain TeX, with a very good
           | feel of what it is doing in its 'guts'. I wrote parsers in
           | compilers in pure TeX (the latter was admittedly a silly
           | academic exercise). It took a very thorough reading of 'The
           | TeXbook' but after that I am constantly amazed at how
           | deliberate and tasteful Knuth's choices were. TeX is simply
           | ... elegant. I am not sure what 'modern' bells and whistles
           | TeX lacks that everyone is so eager to see. CSS is a
           | nightmare, even with recent additions, it seems clunky, most
           | of its choices look like an afterthought.
           | 
           | It is also somewhat puzzling that same people who advocate
           | for a better grammar would also push the idea of a better
           | markup. So which is it: a better programming experience or a
           | pure markup language that one wants? I feel TeX strikes a
           | near perfect balance here. Most importantly, TeX has stayed
           | nearly unchanged at its core for almost forty years! It is
           | its greatest strength, not weakness. I cannot see what latest
           | fads can improve in TeX
        
             | bombcar wrote:
             | I suspect that the vast majority of people who say they've
             | used TeX have actually used _LaTeX_ - and don 't realize
             | just how massively powerful TeX itself is. Much of the
             | LaTeX macros are quite simple; TeX does the heavy lifting
             | for so much of it.
        
             | thrown_22 wrote:
             | People assume that they know a language because they read a
             | tutorial online once.
             | 
             | The TeX Book is a work of art that we should all aspire to
             | when writing software.
        
               | massysett wrote:
               | An amazing thing about the TeX Book is that due to TeX's
               | stability, it's mostly still current. It was written in a
               | day when the graphical computer was a special thing that
               | required a trip to the lab. So the stuff it has about how
               | to run TeX is dated.
               | 
               | But once you know how to run TeX at your "site" (as they
               | would have called it then) all the stuff on the language
               | (that is, practically the whole book) is still good.
        
             | eesmith wrote:
             | FWIW, https://sile-typesetter.org/what-is-sile/ points out:
             | 
             | > one of the things that TeX can't do particularly well is
             | typesetting on a grid. This is something that people
             | typesetting bibles really need to have. There are various
             | hacks to try to make it happen, but they're all horrible.
             | In SILE, you can alter the behaviour of the typesetter and
             | write a very short add-on package to enable grid
             | typesetting."
             | 
             | Alas, I don't know what that means.
             | https://www.oreilly.com/library/view/latex-
             | cookbook/97817843... appears to give a clue:
             | 
             | > For two-sided prints with very thin paper, matching base
             | lines would look much better. Especially in two-column
             | documents it may be desirable to have baselines of adjacent
             | lines at exactly the same height.
             | 
             | but I don't have access to the full content.
        
               | michaelhoffman wrote:
               | https://en.wikipedia.org/wiki/Grid_(graphic_design)
               | 
               | TeX usually tries to adjust the space between lines so
               | that a single typeblock is more visually appealing.
               | Unfortunately, doing this adjustment independently for
               | side-by-side columns leads to output where the text lines
               | don't line up, and that is way less visually appealing.
        
             | bondarchuk wrote:
             | I'm far from an expert but I use LaTeX, and I distinctly
             | remember there is some oddity such that you have to put an
             | empty comment at the end of a specific line in the middle
             | of some code that generates multi column figures, or else
             | the layout gets messed up. That sort of thing just
             | shouldn't be possible in anything that has the right to be
             | called "elegant".
             | 
             | Edit: here it is: https://tex.stackexchange.com/a/37597
             | 
             | >" _The % (between \end{subfigure} and \begin{subfigure} or
             | minipage) is really important; not suppressing it will
             | cause a spurious blank space to be added, the total length
             | will surpass \textwidth and the figures will end up not
             | side-by-side._ "
        
               | ISL wrote:
               | I think many of the ills of this type this can be traced,
               | at least in part, to TeX's only-partial whitespace
               | invariance.
               | 
               | The shifts in behavior with an added newline (or absence
               | thereof) or a comment, as above, simply wouldn't happen
               | if the language ignored whitespace outright.
               | 
               | Of course, requiring tags for newlines/paragraphs would
               | make raw TeX as un-readable as raw HTML. It might be
               | worth the trade for the predictability, but for the era
               | in which TeX was written, one without IDEs or LyX, I
               | suspect that Knuth made the right choice.
        
               | zzless wrote:
               | I am not going to argue about the tastes here but please
               | consider the fact that TeX is a typesetting language.
               | Ignoring whitespace altogether would make .tex files
               | unreadable (as a comment below states). I am again
               | puzzled by complaints about whitespace treatment in TeX
               | (which has facilities for handling it, like
               | \ignorespaces) at the same time having no objections to
               | the choices made by, say, Python (which to me makes a
               | totally wanton decision about such, also I am not
               | suggesting that you personally are inconsistent in your
               | opinions). Also, poorly written LaTeX macros in this case
               | are not a reason to blame TeX itself.
        
             | choeger wrote:
             | > latest fads
             | 
             | Context-free languages are the standard for decades now.
             | They haven't been in the very early days of computing due
             | to a lack of formal education of programmers and because
             | they come with a certain, but tiny, memory requirement.
             | 
             | What Knuth did with TeX was a violation of KISS. There's no
             | good reason, but several downsides, to mix markup, code,
             | and interpreter state like this.
        
               | zzless wrote:
               | I am not sure what you mean by context-free languages
               | because literally none of the modern languages have
               | context-free grammars. This includes HTML and XML
               | although I would not call them programming languages per
               | se. C++ grammar is undecidable. On the other hand, TeX's
               | core typesetting language (i.e. not using its macro
               | facilities) is context-free. Quite trivial in fact.
               | Pascal, which is the language used to build TeX is
               | context-free (even LL(1)), as well, which cannot be said
               | about, say, C.
               | 
               | I would also be quite hesitant to claim that Knuth, who
               | literally pioneered modern LR parsing theory (and
               | deservedly got a Turing award for it) somehow lacked
               | knowledge or awareness of cutting edge parser design
               | techniques.
               | 
               | Finally, there is absolutely good reasons to design TeX
               | as Knuth did. That TeX withstood the test of time for
               | over three decades is a perfect testimony to that.
        
           | foldr wrote:
           | TikZ is the worst for this. I don't usually have any problem
           | picking up esoteric programming languages, but whatever the
           | hell is going in with TikZ/TeX will be forever beyond my
           | comprehension.
        
             | youainti wrote:
             | Take a look at Tikzit a gui for tikz. GUIs have their
             | downsides but they make a lot of sense for graphical
             | output.
        
             | lottin wrote:
             | I find TikZ quite amazing. You make a picture by describing
             | a picture. It's completely unlike anything else.
        
           | enriquto wrote:
           | > I work with TeX quite a lot and I can't even really
           | understand intuitively the principles of the language design
           | let alone the grammar.
           | 
           | Read the TeXbook. No, really, it is a beautifully written
           | text. The program it describes is quite elegant. Most of the
           | complexity comes from modern LaTeX packages, not from the
           | core tool.
        
         | xavxav wrote:
         | 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.
        
           | TheRealPomax wrote:
           | 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 have to do by hand back in the dark days of "you want a
           | GUI? Get out of my office, you simp" paired with the modern
           | "just install missing packages without asking me, that's the
           | whole point: I do the writing, you make that frictionless."
        
             | convolvatron wrote:
             | I have a difficult time with this comment. everyone I know
             | who uses Latex including myself is painfully aware of its
             | shortcomings and fairly steep learning curve.
             | 
             | maybe the graphical environments eliminate some of the pain
             | around embedding images, or using wrapped figures.
             | 
             | but there is no way they manage to get around the
             | fundamental lack of composibility. that sinking feeling you
             | get when you just add one more thing or try to put an X
             | inside of Y and the whole thing falls over in a pile.
        
               | TheRealPomax wrote:
               | As someone who's written multilingual books with custom
               | typesetting needs in it, the learning curve can
               | definitely be steep, but as someone who's also written
               | regular old papers in it, the learning curve is "use our
               | template", and that's kind of it. The only real learning
               | curve is how to write maths, as long as you don't fall in
               | the trap of trying to make LaTeX do graphics. For the
               | love of all that is sane, use the tools best suited for
               | that job instead. For everything else
               | tex.stackexchange.com already has at least three posts
               | covering any "how do I..." you might ever have.
               | 
               | And as someone who's even written packages: ...you're
               | going to end up needing low level TeX, and TeX is insane,
               | don't try to write packages. It's a world of hurt. (But
               | then most people will never need to write their own
               | packages)
               | 
               | Can you talk more about what you mean with the lack of
               | composibility? Or of course link to some page(s) that
               | makes that point?
        
           | privong wrote:
           | > 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.
           | 
           | Perhaps. But I'd wager that more time is lost to the
           | bureaucracy of universities and grant administration than to
           | fighting LaTeX quirks. I'm not sure that "fixing" (La)TeX
           | would result in a noticeable improvement in research that
           | could be done.
        
         | taeric wrote:
         | This is a red herring, I assert. There is no "boiling the
         | problem down to a simple grammar" that has promise for a total
         | solution. There are plenty of ways to combine the different
         | parts that work well, and even more ways to combine them into
         | nonsense. Disallowing the nonsense is probably not going to
         | make the ways that work well any better.
        
       | ubavic wrote:
       | Even if LaTeX3 brought some nice things to the TeX world, TeX
       | programming is every year lagging more and more behind modern
       | programming languages and practices. SILE has a long way to go
       | before it can compete with math-heavy publications made with TeX,
       | but I think it is already a good solution for typesetting
       | technical documentation or prose fiction.
        
         | 0cf8612b2e1e wrote:
         | Better tools and formats have existed for sometime, the problem
         | remains adoption. Part of the issue with mentioning a flawed
         | tool is the supporters who come out of the woodwork to insist
         | that the sharp edges are required, and anything more user
         | friendly would needlessly curtail the power they require.
         | 
         | Personally, I have given up on Latex and write documents in
         | pandoc markdown which I can then convert to pdf through the
         | intermediary latex.
        
         | Finnucane wrote:
         | For prose fiction, I don't see much here that is going to drive
         | people away from Indesign. Designers and typesetters aren't
         | really interested in doing that kind of work in a system that
         | would require generating new output for every correction. Even
         | relatively simple tasks like balancing columns in a spread
         | would become a pain.
        
       | arboles wrote:
       | I like Pollen.
       | 
       | https://docs.racket-lang.org/pollen/
        
         | NeutralForest wrote:
         | It still uses LaTeX to generate PDF right?
        
       | graycat wrote:
       | I've been using TeX for decades. No, not LaTeX, just TeX as in D.
       | Knuth's _The TeXbook_.
       | 
       | I've been thrilled with TeX from my first usage to the present.
       | Of course, when I want to write some math, I use TeX. I also have
       | a collection of TeX macros I wrote for _verbatim_ , cross-
       | references, annotation of figures, foils, ordered lists, simple
       | lists, etc. TeX is my standard for any _good_ or better quality
       | writing, e.g., serious letters. For my last published paper in
       | applied math, right, I did that in TeX (I don 't like to publish
       | -- seems financially irresponsible). The journal was very happy
       | to get my TeX source. I also included the source of the few
       | macros of mine that I used in the paper, and the journal was also
       | happy to receive those. For the core, original applied math for
       | my startup, I wrote that in TeX.
       | 
       | Net, I really like TeX.
       | 
       | For "parsing" TeX as in this Hacker News thread, I have no idea
       | what that might mean or why I would want to do that. TeX, just
       | the way Knuth designed and documented it are just fine with me.
       | For me, TeX solves a big problem; I'm just thrilled to have that
       | problem SOLVED; and I have no desire to invest time or energy in
       | another solution to the problem.
       | 
       | Also relevant, in praise of _simple text_ :
       | 
       | Uh, my most heavily used program is my favorite text editor,
       | Kedit. To me, the most important view, at the most important
       | _level_ , computing and/or computer _usage_ is just simple text,
       | i.e., is still like old fashioned typing. So, I have 100+ macros
       | I wrote for Kedit, and some of those help with typing TeX.
       | 
       | "Simple text" for computing? Yup. Early in my startup, I decided
       | to go with Microsoft and Windows instead of Linux or other
       | versions of Unix.
       | 
       | For the 100,000 lines of code (~24,000 programming language
       | statements and the rest comments or blank lines) for my startup
       | (a Web site), I wrote that with just Kedit. Once I tried to use
       | Microsoft's Visual Studio, and for just the start on just a first
       | program in Visual Basic .NET, I got a big directory of a lot of
       | files I didn't understand. I could see I would need to invest a
       | lot of time and energy into getting the software for my startup
       | to run via Visual Studio and could see no important reason why I
       | should make that investment. I've been happy with that decision:
       | For Visual Basic .NET, I type that in via Kedit.
       | 
       | In praise of Visual Basic .NET:
       | 
       | I know; I know; according to a lot of people and industry norms,
       | I'm supposed to use C, C++, C#, or other programming languages in
       | the _family_ of C and certainly nothing called _basic_. Well, as
       | I recall, the original C documentation admitted that the syntax
       | of C was  "idiosyncratic". E.g., it appeared that
       | 
       | i = ++j+++++k++
       | 
       | was legal -- increase each of j and k by 1; add them; assign the
       | result to i; then again increase each of them by 1. Once I tried
       | this statement on two C compilers, and they didn't agree on the
       | results! So, it seemed that the syntax was too "idiosyncratic"
       | even for the compiler writers! That was enough to warn me to stay
       | away from C, and mostly I've been successful at that!
       | 
       | Then much of what I like and want from Microsoft is their .NET
       | software and especially their documentation. As far as I can tell
       | Visual Basic .NET (VB.NET) is a perfectly good way to make full
       | or nearly so use of .NET and the CLR (common language runtime or
       | some such), exploit their documentation, etc. And with _basic_ I
       | get traditional programming language _syntax_. To me, that was
       | enough evidence -- decision made. Problem solved. TODO list item
       | checked off.
       | 
       | Yup, at one point my VB.NET calls some C code, right, LINPACK --
       | apparently the way to do that is to use "platform invoke", and I
       | did and it works fine. I'm still happy as a clam. So, right, I
       | type in my VB.NET code with just Kedit -- been thrilled! VB.NET
       | and Kedit -- happy as a clam!
       | 
       | For TeX, I type that in via Kedit. For email, Kedit. For forum
       | posts, usually Kedit. For working with collections of files in
       | the Windows file system NTFS (abbreviates maybe New Technology
       | File System), Kedit. For my log of food, exercise, sleep, ...,
       | Kedit. Recipes, sure, Kedit. Shopping lists, Kedit. A very
       | important file, my most important, of various facts, short notes,
       | references, and links, right, Kedit. Generally I like to use just
       | simple text, and, thus, Kedit for as much as possible.
       | 
       | For this thread and its
       | 
       | "Sile: A Modern Rewrite of TeX"
       | 
       | I looked at it and could make no sense out of what it was or what
       | it was for. There was something about hyphenation in Turkish!
       | Looks like I should stay with TeX!
        
       | forgotpwd16 wrote:
       | Title is inaccurate. It uses TeX algorithms, seems (LuaLa)TeX
       | syntax too, and "modern standards". But those don't justify
       | calling it a rewrite. "Modern TeX-inspired system" is a better
       | fit.
        
       | poulpy123 wrote:
       | 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.
        
         | s0rce wrote:
         | I found even typesetting math was a struggle for the layout, I
         | still have nightmares of getting equations for my wife's PhD
         | thesis split nicely across 2 lines.
        
         | taeric wrote:
         | I have yet to see an environment that controlling the layout is
         | not a nightmare pretty quickly.
         | 
         | The entirety of the web world with their rube goldberg
         | interactions between way too many divs isn't exactly giving me
         | inspiration that modern approaches are going to be an answer
         | here.
        
       | cfhhgtyg wrote:
       | I am really desperate for an alternative.
        
         | g8oz wrote:
         | PrinceXML.com - free for non-commercial use. PDFs from HTML/CSS
         | with Katex support. Produces beautiful output.
        
         | RGamma wrote:
         | I've used texmacs (unrelated to TeX despite the name) with good
         | success.
         | 
         | Never went particularly deep into it though.
        
           | natemcintosh wrote:
           | I've been using texmacs for a little over year now, and have
           | loved it. For me, the nicest part is much simpler creation
           | and editing of tables and aligned math. I also appreciate the
           | image insertion; in LaTeX my images often end up not quite
           | where I want them (I know, you can specify "here" for your
           | images, but I'd prefer if they were just "there" to start
           | with). Of course, depending on your use case, your mileage
           | may vary.
        
         | mapierce2 wrote:
         | HTML/CSS, with KaTeX loaded to render mathematics using the
         | same notation as (La)TeX.
         | 
         | https://katex.org
        
         | claudionaoto wrote:
         | https://github.com/gfngfn/SATySFi
         | 
         | SATySFi (pronounced in the same way as the verb "satisfy" in
         | English) is a new typesetting system equipped with a
         | statically-typed, functional programming language. It consists
         | mainly of two "layers" -- the text layer and the program layer.
         | The former is for writing documents in LaTeX-like syntax. The
         | latter, which has OCaml-like syntax, is for defining functions
         | and commands. SATySFi enables you to write documents markuped
         | with flexible commands of your own making. In addition, its
         | informative type error reporting will be a good help to your
         | writing.
         | 
         | The main problem is that a lot of the documentation is in
         | japanese.
        
         | rhabarba wrote:
         | troff exists.
        
           | massysett wrote:
           | My needs are pretty simple - a program that makes grocery
           | lists that I print. groff with the ms macros works very well.
           | I used to use LaTeX but never figured out how to use it
           | without installing gigabytes of stuff. This is my fault -
           | surely I could have learned plain TeX, or learned how to work
           | the TeX distribution to only install the stuff I needed. But
           | ultimately it was just easier to get going with groff.
        
           | NeutralForest wrote:
           | It doesn't have syntax highlighting IIRC
        
             | neutrono wrote:
             | You can hack it with the \m[<color>] escape in groff:
             | \m[blue]int\m[] x
             | 
             | Of course, you would use some kind of pre-processor to make
             | this less of a PITA, but it's not inconceivable.
        
           | AlanYx wrote:
           | For those who expect troff to be an ancient relic, Neatroff
           | and Heirloom troff include modern features like
           | microtypography. troff is still great for a lot of
           | applications.
        
       | begueradj wrote:
       | Honestly, I have always been very happy and satisfied with TeX.
       | But any initiative is always welcome. Good luck
        
       | drekipus wrote:
       | Reminds me of reportlab, which I loathe only because of their
       | lack of documentation.
       | 
       | Typesetting is hard. But at this point why not use semantic html
       | and a specially crafted css?
        
         | pja wrote:
         | Sile will take Docbook XML as an input format. Close enough?
        
           | cristoperb wrote:
           | 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
        
         | fmajid wrote:
         | For computer-generated documents like invoices, that is totally
         | the way to go.
        
         | charlieyu1 wrote:
         | MathML is not even supported in browsers these days
        
           | mapierce2 wrote:
           | Either KaTeX or MathJax has stepped in to support
           | mathematical notation on the web.
           | 
           | https://katex.org https://www.mathjax.org
        
           | jfk13 wrote:
           | That rather depends on your choice of browser.
           | 
           | https://en.wikipedia.org/wiki/MathML#Browser_support
        
       | rhabarba wrote:
       | Yeah, no, I'll stick with troff, thank you.
        
       | paulluuk wrote:
       | It would be cool if the source code under "examples" could be
       | viewed in the browser, rather than having to download the .sil
       | file
        
         | coldpie wrote:
         | There's a handy Firefox extension for that:
         | https://addons.mozilla.org/en-US/firefox/addon/open-in-brows...
         | It allows you to ignore the server-sent mimetype & disposition
         | and choose your own, so you can open the documents as plaintext
         | in the browser.
        
       | funkaster wrote:
       | I always had the hope that Lout[0] would take over LaTeX: very
       | clean & reasonably small implementation, functional programming
       | instead of macros. I guess it's just hard to move against the
       | inertia that (La)TeX carries.
       | 
       | [0]: https://en.wikipedia.org/wiki/Lout_(software)
        
       | chadcmulligan wrote:
       | Something I've wondered, and the Tex users here can probably
       | answer - why not just use Acrobat or Word for math? Does it not
       | support something?
        
         | mapierce2 wrote:
         | Microsoft _recently_ improved the math notation support in
         | Word. You can press [alt]+[=] on Windows or [control]+[=] on
         | OSX to enter  "Math Mode" and begin typing mathematical
         | characters. Word tries to guess what you mean as you type, and
         | it's still much more cumbersome that typing plain-text code in
         | (La)TeX; you still have to reach for a mouse for some notation.
         | 
         | Here's what it looks like if you're interested:
         | 
         | https://org.coloradomesa.edu/~mapierce2/mathsampleguide
        
         | LoganDark wrote:
         | LaTeX is an art form. The output is perfect, based only on the
         | code used to make it. Typesetting mathematical expressions or
         | even creating complex diagrams using a library such as `tkz-
         | euclide` is just code. There is no WYSIWYG. No invisible bold
         | spaces[1]. No forgetting which changes you made to try to get
         | it to look right. Everything is right there in the code.
         | 
         | (I am aware of the difference between LaTeX and TeX; I likely
         | haven't used TeX directly but the comparisons here should still
         | work fine.)
         | 
         | There is a huge difference in workflow between generating a
         | document from a complete code file and iterating on a final
         | result with incremental tweaks. That is why I cannot use
         | Acrobat, Word, Google Docs, etc. for creating papers that I
         | would use LaTeX for. It is just not the same, and it is not the
         | workflow I desire.
         | 
         | [1]: https://xkcd.com/2109/
        
           | qznc wrote:
           | TeX output is not perfect. There is no baseline grid for
           | example. Like this: https://graphicdesign.stackexchange.com/q
           | uestions/49720/body...
           | 
           | Also, pushing figure around to nice places can be so
           | frustrating that people settle for less than perfect layout.
        
           | bombcar wrote:
           | One of the most important things I've found for making LaTeX
           | documents is _do not worry about what it looks like until you
           | 're almost done_. Otherwise you fall into the rabbit hole of
           | adjusting things for hours to find your work is wasted anyway
           | because you changed that page later.
           | 
           | But once the text is done, it's really nice to work with, and
           | you never "accidentally break the whole document by adding a
           | table" - at least not irrecoverably.
        
         | JCWasmx86 wrote:
         | I simply don't like those binary formats. I can't use sed,
         | grep, etc. with .docx files. My workflow for doing notes is
         | primarily CLI-based, and thus using Word/Libreoffice is
         | something I avoid if possible and if it makes sense.
         | 
         | Another pro is that I can use git for tracking changes
        
         | empyrrhicist wrote:
         | Word doesn't support _many_ things in math mode, and entering
         | it is overall slower and more fragile.
        
           | skipnup wrote:
           | But you can just use the same syntax as LaTeX. Or a
           | simplified version. Or use the GUI. It really isn't as bad as
           | it seems at first glance.
        
             | topaz0 wrote:
             | The LaTeX input for Word equation editor makes it a lot
             | faster, but it is still quite limited and often doesn't do
             | what you expect for more complicated things. It makes the
             | easy things easier, but the hard things harder.
        
         | contradictioned wrote:
         | Some more points, collaboration using e.g. git and its
         | ecosystem, a representation that does not force you to use
         | proprietary software (not sure about libre office for
         | formulae), the ability to easily produce tex files by other
         | scripts, e.g. to compile maths exercises from a set of
         | templates.
        
         | chrisseaton wrote:
         | > why not just use Acrobat
         | 
         | Does Acrobat have any typesetting capabilities? I thought
         | another app did that and just finalised through Acrobat.
        
           | chadcmulligan wrote:
           | There's acrobat editor, though its more limited than I
           | assumed it seems.
        
             | massysett wrote:
             | Adobe's Acrobat editor is painful and barely usable even
             | for ordinary prose. There's no way I'd try it for math. To
             | be fair though, it does not seem intended for heavy-duty
             | editing - it's more for: someone gave me this PDF, I don't
             | have the source document, I need to make some little tweaks
             | directly to the PDF.
        
               | richard_todd wrote:
               | Yeah Acrobat and ABBYY editors are really only useful as
               | a last resort when you don't have time to recreate
               | someone's PDF but you really need a couple words changed.
               | 
               | But they are life-savers when that's your situation.
        
         | charlieyu1 wrote:
         | Not even close, these are not plaintext based so you can't
         | track changes with git, let alone automatic generation of
         | formulas.
        
           | smithza wrote:
           | .docx files are a zip folder of plaintext XML files.
           | Theoretically they could be tracked with git if you unzip/zip
           | every commit/checkout.
        
             | charlieyu1 wrote:
             | I actually tried to hash .docx files to keep track of them.
             | Turns out there are random timestamp data that the
             | resulting file is different every time
        
           | chadcmulligan wrote:
           | Word has track changes, though not the math support it seems.
        
             | tinus_hn wrote:
             | In typical Microsoft fashion it has enough to check the box
             | but not enough to actually be useful.
             | 
             | Does it generate diffs/patches that ultimately can be used
             | to reconstruct the document? Can I take a document and
             | apply a patch and get exactly the same as you get? Can I
             | reorder and edit patches? The answer is no.
        
               | chadcmulligan wrote:
               | Interesting, I didn't know Tex users would want those
               | sort of facilities. I've used Word with track changes in
               | enterprise environments and it does the job, I've never
               | had to use patches for it though (and wouldn't).
        
               | DocTomoe wrote:
               | For enterprise environments, where demands usually are
               | low to non-existent, Word does fine. In academic
               | environments, when journals are involved, when a document
               | is being worked on by several people simultaneously (in
               | varying meanings of that word) and when data may come
               | from several different outside sources, it is massively
               | inadequate.
        
               | charlieyu1 wrote:
               | I think there is demand of these features for Word users
               | in the enterprise. Version tracking or reusing templates
               | is huge productivity boost and also helps reducing
               | mistakes. It is only that enterprise users have never
               | thought of that because they don't know it is even
               | possible.
        
               | bombcar wrote:
               | Word with integrated git-like history would be a godsend
               | if someone could develop it. As it is, it's easier to
               | either cripple along with track changes and friends or
               | teach everyone how to use Markdown or LaTeX.
        
       | mmastrac wrote:
       | TeX is one of those bits of software that's so complex to
       | replace, it'll take another few decades (and likely a few false
       | starts) before we can get there.
       | 
       | The fundamentals of TeX's typesetting are amazing, but everything
       | else is just bolted on. You'd probably want to rebuild it with
       | its own, custom language, perhaps inspired more by modern
       | XML/markdown rather than the old TeX language.
       | 
       | The biggest problem that we're going to have moving past TeX is
       | that it's something of a standard for math representation in
       | text. MathML never _really_ took off. Re-training millions of
       | people skilled in typesetting math is going to be _tough_.
        
         | the__alchemist wrote:
         | I never figured the purpose of MathML. It's ugly/impractical to
         | type as a text-based format. Verbose and inefficient compared
         | to a binary format. A middle ground some people might like, but
         | I can't stand.
         | 
         | I'd prefer one of these:                 - A human-writable
         | text format that's displayed in a formatted way, eg TeX or
         | MathJax       - A binary format that represents structs and
         | enums in code with a clear documentation of how it's packed and
         | unpacked. That can be formatted for reading, and perhaps has a
         | TeX-like API (or is just constructed programmatically using an
         | API)
         | 
         | MathML, in contrast, provides neither the speed and small size
         | of a binary format, while being unreadable and unwriteable.
        
         | macjc wrote:
         | MathML is not really for human to type, just as you rarely type
         | long XML by hand. I don't see the point of MathML at all.
        
           | dkarl wrote:
           | I think it was designed as a low-level browser standard, not
           | an authoring language. It is supposed to provide a stable,
           | standardized target for authoring languages to compile to.
           | Think of it as WASM for math markup. It makes sense if
           | languages for authoring math is an unsettled design space
           | where we need diversity and experimentation. As a browser
           | standard, like WASM, MathML should enable people to
           | experiment with new ideas and hopefully evolve a better
           | authoring language than we would have got if we had tried to
           | invent a language and standardize it at the same time.
        
         | ilammy wrote:
         | 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.
        
           | tomrod wrote:
           | I think the argument comes down to complexity. Getting
           | Markdown --> Pandoc featureset up to a reasonable fidelity is
           | the next stage IMO, especially if Markdown can be made to
           | support the most common downloaded TeX extension packages.
        
             | 0cf8612b2e1e wrote:
             | Not going to happen. If you look at the CommonMark
             | discussions, you will find people adamant that X features
             | not be included for varying reasons.
             | 
             | I think the best future option is going to be djot[0]. It
             | is being created by the author of pandoc, who might
             | possibly be the most qualified person in the world to
             | appreciate all if the nuances of marking up text and
             | parsing it.
             | 
             | [0] https://www.djot.net/
        
               | leephillips wrote:
               | djot syntax looks just like Pandoc's markdown. What's the
               | difference?
        
               | 0cf8612b2e1e wrote:
               | Clean slate design. I think pandoc markdown is a superset
               | of markdown, which must parse the ambiguous parts of the
               | spec. Djot has a goal to eliminate the corner cases and
               | be able to represent all things without requiring the
               | html escape hatch (eg bold text within a word).
               | 
               | The rationale page can do a better job than myself.
               | https://github.com/jgm/djot#rationale
        
               | leephillips wrote:
               | Thanks, that makes sense. Although I'd like to point out
               | that one of the listed problems with commonmark, and the
               | problem you mention, are not problems with Pandoc
               | markdown:                   : echo
               | "word**withboldtext**inside" | pandoc
               | <p>word<strong>withboldtext</strong>inside</p>
               | : echo "a*?*b" | pandoc         <p>a<em>?</em>b</p>
        
             | lixtra wrote:
             | Please keep Markdown simple as it is.
             | 
             | Feel free to come up with something new that supports
             | Markdown as a subset or overlaps with Markdown.
        
               | tomrod wrote:
               | I'm unsure of the naming & organizational conventions for
               | Markdown. Are extensions called flavors? If so, I was
               | envisioning a flavor.
               | 
               | Markdown as-is is lovely.
        
             | TheRealPomax wrote:
             | You make markdown support TeX by running it though a tex
             | compiler. The other way around is never in a million years
             | going to happen, because markdown is all about _not_ adding
             | additional markup like \commands, or extensions without
             | which a markdown renderer wouldn 't be able to generate the
             | content it's supposed to.
             | 
             | (which is why markdown still doesn't officially have any
             | maths support, only certain non-standard flavours do)
        
           | mmastrac wrote:
           | > TeX itself is not really complex
           | 
           | I'm not sure if we're getting hung up on the word "complex",
           | but here's 60+ pages on paragraph line breaking alone:
           | 
           | http://www.eprg.org/G53DOC/pdfs/knuth-plass-breaking.pdf
           | 
           | Digital Typography is 700 pages long (not everything is going
           | to be TeX fundamentals, but...):
           | 
           | https://archive.org/details/digitaltypograph0000knut/page/n7.
           | ..
        
             | svat wrote:
             | The 66-page "Breaking Paragraphs into Lines" is a research
             | paper, and much of it is is the "complexity" of the problem
             | itself, rather than TeX's elegant solution in particular
             | (e.g. pages 48-59 are about history). In a sense, the
             | generality shown in the paper (the various different things
             | that TeX's algorithm can accomplish) shows how TeX
             | _reduces_ the real-world complexity of typesetting with a
             | simple approach that covers all of them.
             | 
             | The book "Digital Typography" is, somewhat misleadingly,
             | not a book that was written about digital typography, but
             | simply a collection
             | (https://cs.stanford.edu/~knuth/selected.html) of several
             | papers that Knuth wrote about TeX and Metafont and some
             | related topics, over several decades.
             | 
             | Maybe the several hundred pages of the "Computers and
             | Typesetting" series would be a better example for your
             | point: https://cs.stanford.edu/~knuth/abcde.html
             | 
             | In any case, I agree with the comment you're replying to:
             | if you use TeX itself without dragging behind you the
             | entire ecosystem and all the packages (in particular, use
             | plain TeX rather than LaTeX) you'll see it's not really
             | complex, and the implementation is fine. Especially today,
             | with things like LuaTeX scripting (and, say, opTeX) it is
             | feasible to bypass LaTeX and packages and do things
             | yourself -- that is, unless external circumstances require
             | you to use LaTeX and packages etc, which is still often the
             | case (e.g. submitting papers to journals).
        
           | mapierce2 wrote:
           | Working as a mathematician, the math notation is 100% why I
           | use (La)TeX. Packages are just a bonus.
        
         | cossatot wrote:
         | Ideally there would be a replacement of TeX that shares little
         | of its non-math typesetting capabilities but retains (or only
         | slightly modifies) the math syntax. The rest of the system is
         | where the the problems lie, or at least where I waste a lot of
         | time on little things.
        
           | Shorel wrote:
           | Read the Sile documentation.
           | 
           | As far as I could get, Sile is exactly that.
        
       | daly wrote:
       | 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 better toolset.
        
         | kkfx wrote:
         | Not really a programmer (sysadmin) but I've tried the literate
         | way with org-mode for my stuff and I use LaTeX for all "pretty
         | docs" needs, however while for document production LaTeX excel
         | literate programming AS A MERE CONCEPT for me does not work
         | that much:
         | 
         | - simple things became uselessly lengthy and prolix
         | 
         | - complex things became too big to be easy read, while the
         | equivalent "pure-code with comments" and a small new developers
         | doc while fail to give an equally deep knowledge of the code
         | base is FAR more quick and easy accessed.
         | 
         | Maybe it's my style, I do not know but while I do not feel
         | LaTeX as painful, since most my docs are of the same kind so a
         | template/class produced once with calm get reused issueless, I
         | can't really digest literate programming...
        
         | muds wrote:
         | I've been struggling with keeping track of research experiments
         | and code at the same time. This seems pretty cool! I like how
         | this method is language agnostic and uses "matured" tools.
         | Question: I'd love to give this a try; do you have any public
         | code snippets?
        
           | daly wrote:
           | https://en.wikipedia.org/wiki/Axiom_(computer_algebra_system.
           | ..
           | 
           | This is (most of) the source code for Axiom. The code is
           | extracted from the latex for these pdfs.
        
         | mirekrusin wrote:
         | With pluto/jupyter/observable you can make it live.
        
         | skippp wrote:
        
       | NeutralForest wrote:
       | If it can get sane error messages, then it's already miles better
       | than TeX.
        
       | waynecochran wrote:
       | What is the motivation for the re-write? What is to improve upon
       | or change? Are you going to write something more correct than
       | Knuth?
        
       | TheRealPomax wrote:
       | This should really link to https://sile-typesetter.org/what-is-
       | sile/
       | 
       | (unless it _just_ released a new version of course, in which case
       | the title should probably be about that)
        
         | [deleted]
        
       | charlieyu1 wrote:
       | The scripting parts look promising.
        
       | 0xmohit wrote:
       | Does anyone use ConTeXt these days?
       | 
       | https://en.wikipedia.org/wiki/ConTeXt
        
         | lmz wrote:
         | I also used it to typeset a project report which had some
         | msword specific formatting rules. I found it more customizable
         | than LaTeX in that regard, but I did have to read the docs a
         | lot more.
        
           | 0xmohit wrote:
           | I particularly like the fact that you can control floats much
           | better than in LaTex/pdfTeX, but I agree that the community
           | is smaller.
           | 
           | It appears that there is no development in ConTeXt for a
           | while now. I haven't checked it, but it seems that they are
           | working on LuaMetaTeX.
           | 
           | http://www.pragma-ade.com/luametatex-1.htm
        
         | looperhacks wrote:
         | I did typeset in masters thesis in ConTeXt. It worked okay
         | enough, but for me, it didn't provide any features that make up
         | for the increased time spent searching for stuff because
         | there's less documentation and a much smaller community.
        
       | tokai wrote:
       | Am I having a stroke or are the examples not looking good? Subtle
       | kerning issues and the page layout reminds me of a Word letter
       | page. Maybe I'm not understanding its potential.
        
         | [deleted]
        
         | thrown_22 wrote:
         | I don't know enough about the system, but good text
         | justification is only the first step in a good document. TeX,
         | through LaTeX and the various report/book/etc environments has
         | centuries of man time dedicated to getting the best possible
         | output for a given document type.
        
         | ifreund wrote:
         | Maybe try opening the PDF instead of the PNG, the PNG images of
         | text look off to me as well but the font rendering in the PDF
         | looks fine.
        
           | tokai wrote:
           | I dunno - that doesn't help anything with the layout. I still
           | see overlapping text, tables with crooked columns, bad
           | spacing between paragraphs and titles. The kerning got
           | better, even though there is still something wrong with the
           | stroke weight of the font. Maybe its just a really bad font,
           | and not something related to Sile. Choosing a bad font to
           | showcase a typesetting system is a bit of a redflag imo.
        
             | Semaphor wrote:
             | In case someone is wondering, here's a table from the doc
             | book example: [0]
             | 
             | FWIW, in FF, Win the PDF fonts have aliasing issues when
             | not zoomed in, Sumatra PDF looks much better.
             | 
             | [0]: https://i.imgur.com/EERxV4W.png
        
             | chipotle_coyote wrote:
             | I think the font choice is a lot of it, at least. Sile may
             | be a great typesetting system technically, but the examples
             | kind of look, well, like they were put together by someone
             | who maybe doesn't know much about good layout and
             | typography.
        
             | gort19 wrote:
        
         | replwoacause wrote:
         | Yeah I wasn't impressed with the examples either.
        
         | WithinReason wrote:
         | I think most of the problem is the font they use
        
       | ddougj wrote:
       | Author's 2017 paper on SILE in Tugboat, the journal of the TeX
       | Users' Group: https://tug.org/TUGboat/tb38-1/tb118cozens.pdf
        
         | svat wrote:
         | A couple of the author's talks are also online:
         | 
         | * https://www.youtube.com/watch?v=5BIP_N9qQm4 [FOSDEM 2015,
         | "Introducing SILE: A New Typesetting System"]
         | 
         | * https://www.youtube.com/watch?v=t_kk20vlamo [GRANSHAN
         | Conference 2015, "Global typesetting with SILE"]
        
       | pmoriarty wrote:
       | How does this compare to LuaTeX?
        
       | Timwi wrote:
       | 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.
        
         | mapierce2 wrote:
         | Arcane, but I wouldn't say hideous. What's wrong with \alpha
         | for a or \sum for S? Do you have a better idea than this?
        
           | dash2 wrote:
           | I feel that the answer to your question is right there in
           | your question.
        
             | mapierce2 wrote:
             | I don't understand
        
               | panaeon wrote:
               | You can use a for a. QMK-like keyboard macros make it
               | really easy this days
        
           | jltsiren wrote:
           | You probably meant [?] (\sum) rather than S (\Sigma). The two
           | are different symbols, and they are sometimes used in the
           | same expressions. For example, in the field I (used to) work,
           | a sum over all characters in the alphabet would be written as
           | \sum_{c \in \Sigma}.
           | 
           | Mathematical syntax is complex, and the typesetting often
           | becomes unreadable outside trivial cases. Using Unicode won't
           | help much, especially because it's easy to confuse similar-
           | looking but unrelated symbols. Proper syntax highlighting
           | might help, but I've never seen a tool doing a good job with
           | it.
        
         | arjvik wrote:
         | 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!
        
       ___________________________________________________________________
       (page generated 2022-11-03 23:01 UTC)