14 ms·
Sile: A Modern Rewrite of TeX
- cfhhgtyg 4y agoI am really desperate for an alternative.
- rhabarba 4y agotroff exists.
- AlanYx 4y agoFor 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.
- massysett 4y agoMy 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 4y agoIt doesn't have syntax highlighting IIRC
- neutrono 4y agoYou 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.
- RGamma 4y agoI've used texmacs (unrelated to TeX despite the name) with good success. Never went particularly deep into it though.
- natemcintosh 4y agoI'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 4y agoHTML/CSS, with KaTeX loaded to render mathematics using the same notation as (La)TeX. https://katex.org https://katex.org
- g8oz 4y agoPrinceXML.com - free for non-commercial use. PDFs from HTML/CSS with Katex support. Produces beautiful output.
- claudionaoto 4y agohttps://github.com/gfngfn/SATySFi 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.
- Timwi 4y agoI'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.
- arjvik 4y agoI 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!
- r0uv3n 4y agoWeird, 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.
- mapierce2 4y agoArcane, but I wouldn't say hideous. What's wrong with \alpha for α or \sum for Σ? Do you have a better idea than this?
- rhabarba 4y agoYeah, no, I'll stick with troff, thank you.
- choeger 4y agoDoes 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".
- chrisseaton 4y agoI 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!
- foldr 4y agoTikZ 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 4y agoTake a look at Tikzit a gui for tikz. GUIs have their downsides but they make a lot of sense for graphical output.
- lottin 4y agoI find TikZ quite amazing. You make a picture by describing a picture. It's completely unlike anything else.
- foldr 4y agoOh yes, I find TikZ very useful and it's an amazing piece of engineering. My point is more that I find it very difficult to understand how it works on a deep level.
- zzless 4y agoMy 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
- ubavic 4y agoEven 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.
- Finnucane 4y agoFor 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.
- alerque 4y agoThe whole point is you shouldn't have to manually balance columns in a spread. Obviously a round trip from source to output to fiddle with balancing every spread would be tedious. But if you can say "For this content I want to use spread X defined as this shape and balanced in this way" and then be able to fiddle with your content and have your spread always work, then where is the tedium? That's what SILE is supposed to do. Many publisher's workflows involve a round of content editing bouncing a word file back and forth, then a period where a typesetter uses InDesign or similar to lay it all out, then it goes to press. You can't keep copy-editing after the designer takes over. With a workflow using source documents in Markdown and typesetting handled by SILE I am able to allow copy-edits to book manuscripts up until minutes before going to press.
- 0cf8612b2e1e 4y agoBetter 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.
- drekipus 4y agoReminds 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?
- charlieyu1 4y agoMathML is not even supported in browsers these days
- mapierce2 4y agoEither KaTeX or MathJax has stepped in to support mathematical notation on the web. https://katex.org https://katex.org https://www.mathjax.org https://www.mathjax.org
- jfk13 4y agoThat rather depends on your choice of browser. https://en.wikipedia.org/wiki/MathML#Browser_support https://en.wikipedia.org/wiki/MathML#Browser_support
- fmajid 4y agoFor computer-generated documents like invoices, that is totally the way to go.
- pja 4y agoSile will take Docbook XML as an input format. Close enough?
- cristoperb 4y agoThis 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 https://github.com/sile-typesetter/sile/issues/1338
- paulluuk 4y agoIt would be cool if the source code under "examples" could be viewed in the browser, rather than having to download the .sil file
- coldpie 4y agoThere's a handy Firefox extension for that: https://addons.mozilla.org/en-US/firefox/addon/open-in-browser/ 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.
- chadcmulligan 4y agoSomething 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?
- empyrrhicist 4y agoWord doesn't support many things in math mode, and entering it is overall slower and more fragile.
- skipnup 4y agoBut 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 4y agoThe 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.
- empyrrhicist 4y ago...no, you can't. Sure, for a few one liners it works OK, but it's not like an embedded latex environment. At all. I've used it extensively. As far as speed, even for simple stuff the real time formatting gets in the way constantly compared to just writing text in a latex file.
- contradictioned 4y agoSome 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 4y ago> why not just use Acrobat Does Acrobat have any typesetting capabilities? I thought another app did that and just finalised through Acrobat.
- mmastrac 4y agoTeX 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_.
- ilammy 4y agoTeX 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.
- mmastrac 4y ago> 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 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/mode/2up https://archive.org/details/digitaltypograph0000knut/page/n7...
- svat 4y agoThe 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 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 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).
- charlieyu1 4y agoThe scripting parts look promising.
- tokai 4y agoAm 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.
- replwoacause 4y agoYeah I wasn't impressed with the examples either.
- ifreund 4y agoMaybe 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 4y agoI 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 4y agoIn 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 https://i.imgur.com/EERxV4W.png
- chipotle_coyote 4y agoI 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.
- begueradj 4y agoHonestly, I have always been very happy and satisfied with TeX. But any initiative is always welcome. Good luck
- 0xmohit 4y agoDoes anyone use ConTeXt these days? https://en.wikipedia.org/wiki/ConTeXt https://en.wikipedia.org/wiki/ConTeXt
- looperhacks 4y agoI 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.
- lmz 4y agoI 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 4y agoI 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 http://www.pragma-ade.com/luametatex-1.htm
- ddougj 4y agoAuthor's 2017 paper on SILE in Tugboat, the journal of the TeX Users' Group: https://tug.org/TUGboat/tb38-1/tb118cozens.pdf https://tug.org/TUGboat/tb38-1/tb118cozens.pdf
- svat 4y agoA couple of the author's talks are also online: • https://www.youtube.com/watch?v=5BIP_N9qQm4 https://www.youtube.com/watch?v=5BIP_N9qQm4 [FOSDEM 2015, "Introducing SILE: A New Typesetting System"] • https://www.youtube.com/watch?v=t_kk20vlamo https://www.youtube.com/watch?v=t_kk20vlamo [GRANSHAN Conference 2015, "Global typesetting with SILE"]
- pmoriarty 4y agoHow does this compare to LuaTeX?
- arboles 4y agoI like Pollen. https://docs.racket-lang.org/pollen/ https://docs.racket-lang.org/pollen/
- NeutralForest 4y agoIt still uses LaTeX to generate PDF right?
- NeutralForest 4y agoIf it can get sane error messages, then it's already miles better than TeX.
- alerque 4y agoOn a scale of LaTeX=0 (absolutely inscrutable) to Rust=10 (holds your hand through the fix) I would say SILE is about a 5. Caveat, I speak as one of the authors. It helpfully traces the location of any problem to an exact location in your document, mostly clarifying what it was trying to do, has a trace stack with code locations for everything it was trying to do leading up to the problem, and in many common cases has sensible descriptive errors. That being said if even as a contributing author I only give it a 5 it clearly has room to improve!
- TheRealPomax 4y agoThis should really link to https://sile-typesetter.org/what-is-sile/ 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 4y ago[deleted]
- forgotpwd16 4y agoTitle 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.
- alerque 4y agoTrue. Edit: I initially said none of the upstream maintainers call it a rewrite, but I was wrong because the original author did in fact use that turn of phrase on several occasions including in the manual and in a talk. I agree though it's not an ideal way to describe it because it has some many differences too. It's not a port of TeX to a different language. As you suggest TeX-inspired is much nearer the mark. It's a from-scratch effort at addressing roughly the same problem space. It does re-implement some of the same algorithms. One of it's input syntaxs resembles TeX (although the resemblance is not even skin deep). But no it is not a rewrite, just a new take.
- poulpy123 4y agoI 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 4y agoI 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 4y agoI 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.
- orbifold 4y agoI'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.
- daly 4y agoTeX 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.
- muds 4y agoI'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 4y agohttps://en.wikipedia.org/wiki/Axiom_(computer_algebra_system) 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.
- dcuthbertson 4y agoFYI: axiom-developer.org/ seems to be down
- skippp 4y agoYou may in interested to learn then, that for the past 10 months I have (slowly) been working on a LaTeX package that does exactly this [1]. It writes all the text from between come \begin{code} blocks out to a file, as well as use minted/listings to highlight it in the generated pdf. (exactly what you described but in LaTeX package form). I am currently a physics student and one of the main problems that I have day-to-day coding is being unable to include diagrams/equations/pictures in the source code. Moreover, because there is a fair amount of 'domain complexity' the comments are often longer than the code itself. The package is still very much unstable and not even close to being ready for any sort production. However, I did use it for my masters thesis [2], and it was quite an interesting (in a good way) experience. (I recommend everyone to actually try to write literate code at least once). [1] https://github.com/Skipp1/fortex https://github.com/Skipp1/fortex [2] https://github.com/Skipp1/mono-rich https://github.com/Skipp1/mono-rich
- graycat 4y agoI'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!
- waynecochran 4y agoWhat is the motivation for the re-write? What is to improve upon or change? Are you going to write something more correct than Knuth?
- funkaster 4y agoI 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) https://en.wikipedia.org/wiki/Lout_(software)
- mhd 4y agoI've had a look at Lout years ago, but I think the development stalled a bit and the source wasn't that inviting for contributors. So the PDF support came (too) late and still isn't feature-complete with the PS output. I am still fond of the Scribe[1]-like syntax, but then again, I also liked it in Texinfo or Borland Sprint. [1]: https://en.wikipedia.org/wiki/Scribe_(markup_language) https://en.wikipedia.org/wiki/Scribe_(markup_language)