Begin LaTeX in minutes
github.com
github.com
Tables? Here you go. Oh, you wanted nested tables? For that you need to switch to an entirely different package. Oh, and that one doesn't support splitting up tables over multiple pages. Maybe this new one can do it. But it doesn't support that other package you use. Maybe try that one instead. Oh, in that one you can't have ...
Or is that just me?
I feel like this is a significant shortcoming of Latex, and it really is a mystery to me why no one has seriously tried to write an alternative typesetting system. I know Latex is good enough for lots of applications, and would require a lot of work to rewrite, but I can think of freely available projects with less glaring shortcomings for which people have started successful competitors (Firefox -> Chrome, KDE and GNOME, gcc -> llvm, etc.).
LaTeX is merely a TeX macro package. There are others, such as ConTeXt. Also, if you hate the pick-a-package mentality, there are LaTeX packages that attempt to do it all in one package--Memoir is one.
You can elect to opt out of fancy layers on top of TeX and go with Extended Plain TeX or even just writing in plain TeX, which apparently Knuth did.
Don't like TeX at all? Try roff (or, more realistically these days, groff.) There is a package of roff macros called Mom, which now comes with groff.
In my experience roff is a better UNIX citizen than Tex & Co. I can put roff in a pipeline and it will do what I expect. TeX programs generally do not like to be run in this fashion. Perhaps as a consequence, it seems roff is hard to find outside of UNIX (roff is sort of a UNIX artifact) while TeX and friends run on Windows. I have slapped together a few utilities (I call one "latexstream") so that I can use LaTeX from a shell prompt without dealing with a bunch of temporary files scattered everywhere.
My needs are somewhat simple: I have a system that prints recipes and grocery lists. Nothing beats paper for a task like this. (I see some people using iPads in the kitchen. Forget that. I'm not taking greasy fingers to an expensive tablet.) Generally I am not happy using LaTeX for this. I actually do not want to separate content and presentation. I don't like having to muck around with packages to get what I want. And I don't like dealing with huge TeX distributions when I just need a few things.
But every time I look into all the alternatives I outlined above, I wind up sighing and sticking with LaTeX. None of these alternatives have the community that LaTeX has. I can do relatively simple things in LaTeX (like columns done in particular ways) that would require me to write a lot of code in plain TeX or in roff. Yes, TeX distributions are large, but I am now figuring out how to pare them down to just what I need. (Even though TeX Live suggests you install the whole thing. That's gigabytes. I'm on a smallish SSD. No thanks.)
So folks definitely have come up with alternatives to LaTeX. But if most folks are like me, I imagine they look at these alternatives and conclude that LaTeX with a gazillion packages works well enough.
[edit] forgot yet another alternative: Apache FOP, which uses XML. Some Docbook tool chains use it. IMO the output from those never look as good as the tool chains that ultimately use TeX.
Pandoc is a document converter. I can make a Markdown file and output to LaTex or just PDF. http://pandoc.org/
I have learned that I get things done faster and works 90% of the time for my needs.
Here is a document I created recently using pandoc, python, inkscape and bmake, where I put a bit of LaTeX in the markdown document:
* PDF: https://drive.google.com/file/d/0B-2M0DmQ8rj2SmJnMUFpcEZacFE...
* Markdown: https://drive.google.com/open?id=0B-2M0DmQ8rj2NV9SWktQTWdKQ3...
* Preamble additions: https://drive.google.com/open?id=0B-2M0DmQ8rj2bmNjQ2RweFRfY0...
* BSDmakefile: https://drive.google.com/open?id=0B-2M0DmQ8rj2UDhaVk4zMVlOcD...
You might notice some untransformed LaTeX commands in the figures. That's no fault of pandoc mind you, since the figures are just graphic files to be included from the POV of pandoc, that's just because I haven't bothered yet to get that part right due to there being no real gain for me at the moment from getting that part right so I just type LaTeX in the figure text also even though I do not transform those.
All that you need basically for tables is booktabs and, in very specific cases, longtable.
\usepackage{tabulary} gives me the X column type
\usepackage{multirow} does what the name says
\usepackage{longtable} is the most useful one
\usepackage{booktabs} adds -toprule-, -midrule-, -bottomrule-
\usepackage{threeparttable} adds titles and notes to tables
\usepackage{threeparttablex} extends -threeparttable- to work with -longtable
\usepackage{siunitx} allows decimal alignment
\usepackage{array} some table column types require arraybackslash
\usepackage{varwidth} helps in setting a max column type
\usepackage{ragged2e} because \raggedright used in table footnotes would otherwise break hyphenation
\usepackage{afterpage} defers typesetting of the longtable environment to the top of the next page
\usepackage{etoolbox} helps to write monospace numbers in tables
And then I add all the newcommands, and end up with pretty tables but very fragile wrt changes in the latex environment
Otherwise you can easily avoid most of the other packages (if not all) in the 99% of the cases with some common sense, good style practices, and basic latex.
If you think that you need monospace numbers, X type columns, special decimal alignments and hyper-complex big tables with a lot of footnotes placed inside the floating environment, you are probably overthinking. Tex will allow you to have it in any case, even if is not really necessary, but it comes at a prize.
Writing LaTeX documents becomes easier once you understand the basics: plain boxes, positioning, macros, lengths, counters. Granted, you need to have a fair share of Donald Knuth's enthusiasm for typesetting, but it will be worth it.
Tables will always be a mess, though.
That's not to say the learning curve is not similar to the cliffs of Dover. Because it is. And stackoverflow is your friend. Yes, you can't do everything but you can do most of things you are meant to do.
The key to easily writing LaTex is making a few skeletons and then just reusing them.
And the packages interact with each other in surprising and unexpected ways, and you will almost always end up researching some strange 80s-era TeX commands that are still in there.
And nothing is well documented and you will spend way more time on it than you should.
But it's still better than writing it in *Office, I guess.
For those wishing to learn some 'theoretical' TeX, I can recommend TeX by Topic.[0] It mentions LaTeX macros only in passing, but even that amount was quite helpful to me.
(Links to the other currently mentioned documentation: http://mirrors.ctan.org/graphics/pgf/base/doc/pgfmanual.pdf (of which TikZ is a sub-/co-package) and http://mirrors.ctan.org/macros/latex/contrib/memoir/memman.p... ; and 2ion already linked to the KOMAScript documentation (https://news.ycombinator.com/item?id=12830476).)
And in general, LaTeX is a super worthwhile language to learn. It may be a bit more complicated than markdown or its cousins, but it can do pretty much everything.
I've barely scratched the surface of what it can do, but since I live at the intersection of CS and Education research, it is great how BibTeX will swap between APA and ACM styles easily, or how I can use a macro to create likert scale questions, for example. It probably takes the right kind of mindset, but I really liked the fact that my dissertation had a makefile (and was in source control, way back in the CVS days).
Agreed. Someone posted about it recently on here, and I've been using it ever since then for my research papers. Great website. My only suggestion for it would be that I wish collaborators could work on a particular LaTeX document without having to register.
Nope, tlmgr just isn't the same. :-)
(Lol) Just type "apt install texlive-full" in Debian and you are done.
You can also download your entire project as a zip archive, so you're not locked in to our platform in any way.
EDIT: also, ShareLatex is open source and fully self-hostable.
I really suggest developers to use LaTeX to create their resume because it looks really professional and personal (if you do not just use a standard template). It takes some time but you will get exactly what you want and learn many things along the way.
But yeah, fighting LaTeX is a pain. I thought I'd just install a font (hack). A month later I decided well maybe just using another font (inconsolata) is good enough.
Fully agreed.
> The last 10 percent, fixing margin width
If you're talking about page margins, the `geometry` package makes that easy.
Luckily, sometimes you get into scenarios where somebody has done the hard part for you. For example when writing journal articles, some journals have document classes published that you just have to use, and not do anything special in the body.
You can of course use one of many existing templates, but you will quickly feel lost when you have to customize things.
These days, just go with Markdown (or the like) and just include assets (say graphs) as SVG and be done with it.
For scientific papers (especially with two columns layout) you probably have to go with LaTeX though.
Edit: By the way, my take at minimal LaTeX templates: https://github.com/renke/latex-templates
In the end, I gave up. My profile is on LinkedIn anyway and I have an out of date version in google docs. I don't have as much control on the document, but it takes me a couple of minutes to add a new entry and get a good result.
Nowadays I just use Markdown, Word or Libre Office.
In some projects at work we used Docbook and DITA, coupled with text processor like applications.
Where Latex really shines is writing papers full of mathematical or scientifical notation, with a huge references section at end.
I don't see a place for it on the office workflows.
You can compile from markdown to LaTeX, getting nearly the best of both worlds.
It is interesting that learning LaTeX is a completely reasonable thing to spend time on but learning the basics of styles (surprisingly similar to how styles work everywhere else) is thoroughly unacceptable.
Latex has bloat problems too but there must be some lightweight distribution i just didnt find
Same for libre office, extremel bloated, but i still work sometimes with it. Latex has also better support in a lot of communities and a ton of packages.
surely you're not being literal, or you meant "wouldn't recommend it to just anyone" - for example for setting mathematical and physics formulas, wouldn't you still recommend it?
But even then you could probably integrate MathJax or KaTeX with Markdown. That would give you the best of both worlds.
I spent the same amount of time (72 hours) getting one hairy equation laid out in Word that I spent compiling my entire dissertation in LaTeX. Naturally the former was a request from my adviser, who did the latter back when she was a student. Dammit.
If you have any serious math in your writing, nothing else comes close. (Protip: Mathematica, the only non-free software package that ever earned its keep for me, will directly export equation cells as LaTeX if you ask nicely. I can't stand doing tedious symbolic manipulation without it.)
https://www.overleaf.com/help/17-is-overleaf-open-source#.WB...
An open-source business that doesn't survive (cough ReplicaDB cough) isn't necessarily better than a closed-but-extensible one that does. LaTeX itself is, and anything you're working on within Overleaf can be exported as text at any time, so I don't worry so much about lock-in.
The underlying toolchain (LaTeX and packages) is fully OSS, and isn't going anywhere; I have supported the LyX project in the past, and indeed that's how I laid out my dissertation, but in the end I find Overleaf more usable.
I still wish they'd support Markdown, though. Sometimes I just want to run off a quick, properly typeset series of equations and lists/tables without all the boilerplate. I suppose you could make the argument "well, if it was OSS, you could just patch it yourself!", and you wouldn't be wrong. But we use the autosubmit feature a lot, so on balance I've decided I can live with this shortcoming.
Focusing on internal development is not a justification for making software proprietary. A software license has nothing to do with development style -- you could do code dumps like Oracle while also licensing the code under a free software license.
> An open-source business that doesn't survive (cough ReplicaDB cough) isn't necessarily better than a closed-but-extensible one that does.
I disagree. All businesses will die eventually (or at least, almost all of them will). The difference between a proprietary business and a free software business is that only one of them actually makes a lasting contribution to society in terms of software (hint: it's not the proprietary one).
> The underlying toolchain (LaTeX and packages) is fully OSS, and isn't going anywhere;
True, and even more of a reason to prefer free software solutions (a proprietary version of LaTeX and packages wouldn't have survived for as long as LaTeX has).
But, each to their own.
Pretty neat!
I wrote my paper and master's thesis with a workflow involving LyX, LaTeX and python (scipy, numpy, mpl, doit for building the whole thing). The doit script ran the analysis pipeline, exported the figures, exported a .tex using the LyX CLI and ran all the latex/bibtex stuff to generate a PDF and and zip with all the necessary stuff for submission.
My colleagues looked at me weirdly (mech. engineering department), but I think it was worth it. Probably not time efficient, but at least for the peace of mind.
Can anybody recommend a more bottom up guide? Something more similar to learning a programming language, where you start with the basic syntax and build on features iteratively?
Is Knuth's book the best way to go? Or is that like learning C, when you wanted to learn C++?
That being said, LaTeX has its own kernel, on top of which comes a document class, on top which comes any number of packages. Each layer can alter or mask the lower layer, so understanding LaTeX on all its levels is a difficult task. Then, there are different implementations which add fundamental aspects to the Knuth reference TeX, like pdftex, luatex, xetex, and that does not even include platex, uplatex and other special things.
The little things I know I learned by finding a package/class/command that does what I need, and then study how it does it. E.g. hyperref is a very interesting starting place (relates closely to how documents (DVI, PDF,...) are output), as is memoir or my favourite, microtype.
https://www.pearsonhighered.com/program/Lamport-La-Te-X-A-Do...
Could you explain a bit about this? How does it change one's mindset while writing?
Trick question: What will you get by TeX-ing this document?
$\acute a\acute{a}\acute{{a}}$\'a\'{a}\'{{a}}\endThis is the only reason I got to make my team mates use to Latex for lab reports instead of Word. Latex isn't hard, and the fact that I could help them in real time and that they could see my code in our report's context got them pretty good at latex within an hour of using it !
I'd never used LaTeX until about a year ago when I needed it to write a paper. The first thing I wondered was how to install it. Surely in 2015 installation would be a snap. It'd be in the App Store. Or Homebrew.
Do not install LaTeX. Use it in the cloud. I use www.overleaf.com which is awesome. Similarly, I use www.draw.io to create PDFs for my drawings.
\usepackage{microtype}
\usepackage[hang,font=bf]{caption}
\usepackage{natbib}
\usepackage[unicode=true]{hyperref}
\usepackage[noabbrev,capitalise,nameinlink]{cleveref}
\usepackage{amsmath}
\usepackage{csquotes}
\usepackage{minted}
\usepackage{inconsolata}
\usemintedstyle{bw}
\usepackage{float}
\usepackage{siunitx}
\usepackage{booktabs}
\usepackage{url}
\usepackage{graphicx}
\usepackage{textcomp}
\usepackage{fixltx2e}
The one thing I'd add to this tutorial is citations and bibliographies.Do install LaTeX. I don't know (and frankly don't care) how hard it is under Windows, Mac or Android, but it has been readily available from the package managers with GNU/* and most BSDs for decades, easy to install and use. There are plenty of editors like gummi, kile, texmacs or lyx.
Seriously. You're asking people to give up their freedoms for what? To avoid typing a single line "sudo apt-get install gummi texlive-latex-base"?
I personally do stay away from "cloud"y things (or whatever buzzword you prefer for SaaSS in the stylish Apple-land), and recommend people that I care about around me to do so: https://www.gnu.org/philosophy/who-does-that-server-really-s...
Downloading LaTeX locally on macOS (or rather, Mac OS X as it was called at the time) is not very difficult. As I recall, it's basically just: download this .pkg file, run it, and you're set. That being said, I did _not_ enjoy having LaTeX installed locally. It wasn't harmful, it just wasn't at all beneficial compared to using an online LaTeX service.
The install size is easily tens of thousands of files (totalling a couple GBs), most of which are only a couple hundred KBs each. The vast majority of those files went unused. It clogged up my file system, gave me a marginal amount of benefits, and figuring out how to change the config files to do one _tiny_ thing was horrifically difficult.
As a result, I migrated to using ShareLaTeX. It was just simpler than having to manage the install myself. The value proposition of a (hosted instance of) ShareLaTeX is that I can use LaTeX from any computer (connected to the Internet) to access any of my automatically synchronized files and have an automatically updated install of LaTeX. I personally found that value proposition worthwhile.
textlive-most (which is a meta package which includes almost everything an ordinary user need) uses 1.2GBs on Arch Linux, so for sure it's not "couple of GBs". And even if it takes a couple of GBs: I'm using ~60GBs in my root filesystem, and never experienced any "clogging" (granted, GNU/Linux doesn't use Windows Registry).
If installing programs "clogs up your file system" in Apple's proprietary fork of BSD (don't know/care how they call/stylize it these days), another viable option, before throwing away your freedoms, is to consider switching to a different filesystem or operating system which doesn't "clog up" when you install new programs (and which isn't riddled with backdoors and doesn't spy on you, like Apple products do: https://www.gnu.org/proprietary/malware-apple.en.html https://www.gnu.org/proprietary/proprietary-surveillance.en.... ). Now I'm not sure whether this is an issue with HFS+ or a more general one within Darwin, but what is the point of having harddisks with large capacities (measured in TB these days) if you can't actually use it?
> ShareLaTeX is that I can use LaTeX from any computer (connected to the Internet) to access any of my automatically synchronized files and have an automatically updated install of LaTeX. I personally found that value proposition worthwhile.
I'm not seeing any convincing arguments or any "worthwhile propositions" here. With GNU/* and *BSD, that burden is on the package maintainers. System updates do include latex updates too (I know that it isn't the case with proprietary system you're using, but that's an argument for switching to a free/libre OS, not throwing away your freedoms). And I am able to synchronize my files (including .tex files) files across devices over the internet using syncthing, while still not yielding my rights and data to others, and there are plenty of FOSS alternatives to syncthing too.
And even if your original dichotomy was a real dichotomy, I would encourage people to protect their freedoms, not to throw it away for convenience.
This is going to be anecdotal, and I'm not going to get into details but in one instance, parts of our paper has been leaked before publication by an intern at Google (some of us were using gmail). Since then, we all moved to a private mail server and we're encrypting our correspondences with our collaborators. I know that stuff like this happens rarely, but when it happens, it hurts you.
Aside from principles regarding freedoms, or the creepiness of mass-surveillance, I've already been bit by "cloud" once, so I'm more careful about this than average person. So don't ask me to trust some random dude with a cool startup, or a well-known company with my important data.
In this context, I mean that in two ways (but mainly #2):
1) macOS has a feature (Spotlight) where I can search all of the files on my entire computer with a simple keyboard shortcut. >99% of the time, the result pops up within a second. I use that feature literally dozens of times each day. With LaTeX installed, I got a lot of results that are not relevant to what I want. In hindsight, I should've just disabled the indexing of the files in my install directory.
2) My computer (at the time) had a 64 GB hard drive. As a result, I was straining against the limits of that pretty hard. Uninstalling MacTeX (I believe that was the distribution I used) freed up at least 2 GB. I'm not sure why there's a discrepancy between your quoted figure of 1.2 GB and my experience.
---
In addition, ShareLatex's UI was far superior to anything available for OS X (at least, at the time).
My primary interest is in making myself as productive as possible. If using non-libre software gives me significant gains in productivity while not being unreasonable with their licensing terms/costs, then I will use it. That's the same reason I am using macOS. By using this proprietary piece of software, I do not have to tinkle with the inevitable strange bugs that pop up with the various libre options and therefore I am allowing myself to be the most productive I can possibly be. Every time I have tried using a libre OS, I have experienced some kind of bug that's simply impossible to diagnose and solve.
In sum: the value proposition of non-libre software is increased productivity. I highly value productivity. So, I am willing to make the tradeoff. I recognize and accept that if everyone does this, the world is worse off. But, I am selfish and therefore am willing to make the tradeoff (to some extent; my willingness to tradeoff is not infinite).
Sidenote: I could (technically) not throw away my freedoms by hosting my own instance of ShareLatex (as it is, now, licensed under the AGPL), but that's highly inconvenient and I have no interest in being a system admin. Again, this goes back to the idea of increased productivity by using "proprietary" services.
So, behind all your marketing buzzwords, you're trying to portray GNU/Linux software as buggy in contrast to superior Mac/Windows, which has, interestingly, long been a FUD and a lie propagated by Microsoft. This suddenly takes me back to halloween documents and "real cost of 'free'" because you're saying exactly the same thing, only in 2016 (on halloween eve!).
Like many others, I've been using GNU/Linux since ~1997, and been totally happy overall, and I can vouch it's nothing like you're trying to portray.
You may, of course, value your freedoms less than the conveniences you find in Apple or SaaSS programs. You prefer trading your privacy and freedoms for bits of conveniences, and that's the way you chose to live. I did hear you the first time. No need to reiterate, as this is not about your personal feelings or the "values" you found here and there (and no offense, but frankly I don't care about your personal feelings or anecdotes).
I'm trying to make a point that goes beyond your "productivity": this line of though shouldn't be advertised as a good thing due to the fact that it eventually hurts us as a society at large (see the references in my previous posts).
Not sure how much more of a snap installation of something can get....
-bash: apt-get: command not foundAnd consider ditching natbib for biblatex/biber
VOL〈▰▰▰▰▰▰▱▱▱▱〉Another tip: If you usually write markdown, pandoc can turn Markdown interspersed with LaTeX code into pdfs.
My personal experience is quite the opposite. In our research team, we collaborated on papers, proposals, theses and similar documents and we exclusively used Latex. Being a text based format, it lends itself well to version controlled (svn/git) repos. It was very easy to track changes and resolve conflicting edits. I don't think any binary format would have worked as well.
> with people who don't know latex
This is, however, painfully true. Newcomers had to learn Latex; but given the prevalence of it in the academia, I doubt it was a bad investment.
There are even wrappers that integrate this with git, so just "git latexdiff HEAD~5 HEAD" will give you a "track changes" PDF between the current version and the one from five commits ago.
I've used this on complex papers where editors have requested it, and it works fine. Once I had to manually tweak the .tex file produced by latexdiff, but it was a very complex use case (packages added and removed between versions) and pretty easy to fix.
I've collaborated on notes using latex before on github and PR discussions, inline comments, and git collaboration features like branching, descriptive commit messages and diffs, etc. are awesome for productivity.
That said, everyone will need to know how to use latex, git, and GitHub, so gdocs certainly has a simpler workflow.
We're working on it ;)
I actually would have done the same given my experience with both. Recently I tried out overleaf in order to allow others to collaborate on a paper. However, what was compiling perfectly fine on my local machine just refused to compile on overleaf, keep throwing me error related to $ symbol even though I did not use $ symbol at all (I used my own bst and cls). After googling for 30 minutes without finding a fix, I gave up and turned to the alternative, ShareLaTeX. It compiled perfectly with no errors on the first try.
[1]: https://github.com/sharelatex/sharelatex [2]: https://www.overleaf.com/help/17-is-overleaf-open-source
This post was the inspiration for using it: http://kesdev.com/you-got-latex-in-my-markdown/
One could duplicate the functionality of LaTeX with a superset of rST or Markdown. Case in point: Sphinx. That's essentially writing your documents in a combination of rST and Python.
There is some learning curve, but you can get LaTeX out of rst from docutils, Sphinx, or my tools.
TeX was designed to typeset a document always the same way on any machine that could run it. You can typeset any of Knuth's papers from the 80s and they can still compile today. Maths as Barbara is fond of saying has a long shelf life.
By the way, the one thing that disappoints me most about LaTeX is that you often cannot nest one environment in another without running into issues. In HTML the "composability" is much better.
But you are being somewhat naïve on the render in thirty years point. Html from two years so probably renders differently today. Never mind how different it is on machine that is rendering it.
So, could someone have made a simple one? Maybe. Evidence looks unlikely. Plenty have tried.
Writting them manually is not a good idea, at all.
I've personally found it somewhat easier to manage floats in ConTeXt as compared to TeX/PDFTex.
When I first began to use LaTeX long ago, a friend of mine gave me a preamble and essentially told me to not touch it until I knew better. This was very helpful to me, and I immediately began to use LaTeX in a mindset that separated content from presentation. Later, I did know better, but I'd already gotten the gist of what's going on.
Years later, when I introduce LaTeX to others (which I have frequently done), I follow the same starting path.
However, I briefly used www.sharelatex.com, is a web GUI (or WYSIWYG) type approach to Latex. It's a good project and makes using Latex slightly easier, but user must still know various packages, how to layout images etc. Nonetheless, sharelatex is a good effort and hope it benefits others.
With LaTeX, I suspect that really should also know the underlying TeX, but with some understanding of TeX can do just fine without LaTeX and all its extra considerations.
I just use templates and fill in the blanks. I once showed my not so computer affine sister how to do it and she likes it too.