LaTeX Tooling Guide
norswap.com
norswap.com
It's like talking about how hard it is to work with browsers and then telling people the best way to set up IE8, instead of using a modern browser.
Of course it's still you in the typesetting driving seat, it's never going to be as easy as Word, but I'm writing a novella in XeLaTeX right now, not even maths papers, and it's almost child's play to make it do what I want with minimal effort. My entire "complicated setup" is five lines plus one line that's me being completely unreasonable, with XeTeX going "sure, be that way":
\documentclass[11pt, oneside]{book}
\usepackage{tocloft}
\usepackage{fancyhdr}
\pagestyle{plain}
\usepackage[b5paper, bindingoffset=0mm, inner=23mm, outer=23mm, top=21mm, bottom=24mm]{geometry}
\input{quotation-rules.tex}
And that's it, the rest of the document is basically just a giant text file of paragraph after paragraph of normal text, using normal as-per-unicode accented letters saved in UTF8. The doc's certainly interspersed with \part{} and \chapter{} markers because that's how a story works, but there is nothing I couldn't explain to my mom in there: I'm writing a "book" with a table of content, a reasonable looking page header but otherwise plain styling, with some explicit page dimensions (which is no different from using Word for a specific page size).(the only unreasonable demand being that "\input" line, which imports a set of rules for using "Palatino Linotype" as main font, but then pulling the punctuation glyphs from "Sylfaen". So stuff like full stops, apostrophes, commas, double quotes, etc. And even for something seemingly as complex as that, is just a few more lines using modern XeLaTeX)
For example I can list them with: mtxrun --script font --list --all
But when I try to use "gonormal" ( \definefontfamily [myfam] [tf] [gornormal] ) I get: "The requested font 'gonormal' has no files for the 'tf' alternative, Latin Modern is used instead."
And if you need the automatic TeX style replacements (like turning `` into opening quotes - personally, I hate that, I'm writing text, not programming - then you can pass in TeX mapping instructions in [...] blocks, covered by the fontspec manual: \setmainfont[Ligatures=TeX]{Font By Name} and \newfontfamily\whateveryoucallit{Font by Name}[Ligatures=TeX])
You mention writing a novella as your use case, but I don't think that's a particularly difficult task for a typesetting engine. If you found typesetting a textbook with "rich" margins, annotations, and figures significantnly easier I would be more inclined to learn about alternatives.
With LaTeX I can transform my research papers to comply with a publisher's template in a few lines of code. Sure there are some annoyances such as compile compile bibtex compile, but the ecosystem is mature enough that most of these are well handled.
For works that have to handle multiple scripts, and for works wherein you are in control of your own typography, it's more logical and practical to work with XeLaTeX/LuaLaTeX. If you wish to use OpenType or TrueType fonts there's little debate.
If you want to go the whole nine yards regarding Unicode, there's recently been some development regarding Unicode math, with the first impetus being Microsoft and its Cambria Math to support mathematical typesetting in Word. Unicode math refers to fonts implementing mathematical symbols as Unicode glyphs, as well as some font-side logic regarding how the font renders math, afaik.
So if your publisher has a LaTeX template, that's pretty much guaranteed to work just fine when you \usepackage it in XeLaTeX context. Needless to say, except it really does need to be said, that also means full Unicode Maths support (through \setmathfont{A normal font name} without needing TeX metrics nonsense because it's 2017) for any OpenType font with maths support (Cambria Math, XITS Math, etc. etc.)
Another point is that some packages haven't been updated for Unicode, algorithms2e being one popular package that's still Latin-1, IIRC.
Then if your code will be compiled from source by someone using pdfLaTeX, your Unicode characters will cause problems.
Hence why I say that it's probably more pain than it's worth, since there are still things you need to understand to avoid incompatibility. I think a more proper analogy would be C and C++, since while XeTeX/LuaTeX is mostly LaTeX compatible, 1) you risk running into sinister incompatibilities and 2) typical XeTeX/LuaTeX code is different from, and incompatible with typical LaTeX code.
If you need amsmaths or APA citation, you still get those. Except now you get them without insane commands just to type Paul Erdös' name, or citing Лев Семёнович Вы́готский.
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc} m n
[ A B ] m
X = [ C D ] n
[ E F ] n
Achieving this in LaTeX deserves a dissertation in and of itself. \documentclass{article}
\usepackage{blkarray}
\usepackage{amsmath}
\begin{document}
\[ X = \begin{blockarray}{rrr}
m & n \\
\begin{block}{[rr]r}
A & B & m \\
C & D & n \\
E & F & n \\
\end{block}
\end{blockarray} \]
\end{document}Also, +1 for TexStudio!
[1] http://pandoc.org/ [2] http://rmarkdown.rstudio.com/ [3] https://bookdown.org/yihui/bookdown/ [4] http://rstudio.github.io/tufte/
[1] e.g. on Github: https://github.com/philipithomas/SchedulingPaper
2. Start writing your master main.tex file
3. Search a bunch of StackExchange forums, edit main.tex appropriately
4. Now you have to edit /usr/share/texmf/tex4ht so your epub converter renders images properly
5. Finish your book. You will never touch that main.tex again, you will use it for everything from now on and take it to the grave
\usepackage[LANG_OF_CHOICE]{babel}
solves that problem.
there's plenty of font packages available for pdflatex.
I use newtxmath and newtxtext and libertine math and text all the time.
\usepackage{fontspec}
\setmainfont{Noto Sans}
and that solves that problem. I can write whatever I want, and stick in lang-specific context switches using \usepackage{ucharclasses} (for making sure macros are inserted for transitions to/from specific unicode blocks) only once I absolutely need them, and no earlier.Choosing a language allows you to automatically translate a bunch of strings used by various packages.
For examples Chapter, Section, TOC and everything that is autogenerated will be translated to a language. It has nothing to do with utf8.
You can remove babel and Chinese, German, Swedish can work in the same file regardless.
\usepackage{noto}
What's hard about that?
;; See: https://lists.gnu.org/archive/html/emacs-orgmode/2014-05/msg00198.html
(let
((xelatex "xelatex -shell-escape -interaction nonstopmode -output-directory %o %f")
(biber "biber -u -U %b"))
(setf org-latex-pdf-process
(list xelatex xelatex biber xelatex)))
and go.> 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.
I use LyX because, although I'm a programmer and perfectly capable of littering my text with braces, somehow that completely ruins my writing flow. I need the text I'm writing to look clean and a bit formatted (big text for headings, italics and suchlike) -- and not like code -- to get anything meaningful down on paper.
Honestly, nothing is 100% convincing, but if I could pick anything, I'd use HMTL with some templating magic (for generating references).
It still leaves the issue of positioning floats and page breaks, which is really non-trivial, even if you already had a "spatial model" of what the generated HTML would look like (I know of no such library, but do tell if you know of it).
TBH, floating figures is a non-issue for the web, where you can just position them in the flow. It's only in print that this is an issue. I'd be fine to put figures on separate pages, but that might be a waste of paper.
I've been a good TeX user from the beginning of TeX and love TeX.
For the problem the OP addresses with LaTeX, there is a much easier solution: And the candidates are ..., and may I have the envelope, please? [drum roll]. And the winner is ["rip"]: Just use just TeX, that is, D. Knuth's TeX with his standard macro collection Plain. If get into trouble, then just get and read his book, The TeXBook -- as software documentation, it is exemplary.
I'm guessing that a TeX file sent to people who accept LaTeX will work fine. That was the case the time I published in the Elsevier journal Information Sciences.
Want some cross reference macros? Okay, I put my TeX macro source code for cross references at
https://news.ycombinator.com/item?id=13630570
in two parts in two posts where the above URL is for the first part and the second part is close in the same HN thread.
The OP goes on and on about what text editor to use for typing in documents in TeX. No problemo! I just use my favorite general purpose text editor KEdit with a few macros specific to TeX.
With the TeX distribution I have is the spell checker ASpell. I use it for nearly all my spell checking, in blog posts, e-mail, sure, TeX, source code documentation, own notes on random subjects, etc. ASpell was written by a bright, hard working person -- it's darned nice software, one of my favorite tools. I use ASpell just for English, but IIRC it also can work with French, German, etc.
TeX is fixed and unchanging, rock solidly standard, essentially totally bug free, beautifully designed and documented -- what's not to like?
LaTeX? Just to start, need at least two books, each about twice the size of Knuth's one book, and IMHO nowhere nearly as well written (likely the case since next to nothing in software or computer science is written as well as Knuth's book). For more, of course there is the TeX source code documentation in Knuth's literate programming which I've long regarded as just exemplary software development -- that is, IMHO the most important part of software is the documentation, clear enough to make the actual programming language statements obvious because otherwise when the code is written "only the programmer and God understand it and six months later, only God".
TeX was good enough for Knuth's book and, then, his series The Art of Computer Programming and, thus, should be up to the needs of a journal.
Or, in short, just use TeX, with your favorite editor (hopefully a good one that lets you write some macros), write some TeX macros, use ASpell, and otherwise avoid the mud wrestling and relax!
Yup, and "sigh" is a mild version.
I don't remember saying that TeX was "easy".
Actually, for just text, TeX can be quite easy, as easy as, say, HTML, old WordStar, Word, the old Runoff programs, etc. That is, just need to know a few tags.
The difficult parts are doing more, lots more, especially typesetting some mathematics with some tricky notation. It's fair to say that, just due to mathematics and its notation, fundamentally there is no "royal road" to typesetting all of mathematics -- much of it, yes, all of it, no.
I confess I spent a lot of time in Knuth's book. At one point I wrote a verbatim macro and like it better than what Knuth has -- verbatim is tricky because need to cancel temporarily a lot of what is in TeX. I wrote the macro so that I could document with the source code TeX macros in TeX documents. At the time, that seemed important -- I no longer believe it is.
Also I wanted to use TeX as the formatting language for my old daisy wheel printer, say, instead of old PC WordStar or some such. At the time, that seemed important. Nope, it wasn't.
But for business cards? Yup, TeX has been nice. Can get some sheets to run through a black and white laser printer. The TeX is cute, say, have the TeX for one business card and, then, use more TeX tricks to position the results for one card on all the cards on one sheet. Then bend the sheets and get a stack of cards -- they look good enough (somehow the edges are clean enough).
But I've got the macro; writing it is a good TeX exercise.
Maybe have to look at TeX in about the right way. Or, from a movie, "I'll love it when it works." with the response "It will work when you love it." Or, love it for what it is good for; don't hate it for what it's not good for. TeX is not good for everything.
What is TeX good for? Sure, Knuth's books in his series The Art of Computer Programming (TACP) and, okay, also papers in, say, the American Mathematical Society (AMS) journals.
Or, TeX is to do on a computer what typesetters used to do by hand for math text, many physics and engineering texts, TACP, and the AMS. So, right, TeX is not the ultimate way to put any and all marks in color, etc. on paper or a screen now and in the future. For the future, really, TeX was to computerize the old work of math typesetting, not create a new future in formatting or putting wildly conceived marketing materials on billboards, handbills, TV, or computer screens. E.g., I don't see an easy way in TeX to wrap multicolored, stretched text around a sphere and have it rotating with sparks flying off -- maybe Knuth could use TeX for that! I see no way to do ray tracing graphics in TeX. TeX doesn't replace everything from Adobe or HTML5 or be the sole tool of all graphic artists, movie makers, etc.
But if you want to be able to type math, and I do, then TeX is just fantastic -- beautiful results and, for such good results, by far the easiest approach.
If look at Knuth's book and insist on just an introductory tutorial for an hour or so and just f'get about the rest, then you should do okay at first. As you want more, say, ordered lists, unordered lists, simple lists (I have some simple macros for each of those three, with the logic for some nesting), good control over page breaks, exact control on space after periods, positioning of figures, using TeX to put math annotation on a figure (basically have TeX print on top of the figure -- actually easy enough once see how it works), some fancy foils format, essentially automatic tables of contents, cross references, a nice way to do references (I have a good enough way but don't use BibTeX), getting good with font magnification, handling hyphenation in detail yourself, tricky tables (they are not so easy in HTML, either -- about the only easy way to do tables is with just flat ASCII and assuming a monospaced font!), then look some things up in The TexBook.
I believe you will find that the simple stuff can still be simple. And for the math, say, at the level of freshman calculus, that's actually quite natural and easy also.
IMHO, LaTeX is more difficult. Maybe LaTeX makes it easier to have some book format with title page, frontispiece, preface, table of contents, fronts matter, body, parts, chapters, sections, subsections, back matter, tricky running headers and footers, references, colophon, etc., but, gee, Knuth wrote his book in TeX and not everyone is trying to write the Encyclopedia Britannica.
If something seems really challenging in TeX, then maybe don't really need to do that. Or get some help from the KISS princple -- Keep it Simple Sam.
E.g., for KISS, consider HN: How can post pictures? Can't do that. How can include TeX math? Nope, not there. How about bold face? Can't do that either. How about ordered lists nicely indented? Not there. Still HN is darned useful.
The biggest caveat is that you still have to rely on the buggy conference templates (or spend a lot of time recreating them).
With Word, LibreOffice or other alternatives, it's impossible to get things done no matter how much tooling one adds, because they simply cannot do what LaTeX does.
Certainly this is the case when you need to typeset maths, but even when you want proper typesetting control over something as "simple" as mixing English and vertically typeset Japanese, Word and friends are insanely ill-equipped to do what you need them to do, whereas a modern TeX system like LuaTeX or XeLaTeX will actually let you define what you need and then get out of your way from that moment on.
I had to learn LaTeX as part of my education, and as much as I like it this is one of it's weaknesses, not it's strengths. I saw my fellow students struggle to get all the images on the pages they wanted, and if they asked for help the answer was "Let LaTeX decide where to put it".
Don't get me wrong, I still love LaTeX. It let's me:
* Keep a whole document in a consistent style I can change at any point in the process.
* Produce pretty mathematical formulas and proper justified text.
* focus on writing instead of fiddling with where images go (I let LaTeX decide, it's usually pretty smart about this)
* Write code that writes part of my document. I used to write code to do the boring parts of certain proofs, and it would produce the LaTeX for me.I appreciate your point, but it's actually $19/mo for InDesign.