11 ms·
LaTeX Tooling Guide
- Zeebrommer 10y agoLatex still is the least bad option for technical writing. I never get used to Word's figure captioning, numbering and referencing, and although the equation editor is vastly improved, multiline alignment is still tricky. And version control of documents of course! I hate those report_v23_JohnReview.docx systems. Also, +1 for TexStudio!
- TheRealPomax 10y agoWhat should be step 1: it's 2017, you want XeLaTeX or LuaTeX, both capable of native unicode handling, using fonts by name, etc. Traditional LaTeX (and I use "traditional" with scorn as we've had XeLaTeX for almost 15 years now), relying on the ancient pdftex engine, might be "easier to google" (let alone remember), but is also not an acceptable thing to recommend to people if all they want to do is control their typesetting. 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)
- 0xdeadbeefbabe 10y agoI've spent time on LuaTeX, and I'd really like to understand changing the font. 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."
- TheRealPomax 10y ago\usepackage{fontspec} and you're done. \setmainfont{Palatino Linotype} to just use that, \newfontfamily\secondary{Times New Roman} now you can just stick in {\fontspec{\secondary} blah blah blah} for bits you need styled in a different font for a few words/sentences/paragraphs/however much you need. 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])
- maksimum 10y agoBesides native UTF support and fonts what advantages do the XeLaTeX and LuaTeX ecosystems offer over LaTeX? 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.
- jhanschoo 10y agoFor the use case where your journal/publisher has a desired LaTeX template, it's probably more pain than it's worth. 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.
- Animats 10y agoNeeding all that "tooling" for a word processor is embarrassing.
- nobbs 10y agoYou don't "need" it. Install your favourite latex distribution and use an editor and latexmk. Works fine. Still better than every office suite or web app for academic articles, at least in STEM fields.
- zeveb 10y agoWith LaTeX one needs a bunch of tooling to get things done. 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.
- TheRealPomax 10y agoThat's literally the difference: this isn't word processing, it's typesetting. If you want word processing, use a word processor, and trust it to make the right choices for you. However, if you've spent any amount of time actually trying to get those images placed correctly, or those page dimensions perfect, word processors fall short and your only other option is a TeX engine, or typesetting applications like InDesign. Of those two, one category is free, and the other costs $50 a month these days. 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.
- elsjaako 10y ago> if you've spent any amount of time actually trying to get those images placed correctly 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.
- philip1209 10y agoWe used ShareLatex.com for engineering projects in college, and it eliminated the complexity of having to install LaTeX on everybody's computers. It also allowed us to export the source for safekeeping [1]. I would use it again in the future. [1] e.g. on Github: https://github.com/philipithomas/SchedulingPaper https://github.com/philipithomas/SchedulingPaper
- clishem 10y agoIt's free software as well! https://github.com/sharelatex/sharelatex https://github.com/sharelatex/sharelatex (AGPL)
- fnordfnordfnord 10y agoAlso Overleaf (used to be writelatex.com) https://www.overleaf.com/ https://www.overleaf.com/
- timlyo 10y agoAlthough docker could be pretty handy for this these days.
- sehugg 10y ago1. Install TeX Live and TeXstudio 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
- TheRealPomax 10y agoWhile making sure to tell TeXstudio to use XeLaTeX or LuaTeX, and never the LaTeX/pdftex (unless you live in such a small world you never need a single non-ascii English character of course. Then stick with pure LaTeX)
- projectorlochsa 10y ago\usepackage[utf8]{inputenc} \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.
- TheRealPomax 10y agoNo it doesn't: you just told me to "choose a language". It's 2017, why would I choose a language when I can just use all the languages with XeLaTeX, using: \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.
- projectorlochsa 10y agoYou haven't really explained why it doesn't. 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?
- girzel 10y agoEmacs and Auctex and you're done! (Provided you already use Emacs...)
- Derbasti 10y agoThis. And it even comes with reftex and bibtex.
- gkya 10y agoIf you're using Emacs already, just use Org-mode to write your documents and C-c Ce l p, i.e. export to pdf through latex. I use a combination of Org-mode and xelatex, and it works like a charm. Just set up `org-latex-classes' to your templates if necessary, then: ;; 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.
- torrent-of-ions 10y agoorg-mode is wonderful and exporting is a great feature. But it's more about using LaTeX as a convenient way to get a typeset PDF. But I've never successfully completed a "real" paper or book using just org-mode. I always end up adding a ton of manual hacks and at that point I might as well skip org-mode entirely.
- torrent-of-ions 10y agoIt's great but the author already says he uses it. It doesn't run LaTeX multiple times, though, as far as I know.
- IngoBlechschmid 10y agoI wrote sshlatex to speed up compilation. It does what you think it does, it runs LaTeX on a remote server and streams the resulting PDF document. The LaTeX header gets precompiled, shaving a couple of hundreds of milliseconds. It's therefore also useful when used only locally. https://github.com/iblech/sshlatex https://github.com/iblech/sshlatex
- Kinnard 10y agoI wonder what the author would replace LaTex with . . . ?
- norswap 10y agoSomething better :) 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.
- stephenll 10y agoOn iOS and OSX, TexPad.com apps work very well. Not affiliated but prefer TexPad over all other editors. Even works with git clients on iOS.
- KKKKkkkk1 10y agoI use LyX. It's interactive and visual, it generates clean and correct LaTeX, and it builds it for you, so you don't need to muck around with error-message parsers and makefiles.
- gmac 10y agoMe too. It's also extremely flexible, at the cost of not in fact always generating correct LaTeX and sometimes needing a whole lot of debugging. 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.
- nlp7 10y agoI love the feature of Latex where you remove one brace from your code and then it breaks entirely with the very helpful memory overflow error. Great compiler.
- seanlane 10y agoLooking through here, haven't seen anyone using Pandoc, so I'll through that in the mix. Offers the ability to write simple LaTeX intertwined with Markdown. I've been using it for everything from letters to homework assignments, seems to get the job done for most scenarios. Probably wouldn't use it for an extensive paper though. But it's nice to be able to start typing in Markdown, call `pandoc -o output.pdf source.md` and just have something nice to send out without a ton of setup.
- pvorb 10y agoI've written both my bachelor's and master's thesis using Pandoc and Markdown with occasional LaTeX markup.
- deleted 10y ago[deleted]
- mncharity 10y agoThere are also pandoc[1]-based markdown extensions which can create both latex and html. Today I was looking at an R Markdown[2] derivative, bookdown[3]. And was amused by Tufte style[4]. [1] http://pandoc.org/ http://pandoc.org/ [2] http://rmarkdown.rstudio.com/ http://rmarkdown.rstudio.com/ [3] https://bookdown.org/yihui/bookdown/ https://bookdown.org/yihui/bookdown/ [4] http://rstudio.github.io/tufte/ http://rstudio.github.io/tufte/
- graycat 10y agoWhat the OP describes is really long, drawn out, complicated mud wrestling. 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 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!
- massysett 10y ago
- drej 10y agoStep 1: touch report.tex Step 2: latexmk -pvc -pdf report.tex Step 3: ??? Step 4: PROFIT
- refrigerator 10y agoCan vouch for ShareLatex - used it to write my Masters dissertation (Maths) and use it to maintain my CV. Lots of handy templates for everything and no need to faff around with infrastructure.
- jsilence 10y agoYes, it has a lot of nice features, but the monthly subscription price is simply way to high for me.
- baldfat 10y agoAs the unoffical Racket Evangelist has anyone looked at Scribble? > 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. https://docs.racket-lang.org/scribble/ https://docs.racket-lang.org/scribble/
- deleted 10y ago[deleted]
- sevensor 10y agoI've always been confused when people talk about tooling for their programming languages. It made me fell like, maybe, I was doing it wrong by using a console-based text editor along with whatever compiler / interpreter is appropriate. This article finally made it clear to me that "tooling" means "a Rube Goldberg device I cooked up instead of learning how my programming language works." LaTeX is a lot easier if you understand what it's doing for you.