For almost every document that I type in LaTeX, I start by opening one of the most recent documents that I made, copying all of the packages and pre-set commands, and pasting them in the new document. This is because I have a lot of packages that I use on a regular basis. However, it gets pretty annoying and my preamble is messy.  I would like to create some sort of a template that contains all of the packages and commands that I normally use so that when I decide to start a new document I can use a single command and call on a file that has all of those packages already set up. Is something like this possible?   Thank you for your time
58098
Since I am using (almost) the same set up for my tex documents, I wonder if there is a way to create a preamble with my default packages and to recall it anytime I want to create a tex document.  If yes, how I can call this "default" preamble?  Thanks in advance
2944
I have to prepare my slides in latex. A quick search came up with different packages. Before start preparing, I need your experiences. I do not want to regret after learning one as I did, learning vim (now can not quit) instead of emacs.  EDIT: After asking this question at that time, I start learning Beamer. Now I'm really happy with that, I created my own template and now it's easier just copying from my .tex files to beamer template. I recommend beamer for powerpoint users who are actively using latex .
34546
What is the best practice for separating the preamble to a dedicated file?  I've seen two variants:   A package: preamble.sty and \usepackage{preamble} A .tex file: preamble.tex and \input{preamble}   Which one is to be preferred?
41629
I'm thinking of submitting a package to CTAN, and would like some hints which will help keep the path as smooth as possible for me, the CTAN administators, and the final users.  Please tell me what I should take care with in doing this. In particular, the doubts I have are:   I'm not a top-drawer TeXnician, so I don't really understand .dtx and .ins files. Can I get by without them, and is it OK just to submit a zip file containing a flat folder? I'll be preparing the package user documentation (by hand) as a PDF. Should I use a specific document class, or can I, for example, use memoir? How important is it to provide the source LaTeX code for the documentation? If I do provide the documentation source, should I "declare" the prerequisite packages for formatting the manual (as opposed to the prereqs for using the package) as prereqs for the package?
23746
Aside from CTAN, what are good resources/repositories for Latex templates? In particular, I'm looking for some pretty Thesis templates (I'm familiar with classicthesis)
89420
all the LaTeX-tutorials tell me how LaTeX is an extention simplifying the building of TeX documents. Understandably, no one uses plain TeX anymore, right?  But I seem to learn better when I grasp the link between TeX and LaTeX. Does someone have a link to example files in plain TeX? I'd like to know which commands, macros etc. are LaTeX-specific.
4031
I know that I can check from where one particular package would be called, using  kpsewhich &lt;packagename&gt;.sty   and that if I want a custom package, I usually have to put it in the same folder as my document.   I assume that similar to a $PATH, LaTeX checks a list of paths in an attempt to find my package.   Which paths are those? In what order are they checked? If this is system-specific, how can I find out the configuration for my system?   Related questions:    , the answers to which contain some paths that  LaTeX apparently checks.  mentions    &gt;    /usr/local/texlive/2009/texmf &gt;    /usr/local/texlive/2009/texmf-dist &gt;    /usr/local/texlive/texmf-local &gt; &gt; as well as other directories.   (Neither of those lists is complete).
92499
I work with many documents which I hope will have the same style throughout.. When making a decision about the design, I want that to be applied to all of the documents uniformly. I've created 1 file that has the start and ending code. Then, all of my other files just have the text, and some minimal code (defining things like chapters and sections). E.g.:  \documentclass{article}  \title{The First Document} %\title{The Second Document} %\title{The Third Document}  \begin{document}      \input{document01}     %\input{document02}     %\input{document03}  \end{document}   To compile a different document, I just move the %'s to another line and run pdflatex on this file.   Is there a better system for managing these? Can I put some details, such as the \title information in the beginning of each document (document01.tex, etc.) Is there any way to compile all of the documents at once as separate PDFs?
3858
I'm working on an exam document class where the user enters in questions something like this:  \multiplechoice{Question} {Answer #1} {Answer #2} {Answer #3} {Answer #4} {Correct answer} {Explanation}   I'd like to process this information in various ways in one LaTeX run (to create an answer sheet, key, and the test itself), so the questions need to be stored in a macro. The awkwardness comes when one defines:  \newcommand{\sectionA}[1]{\newcommand{\putsectionA}{#1}}   and then asks the user to put 15 questions as an argument to \sectionA. I'd much rather have those questions be the contents of an environment, like so:  \begin{sectionA} lots of questions \end{sectionA}   Mostly because I find it much easier to keep track of environment declarations than curly brackets. Is it possible to have the contents of an environment get packaged up into a macro?  Edit:  The solution would seem to be to us the environ package, but it doesn't seem to be working. Here's what I'm trying:  \documentclass{article} \usepackage{environ} \NewEnviron{foo}{\edef\foot{\BODY}} \begin{document} \begin{foo}   Store This \end{foo} \foot \end{document}   However when running this code \foot remains undefined. It actually seems impossible to define any macro using environ. Even when not using \BODY. For example, replacing the definition above with  \NewEnviron{foo}{\newcommand{\foot}{Print me}}   still fails. I've also tried \Collect@Body from the environ package with similar results. Does \NewEnvrion somehow prohibit defining new commands?
94421
There are many different kind of options that you can do  in order to start using LaTeX on Ubuntu. I would prefer doing that through Eclipse, but if there is a better way of doing it, feel free to write your opinion on why using this instead of something else.
118353
I'm using LaTeX for my research journal (similar to WordPress).  There are a number of subdirectories that contain complete (standalone) .tex files along with PDF files that I made from those standalone files.   I'd like to get a .tex file that contains all the .tex files and compiles to a PDF. What would be a good way to do that?  Currently I compile the .tex file in each subdirectory and then merge all the PDFs into a main PDF file. The problem is that each PDF takes a page and if I have a small note, the most of the page is clear. Please keep in mind that I would like to keep the standalone PDF files, too.  The other option is to cut out the body of the document and paste it into the main LaTeX file, but i was wondering if there is a package that does it. Meaning that would keep both main and stand alone files. Kind of like have chapters of the book compile separately
22589
Is there any tool that can convert Latex documents to HTML documents, so that all math is presented with ?  (Obviously, it is fairly easy to hack together a quick Perl script that is able to do a crude conversion, but I am interested in a bit more robust solutions — at least it should get all cross-references right automatically.)
7689
I'm getting the impression from reading the answers written by some of the real experts here that there are quite a few little packages that just tweak LaTeX2e's default behaviour a little to make it more sensible here and there.  Rather than try to pick these up one by one as I read answers to questions (and thus risk missing them), I thought I'd ask up front what LaTeX2e packages people load by default in (almost) every document.  As this is a "big list" question, I'm making it CW.  I don't know if there are standard rules across all SE/SO sites for such questions, but on MathOverflow the rule is generally: one thing (in this case, package) per answer.  I guess that if a couple of packages really do go together then it would be fine to group them.  This is perhaps a little subjective and a little close to the line, so I'll not be offended if it gets closed or voted down!  (But please explain why in the comments.)  Also see our community poll question:
5130
I'd like to create a LaTeX document that when rendered into PDF, has forms that can be filled out using Adobe Reader or other such programs. Then I'd like to be able to extract the data. I deliberately would like to avoid using Acrobat for all the usual reasons (non-free, need different versions for different platforms etc).   Can this be done ?
95852
I have the following situation:  Like most LaTeX users that write much, I have my own header files where the packages I use normally are required and the macros I use often are defined.  So if I write some article, I will normally use my own macros and save a lot of time and redundancies.  Now I send in my article to some journal and they want to publish it! Of course they want me to send in my source code.  Naturally, the following problem arises: The publishers won't want to include my own headers. They want code that compiles on every regular TeX-distribution. How can I convert my source into a file that doesn't contain my own macros anymore?  I need something like a preprocessor, that "inlines"/expands all macros and definitions found in the headers I explicitly specify (my headers), but not those in the other, unmentioned packages (regular headers).  Does anything like this exist? Could it be implemented using TeX/LaTeX or would one have to reimplement the macro expansion mechanism?
86665
I use the term database loosely here -- it can be an actual database, or a spreadsheet (in any format including CSV) or can be package-dependent.   Is there a way to create mail-merged documents similar to what can be done in word processing packages? I found the  which sort of works but it puts all the mail-merged data into one document.   Is there a package or way to generate new, individual documents for each part of the database? In other words, if I have a firstName value in whatever storage system, can I get LaTeX to generate a file called &lt;firstName&gt;.dvi for each of the names in the database? Or do I need to resort to a scripting language driver to pull that off?  EDIT  So to further explain what I am trying to do (and will now set it up based on the answer to  ) :  I'm trying to create a "welcome to the company" sort of document that has a cover page, table of contents, welcome letter, then various sections of information. I've never tried this in anything other than a word processor where it's easy to set "master pages" or "template pages" for individual pages in the document. So I could use a letterhead template page for the welcome letter part and a standard article-type template for the rest and still have the letter numbered/referenced in the ToC.   If I use the approach on the answer there, how can I tell \pdfpages which page to include? Ultimately I would like to have many files like Bob.pdf, Sue.pdf, John.pdf etc. where each file is the same document with a custom letter embedded within.
47016
I am writing some documentation for a LaTeX package, in which I am going to be including some example LaTeX code.  What is the best way to typeset that code?  I know I could just use verbatim, but it would be nice to get syntax highlighting.  I realize that this is a duplicate of , in which the consensus was to use the  package.  The problem with listings is that it seems to only have a driver for TeX, not LaTeX.  For example, when I typeset something like this:  \begin{lstlisting}[language=TeX,                    keywordstyle=\bfseries,                    identifierstyle=\itseries,                    stringstyle=\ttfamily] \begin{minipage}{\hsize}   This is a test! \end{minipage} \end{lstlisting}   it results in something like this:     \begin{minipage}{\hsize}   &nbsp;&nbsp;This is a test!   \end{center}   which is obviously messed up.  Is there a LaTeX-specific driver for listings?  If not, is there another package that does syntax highlighting for LaTeX code?