I have a file, jtc.sty, that houses all the repetitive stuff that normally goes into a latex document (usepackage statments, turning paragraph indent off, and some formatting stuff) that I include in pretty much all of my tex files. However, I find it annoying to manually copy over that file every time I want to use it. Is there some way to configure latexmkrc so that it knows where to find jtc.sty whenever I use it?
3074
I know how to define a package or a class, but how do I make it available (to myself) at all times?  Say I have the package file commonstuff.sty (or myprettyclass.cls), that I want to be able to include in any .tex file I create on my computer. Where do I put it? Do I need to run some installer on it, or is it enough to keep it in a certain folder?  Note: I know I can just place it in the same folder as the .tex file, but that's not what I'm after here. I'm looking for a way to "install" the package centrally on my computer.
92736
This question is very similar to a previous post:   I am using MiKTeX 2.9 and TeXnicCenter to compose and execute my LaTeX file(s) on Windows 7. I am using a template from Elsevier to submit a journal article, but I am getting the LaTeX Error that File 'numcompress.sty' not found. This file is currently located in the same directory as the other elsarticle files: C:\Program Files (x86)\MikTex 2.9\tex\latex\elsarticle. I have actually followed the directions posted to the above question exactly:  but still have had no change in outcome.
64791
I have a TeX document that is embedding a huge amount of figures from a fig folder that is full of another humongous amount of other figures.  I would like to move the document along with its figures, but I don't want to take the whole fig folder, just the figures in there that are embedded by the document.  Is there a package (or any other way) that allows me to, for example, print out the filenames of all the figures embedded by the document? Something like:  fig/figurename1.eps fig/figurename2.eps ... etc   I could then just copy-paste that list and add some cp's in a plain text file and automate the copy of those files to my desired location by running the file in my shell:  $ cp fig/figurename1.eps wherever/fig/ $ cp fig/figurename2.eps wherever/fig/ ... etc   Of course this is just an idea, if somebody has an alternative to the "file listing and copy-pasting in a shell file" I would be happy to listen =)
73808
I am interested in using LaTeX in a way such that when I compile twice, I get the very same resulting file.  My test.tex:  \documentclass{article} \begin{document} Hello, World! \end{document}   Compiling yields different hashes:  8493b40b225993d01d46ed7479725d8b4e9f6efbfddcc8d6d657f00084d41cdb  test.pdf 05f2a3cd3780df33470a4363da18b008595e42acd9a085d76c83b6c83dc71c41  test.pdf   and so on.  (This also applies when compiling to DVI at least a minute apart.)  My guess is that this is, at least, due to the Created and Modified metadata of the PDF. I followed  for fixing those, but I still get different hashes.  I found out that when compiling with faketime '2008-12-24 08:15:42' pdflatex test the file will be reproducible. I conclude that there is no random data involved, but it's only dependent on the time.  My question is thus, can I influence that time for pdflatex from within my TeX document?
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?
94960
I hope this question is not a duplicate, but I couldn't find anything here on tex.stackexchange.   What I want is the place where all the macros already defined in LaTeX are. For example I know that the command \hrulefill is defined as   \def\hrulefill{\leavevmode\leaders\hrule\hfill\kern\z@}   (I got this form ), but where can I find all the possible commands defined already for all the LaTeX classes (such as the sectioning commands \chapter, \part and so on)?
5532
I am trying to figure out a way to cleanly separate the TEX files from all of the intermediate and output files. Various approaches I've tried, including the one described by  don't seem to work. I'm using TexMaker + MikTex (portable). Ideally, I would like my file/directory structure to look something like this:   texproject   texfiles   1.tex 2.tex  intfiles   1.out 1.log 1.aux 2.out 2.log 2.aux  pdffiles   1.pdf 2.pdf     Instead, what I have, is the jumbled-up mess where all of these files live in the same directory. I've tried setting the ouput-directory, for example, on pdflatex but this doesn't work. The pdf file still gets created in the same place but now it doesn't show up in the previewer. This should be pretty easy to solve but I've so far been unsuccessful. How can I set up my environment to use the above structure when compiling?  Update: I believe I have narrowed this down to something specific to TexMaker. If the desired aux and out directories are passed via the command line to pdflatex, everything builds as it should. Yet, I get numerous message boxes popping up saying that files can't be found and the PDF doesn't display in the internal viewer. I can't see any obvious options within TexMaker to change to address this. So, has anyone been able to make the scenario I'm describing work with TexMaker?
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)
89917
I have a style file which includes another .sty file with \usepackage. Everything works fine. Since this is a  small file written by myself I decided to insert it verbatim at the same place were I use \usepackage in the surrounding file. But this results in errors. This gives raise to the general question in the title. More specific:  What do I have to do to make such an inclusion work?
85216
What's the best practice for naming LaTeX files?  I know R, Matlab, and Java all differ in their use of ., _, -, camel case, capitalization, etc. What do people generally use for naming LaTeX files? Is this easily portable across systems?  I remember having a HUGE problem interpreting a Matlab program of mine. Turned out that I had named the file in a way that Matlab couldn't handle. To avoid such issues in the future, I'd just like to start naming my LaTeX files using best practices.
70938
Let's say I have .tex file which is a set of problems and solutions, of which I want to make two pdf files, one which includes the solutions and one which doesn't. so I need to build the .tex file under two different modes, and specify that parts of the document be ignored under one of the modes.  This is something common in programming context. e.g. in C++ i can code  #ifdef DEBUG   // do this additional stuff ... #endif   How can I do something equivalent in latex?
40117
So I am using  package for code examples. But there is a problem. When I copy the code examples from the final PDF document, they are usually not the same - the indentation is gone, there are random spaces after parenthesis, etc. Does anyone know how to make sure that the code that I copy from the final document is the same as I wrote it in the LaTeX document?  Here is what I mean. Compile this document:  \documentclass[12pt,oneside]{memoir}  \usepackage{listings} \usepackage[T1]{fontenc} \usepackage{xcolor} \usepackage{textcomp}  \definecolor{codebg}{HTML}{EEEEEE} \definecolor{codeframe}{HTML}{CCCCCC}  \lstset{language=Awk} \lstset{backgroundcolor=\color{codebg}} \lstset{frame=single} \lstset{framesep=10pt} \lstset{rulecolor=\color{codeframe}} \lstset{upquote=true} \lstset{basicstyle=\ttfamily} \lstset{showstringspaces=false}  \begin{document}  This code example prints out all users on your system:  \begin{lstlisting}[language=c] #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; #include &lt;string.h&gt;  #define MAX_LINE_LEN 1024  int main() {     char line[MAX_LINE_LEN];     FILE *in = fopen("/etc/passwd", "r");     if (!in) exit(EXIT_FAILURE);      while (fgets(line, MAX_LINE_LEN, in) != NULL) {         char *sep = strchr(line, ':');         if (!sep) exit(EXIT_FAILURE);         *sep = '\0';         printf("%s\n", line);     }     fclose(in);     return EXIT_SUCCESS; } \end{lstlisting}  \end{document}   Now compile it, open it, select and copy the code example and paste it in a text editor. Here is the result I get:  # include &lt;stdio .h&gt; # include &lt;stdlib .h&gt; # include &lt;string .h&gt; # define MAX_LINE_LEN 1024 int main () { char line [ MAX_LINE_LEN ]; FILE *in = fopen ("/ etc / passwd ", "r"); if (! in) exit ( EXIT_FAILURE ); while ( fgets (line , MAX_LINE_LEN , in) != NULL ) { char * sep = strchr (line , ':'); if (! sep ) exit ( EXIT_FAILURE ); * sep = '\0 '; printf ("%s\n", line ); } fclose (in ); return EXIT_SUCCESS ; }   Jeez! What's this... The indentation is gone. There are spaces in included headers &lt;stdio .h&gt;, there are spaces after parenthesis [ MAX_LINE_LEN ].  Anyone knows how to fix this? I'd like the code examples in my book to be copy/paste-able into a text editor so people can try them out easily.
111849
I'm trying to compile a file for which I need titling.sty:  ! LaTeX Error: File `titling.sty` not found.  The two biggest issues are 1) it's on a Windows machine (I'm really only &quot;comfortable&quot; with the Unix command line) and 2) the machine cannot be connected to the internet (so automatic approaches are impossible). Assuming the error means I'm missing a package and following some related advice (e.g., ), I downloaded the file , transferred it to the offline machine, and unzipped it, then tried to run: latex titling.ins  But this gave me an error (given I can't copy-paste, I'm including what I think may be relevant):  ******************************************************** * No Configuration file found, using default settings. * ******************************************************** ! ************************************************** * Could not find your \batchfile=titling.ins. **************************************************. \processbatchFile ...****************************}                                                  \fi \else \ifDefault \Msg ... 1.1092 \process@first@batchfile  I have no idea how to proceed from this. How can I install titling.sty on this machine?
71732
Is there any way to override the fact that certain environments in LaTeX are automatically "displayed"?  One such example is the align* environment.  I want to keep my aligned equations inline.  So basically I want something like  \begin{align*} x+y&amp;=z\\ u+v&amp;=w \end{align*}   embedded into a line of text.
121837
I know there are tools to export excel tables to latex, but what about the other way around?  I get a lot of latex tables from functions in R (e.g.: texreg) that aren't perfectly customizable via the code, and need some editing.  For example, I'll have variables like T:X and X:T as separate rows, based on how whatever model function interpreted an interaction expansion.  I'd like to be able to input a tabular object and get .csv-like table, which I could then edit and re-export (using calc2latex in my case).    Anything like this exist?
78172
I have been using LaTeX for about a year now, and I quite like it.  However, I like to space out my source code. In most languages, this doesn't cause an issue, as extra newlines don't affect meaning.  However, in LaTeX, two newlines in fact changes the document, by creating a new paragraph.  I'm wondering, is there a way to turn this feature off in latex, and require me to specify new paragraphs manually? If not, is there an alternative to LaTeX (preferably similar i.e. still TeX based) which isn't so sensitive?
68629
I am using PHP on my server to create a latex table from a database, which is working fine.  The problem I have now is getting that into my latex document.  I thought that giving it the path would allow it to get the file from the web and input it like normal but that doesn't work and I've been unable to find anything online about doing this sort of thing.  Here is an example of what I'm trying to accomplish:  \documentclass{article} \begin{document} \input{http://example.com/generated-latex.php} \end{document}