TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Essential LaTeX packages

126 pointsby czamalmost 11 years ago

14 comments

CJeffersonalmost 11 years ago
I would recommend everyone look at xspace.<p>It only has one tiny aim - to deal with spaces after commands.<p>Given: \newcommand{\S}{Bob} then \S is \S. expands to:<p><pre><code> Bobis Bob. </code></pre> While: Given: \newcommand{\S}{Bob } expands to<p><pre><code> Bob is Bob . </code></pre> One can write: \newcommand{\prog}{\textsc{prog}\xspace}. Then we get:<p><pre><code> Bob is Bob.</code></pre>
评论 #7879572 未加载
评论 #7880329 未加载
x3roalmost 11 years ago
At some point I started writing my own templates rather than packages. There are LaTeX packages for almost everything imaginable, but it&#x27;s always been annoying to get a new document up quickly.<p>So now I have my template repository (<a href="https://github.com/x3ro/x3-latex" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;x3ro&#x2F;x3-latex</a>) which has a very basic init script, which I call like this:<p>x3-init x3-paper some&#x2F;folder&#x2F;<p>And it creates a complete skeleton for the document, including a tiny build script that transforms the main text body written in markdown to LaTeX (because who really wants to write LaTeX lists and stuff, right?).<p>My point is that I find such a list of &quot;essential LaTeX packages&quot; quite pointless, especially if it&#x27;s only ten or so of them. It&#x27;s like writing a post on the &quot;10 best parts of a motorcycle&quot; or something. There are thousands of awesome packages out there, and creating a repertoire and putting everything together takes time. I&#x27;d welcome it if somebody came up with a really nice template repository style thing for LaTeX, though.<p>PS: My favorite LaTeX package is definitely minted (<a href="http://stackoverflow.com/a/1985330/124257" rel="nofollow">http:&#x2F;&#x2F;stackoverflow.com&#x2F;a&#x2F;1985330&#x2F;124257</a>) for syntax highlighting.
评论 #7879824 未加载
edwintorokalmost 11 years ago
As mentioned in the comments there are some language&#x2F;font settings that are essential:<p><pre><code> \usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} </code></pre> Then alongside microtype the package upquote is useful too (for correct quotes inside verbatim):<p><pre><code> \usepackage{upquote} </code></pre> If you want to include source code then listings is nice:<p><pre><code> \usepackage{listings} </code></pre> Also when creating PDF I always check with pdffonts that all the fonts really are Type1. It can happen that you don&#x27;t have a package installed (such as cm-super), and if you use the default fonts you may end up with a bitmap font embedded.
评论 #7879586 未加载
peatmossalmost 11 years ago
My two packages that get used pretty much all the time are biblatex(-chicago) and memoir. Memoir is my friend because it includes so much of the functionality that is otherwise spread across a bazillion packages, <i>and</i> makes sure it all works nicely together.
评论 #7879519 未加载
gradschoolalmost 11 years ago
The OP also should have included latexmk in the list, which is a build system that runs latex and auxiliary programs such as bibtex sufficiently many times to build a document with correct cross references. It can be configured to rebuild a document whenever any source file changes and refresh a viewer such as evince or xpdf, so you only have to save the .tex file in your editor to see the updated typeset version. I&#x27;ve used LaTeX for years and only discovered latexmk recently, but it has made the workflow much more pleasant.<p>I&#x27;ve always wished it were easier to define new environments with arbitrary syntax that gets passed to external programs for conversion to LaTeX code while LaTeX is running. A package called dot2texi has that ability for dot code snippets (i.e., AT&amp;T graph visualization tools, dot etc.), and the dot2texi source code shows how to do it in general.<p>I agree with the comments that Tikz is an amazing package, and I didn&#x27;t realize until recently that it includes many state of the art graph layout algorithms that are as good or better than dot, with highly customizable features such as allowing the user to specify absolute positions of some of the nodes and letting the algorithm place the rest. It seems the whole section of the Tikz manual pertaining to automated graph drawing is omitted if it&#x27;s built on a system that doesn&#x27;t have LuaTeX installed, which is how I must have missed it.
评论 #7888252 未加载
ecesenaalmost 11 years ago
Since &quot;top 10&quot; is better than &quot;top 9&quot;, I&#x27;d add TikZ. Ok, you need it only if you need to draw pictures, but it&#x27;s an incredible tool.
评论 #7879402 未加载
评论 #7879972 未加载
评论 #7880568 未加载
评论 #7893615 未加载
jimhefferonalmost 11 years ago
What could OP mean in the booktabs section about a necessity in LaTeX&#x27;s table layout for vertical separators? The linked-to post seems to mean vertical rules (as opposed to inter-line vertical separation), but vertical rules are obviously not required in LaTeX tables. And, some inter-column space typically has to be there.
评论 #7879359 未加载
评论 #7880447 未加载
bristolalmost 11 years ago
My favourite is missing from the list: \usepackage{needspace}.<p>LaTeX&#x27; page-breaking algorithm gets it right most of the time but sometimes a bit of help makes it even better, i.e. a<p><pre><code> \needspace{4\baselineskip} \subsection{Something} Lorem ipsum ... </code></pre> tells TeX to insert a pagebreak here if there&#x27;s fewer than 4 lines of text left on the page, otherwise just carry on. Unlike \pagebreak[n], this is not optional.<p>\usepackage{refcheck} belongs in everyone&#x27;s toolbox as well.
ryan1234567890almost 11 years ago
cleverref is great but I gave up on it after finding how often it&#x27;s incompatible with journal&#x2F;conference .sty files
sabootalmost 11 years ago
Are there any compelling reasons to not avoid latex packaging and installing by using an online tool like sharelatex.com or writelatex.com ? They always seem up to date on latex packages and have a wide variety. I&#x27;m admittedly a latex-noob so I&#x27;ve only used it to create a few slides with beamer.
评论 #7881797 未加载
评论 #7880696 未加载
评论 #7881256 未加载
intullalmost 11 years ago
Include &quot;minted&quot; and make that 10! XeLaTeX with minted is a very neat combination.<p>XeLaTeX allows you to use TTF fonts in your LaTeX document and minted allows you to syntax highlight code. For books&#x2F;articles, especially by those in the software industry, it&#x27;ll certainly come in handy!
评论 #7881603 未加载
mythealiasalmost 11 years ago
From stackexchange: <a href="https://tex.stackexchange.com/questions/553/what-packages-do-people-load-by-default-in-latex" rel="nofollow">https:&#x2F;&#x2F;tex.stackexchange.com&#x2F;questions&#x2F;553&#x2F;what-packages-do...</a>
im3w1lalmost 11 years ago
Is it possible to hire a latex monkey for converting libreoffice documents?
jackmaneyalmost 11 years ago
XY-pic is also useful for drawing graphs, commutative diagrams, etc. With enough twisting, it could probably be used to create UML diagrams.