TeX Live 2017 released
tug.org
tug.org
- At the base, there is Donald Knuth's program `tex`, itself written in a strange language (WEB) that is essentially an ad-hoc macro-expansion system (not used by many others, and not even by Knuth today, who prefers CWEB), and compiles (via `tangle`) to a dialect/version of Pascal (“Pascal-H”) for which a compiler hasn't existed for years. [It also "compiles" (via `weave`) to the printed book TeX: The Program]
- Then there is LaTeX, an elaborate set of macros written originally by Leslie Lamport (another Turing award winner) and later by a team, to be interpreted by the TeX program, which was never designed by its original creator for such elaborate programming.
- There are entire new programs (aka TeX engines) like pdfTeX and XeTeX, created by editing the original `tex.web` in different directions.
- There are the binaries of all these programs, compiled using `web2c`, a program written solely for converting all these WEB programs written in (basically) Pascal into C code, which is neither an arbitrary Pascal-to-C converter nor even an arbitrary WEB-to-C converter.
- There is LuaTeX, a manual rewrite of TeX in C, embedding a Lua interpreter and adding many hooks and extensions.
- There are thousands of macro packages written by thousands of people of varying levels of skill and foresight, on top of TeX, LaTeX, and other macro packages themselves: essentially everything on CTAN (which was inspiration for Perl's CPAN, and ultimately many languages' package repositories like Python's PyPI etc.)
And all this without even mentioning ConTEXt, Metafont, MetaPost, BibTeX, Kpathsea, various assorted utilities, graphics drivers…
I now get closer to 10+ years of programming experience, yet nothing comes close to debugging a faulty LaTeX custom command... it can quickly turn to an unreadable mess, but you have to admit that once everything is swept under a preamble.tex file, the rest of the code is very clean. Especially with auctex in emacs which displays most math symbols as their true unicode counterpart.
Funny story: one of my first gig was working in a music instruments shop where I was basically the IT guy, from sysadmin to web dev. At some point the software that created the barcode labels stopped working. Now I had to find an automatic way to make those labels, so of course I turned to LaTeX. All I needed to do was to write a batch file calling `pdflatex` with a template tex file and a pdf file for the label was promptly sent to the printer! There is probably some python package for doing the same thing, but I was so proud of seeing Computer Modern font tagged to every instruments in the shop!
For example, \AA -> Å, $\pm$ -> ±, and {\'e} -> é.
http://vimdoc.sourceforge.net/htmldoc/syntax.html#tex-concea...
Have you ever tried to color a latex table? If you color a cell, most readers will cover ~1 pixel of the upper and left table borders with the cell color, regardless of the zoom level. This is especially a problem on zoom levels where the border is only 1 or 2 pixels, but makes you feel insane when you zoom in so it's 10 or more. You know what the most common advice for fixing this is? "Get rid of your table borders. It will make your table look better."
Latex is full of little problems like this, but it's still the best.
Latex is far from ideal, but it's still the best because it hasn't stood still - many people are constantly contributing improvements and new packages, and it's very hard for a new replacement system to compete with that.
[1] https://tex.stackexchange.com/questions/18521/tikz-matrix-as...
Otherwise, this is like saying Python is not suitable as HTTP client because "urllib" has too many quirk - ignoring the fact everyone else uses the excellent "requests" libraray.
Although there are interesting developments at its code (XeLaTex, LuaTex), it is the packages which are ever evolving at a rapid pace. Have trouble with the "graphics" package? Use "graphicx" instead. Don't like the old "letter" class? Use "scrlttr2". And of course, use TikZ, it is one of the most well-designed, best-documented and comprehensive packages out there.
Compared to most programming languages, what I really like about LaTeX is their almost almost merciless take on backwards compatibility. This means that your old "article" document almost certainly works with later LaTeX versions. There will never be a breaking new version of "article" that forces you to adapt your LaTeX code, like we see with so many libraries in other languages. But this also means that you are stuck in your "old world" if you don't keep your eye open for new packages, and are willing to learn them. There are quite a lot of StackExchange questions that are essentially like this:
"Q: How do I fix my issue with package X? A: Use the newer package Y instead (or in addition)."
It's the combination of (mostly works by default) and (I can make it look just right) that is appealing. It gives me just enough stuff to play with to be satisfying and even a bit fun, without having to tweak so many things that it gets frustrating.
LaTeX::Word as Context::PageMaker.
Many many years ago I evaluated the available options as well to write internal documentation for the company I worked for. Looked at groff with the mom macro package. But eventually settled on Lout.
Lout worked very pleasantly (it has a nice markup language) but the output didn't look as beautiful as Latex. Unfortunately it doesn't seemed to be developed anymore.
The reason i made it was that i liked Lout's syntax but i wanted something closer to DocBook that i could convert to other formats (Lout only works with printed output). I think the closest is GNU Texinfo, but even that was too specific and it needs way more handholding for the underlying output than i'd like. Texinfo defines its node types (and its format isn't really a tree nor very generic) whereas LILArt's node types are just a convention and in practice the scripts can define any sort of node.
Having said that, LILArt is really a backburner project which i only touch wherever i need to write a document in more than one format. The default LILArt scripts can output groff macros for conversion to PS and PDF (i used that because it is already installed in many systems, including the iMac i used at the time, and it is small to download for where it isn't available) and HTML in several variations, like semantic HTML, "simple" HTML for systems like Java help and LHelp, HTML for conversion to mobi and plain text and "naked" HTML for use with QuHelp (a program that i wrote some years ago to convert naked HTML files to full web-based help sites with search). I also had a Texinfo target that could be used to make info files, PDF and PS through TeX and CHM files for a while but it was buggy and decided to rewrite it at some point.
However i only touch that rarely when i need it so i don't really recommend its use as it is right now (the processor is more or less done, but the scripts aren't very well thought out since i was doing stuff as i needed them and they need a bit of a cleanup and some nodes are needlessly verbose - the DocBook inspiration - and need some abbreviation aliases).
"Scribble is a collection of tools for creating prose documents—papers, books, library documentation, etc.—in HTML or PDF (via Latex) form. More generally, Scribble helps you write programs that are rich in textual content, whether the content is prose to be typeset or any other form of text to be generated programmatically."
You type in text and mark up using @-tags that are defined in, and can also contain, the full Racket language. It's like LaTeX with a modern language (but without the tons of available packages).
It's a really complex piece of software (much more complex than everyone thinks at first), but most of the time that isn't noticeable. The rST syntax can be somewhat confusing with advanced constructs, but for most stuff a short primer gets everyone going in the right direction. Since it's Python, deployment is a little bit annoying on non-Linux machines, but for docs you want CI anyway. To tweak PDF (i.e. latex) output it requires a fair bit of knowledge of both Sphinx and latex (and possibly rST [0]).
Like I said... it's quite usable.
[0] rST again being much more complex than everyone thinks at first. It's an enterprise markup language.
I've always wanted to build a latex based reporting system for similar reasons, all existing reporting systems suck and I wouldn't be surprised if I could build a latex based system to be the least worst option.
I wonder if there are other areas that it would be useful?
% fizzbuzz.tex -- Compile with pdftex, not pdflatex
\def\modulo#1#2{(#1-(#1/#2)*#2)} % a mod n = a-(a/n)*n where / is integer division
\newcount\X
\X=1
\loop
\ifnum \numexpr\modulo{\X}{15} = 0
FizzBuzz
\else
\ifnum \numexpr\modulo{\X}{3} = 0
Fizz
\else
\ifnum \numexpr\modulo{\X}{5} = 0
Buzz
\else
\the\X
\fi
\fi
\fi
\endgraf
\advance \X by 1
\unless \ifnum \X>100
\repeat
\bye $ tex
This is TeX, Version 3.14159265 (TeX Live 2016/Debian) (preloaded format=tex)
**\show\numexpr
> \numexpr=undefined. \unless \ifnum \X>100 \repeatDon't take my comment as my rushing out to embrace TeX. I just don't think it is nearly as bad as its reputation.
All of the CSS/HTML based solutions cost thousands per license, so that's out.
I'm now on to SILE, which fixes a lot of problems with tex. I can only hope that it's advanced enough to properly typeset a novel.
You'd think that typesetting a novel would be a gimme, but in the current ecosystem (tex or otherwise) it's a shambles.
I use it mainly for technical documentation (product manuals, etc.), so I've never tried the memoir class. But what I find myself doing mostly these days is makinng my own classes, usually based on article because it seems to me to have the most 'neutral' defaults.
It's a very steep learning curve, but I've found it an extremely valuable technology to be able to use.
Asking questions on the TeX stack overflow is a pretty good way to get help also.
Of course, it's all about using a good template. Usually I find there are tons of resources out there, but it does often involve finding someone with the same problem and asking the right question.
I'm now reading on ConTeXt and it seems to be a much more adequate TeX format. For one thing, it supports grid typesetting! LaTeX's philosophy is to separate style and content, leaving the style to "someone else". It seems that ConTeXt's philosophy is to separate style and content, but still make it easy for the user to choose the style. It's also more integrated: comprehensive core, few third-party packages, meaning less compatibility issues (but less choice too). I'll definitely try it for my next project.
what does this mean? I haven't seen that term before. I assume it's nothing to do with tables..
Generally you also want the baseline of titles to fall on the grid. Possibly also the formulas, figures etc.
LaTeX is pretty bad at this: by default it inserts stretchable vertical space between paragraphs, and around things like bullet lists, centered text and formulas.
Stretchable space is a good thing when you have a lot of elements beside simple paragraphs: it gives TeX flexibility to produce a nice page layout. For example the optimal spacing around equations might not be a multiple of the inter-line space. And you might still want to have the last line land precisely at the bottom of the page, so there must be a stretchable space somewhere. This flexibility also helps avoiding widows and orphans[1].
On the other hand I think non-grid-aligned text looks terrible for novels, especially when the page is thin and you can see through the paper the text on the other side (it's much less noticeable if the lines on both sides are perfectly aligned). Grid typesetting is also nice when you have multiple columns of text on the same page: it looks odd if the lines of one column are not aligned with those in the next column.
There's definitely a learning curve to LaTeX, but not a huge one, as it's mostly just a markup language. If you want to get in to the programming side of it, or if you want to learn one of the larger LaTeX packages really well, that would take you more time, but not even then it shouldn't scare anyone, particularly if you've learned other high level programming languages before. Diving in to TeX itself could be a different story, but I can't comment since I've never bothered to learn it myself, and haven't had to for anything that I've done with LaTeX.
Where LaTeX shines is for cases where you don’t really care about the details of the layout, but just want someone else to handle it all in a somewhat sensible way when you hand them a basic manuscript, and not shit all over itself the way MS Word does on a regular basis.
LaTeX is great for generic college papers where you don’t have figures and don’t have time to worry about the layout. By contrast it’s a huge pain in the butt for something like magazines, coffee-table books, or posters.
(It’s also the best way to typeset mathematical formulas, of course.)
- nice block text adjustment, line-breaks and hyphenation, line/paragraph,chapter spacing
- margins and padding, page numbers, and chapter headings
- font selection, supporting ligatures and kerning if you are fancy
I'm sure the devil is in the details, but how much detail can there be in basic running text? I'm fine reading novels rendered by basic html engines without css, even in monospaced font. The most important consideration for a text layout engine seems to be the font data format and corresponding font engine, which I don't know much about, because I don't really care.
You can check out the LaTeX template in the repo.
http://chrisanthropic.github.io/Open-Publisher-Documentation...
By the way, a really excellent book for (plain) TeX is A Beginner's Book of TeX by Seroul and Levy: it's truly for the beginner, yet at the end you'll be practically an expert, or at least know how to become one.
I've seen people get frustrated with LaTeX (not TeX), but that's because it was designed to make it difficult to do typesetting: instead the LaTeX philosophy is to specify only the document structure, and leave all the typesetting to a package that you hope someone has written.
Your comment is making me reevaluate what I thought I understood.
Folks are also highly scared off of TeX due to some of its aesthetic nature. Specifically, it looks rather different than most modern languages.
That said, I think most of that fear is unfounded and I regret that I let it keep me from learning this while in college.
You don't say "make a heading", you say "make this text in 14pt font, bold, with this much extra vertical space.
If you're writing a paper for publication in a journal, they probably have their own typesetting style. With LaTeX you can just specify your paper as a sequence of paragraphs, "sections", a title, an author, and so on, and, by including the journal's style file (assuming it's good), your paper will come out typeset in that journal's style. This philosophy is explained at https://www.latex-project.org/about/
This is great for certain (many) kinds of documents. The problem with this, though, is that the moment you want to change the appearance and get into typesetting yourself, you're fighting a system that was actively designed to prevent you from doing this.
An analogy may be a system like, say, WordPress: if what you have is a blog, then it would work for you, and you even get to choose one of several “themes” that others have written, and so on. The set of available plugins and customizations can even be impressively versatile (for example, I noticed that time.com runs on WordPress, and apparently so do a number of other non-blog sites: https://vip.wordpress.com/clients/). But ultimately, if you're trying to figure it out by yourself and have your own ideas about what your website should look like, a system like this will always be more frustrating than the alternative (of having full control).
TeX is not difficult to use, though in the beginning you'd have to specify manually things like the typesetting of the document title (put it in a bold font at 16pt, centered on a line...). LaTeX has features to automate many such common typesettings tasks, but it has its own flaws (some stemming from the fact that it's implemented using TeX macros, which weren't designed for such heavy “programming”).
If all you have is a passing curiosity though, you may just want to look at some examples: Knuth has .tex sources of some of his papers on his website (https://cs.stanford.edu/~knuth/preprints.html); you can look at them and compare with the resulting PDF files (which you can generate with `pdftex`). For an already typeset example, look at JRM2680.tex (https://cs.stanford.edu/~knuth/papers/JRM2680.tex) and JRM2680.pdf (https://cs.stanford.edu/~knuth/papers/JRM2680.pdf).
I've had complete strangers email me with Tex questions just from encountering my thesis.
The community on Stack Exchange was very helpful for me.
If you find TeX, LaTeX, and friends useful, check out the TeX Users Group at http://www.tug.org. If you'd consider supporting the folks who bring you TeX Live, you can read the Aims and Benefits page at https://tug.org/aims_ben.html.
Note that a membership is very reasonable-- if you choose an electronic copy of the journal then membership is $45 annually, or $15 annually if you are a student, senior, etc. The details are at https://tug.org/join.html.