parent_url
stringlengths 41
46
| parent_score
stringlengths 1
4
| parent_body
stringlengths 25
35.5k
| parent_user
stringlengths 37
42
| parent_title
stringlengths 12
150
| accepted
bool 2
classes | body
stringlengths 4
36.7k
| score
stringlengths 1
4
| user
stringlengths 37
42
| answer_id
stringlengths 1
6
| __index_level_0__
int64 0
322k
|
|---|---|---|---|---|---|---|---|---|---|---|
https://tex.stackexchange.com/questions/121
|
8
|
I've been toying with the idea of switching over from `Xy-pic` to `TikZ` for all of my diagramming needs, but one feature that's very important to me is the ability to create 2-categorical pasting diagrams (like the ones in Wikipedia's entry on [2-categories](http://en.wikipedia.org/wiki/2-category)), as I can with `Xy-pic`'s "twocell" commands (which, incidentally, I find to be a huge pain to deal with). How do I do these in `TikZ`? I'd be happy with just a reference to the relevant commands or an `arXiv` paper with good examples.
|
https://tex.stackexchange.com/users/101
|
How do I create pasting diagrams in TikZ?
| false
|
Making pasting diagrams in TikZ is pretty easy, as has been said; I think easier than in xypic for complicated ones, since it's easy to place the 2-cell arrows exactly where you want them and in exactly the right orientation. One useful trick for placing them is barycentric coordinates; then once you've got a node/coordinate at the center of the 2-cell arrow, you can use adjustments like `+(0,0.2)` to get to the starting and ending points.
A significant problem, however, is that as far as I know, in versions of TikZ prior to the current CVS version, there is no good way to draw a double-shafted arrow, as is used for 2-cells in pasting diagrams. In the CVS version of TikZ, you can say `\draw[double,-implies]`, but this won't compile for anyone (such as arXiv or a journal editor) who has an older, "released" version of TikZ. For that reason, I'm personally holding off on switching from xypic to TikZ for pasting diagrams until the next version of TikZ is released and becomes at least somewhat more widely available.
|
6
|
https://tex.stackexchange.com/users/535
|
1634
| 1,145
|
https://tex.stackexchange.com/questions/1635
|
4
|
Normally I write my LaTeX with Emacs/AUCTeX viewing in xdvi, which has the very nice "source specials" feature that I can hit a key command in Emacs to jump to the current location in the output dvi file in xdvi, and likewise I can click on a location in xdvi and have Emacs jump to that location in the source file. But sometimes, notably when using TikZ, I need to compile with pdflatex. Is there any source-specials-like feature for PDF files which works with AUCTeX? I'd be willing to switch to any PDF viewer that will run in Linux.
|
https://tex.stackexchange.com/users/535
|
Source specials for PDF?
| false
|
Recent versions of AUCTeX's source specials handles synctex. So make sure you have the latest release 11.86.
You also need a recent version of pdftex that supports synctex. The one in TeX Live 2009 is fine.
```
This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009)
```
For backward search, you need to configure your pdf viewer to support emacs. Usually the pdf viewer would have an entry in the FAQ or Wiki teaching how to set this up and usually pretty simple.
For forward search, I am not sure if 'C-c C-v' does this automatically.
But backward search is usually more important.
|
4
|
https://tex.stackexchange.com/users/337
|
1636
| 1,146
|
https://tex.stackexchange.com/questions/1633
|
12
|
I want to place two (or more) figures with side by side. The figures are independent, so need separate captions, with no overall caption for the two. I know how to do this with minipages within a figure environment. But the captions don't line up without trail and error `\vspace`'s before the individual captions. Is there a way to line up the captions automatically?
|
https://tex.stackexchange.com/users/nan
|
Line up captions on side by side figures
| false
|
Would [subfigure](http://www.ctan.org/tex-archive/obsolete/macros/latex/contrib/subfigure/subfigure.pdf) (omitting the caption argument and only using subcaptions) solve your problem? [(See this example)](http://texblog.wordpress.com/2007/08/28/placing-figurestables-side-by-side-subfigure/)
**EDIT:** Subfigure has apparently been replaced by [subfig](http://tug.ctan.org/tex-archive/macros/latex/contrib/subfig/subfig.pdf).
|
1
|
https://tex.stackexchange.com/users/237
|
1637
| 1,147
|
https://tex.stackexchange.com/questions/1633
|
12
|
I want to place two (or more) figures with side by side. The figures are independent, so need separate captions, with no overall caption for the two. I know how to do this with minipages within a figure environment. But the captions don't line up without trail and error `\vspace`'s before the individual captions. Is there a way to line up the captions automatically?
|
https://tex.stackexchange.com/users/nan
|
Line up captions on side by side figures
| false
|
Use the [floatrow](http://www.ctan.org/tex-archive/help/Catalogue/entries/floatrow.html) package, particularly its `floatrow` environment and `\ffigbox` command.
```
\documentclass{article}
\usepackage[format=hang]{caption}
\usepackage{floatrow}
\begin{document}
\begin{figure}
\begin{floatrow}
\ffigbox{%
\rule{3cm}{3cm}%
}{%
\caption{A figure}%
}
\ffigbox{%
\rule{2cm}{2cm}%
}{%
\caption{Another figure with a long caption}%
}
\end{floatrow}
\end{figure}
\end{document}
```
|
1
|
https://tex.stackexchange.com/users/510
|
1639
| 1,148
|
https://tex.stackexchange.com/questions/1612
|
9
|
Last year I was involved in writing a large group proposal with LaTeX. This involved various sections written and rewritten by disparate subgroups, with all the merging and editing headaches you'd expect and more. In particular, handling the bibliography was a nightmare. Everyone handled references by hand without using BibTeX or anything similar (some people didn't even use \cite), and it took hours of work at the end to get a properly alphabetized bibliography without duplications; we ran out of time and energy for any attempt at consistency of formating, or even checking which preprints were now publications in print.
It is likely that I will be involved in a similar proposal at some point in the future, and I'm looking for suggestions to make (at least) the bibliography work more smoothly.
Keep in mind that what I'm dealing with is at least as much a sociological problem as a technological one. I think almost none of the people I'm working with have even heard of BibTeX, and some may be resistant to making the time investment to learn any unfamiliar software at all. So very low overhead is a must.
I had been planning to insist on using BibTeX, but I just recently learned about AMSRefs, which (used in the simplest way) seems to require less overhead for novices. (Since we are mathematicians, it's easy to get both BibTeX and AMSRefs data for our citations from MathSciNet or MRefs.) And of course there may be other alternatives, or things that work with BibTeX, that I don't know about.
I'm well aware that BibTeX or something similar would at best only help with a very few aspects of the problems I described with my past experience, and that the Right Solution would be to use some kind of VCS for the entire thing. Unfortunately, I think it's probably out of the question to get everyone else to learn to use such a system (though I'm open to being convinced otherwise).
|
https://tex.stackexchange.com/users/206
|
Handling bibliographies with many coauthors
| false
|
See the third answer to the question
[how to avoid bibtex error message "repeated entry" for an entry appearing in several bibtex files?](https://tex.stackexchange.com/questions/1380/how-to-avoid-bibtex-error-message-repeated-entry-for-an-entry-appearing-in-seve)
it explains how nbibtex can help you without deploying any new app or database server ;-)
|
1
|
https://tex.stackexchange.com/users/546
|
1642
| 1,149
|
https://tex.stackexchange.com/questions/1635
|
4
|
Normally I write my LaTeX with Emacs/AUCTeX viewing in xdvi, which has the very nice "source specials" feature that I can hit a key command in Emacs to jump to the current location in the output dvi file in xdvi, and likewise I can click on a location in xdvi and have Emacs jump to that location in the source file. But sometimes, notably when using TikZ, I need to compile with pdflatex. Is there any source-specials-like feature for PDF files which works with AUCTeX? I'd be willing to switch to any PDF viewer that will run in Linux.
|
https://tex.stackexchange.com/users/535
|
Source specials for PDF?
| false
|
A solution for the reverse search (from PDF to the source code): I currently use [pdfsync](http://www.ctan.org/tex-archive//macros/latex/contrib/pdfsync/); here's an excerpt from the readme file:
>
> pdfsync.sty allows one to synchronize between LaTeX source and pdf output.
> When used with a text editor and a PDF viewer that both support pdfsync,
> you can navigate from the source to the output and vice versa.
> This is some kind of srcltx ported from dvi to pdf.
>
>
>
All you need to do is to include it in your preamble with
```
\usepackage{pdfsync}
```
If you use the hyperref package or another similar package that manipulates the references, take care of load pdfsync as the last one.
Caveat: it is a little buggy (but, to me, it works quite well)
>
> You should not use pdfsync on final documents because
> it can change the layout rather significantly
>
>
> The accuracy of pdf synchronization depends on the application used for that purpose.
>
>
>
In case of conflicts or malfunctioning, read the [documentatation](http://ftp.uniroma2.it/TeX/macros/latex/contrib/pdfsync/README).
|
2
|
https://tex.stackexchange.com/users/177
|
1643
| 1,150
|
https://tex.stackexchange.com/questions/1641
|
10
|
I am writing a document on a foreigh language, say French, and want to put some paragraphs in French with their translation in English. But I would like to print one line in French, the corresponding line in English, one line in French, the corresponding line in English, and so on.
For example, if I have these two paragraphs:
>
> On ne connaît que les choses que l'on
> apprivoise, dit le renard. Les hommes
> n'ont plus le temps de rien connaître.
> Ils achètent des choses toutes faites
> chez les marchands. Mais comme il
> n'existe point de marchands d'amis,
> les hommes n'ont plus d'amis. Si tu
> veux un ami, apprivoise-moi!
>
>
> We only know the things that we tame,
> said the fox. People no longer have
> the time to know anything. They buy
> things already made for peddlers. But
> since there are no peddlers of
> friends, they no longer have friends.
> If you want a friend, tame me!
>
>
>
I would like them to be automatically printed like this, providing interlinear translation:
```
On ne connaît que les choses que l'on apprivoise, dit le renard. Les hommes n'ont plus
We only know the things that we tame, said the fox. People no longer have
le temps de rien connaître. Ils achètent des choses toutes faites chez les marchands.
the time to know anything. They buy things already made for peddlers.
Mais comme il n'existe point de marchands d'amis, les hommes n'ont plus d'amis.
But since there are no peddlers of friends, they no longer have friends.
Si tu veux un ami, apprivoise-moi!
If you want a friend, tame me!
```
So, I am looking for a way to mix both paragraphs, eventually with a way to provide sync information to tell latex which parts have to be kept together. Ideally I would like this to be processed automatically in such a way that a modification of the layout of the page or the size of the font should not oblige me to reformat the text by myself.
|
https://tex.stackexchange.com/users/546
|
Printing interlinear translation: how to mix automatically two paragraphs, printing lines alternately
| false
|
Intriguing idea. Here's a proof of concept:
```
\documentclass{article}
\usepackage{setspace}
\newlength{\syncheight}
\newcommand{\sync}[2]{%
\setlength{\syncheight}{\baselineskip}
\begin{spacing}{3}
\setlength{\parindent}{0pt}
\begin{minipage}[t][0pt][t]{\textwidth}
#1
\end{minipage}
\vspace{-2\syncheight}
#2
\end{spacing}
}
\begin{document}
The following paragraph is in both English and French.
That is to say, there are two paragraphs, one is in French and one in English,
and each is a translation of the other.
\sync{%
On ne connaît que les choses que l'on apprivoise, dit le renard. Les hommes
n'ont plus le temps de rien connaître. Ils achètent des choses toutes faites
chez les marchands. Mais comme il n'existe point de marchands d'amis, les
hommes n'ont plus d'amis. Si tu veux un ami, apprivoise-moi!
}{%
We only know the things that we tame, said the fox. People no longer have
the time to know anything. They buy things already made for peddlers. But
since there are no peddlers of friends, they no longer have friends. If you
want a friend, tame me!
}
The preceeding paragraph is in both English and French.
That is to say, there are two paragraphs, one is in French and one in English,
and each is a translation of the other.
\end{document}
```
Problems with this implementation:
1. Excessive whitespace before and after the translated paragraph (maybe that's actually a good thing!). Probably not too hard to overcome.
2. If the French paragraph is longer than the English one then the extra line(s) will cause problems with spacing the following text. Not sure on this one; easy enough if it's possible to measure the height of a paragraph and to compare two lengths.
3. It won't flow correctly across a page boundary: the French one will simply continue down the old page whilst the English one will correctly go over. This could be tricky.
(I used a similar trick long ago doing booklets that needed marginal comments a bit beyond what `\marginpar` seemed capable of. I took my inspiration from a remark in the *Not So Short Guide* when talking about the width of parboxes and the like: "In a demented case you can even set the width to 0pt so that the text inside the box will be typeset without influencing the surrounding boxes." to which I added: "Of course, if you're really certifiable you can do the same with the height.")
|
3
|
https://tex.stackexchange.com/users/86
|
1644
| 1,151
|
https://tex.stackexchange.com/questions/1633
|
12
|
I want to place two (or more) figures with side by side. The figures are independent, so need separate captions, with no overall caption for the two. I know how to do this with minipages within a figure environment. But the captions don't line up without trail and error `\vspace`'s before the individual captions. Is there a way to line up the captions automatically?
|
https://tex.stackexchange.com/users/nan
|
Line up captions on side by side figures
| false
|
You could use the optional argument `b` to the `minipage` environments to align the images at their bottom, this way the caption would be side by side. At least you did'nt say if you want the images aligned in another way. Though, a common baseline at their bottom would be good, especially as their captions are aligned.
Here's an example using the `caption` package:
```
\documentclass{article}
\usepackage[labelfont=bf]{caption}
\usepackage[demo]{graphicx}
\begin{document}
\begin{figure}[ht]
\begin{minipage}[b]{.4\linewidth}
\centering%
\includegraphics[width=140pt]{test}
\captionof{figure}{First image}
\end{minipage}%
\hfill%
\begin{minipage}[b]{.5\linewidth}
\centering%
\includegraphics[width=180pt,height=50pt]{test}
\captionof{figure}{Second image with caption}
\end{minipage}
\end{figure}
\begin{figure}[ht]
\centering%
\includegraphics{test}
\caption{Another figure}
\end{figure}
\end{document}
```
Output:
Using the tiny `capt-of` package would be sufficient. The `\captionof` command is important. As you can see, the numbering of the subfigures matches the numbering of normal figures.
|
5
|
https://tex.stackexchange.com/users/213
|
1645
| 1,152
|
https://tex.stackexchange.com/questions/1641
|
10
|
I am writing a document on a foreigh language, say French, and want to put some paragraphs in French with their translation in English. But I would like to print one line in French, the corresponding line in English, one line in French, the corresponding line in English, and so on.
For example, if I have these two paragraphs:
>
> On ne connaît que les choses que l'on
> apprivoise, dit le renard. Les hommes
> n'ont plus le temps de rien connaître.
> Ils achètent des choses toutes faites
> chez les marchands. Mais comme il
> n'existe point de marchands d'amis,
> les hommes n'ont plus d'amis. Si tu
> veux un ami, apprivoise-moi!
>
>
> We only know the things that we tame,
> said the fox. People no longer have
> the time to know anything. They buy
> things already made for peddlers. But
> since there are no peddlers of
> friends, they no longer have friends.
> If you want a friend, tame me!
>
>
>
I would like them to be automatically printed like this, providing interlinear translation:
```
On ne connaît que les choses que l'on apprivoise, dit le renard. Les hommes n'ont plus
We only know the things that we tame, said the fox. People no longer have
le temps de rien connaître. Ils achètent des choses toutes faites chez les marchands.
the time to know anything. They buy things already made for peddlers.
Mais comme il n'existe point de marchands d'amis, les hommes n'ont plus d'amis.
But since there are no peddlers of friends, they no longer have friends.
Si tu veux un ami, apprivoise-moi!
If you want a friend, tame me!
```
So, I am looking for a way to mix both paragraphs, eventually with a way to provide sync information to tell latex which parts have to be kept together. Ideally I would like this to be processed automatically in such a way that a modification of the layout of the page or the size of the font should not oblige me to reformat the text by myself.
|
https://tex.stackexchange.com/users/546
|
Printing interlinear translation: how to mix automatically two paragraphs, printing lines alternately
| true
|
Partitions similar to these, but with even higher degrees of syncing, are common in linguistics. At <http://www.essex.ac.uk/linguistics/external/clmt/latex4ling/> most LaTeX resources for linguistics have been gathered. Specifically your synched texts are similar to what's called *glosses* in linguistics; and these can be handled by `cgloss4e.sty`. See <http://www.essex.ac.uk/linguistics/external/clmt/latex4ling/examples/> for more details.
|
14
|
https://tex.stackexchange.com/users/257
|
1646
| 1,153
|
https://tex.stackexchange.com/questions/1647
|
28
|
I've heard making and managing a resume in LaTeX is highly useful. I am sure consistent and easy to maintain output format is one reason.
I haven't used LaTeX before (a suggestion to where from to learn will also be helpful) so my question may be fairly trivial.
**The questions:**
1. Is it possible to have one resume
and have multiple outputs (I don't
know what it is called, but I mean when
you make a PDF, etc. of it) based on
you selecting show this section and
don't show this section? How?
*For example, at some places I would
like to give them my resume with
mentions of X and Y and not A while
I would like to give my resume
elsewhere with A and not X or Y.*
2. Also, is it possible to have a
couple of summary sections written
and chose one of them to be inserted
when the documented is exported (as
in made into a PDF, etc.)? How?
|
https://tex.stackexchange.com/users/724
|
Guide to managing multiple resume with one LaTeX?
| true
|
For this sort of “conditional” compilation I would suggest the use of, e.g., verbatim to create `comment` environments to skip over parts of a document with respect to your selected options. A quick example
```
\documentclass{article}
\usepackage{verbatim}
\newenvironment{optionA}{}{} % use this to show
% \newenvironment{optionA}{\comment}{\endcomment} % use this to hide
\begin{document}
\begin{optionA}
Some text to show only if optionA is enabled.
\end{optionA}
\end{document}
```
Toggling between the two definitions of the `optionA` environment (of course you should give it a more descriptive name) you can select whether the appropriate content is shown (or not) in the final pdf output.
|
16
|
https://tex.stackexchange.com/users/169
|
1648
| 1,154
|
https://tex.stackexchange.com/questions/1612
|
9
|
Last year I was involved in writing a large group proposal with LaTeX. This involved various sections written and rewritten by disparate subgroups, with all the merging and editing headaches you'd expect and more. In particular, handling the bibliography was a nightmare. Everyone handled references by hand without using BibTeX or anything similar (some people didn't even use \cite), and it took hours of work at the end to get a properly alphabetized bibliography without duplications; we ran out of time and energy for any attempt at consistency of formating, or even checking which preprints were now publications in print.
It is likely that I will be involved in a similar proposal at some point in the future, and I'm looking for suggestions to make (at least) the bibliography work more smoothly.
Keep in mind that what I'm dealing with is at least as much a sociological problem as a technological one. I think almost none of the people I'm working with have even heard of BibTeX, and some may be resistant to making the time investment to learn any unfamiliar software at all. So very low overhead is a must.
I had been planning to insist on using BibTeX, but I just recently learned about AMSRefs, which (used in the simplest way) seems to require less overhead for novices. (Since we are mathematicians, it's easy to get both BibTeX and AMSRefs data for our citations from MathSciNet or MRefs.) And of course there may be other alternatives, or things that work with BibTeX, that I don't know about.
I'm well aware that BibTeX or something similar would at best only help with a very few aspects of the problems I described with my past experience, and that the Right Solution would be to use some kind of VCS for the entire thing. Unfortunately, I think it's probably out of the question to get everyone else to learn to use such a system (though I'm open to being convinced otherwise).
|
https://tex.stackexchange.com/users/206
|
Handling bibliographies with many coauthors
| true
|
I'd recommend using a central reference database that everyone can add references to and which generates unique citation keys. In particular, I'd recommend [refbase](http://www.refbase.net). I have a slightly modified version of it (see below) in which I've changed the field names to something a little more useful for mathematicians (it was designed by geologists) and in which I've added automatic importers for the arXiv and MathSciNet: so simply specifying an arXiv id or an MR number is enough for it to go and fetch the data needed.
This approach would also mean that you could put off the BibTeX/AMSRefs choice for a while (assuming that both use `\cite{ref}` in the text).
My modified version of refbase is available [on github](https://github.com/loopspace/RefBase). (NB the comments below refer to an earlier repository, not the github one.)
|
4
|
https://tex.stackexchange.com/users/86
|
1649
| 1,155
|
https://tex.stackexchange.com/questions/1647
|
28
|
I've heard making and managing a resume in LaTeX is highly useful. I am sure consistent and easy to maintain output format is one reason.
I haven't used LaTeX before (a suggestion to where from to learn will also be helpful) so my question may be fairly trivial.
**The questions:**
1. Is it possible to have one resume
and have multiple outputs (I don't
know what it is called, but I mean when
you make a PDF, etc. of it) based on
you selecting show this section and
don't show this section? How?
*For example, at some places I would
like to give them my resume with
mentions of X and Y and not A while
I would like to give my resume
elsewhere with A and not X or Y.*
2. Also, is it possible to have a
couple of summary sections written
and chose one of them to be inserted
when the documented is exported (as
in made into a PDF, etc.)? How?
|
https://tex.stackexchange.com/users/724
|
Guide to managing multiple resume with one LaTeX?
| false
|
I don't use LyX, so I don't know what constraints you're working under, but I'd structure the problem like this:
1. Use the `comment` package
2. Create a stub (cv1, cv2, etc) for each instance of your CV.
3. Create a common file with everything in it, with the variable stuff in comment-derived environments
4. Call the common file from each stub
Here's a simple example for you to try:
cv1.tex:
```
\documentclass[11pt,a4paper]{article}
\usepackage{comment}
\includecomment{cv1}
\excludecomment{cv2}
\excludecomment{cv3}
\input{cvcommon}
```
cv2.tex:
```
\documentclass[11pt,a4paper]{article}
\usepackage{comment}
\excludecomment{cv1}
\includecomment{cv2}
\excludecomment{cv3}
\input{cvcommon}
```
cvcommon.tex:
```
% Rest of your preamble here
\begin{document}
This text appears everywhere.
\begin{cv1}%
This is my Number 1 CV!
\end{cv1}
\begin{cv2}%
This is my Number 2 CV!
\end{cv2}
I
\begin{cv1}%
did
\end{cv1}
\begin{cv2}%
didn't
\end{cv2}
go to university.
\end{document}
```
|
3
|
https://tex.stackexchange.com/users/344
|
1651
| 1,156
|
https://tex.stackexchange.com/questions/1647
|
28
|
I've heard making and managing a resume in LaTeX is highly useful. I am sure consistent and easy to maintain output format is one reason.
I haven't used LaTeX before (a suggestion to where from to learn will also be helpful) so my question may be fairly trivial.
**The questions:**
1. Is it possible to have one resume
and have multiple outputs (I don't
know what it is called, but I mean when
you make a PDF, etc. of it) based on
you selecting show this section and
don't show this section? How?
*For example, at some places I would
like to give them my resume with
mentions of X and Y and not A while
I would like to give my resume
elsewhere with A and not X or Y.*
2. Also, is it possible to have a
couple of summary sections written
and chose one of them to be inserted
when the documented is exported (as
in made into a PDF, etc.)? How?
|
https://tex.stackexchange.com/users/724
|
Guide to managing multiple resume with one LaTeX?
| false
|
Even simpler than using comment (and more versatile), you can use multiple files for different sections. For instance you can have a main file cv.tex, and the a file for each section, for instance hobbies.tex, programming.tex, study.tex, languages.tex and so on.
Then you include exactly the sections you want, using input
```
Here goes the preamble
...
\begin{document}
\input{study}
\input{programming}
%\input{hobbies}
\input{languages}
\end{document}
```
Whenever you put a % sign at the beginning of a line, that line is ignored. So in the example I made you would have sections study, programming and languages, but not hobbies.
As for writing the CV itself, I advise [this very nice template](http://nitens.org/taraborelli/cvtex).
|
15
|
https://tex.stackexchange.com/users/260
|
1652
| 1,157
|
https://tex.stackexchange.com/questions/1650
|
18
|
I'm updating my CV, which is written by modifying [this template](http://nitens.org/taraborelli/cvtex). I have always been very happy with the result, but now I'm getting a *Too many unprocessed floats* error.
For those who do not want to have a look at the template, it basically works like this. In the preamble I have a command
```
\newcommand{years}[1]{\marginpar{\scriptsize #1}}
...
\begin{document}
\reversemarginpar
```
which one then uses like
```
\section*{Seminars}
\years[2005]Blah blah...
\\
\years[2007]Blah blah blah..
```
The problem is, when I insert the 10th item, I get the *Too many unprocessed floats* error.
Inserting a clearpage is not an option, since it would just leave half page empty. Also, doing a major change to the CV, like switching to another template or using a CV class is not an option either. I have tried many different ways to write my CV; it always takes time to switch, and I need to compile it soon. Moreover I'm very happy with this template.
**Is there a way to increase the number of floats that LaTeX can handle?**
|
https://tex.stackexchange.com/users/260
|
Too many unprocessed floats with marginpar
| true
|
The package [`morefloats`](http://ctan.org/pkg/morefloats) doubles the number of floats that can be handled.
|
16
|
https://tex.stackexchange.com/users/213
|
1653
| 1,158
|
https://tex.stackexchange.com/questions/3
|
241
|
I have heard rumors that you can compile documents online, and more specifically that Google has a free online compiler, but I have never been able to find any. Is there a way to compile documents online, so that I can write and compile documents even if I don't have a TeX distribution installed on my computer?
|
https://tex.stackexchange.com/users/14
|
Compiling documents online
| true
|
**Online compiler with storage and editor features:**
* [LaTeX Base](https://latexbase.com/)
* [Overleaf](https://www.overleaf.com/) *(was WriteLaTeX before)*
* [ShareLaTeX](https://www.sharelatex.com/) *(is [joining Overleaf](https://www.sharelatex.com/blog/2017/07/20/sharelatex-joins-overleaf.html) since 2017)*
* [Docx2Latex Add-On](https://chrome.google.com/webstore/detail/docx2latex/egbfhgljgndebjfacgpkjchhpfbcpegl?utm_source=permalink) - (Write LaTeX and Rich Text simultaniously in Google Docs)
* [verbosus](https://www.verbosus.com/)
* [Authorea](https://authorea.com/)
* [Papeeria](https://papeeria.com/)
* [\BlueLaTeX](https://github.com/gnieh/bluelatex/) - formally [publications.li](https://www.publications.li/blue) (meant for Collaborative Writing)
* [CoCalc](https://cocalc.com/doc/latex-editor.html) (contains a LaTeX editor amongst many other tools; formerly "SageMathCloud")
*Meanwhile inactive:*
* [ScribTeX](http://www.scribtex.com/) (now uses [ShareLaTeX](http://www.sharelatex.com/) for its editor)
* [SpanDeX](http://www.spandex.io/) (included Dropbox-sync and version control,
[but has been discontinued](http://www.latex-community.org/home/news/47-news-latex-editors/481-online-latex-compiler-spandex-is-being-discontinued))
* MonkeyTeX: *monkeytex.bradcater.webfactional.com*, seems to not exist any‑more
* [LaTeX Lab](http://latexlab.org/) (does not exist anymore)
**Online compiler with basic functionality:**
* [LaTeX servlet on sciencesoft.at](http://sciencesoft.at/index.jsp?link=latex&js=0&lang=en)
* [LaTeX online-compiler in Halle, Germany](https://latex.informatik.uni-halle.de/latex-online/latex.php)
* [TeX on Web](https://tex.mendelu.cz/en/)
* [LaTeX 4 Technics](https://www.latex4technics.com/)
* [Tex Viewer](https://texviewer.herokuapp.com)
**Tiny equation compiler:**
* Google Docs with the [Auto-LaTeX Equations Add-on](https://workspace.google.com/marketplace/app/autolatex_equations/850293439076?utm_source=tex_se_1654) - Write any equation in Google Docs
* [LaTeX equation editor](https://www.codecogs.com/latex/eqneditor.php?lang=en-en) with realtime rendering
* [mathurl.com](http://mathurl.com/)
* [Hamline University Physics Department Latex Equation Editor](http://www.hamline.edu/%7Earundquist/equationeditor/)
* [MathTran](http://mathtran.open.ac.uk/) for TeX-notation mathematics
* [Roger's Online Equation Editor](http://rogercortesi.com/eqn/)
* [TeXify](http://www.texify.com/) based on mimeTeX
* [LaTeX2PNG](http://hausheer.osola.com/latex2png)
* [FormulaSheet.com](http://formulasheet.com/editor.php)
* [Online LaTeX Equation Editor](https://www.latex4technics.com/)
**Latex Table generator:**
* [Table Generator](https://www.tablesgenerator.com)
**Document frame generator:**
* [LaTeX Generator](http://latex.sehnot.de/) (in German)
**The other way round:**
* [DeTeXify](http://detexify.kirelabs.org/classify.html) outputs the corresponding LaTeX command code after you've drawn a symbol
* [classify](http://www.martin-thoma.de/write-math/classify/) has the same purpose like DeTeXify
**Word to LaTeX converters**
* [Docx2Latex](https://www.docx2latex.com) Converts Word/Google Docs file to LaTeX source code and PDF.
|
313
|
https://tex.stackexchange.com/users/213
|
1654
| 1,159
|
https://tex.stackexchange.com/questions/162
|
55
|
Are there newsgroups, forums, FAQs, and other sites that provide quality information on TeX, LaTeX and friends? Are all of these in English, or is there one in "my language of choice"?
|
https://tex.stackexchange.com/users/87
|
What are other good resources on-line for information about TeX, LaTeX and friends?
| false
|
For LaTeX the way it's used by linguists, there is
<http://www.essex.ac.uk/linguistics/external/clmt/latex4ling/>
|
3
|
https://tex.stackexchange.com/users/257
|
1657
| 1,160
|
https://tex.stackexchange.com/questions/1656
|
57
|
I would like the footnote counter to automatically restart from '1' for each page of my document.
|
https://tex.stackexchange.com/users/546
|
footnote counter, would like to restart from '1' each page
| true
|
```
\usepackage[perpage]{footmisc}
```
<https://ctan.org/pkg/footmisc>
|
73
|
https://tex.stackexchange.com/users/337
|
1659
| 1,161
|
https://tex.stackexchange.com/questions/1656
|
57
|
I would like the footnote counter to automatically restart from '1' for each page of my document.
|
https://tex.stackexchange.com/users/546
|
footnote counter, would like to restart from '1' each page
| false
|
One just needs to make the counter `footnote` "subcounter" of the counter `page` (as in `\newcounter{subcounter}[counter]`). The only problem is lack of `\renewcounter` command, so one has to use
```
\makeatletter
\@newctr{footnote}[page]
\makeatother
```
*Update:* as [lockstep](https://tex.stackexchange.com/users/510/lockstep) points out, the counter `page` is unreliable and one has to use e.g.
```
\usepackage{perpage}
\MakePerPage{footnote}
```
|
5
|
https://tex.stackexchange.com/users/85
|
1660
| 1,162
|
https://tex.stackexchange.com/questions/1656
|
57
|
I would like the footnote counter to automatically restart from '1' for each page of my document.
|
https://tex.stackexchange.com/users/546
|
footnote counter, would like to restart from '1' each page
| false
|
Using the counter `page` will produce wrong results.
```
\documentclass{article}
\usepackage{blindtext}
\makeatletter
\@newctr{footnote}[page]
\makeatother
\begin{document}
\blindtext\footnote{bla}
\blindtext\footnote{bla}
\blindtext\footnote{bla}
\blindtext\footnote{bla}
\blindtext\footnote{bla}
\end{document}
```
Instead, you should use either the package `footmisc` with the `perpage` option or the following code:
```
\usepackage{perpage}
\MakePerPage{footnote}
```
|
16
|
https://tex.stackexchange.com/users/510
|
1661
| 1,163
|
https://tex.stackexchange.com/questions/1655
|
13
|
I'd like to use `nameref`s within a sentence, and have the case of the resulting text match the position within the sentence. The section title is naturally title case, but is there some command to either a) force lowercase of `nameref`s (`\lowercase{}` doesn't work), or b) insert init-case, i.e., uppercase the initial word if it's at the beginning of a sentence, lowercase elsewhere?
Example:
```
\section{Object}
\label{sec:obj}
[definition of an object]
...
\nameref{sec:obj} instance variables are often called simply "\nameref{sec:obj}".
```
should produce:
```
Object
[definition of an object]
...
Object instance variables are often called simply "object".
```
Note case difference at the start and in the middle of the sentence.
|
https://tex.stackexchange.com/users/602
|
Correct case in namerefs
| false
|
I think that it would be hard for TeX to *automatically* know whether the `\nameref` should be title-case, lowercase, or init-case. But if *you* are prepared to tell TeX, then this can be done. I don't claim that this is the most elegant method, but it's the one that I use in a similar situation.
```
\documentclass{article}
\usepackage{hyperref}
\newcommand{\lnameref}[1]{%
\bgroup
\let\nmu\MakeLowercase
\nameref{#1}\egroup}
\newcommand{\fnameref}[1]{%
\bgroup
\def\nmu{\let\nmu\MakeLowercase}%
\nameref{#1}\egroup}
\newcommand{\nmu}{}
\begin{document}
\section{\nmu This \nmu Is a \nmu Section}
\label{sec}
\lnameref{sec} is a section.
\nameref{sec} is a section.
\fnameref{sec} is a section.
\nameref{sec} is a section.
\end{document}
```
Produces:
>
> 1 This Is a Section
>
>
> this is a section is a section.
>
> This Is a Section is a section.
>
> This is a section is a section.
>
> This Is a Section is a section.
>
>
>
(It makes a modicum more sense when the "this is a section" looks like a link since then it looks like '"this is a section" is a section'. Only when I transcribed it did I realise how daft it looked.)
|
12
|
https://tex.stackexchange.com/users/86
|
1662
| 1,164
|
https://tex.stackexchange.com/questions/93
|
18
|
What do I need in order to use TeX on Windows as an eventual replacement for Word?
What software is available for Windows for WYSIWYG editing of TeX files?
|
https://tex.stackexchange.com/users/91
|
What do I need in order to use TeX on Windows as an eventual replacement for Word?
| false
|
Since you're looking for something WYSIWYG-like, I know two approaches:
* [LyX](http://www.lyx.org/) is a document processor but [WYSIWYM](http://en.wikipedia.org/wiki/WYSIWYM) (alread mentioned by other users)
* [GNU TeXmacs](http://www.texmacs.org/) (not yet mentioned) is a free WYSIWYW document processor with TeX export and plugins for Maple, Mathematica, Maxima, Matlab, Axiom, GraphVIZ, GNUplot and more. The latest version has been released in Oct 2008 though (1.0.7).
|
1
|
https://tex.stackexchange.com/users/213
|
1663
| 1,165
|
https://tex.stackexchange.com/questions/1647
|
28
|
I've heard making and managing a resume in LaTeX is highly useful. I am sure consistent and easy to maintain output format is one reason.
I haven't used LaTeX before (a suggestion to where from to learn will also be helpful) so my question may be fairly trivial.
**The questions:**
1. Is it possible to have one resume
and have multiple outputs (I don't
know what it is called, but I mean when
you make a PDF, etc. of it) based on
you selecting show this section and
don't show this section? How?
*For example, at some places I would
like to give them my resume with
mentions of X and Y and not A while
I would like to give my resume
elsewhere with A and not X or Y.*
2. Also, is it possible to have a
couple of summary sections written
and chose one of them to be inserted
when the documented is exported (as
in made into a PDF, etc.)? How?
|
https://tex.stackexchange.com/users/724
|
Guide to managing multiple resume with one LaTeX?
| false
|
Like [Andrea](https://tex.stackexchange.com/questions/1647/guide-to-managing-multiple-resume-with-one-latex/1652#1652), I maintain separate bits of my CV/resume in individual files, but for each style (full CV (for academia), brief CV (likewise), industry resume, separate list of publication, etc...) I have a separate master file to pull in the bits I want. On top of that, I use [make](http://www.gnu.org/software/make/) to handle the build management.{\*}
{\*} Yes, I have the usual trouble with knowing how many passes are needed, and no I don't have a magic solution.
|
8
|
https://tex.stackexchange.com/users/327
|
1664
| 1,166
|
https://tex.stackexchange.com/questions/1666
|
17
|
I have used Computer Modern, and I love it.
Is there any other complete METAFONT font that can be used with LaTeX?
|
https://tex.stackexchange.com/users/777
|
What fonts are available for LaTeX?
| true
|
The [LaTeX Font Catalogue](http://www.tug.dk/FontCatalogue/) provides an overview with examples and how to use them of nearly all freely available fonts with good LaTeX support.
|
18
|
https://tex.stackexchange.com/users/213
|
1668
| 1,168
|
https://tex.stackexchange.com/questions/1669
|
241
|
I'd like to be able to resume an enumerated list, continuing the old numbering, after some intervening text which should not be formatted like a list item. Is there a nice way to do this?
In particular, I *don't* want to start a second list with a hard-coded initial counter value, because that will break if I change the number of items in the first list.
|
https://tex.stackexchange.com/users/206
|
Resuming a list
| true
|
This can easily be done using the `enumitem` package, for example:
```
\documentclass[12pt]{article}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}
\item One
\item Two
\end{enumerate}
Some text
\begin{enumerate}[resume]
\item Three
\end{enumerate}
\end{document}
```
Output:
If you use `\usepackage[shortlabels]{enumitem}` and have configured labels (e.g., using `\begin{enumerate}[(1)]`), you can carry over this formatting by using `[resume*]`.
Alternatively, the package `mdwlist` provides the commands `\suspend` and `\resume` for temporarily ending a list and restarting it.
|
258
|
https://tex.stackexchange.com/users/213
|
1670
| 1,169
|
https://tex.stackexchange.com/questions/1666
|
17
|
I have used Computer Modern, and I love it.
Is there any other complete METAFONT font that can be used with LaTeX?
|
https://tex.stackexchange.com/users/777
|
What fonts are available for LaTeX?
| false
|
An early project to make a complete font family was [Pandora](http://tug.ctan.org/tex-archive/fonts/pandora/), but it has never really caught on.
|
2
|
https://tex.stackexchange.com/users/170
|
1672
| 1,170
|
https://tex.stackexchange.com/questions/162
|
55
|
Are there newsgroups, forums, FAQs, and other sites that provide quality information on TeX, LaTeX and friends? Are all of these in English, or is there one in "my language of choice"?
|
https://tex.stackexchange.com/users/87
|
What are other good resources on-line for information about TeX, LaTeX and friends?
| false
|
One of my favourite books on LaTeX is 'The LaTeX companion'. It has the whole 3rd chapter 113 pages freely online (See: [full text of chapter 3](http://www.latex-project.org/guides/tlc2-ch3.pdf)). The typography is also excellent.
|
4
|
https://tex.stackexchange.com/users/337
|
1673
| 1,171
|
https://tex.stackexchange.com/questions/1671
|
8
|
I am currently including:
```
\usepackage[ruled,vlined]{algorithm2e}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{bm}
\usepackage{cancel}
\usepackage{fixltx2e}
\usepackage{float}
\usepackage[stretch=10]{microtype}
\usepackage{multirow}
\usepackage{paralist}
\usepackage{verbatim}
```
Which of these can I remove?
|
https://tex.stackexchange.com/users/512
|
Which packages are automatically included by memoir?
| true
|
It is written to the log file or check the manual Section 18.24:
>
> memoir does include code from several packages and uses a similar internal command to ensure that the packages are not loaded following some later \usepackage command. The names of the emulated packages are written to the log file. At the time of writing the emulated packages are: abstract, appendix, array, booktabs, ccaption, chngcntr, crop, dcol- umn, delarray, enumerate, epigraph, ifmtarg, ifpdf, index, makeidx, moreverb, needspace, newfile, nextpage, pagenote, patchcmd, parskip, setspace, shortvrb, showidx, tabularx, ti- tleref, tocbibind, tocloft, verbatim, and verse. As well as the emulated packages memoir provides functions equivalent to those in the following packages, although the class does not prevent you from using them: fancyhdr, framed, geometry, sidecap, subfigure, and ti- tlesec.
>
>
>
|
10
|
https://tex.stackexchange.com/users/337
|
1674
| 1,172
|
https://tex.stackexchange.com/questions/1671
|
8
|
I am currently including:
```
\usepackage[ruled,vlined]{algorithm2e}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{bm}
\usepackage{cancel}
\usepackage{fixltx2e}
\usepackage{float}
\usepackage[stretch=10]{microtype}
\usepackage{multirow}
\usepackage{paralist}
\usepackage{verbatim}
```
Which of these can I remove?
|
https://tex.stackexchange.com/users/512
|
Which packages are automatically included by memoir?
| false
|
Aside from reading the documentation (which you should always do, although in the case of memoir it can be intimidating), you always have the option to check the log file: it reports all the names of the files it includes in brackets, with their nesting levels; hence you would have something like:
```
(.../memoir.sty (.../somepackage.sty) [etc.])
```
This is only a hypothetical example, as according to the documentation quoted by Leo, many packages are actually not included at all, but have their code embedded into memoir.
|
1
|
https://tex.stackexchange.com/users/170
|
1675
| 1,173
|
https://tex.stackexchange.com/questions/1678
|
7
|
When I put an equation in a tabular, it gets vertically compressed. How do I prevent that?
|
https://tex.stackexchange.com/users/512
|
Embedding large equation in tabular
| true
|
Put `\displaystyle` inside your `\( \)` or `$ $`.
Added: The issue here actually has nothing to do with tables (unless I'm missing something). It's just about inline as opposed to displayed math.
|
12
|
https://tex.stackexchange.com/users/206
|
1679
| 1,175
|
https://tex.stackexchange.com/questions/1680
|
5
|
How do I have footnotes in a table while using memoir?
I tried ctable, but I get the following errors:
```
/usr/local/texlive/2008/texmf-dist/tex/latex/hyperref/hyperref.sty:4022: No room for a new \dimen .
/usr/local/texlive/2008/texmf-dist/tex/latex/hyperref/hyperref.sty:4022: leading text: \newdimen\Field@Width
/usr/local/texlive/2008/texmf-dist/tex/latex/hyperref/hyperref.sty:4023: No room for a new \dimen .
/usr/local/texlive/2008/texmf-dist/tex/latex/hyperref/hyperref.sty:4023: leading text: \newdimen\Fld@charsize
/usr/local/texlive/2008/texmf-dist/tex/context/base/supp-pdf.tex:137: No room for a new \dimen .
/usr/local/texlive/2008/texmf-dist/tex/context/base/supp-pdf.tex:137: leading text: ... \csname newdimen\endcsname \scratchdimen
/usr/local/texlive/2008/texmf-dist/tex/context/base/supp-pdf.tex:1253: No room for a new \dimen .
/usr/local/texlive/2008/texmf-dist/tex/context/base/supp-pdf.tex:1253: leading text: \newdimen\MPscratchDim
```
|
https://tex.stackexchange.com/users/512
|
table notes in memoir
| false
|
Errors with this messages may be resolved using `etex`:
```
\usepackage{etex}
```
The error message means that the dimen register set is full. etex allows to use e-TeX’s extended register sets. See the TeX FAQ: [No room for a new ‘thing’](https://texfaq.org/FAQ-noroom).
|
5
|
https://tex.stackexchange.com/users/213
|
1682
| 1,176
|
https://tex.stackexchange.com/questions/1681
|
80
|
To ensure that a new chapter starts on a right-hand page, the `book` class (and the `report` class with the options `twoside` and `openright`) will insert blank pages between chapters if necessary. However, these pages still contain the headers and footers as defined by the class. How can I remove those?
Note: I know that I can manually add `\clearpage\thispagestyle{empty}` at the appropriate points of my document. However, this seems awkward and is prone to fail if I change my document later. I'm looking for automatic solutions.
|
https://tex.stackexchange.com/users/510
|
How to remove headers and footers for pages between chapters?
| false
|
You could redefine `\cleardoublepage`:
```
\makeatletter
\renewcommand*{\cleardoublepage}{\clearpage\if@twoside \ifodd\c@page\else
\hbox{}%
\thispagestyle{empty}%
\newpage%
\if@twocolumn\hbox{}\newpage\fi\fi\fi}
\makeatother
```
The [`fancyhdr`](https://texdoc.org/pkg/fancyhdr) package deals with this topic in its documentation. Have a look at section 20 *Those blank pages* on page 26.
|
18
|
https://tex.stackexchange.com/users/213
|
1683
| 1,177
|
https://tex.stackexchange.com/questions/1681
|
80
|
To ensure that a new chapter starts on a right-hand page, the `book` class (and the `report` class with the options `twoside` and `openright`) will insert blank pages between chapters if necessary. However, these pages still contain the headers and footers as defined by the class. How can I remove those?
Note: I know that I can manually add `\clearpage\thispagestyle{empty}` at the appropriate points of my document. However, this seems awkward and is prone to fail if I change my document later. I'm looking for automatic solutions.
|
https://tex.stackexchange.com/users/510
|
How to remove headers and footers for pages between chapters?
| true
|
Use the [`emptypage`](http://ctan.org/pkg/emptypage) package.
|
94
|
https://tex.stackexchange.com/users/627
|
1684
| 1,178
|
https://tex.stackexchange.com/questions/1680
|
5
|
How do I have footnotes in a table while using memoir?
I tried ctable, but I get the following errors:
```
/usr/local/texlive/2008/texmf-dist/tex/latex/hyperref/hyperref.sty:4022: No room for a new \dimen .
/usr/local/texlive/2008/texmf-dist/tex/latex/hyperref/hyperref.sty:4022: leading text: \newdimen\Field@Width
/usr/local/texlive/2008/texmf-dist/tex/latex/hyperref/hyperref.sty:4023: No room for a new \dimen .
/usr/local/texlive/2008/texmf-dist/tex/latex/hyperref/hyperref.sty:4023: leading text: \newdimen\Fld@charsize
/usr/local/texlive/2008/texmf-dist/tex/context/base/supp-pdf.tex:137: No room for a new \dimen .
/usr/local/texlive/2008/texmf-dist/tex/context/base/supp-pdf.tex:137: leading text: ... \csname newdimen\endcsname \scratchdimen
/usr/local/texlive/2008/texmf-dist/tex/context/base/supp-pdf.tex:1253: No room for a new \dimen .
/usr/local/texlive/2008/texmf-dist/tex/context/base/supp-pdf.tex:1253: leading text: \newdimen\MPscratchDim
```
|
https://tex.stackexchange.com/users/512
|
table notes in memoir
| true
|
The [threeparttable](http://www.ctan.org/tex-archive/help/Catalogue/entries/threeparttable.html) package is compatible with memoir.
|
4
|
https://tex.stackexchange.com/users/510
|
1685
| 1,179
|
https://tex.stackexchange.com/questions/1681
|
80
|
To ensure that a new chapter starts on a right-hand page, the `book` class (and the `report` class with the options `twoside` and `openright`) will insert blank pages between chapters if necessary. However, these pages still contain the headers and footers as defined by the class. How can I remove those?
Note: I know that I can manually add `\clearpage\thispagestyle{empty}` at the appropriate points of my document. However, this seems awkward and is prone to fail if I change my document later. I'm looking for automatic solutions.
|
https://tex.stackexchange.com/users/510
|
How to remove headers and footers for pages between chapters?
| false
|
The `KOMA-Script` classes allow to set the pagestyle of inserted "blank" pages with the option `cleardoublepage` (which defaults to `empty`). See section 3.13 of the `KOMA-Script` manual for details.
|
5
|
https://tex.stackexchange.com/users/510
|
1686
| 1,180
|
https://tex.stackexchange.com/questions/1687
|
65
|
I am using biblatex with the authoryear styles.
So far I've been able to find everything I need easily in the excellent documentation, but I'm stuck on one thing.
With my current settings (below) citations only have the year hyperlinked to the bibliography entry. I think prior to using biblatex I would have the whole citation (authors + year) as a reference - I think this is easier to click etc. when browsing.
Is there an easy way to get this (or does it involve creating a new style).
```
\usepackage[style=authoryear,
bibstyle=authoryear,
citestyle=authoryear,
natbib=true,
hyperref=true,
backref=true,
abbreviate=true]{biblatex}
```
|
https://tex.stackexchange.com/users/759
|
hyperlink name with biblatex authoryear
| true
|
Add the following to you preamble:
```
\DeclareCiteCommand{\cite}
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\printtext[bibhyperref]{\usebibmacro{cite}}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand*{\cite}
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\printtext[bibhyperref]{\usebibmacro{citeyear}}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand{\parencite}[\mkbibparens]
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\printtext[bibhyperref]{\usebibmacro{cite}}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand*{\parencite}[\mkbibparens]
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\printtext[bibhyperref]{\usebibmacro{citeyear}}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand{\footcite}[\mkbibfootnote]
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\printtext[bibhyperref]{ \usebibmacro{cite}}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand{\footcitetext}[\mkbibfootnotetext]
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\printtext[bibhyperref]{\usebibmacro{cite}}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand{\textcite}
{\boolfalse{cbx:parens}}
{\usebibmacro{citeindex}%
\printtext[bibhyperref]{\usebibmacro{textcite}}}
{\ifbool{cbx:parens}
{\bibcloseparen\global\boolfalse{cbx:parens}}
{}%
\multicitedelim}
{\usebibmacro{textcite:postnote}}
```
Note that this code snipped is basically taken from [here](http://groups.google.com/group/comp.text.tex/browse_thread/thread/ad23e11b68dddcab) and adapted to biblatex v0.9b, i.e. the definitions for `\footcitetext` and `\textcite` are added resp. changed. (I also decided not to add hyperlinks for `\citeauthor` and `\citeyear`.)
|
39
|
https://tex.stackexchange.com/users/510
|
1690
| 1,181
|
https://tex.stackexchange.com/questions/1691
|
12
|
(with apologies for the title)
I've just entered the murky waters of trying to get one LaTeX file to write out something useful as it goes along. In brief, I want my lecture LaTeX file to be able to write out a file that, upon LaTeX'ing, will give me the corresponding lesson plan. So at the start of the (main) document I want to write out the header, then as the document progresses, I want to write out bits to go in the plan, then at the end it needs to write out a footer.
What is confusing me is *when* writes happen. The lecture file consists of lots and lots of lectures (it's a beamer file) and only one is produced upon LaTeX'ing, but one of the pieces of information that I want to write out is the lecture title and I keep getting the last lecture title. I thought that maybe `\immediate` would be the answer, but that really does mean **immediate**. What I want is to put the `\write` in a macro in such a way that when the macro is called, the write is immediate (in particular, I want to hook it in to the lecture title page). So the question is: how do I do that?
I'm probably just missing something obvious, but whatever it is, I'm missing it!
(And for some reason, searching on google for 'latex write' doesn't help much.)
|
https://tex.stackexchange.com/users/86
|
What are the right rites to \write right now?
| false
|
Can you not just use `\let` to save the current title, and use it later to write to a file? Another alternative would be to always use `\immediate` so that the chronology of typesetting is respected.
|
1
|
https://tex.stackexchange.com/users/170
|
1692
| 1,182
|
https://tex.stackexchange.com/questions/1583
|
81
|
I would like to have footnotes in tables, but the `\footnote` command does not work inside a `table` environment. Googling one finds that this is [a frequently asked question](https://texfaq.org/FAQ-footintab), at least in the UK. That link contains a list of solutions to the problem, but since the author of the FAQ does not believe that this is good style, no comparison is made between the different methods.
I am sure that there are good typographical reasons why in most situations it is undesirable to have footnotes in tables (although I have never come across them), however I have recently felt the need to do just this in a paper I am currently writing.
Therefore I'd like to ask two questions:
1. What are the arguments against footnotes in tables?
2. If one really must go against the advice in 1., which method (whether considered in the [FAQ above](https://texfaq.org/FAQ-footintab) or not) would you recommend?
Thanks in advance.
### Added
In response to ShreevatsaR's comment: I do not much care for where the text of the footnote appears. I do however insist on the footnote marks being attached to the relevant entries in the table, so that I can avoid having to reference "the second entry in the eighth line of the table", etc...
|
https://tex.stackexchange.com/users/18
|
Footnotes in tables?
| false
|
The commands `\savenotes` and `\spewnotes` from the [`footnote` package](http://www.ctan.org/tex-archive/help/Catalogue/entries/threeparttable.html) might help you.
|
2
|
https://tex.stackexchange.com/users/704
|
1693
| 1,183
|
https://tex.stackexchange.com/questions/1290
|
35
|
Most examples I've seen are like this:
```
\begin{tabular}{@{}l r r@{}}
```
that is, with one `@{}` to the left of first column specifier and another `@{}` to the right of the last column specifier.
Yet the "Not So Short Guide to LaTex" says this construct suppresses the *leading* space.
I'm a bit confused. Which of the following interpretations are correct?
* `@{}` suppresses the space on the side of the column specifier where it is placed (i.e. placed to the left of the specifier it suppresses the leading space and, conversely, placed to the right it suppresses the trailing space)
* only `@{}` should be placed to the left of the first column and/or to the right of the last column, but not in between.
* neither of the above.
Unfortunately I'm not at a computer with LaTeX at this very moment so I cannot try it instead of asking.
Thanks a lot.
|
https://tex.stackexchange.com/users/564
|
Clarification on the use of @{} with table headings
| false
|
Incidentally, this is a good trick to use when you have "complicated" numbers. Use `\begin{tabular}{lr@{.}l}
Variable 1 & -2&35 \\ Variable 2 & 127&50*** ...`
The "." in the braces of "@{.}" uses a decimal point to separate columns 2 and 3 with no space. So you get -2.35 and 127.50\*\*\* aligned at the decimal points. This is difficult to do another way because the numbers are different orders of magnitude, one is negative, and one is marked as significant using stars.
|
13
|
https://tex.stackexchange.com/users/758
|
1694
| 1,184
|
https://tex.stackexchange.com/questions/1691
|
12
|
(with apologies for the title)
I've just entered the murky waters of trying to get one LaTeX file to write out something useful as it goes along. In brief, I want my lecture LaTeX file to be able to write out a file that, upon LaTeX'ing, will give me the corresponding lesson plan. So at the start of the (main) document I want to write out the header, then as the document progresses, I want to write out bits to go in the plan, then at the end it needs to write out a footer.
What is confusing me is *when* writes happen. The lecture file consists of lots and lots of lectures (it's a beamer file) and only one is produced upon LaTeX'ing, but one of the pieces of information that I want to write out is the lecture title and I keep getting the last lecture title. I thought that maybe `\immediate` would be the answer, but that really does mean **immediate**. What I want is to put the `\write` in a macro in such a way that when the macro is called, the write is immediate (in particular, I want to hook it in to the lecture title page). So the question is: how do I do that?
I'm probably just missing something obvious, but whatever it is, I'm missing it!
(And for some reason, searching on google for 'latex write' doesn't help much.)
|
https://tex.stackexchange.com/users/86
|
What are the right rites to \write right now?
| false
|
One solution is to use `filecontents` (CTAN).
|
1
|
https://tex.stackexchange.com/users/337
|
1695
| 1,185
|
https://tex.stackexchange.com/questions/1691
|
12
|
(with apologies for the title)
I've just entered the murky waters of trying to get one LaTeX file to write out something useful as it goes along. In brief, I want my lecture LaTeX file to be able to write out a file that, upon LaTeX'ing, will give me the corresponding lesson plan. So at the start of the (main) document I want to write out the header, then as the document progresses, I want to write out bits to go in the plan, then at the end it needs to write out a footer.
What is confusing me is *when* writes happen. The lecture file consists of lots and lots of lectures (it's a beamer file) and only one is produced upon LaTeX'ing, but one of the pieces of information that I want to write out is the lecture title and I keep getting the last lecture title. I thought that maybe `\immediate` would be the answer, but that really does mean **immediate**. What I want is to put the `\write` in a macro in such a way that when the macro is called, the write is immediate (in particular, I want to hook it in to the lecture title page). So the question is: how do I do that?
I'm probably just missing something obvious, but whatever it is, I'm missing it!
(And for some reason, searching on google for 'latex write' doesn't help much.)
|
https://tex.stackexchange.com/users/86
|
What are the right rites to \write right now?
| true
|
I guess I must not understand the question. What is wrong with:
```
\newcommand{\mywrite}[1]{\immediate\write\myoutputfile{#1}}
```
Although I like to be a bit more complete and handle the fact that not all input files may be read on each compilation (due to `\includeonly`) but you still want the complete lesson plan even if some parts live in the non-included files, also the user maybe want to switch off all file output via `\nofiles`, or only wants to stop automatically updating the lesson plan so they can do some hand editing (here remove the `\makemyrecords` line). I would also want to avoid putting spurious spaces in the document, so I would do it this way, modelled loosely after how `\makeindex` works in latex:
```
\ProvidesPackage{myrecords}%
[2010/08/14 v0.01 my example record package (LSB)]
\NeedsTeXFormat{LaTeX2e}
\def\myrec@outputfileextension{.mrc}
\newcommand*{\myrec@write}[1]{}
\def\myrec@verb{\expandafter\strip@prefix\meaning}
\newcommand*{\makemyrecords}{%
\newwrite\myrec@outfile
\immediate\openout\myrec@outfile=\jobname\myrec@outputfileextension
\typeout{Writing my records to file \jobname\myrec@outputfileextension}%
\let\makemyrecords\@empty
\renewcommand*{\myrec@write}[1]{\immediate\write\myrec@outfile{##1}}%
}
\@onlypreamble\makemyrecords
\newcommand*{\myrecord}[1]{%
\@bsphack
\if@filesw
\immediate\write\@auxout{\string\myrecordentry{#1}}%
\fi
\@esphack
}
\newcommand*{\myliteral}[1]{%
\@bsphack
\if@filesw
\def\@tempa{#1}
\immediate\write\@auxout{%
\string\myrecordentry{%
\myrec@verb\@tempa}}%
\fi
\@esphack
}
\newcommand*{\mywritecurrenttitle}{
\if@filesw
\immediate\write\@auxout{\string\myrecordentry{%
\string\lessonplanitem{\currenttitle}}}%
\fi
}
\newcommand*{\myrecordentry}[1]{}
\AtEndDocument{%
\renewcommand*{\myrecordentry}[1]{%
\def\@tempa{#1}%
\myrec@write{\myrec@verb\@tempa}%
}}
\endinput
```
If I test this with what I imagine you have in mind (obviously you would want to wrap the \renewcommand{\currenttitle}\mywritecurrenttitle up with a command that generates the document sectioning, or put them in hooks provided by your document class).
```
\documentclass{article}
\usepackage{myrecords}
\makemyrecords
\begin{document}
\myliteral{
\documentclass{lessonplan}
\begin{document}}
\newcommand*{\currenttitle}{This is the title of lesson 1}
\mywritecurrenttitle
Lesson 1....
\renewcommand{\currenttitle}{This is the title of lesson 2}
\mywritecurrenttitle
Lesson 2.....
\myliteral{\end{document}}
\end{document}
```
Then, as expected, the lesson plan file looks like
```
\documentclass {lessonplan} \begin {document}
\lessonplanitem {This is the title of lesson 1}
\lessonplanitem {This is the title of lesson 2}
\end {document}
```
|
10
|
https://tex.stackexchange.com/users/627
|
1696
| 1,186
|
https://tex.stackexchange.com/questions/1697
|
17
|
This is probably going to sound like a strange request (trust me that there's a good reason for it), but is it possible to have LaTeX compile straight to an image file instead of to something like PDF, PostScript, or DVI? I know there are probably good ways to convert *those* formats to an image instead, but I figured I would see if there was a more direct route.
Some requirements:
* The image format can be either PNG or JPG.
* I'm not looking just for a single expression or something (I'm aware of tools like `tex2im`). I want to compile an entire document.
* There should be one image for each page in the corresponding PDF, with the same resolution, margins, etc. It should be identical to just converting each page faithfully.
In case this turns out to be impossible for some reason, I would also be happy with a simple conversion routine to accomplish this with a PDF generated by `pdflatex`.
Thanks!
|
https://tex.stackexchange.com/users/767
|
Compiling LaTeX straight to an image
| false
|
You want the `preview` package. For example, this is what I use for tikz:
```
\RequirePackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{1pt}%
```
You can insert as many `tikzpicture` env as you wish and each one appears on a single page with the page fit to the image.
|
3
|
https://tex.stackexchange.com/users/337
|
1698
| 1,187
|
https://tex.stackexchange.com/questions/1697
|
17
|
This is probably going to sound like a strange request (trust me that there's a good reason for it), but is it possible to have LaTeX compile straight to an image file instead of to something like PDF, PostScript, or DVI? I know there are probably good ways to convert *those* formats to an image instead, but I figured I would see if there was a more direct route.
Some requirements:
* The image format can be either PNG or JPG.
* I'm not looking just for a single expression or something (I'm aware of tools like `tex2im`). I want to compile an entire document.
* There should be one image for each page in the corresponding PDF, with the same resolution, margins, etc. It should be identical to just converting each page faithfully.
In case this turns out to be impossible for some reason, I would also be happy with a simple conversion routine to accomplish this with a PDF generated by `pdflatex`.
Thanks!
|
https://tex.stackexchange.com/users/767
|
Compiling LaTeX straight to an image
| false
|
There is not a way to get a PNG or JPG directly from LaTeX.
My guess is you're attempting to make some web service where users enter LaTeX and get pictures as a result. If this is the case, there are many that do this already and I should caution you that it is unsafe to directly expose LaTeX to the internet. If this is not the case, ignore this graf.
|
0
|
https://tex.stackexchange.com/users/647
|
1699
| 1,188
|
https://tex.stackexchange.com/questions/1697
|
17
|
This is probably going to sound like a strange request (trust me that there's a good reason for it), but is it possible to have LaTeX compile straight to an image file instead of to something like PDF, PostScript, or DVI? I know there are probably good ways to convert *those* formats to an image instead, but I figured I would see if there was a more direct route.
Some requirements:
* The image format can be either PNG or JPG.
* I'm not looking just for a single expression or something (I'm aware of tools like `tex2im`). I want to compile an entire document.
* There should be one image for each page in the corresponding PDF, with the same resolution, margins, etc. It should be identical to just converting each page faithfully.
In case this turns out to be impossible for some reason, I would also be happy with a simple conversion routine to accomplish this with a PDF generated by `pdflatex`.
Thanks!
|
https://tex.stackexchange.com/users/767
|
Compiling LaTeX straight to an image
| true
|
Probably the best way is latex followed by dvipng. The main advantages over pdflatex followed by pdf2png are: it is faster; it can start working on the dvi while latex is still in the process of producing the dvi. It's optimized for producing screen-resolution antialiased images at maximum speed. If your foo.dvi has 4 pages then you get foo1.png foo2.png foo3.png foo4.png.
|
15
|
https://tex.stackexchange.com/users/627
|
1700
| 1,189
|
https://tex.stackexchange.com/questions/1688
|
30
|
>
> **Possible Duplicate:**
>
> [How do I repeat a theorem number?](https://tex.stackexchange.com/questions/422/how-do-i-repeat-a-theorem-number)
>
>
>
I am writing a paper, and would like to state the main results in the Introduction. Then, when I come to prove the main results in later sections, I would like to restate the theorem before proceeding with the proof. (We could debate about whether that is good style, but it is what my co-author and I want to do in this instance.) I would prefer to restate the theorem with the original theorem number - so "Theorem 1.1" again, rather than "Theorem 4.1," when restated. Does anyone have a good solution for how to do this in LaTeX?
I have done this a couple times before, but never with an elegant solution. The best solution I have come up with is to create a different theoremstyle for main results, and call the main results "Theorem A", etc, in the introduction; and then use yet another theoremstyle to reproduce the results, again "Theorem A" later in the paper. This method works so long as you prove the results in the order that you discuss them in the introduction, but is inelegant.
I also realize that hard core TeX users might tell me just to use TeX, where you have much more control. That would also take more time than I have energy for to finish this paper!
>
> What is a good way to re-use Theorem numbers, to repeat a theorem, using LaTeX?
>
>
> More technically, how can I get a Theorem to use a \ref for the number, rather than referring automatically to a counter?
>
>
>
|
https://tex.stackexchange.com/users/784
|
Using LaTeX, how can I restate a theorem, with the same theorem number, later in a paper?
| false
|
I define my own `oneshot` environment in a private macro package.
```
\newenvironment{oneshot}[1]{\@begintheorem{#1}{\unskip}}{\@endtheorem}
```
Here's how it's used:
```
\begin{theorem}
\label{Th:wet}
The rain in Spain falls mainly on the plain.
\end{theorem}
\begin{oneshot}{Theorem~\ref{Th:wet}}
Iberian precipitation primarily hits the flatlands.
\end{oneshot}
```
|
4
|
https://tex.stackexchange.com/users/105
|
1701
| 1,190
|
https://tex.stackexchange.com/questions/1669
|
241
|
I'd like to be able to resume an enumerated list, continuing the old numbering, after some intervening text which should not be formatted like a list item. Is there a nice way to do this?
In particular, I *don't* want to start a second list with a hard-coded initial counter value, because that will break if I change the number of items in the first list.
|
https://tex.stackexchange.com/users/206
|
Resuming a list
| false
|
Just save the counter and then restore it. There's no reason to use packages for things like this.
```
\documentclass{article}
\newcounter{nameOfYourChoice}
\begin{document}
\begin{enumerate}
\item Foo
\setcounter{nameOfYourChoice}{\value{enumi}}
\end{enumerate}
Foo
\begin{enumerate}
\setcounter{enumi}{\value{nameOfYourChoice}}
\item Foo
\end{enumerate}
\end{document}
```
|
141
|
https://tex.stackexchange.com/users/386
|
1702
| 1,191
|
https://tex.stackexchange.com/questions/1703
|
5
|
How can I convert the old tex file below into a pdf?
I would very much like to know as I have a few other files that I would like to convert.
Thanks.
PS: I selected the shortest example I had to hand.
```
\hrule
\vskip 2cm
\centerline{\magtwotenrm Some reciprocal summation identities with
applications to the}
\centerline{\magtwotenrm Fibonacci and Lucas numbers}
\vskip 1cm
\centerline{\magonetenit Derek Jennings}
\centerline{\magonetenrm Faculty of Mathematics, University of Southampton,}
\centerline{\magonetenrm Southampton, Hampshire, SO17 1BJ, England.}
\vskip 2cm
\centerline{\magtwotenrm 1: Introduction}
\vskip 1cm
\noindent In this arcticle we use theta functions and simple telescoping
of series to produce some reciprocal summation results for the Fibonacci
and Lucas numbers. The two results that we prove are the following:
\gap
{\noindent\bf Theorem 1}
$${\left( \sum_{n=1}^\infty {1 \over F_{2n-1}} \right)}^2 -
\sum_{n=1}^\infty {1 \over F_{2n-1}^2} =
2\sum_{n=1}^\infty {1 \over F_{4n-2}^2}$$
\gap
{\noindent\bf Theorem 2}
$$\sum_{n=1}^\infty {\left( {2^n \over L_{2^n} } \right)}^2 = {4 \over 5}$$
\gap
\noindent $F_n$ and $L_n$ are the Fibonacci and Lucas numbers respectively,
satisfying the usual recurrence $U_{n+1}=U_n+U_{n-1}$ where $F_0=0$, $F_1=1$,
$L_0=2$ and $L_1=1$.
\vskip 2cm
\centerline{\magtwotenrm 2: Proof of Theorem 1}
\vskip 1cm
\noindent By simple series rearrangement we have
$$\sum_{n=1}^\infty {q^{2n-1} \over (1+q^{2n-1})^2} =
\sum_{n=1}^\infty (-1)^{n-1}{ nq^n \over 1-q^{2n}}.$$
\noindent Replacing $q$ by $q^2$ in the above then splitting the summation
over the odd and even numbers we obtain
$$\eqalign{
\sum_{n=1}^\infty {q^{4n-2} \over (1+q^{4n-2})^2} &=
\sum_{n=1}^\infty (-1)^{n-1}{ nq^{2n} \over 1-q^{4n}} \cr
&= \sum_{n=1}^\infty (2n-1){q^{4n-2} \over 1-q^{8n-4}} -
2\sum_{n=1}^\infty {nq^{4n} \over 1-q^{8n}}. \cr }\eqno(1)$$
\noindent Now a theorem originally due to Guass gives
$$\sum_{n=1}^\infty (2n-1){q^{8n-4} \over 1-q^{16n-8}} =
{ \left\{ {1 \over 2} \theta_2(q^4) \right\} }^4$$
\noindent where
$$\theta_2(q) = \sum_{-\infty}^\infty q^{(n+1/2)^2} =
2q^{1/4} \prod_{n=1}^\infty(1-q^{2n})(1+q^{2n})^2.$$
\noindent Therefore
$$\sum_{n=1}^\infty (2n-1){q^{4n-2} \over 1-q^{8n-4}} =
{\left( \sum_{n=1}^\infty {q^{2n-1} \over 1+q^{4n-2} } \right)}^2,\eqno(2)$$
\noindent using
$$\theta_2(q^2)^2 = 4 \sum_{n=1}^\infty {q^{2n-1} \over 1+q^{4n-2} }.$$
\noindent The last equality follows directly from equating the coefficient
of $x$ in (2) of {\bf [1]}.
\noindent Also, by simple series rearrangement we have
$$\sum_{n=1}^\infty { nq^n \over 1-q^{2n}} =
\sum_{n=1}^\infty {q^{2n-1} \over (1-q^{2n-1})^2},$$
\noindent which on replacing $q$ by $q^4$ gives
$$\sum_{n=1}^\infty { nq^{4n} \over 1-q^{8n}} =
\sum_{n=1}^\infty {q^{8n-4} \over (1-q^{8n-4})^2}.\eqno(3)$$
\noindent Using (2) and (3) to substitute for the summations in the RHS of
(1) gives
$$\sum_{n=1}^\infty {q^{4n-2} \over (1+q^{4n-2})^2}=
{\left( \sum_{n=1}^\infty {q^{2n-1} \over 1+q^{4n-2} } \right)}^2 -2
\sum_{n=1}^\infty {q^{8n-4} \over (1-q^{8n-4})^2}.\eqno(4)$$
\noindent Setting $q=(1-\sqrt 5)/2$ in (4), and using the Binet form
$F_n = (\alpha^n - \beta^n)/(\alpha -\beta)$ of the Fibonacci numbers
($\alpha = (1+\sqrt 5)/2$, $\beta = (1-\sqrt 5)/2$) we obtain Theorem 1.
\vskip 2cm
\centerline{\magtwotenrm 3: Proof of Theorem 2}
\vskip 1cm
\noindent Our starting point is the identity
$${q \over (1+q)^2} + {4q^2 \over (1-q^2)^2 } = {q \over (1-q)^2}.$$
\noindent This telescopes to
$${q \over (1+q)^2} + {4q^2 \over (1+q^2)^2 } + {16q^4 \over (1-q^4)^2}
= {q \over (1-q)^2}$$
\noindent and continuing the expansion process we arrive at
$$\sum_{n=0}^\infty {2^{2n} q^{2^n} \over (1+q^{2^n})^2} =
{q \over (1-q)^2}.$$
\noindent Now we put $q=(1-\sqrt 5)/2$ in the above identity and use the
Binet form of $L_n = \alpha^n + \beta^n$ of the Lucas numbers ($\alpha$,
$\beta$ as in section 2) to obtain Theorem 2.
\vskip 2cm
\centerline{\magonetenrm References}
\vskip .75cm
\item{[1]} D.Jennings {\sl An identity for the Fibonacci and Lucas numbers}
Glasgow Math. J. {\bf 35} (1993) 381--384.
\vfill\eject
```
|
https://tex.stackexchange.com/users/790
|
How do I create a pdf file from old tex code?
| false
|
I would built a small LaTeX frame document for this purpose and use `\input` to include such tex code.
Do know the definition of commands like `\magtwotenrm`, `\magonetenit` etc.? If you don't have it, define them by `\newcommand`. These look like font declarations `\rm`, `\it`.
The [plain bundle](http://ctan.org/pkg/plain) contains files to use plain TeX code in LaTeX documents. So, together with Carls lines and plain.tex I could create a pdf document with this LaTeX code:
```
\documentclass{article}
\input{plain}
\font\magtwotenrm=cmr10 scaled\magstep2
\let\magonetenrm\rm
\let\magonetenit\it
\def\gap{\vskip16pt}
\begin{document}
\input{file1}
\end{document}
```
Of course you could use pdftex instead if you just want to get a pdf. But if you would like to modify page dimensions or the content, you could go further with LaTeX.
To convince that it works, heres the pdf output of that file: [main.pdf](http://texblog.net/pdf/main.pdf).
I still had to confirm some errors but the pdf has been produced. Now the formatting could be enhanced.
|
9
|
https://tex.stackexchange.com/users/213
|
1705
| 1,193
|
https://tex.stackexchange.com/questions/1703
|
5
|
How can I convert the old tex file below into a pdf?
I would very much like to know as I have a few other files that I would like to convert.
Thanks.
PS: I selected the shortest example I had to hand.
```
\hrule
\vskip 2cm
\centerline{\magtwotenrm Some reciprocal summation identities with
applications to the}
\centerline{\magtwotenrm Fibonacci and Lucas numbers}
\vskip 1cm
\centerline{\magonetenit Derek Jennings}
\centerline{\magonetenrm Faculty of Mathematics, University of Southampton,}
\centerline{\magonetenrm Southampton, Hampshire, SO17 1BJ, England.}
\vskip 2cm
\centerline{\magtwotenrm 1: Introduction}
\vskip 1cm
\noindent In this arcticle we use theta functions and simple telescoping
of series to produce some reciprocal summation results for the Fibonacci
and Lucas numbers. The two results that we prove are the following:
\gap
{\noindent\bf Theorem 1}
$${\left( \sum_{n=1}^\infty {1 \over F_{2n-1}} \right)}^2 -
\sum_{n=1}^\infty {1 \over F_{2n-1}^2} =
2\sum_{n=1}^\infty {1 \over F_{4n-2}^2}$$
\gap
{\noindent\bf Theorem 2}
$$\sum_{n=1}^\infty {\left( {2^n \over L_{2^n} } \right)}^2 = {4 \over 5}$$
\gap
\noindent $F_n$ and $L_n$ are the Fibonacci and Lucas numbers respectively,
satisfying the usual recurrence $U_{n+1}=U_n+U_{n-1}$ where $F_0=0$, $F_1=1$,
$L_0=2$ and $L_1=1$.
\vskip 2cm
\centerline{\magtwotenrm 2: Proof of Theorem 1}
\vskip 1cm
\noindent By simple series rearrangement we have
$$\sum_{n=1}^\infty {q^{2n-1} \over (1+q^{2n-1})^2} =
\sum_{n=1}^\infty (-1)^{n-1}{ nq^n \over 1-q^{2n}}.$$
\noindent Replacing $q$ by $q^2$ in the above then splitting the summation
over the odd and even numbers we obtain
$$\eqalign{
\sum_{n=1}^\infty {q^{4n-2} \over (1+q^{4n-2})^2} &=
\sum_{n=1}^\infty (-1)^{n-1}{ nq^{2n} \over 1-q^{4n}} \cr
&= \sum_{n=1}^\infty (2n-1){q^{4n-2} \over 1-q^{8n-4}} -
2\sum_{n=1}^\infty {nq^{4n} \over 1-q^{8n}}. \cr }\eqno(1)$$
\noindent Now a theorem originally due to Guass gives
$$\sum_{n=1}^\infty (2n-1){q^{8n-4} \over 1-q^{16n-8}} =
{ \left\{ {1 \over 2} \theta_2(q^4) \right\} }^4$$
\noindent where
$$\theta_2(q) = \sum_{-\infty}^\infty q^{(n+1/2)^2} =
2q^{1/4} \prod_{n=1}^\infty(1-q^{2n})(1+q^{2n})^2.$$
\noindent Therefore
$$\sum_{n=1}^\infty (2n-1){q^{4n-2} \over 1-q^{8n-4}} =
{\left( \sum_{n=1}^\infty {q^{2n-1} \over 1+q^{4n-2} } \right)}^2,\eqno(2)$$
\noindent using
$$\theta_2(q^2)^2 = 4 \sum_{n=1}^\infty {q^{2n-1} \over 1+q^{4n-2} }.$$
\noindent The last equality follows directly from equating the coefficient
of $x$ in (2) of {\bf [1]}.
\noindent Also, by simple series rearrangement we have
$$\sum_{n=1}^\infty { nq^n \over 1-q^{2n}} =
\sum_{n=1}^\infty {q^{2n-1} \over (1-q^{2n-1})^2},$$
\noindent which on replacing $q$ by $q^4$ gives
$$\sum_{n=1}^\infty { nq^{4n} \over 1-q^{8n}} =
\sum_{n=1}^\infty {q^{8n-4} \over (1-q^{8n-4})^2}.\eqno(3)$$
\noindent Using (2) and (3) to substitute for the summations in the RHS of
(1) gives
$$\sum_{n=1}^\infty {q^{4n-2} \over (1+q^{4n-2})^2}=
{\left( \sum_{n=1}^\infty {q^{2n-1} \over 1+q^{4n-2} } \right)}^2 -2
\sum_{n=1}^\infty {q^{8n-4} \over (1-q^{8n-4})^2}.\eqno(4)$$
\noindent Setting $q=(1-\sqrt 5)/2$ in (4), and using the Binet form
$F_n = (\alpha^n - \beta^n)/(\alpha -\beta)$ of the Fibonacci numbers
($\alpha = (1+\sqrt 5)/2$, $\beta = (1-\sqrt 5)/2$) we obtain Theorem 1.
\vskip 2cm
\centerline{\magtwotenrm 3: Proof of Theorem 2}
\vskip 1cm
\noindent Our starting point is the identity
$${q \over (1+q)^2} + {4q^2 \over (1-q^2)^2 } = {q \over (1-q)^2}.$$
\noindent This telescopes to
$${q \over (1+q)^2} + {4q^2 \over (1+q^2)^2 } + {16q^4 \over (1-q^4)^2}
= {q \over (1-q)^2}$$
\noindent and continuing the expansion process we arrive at
$$\sum_{n=0}^\infty {2^{2n} q^{2^n} \over (1+q^{2^n})^2} =
{q \over (1-q)^2}.$$
\noindent Now we put $q=(1-\sqrt 5)/2$ in the above identity and use the
Binet form of $L_n = \alpha^n + \beta^n$ of the Lucas numbers ($\alpha$,
$\beta$ as in section 2) to obtain Theorem 2.
\vskip 2cm
\centerline{\magonetenrm References}
\vskip .75cm
\item{[1]} D.Jennings {\sl An identity for the Fibonacci and Lucas numbers}
Glasgow Math. J. {\bf 35} (1993) 381--384.
\vfill\eject
```
|
https://tex.stackexchange.com/users/790
|
How do I create a pdf file from old tex code?
| false
|
Here's a quick and dirty way. Put the following at the top of the file:
```
\font\magtwotenrm=cmr10 scaled\magstep2
\let\magonetenrm\rm
\let\magonetenit\it
\def\gap{\vskip16pt}
```
Then put "\bye" at the bottom of the file, and run it through pdftex.
The "mag" commands were intended to change the size of the text, and you can redefine them to scale differently if you want.
|
5
|
https://tex.stackexchange.com/users/386
|
1707
| 1,194
|
https://tex.stackexchange.com/questions/1706
|
18
|
My only knowledge of LaTeX is that it is a markup language that lets me concentrate on the structure of my document rather than its appearance. It uses tags similar to HTML.
My problem is that I've only experienced all that through reading tutorials and Wikipedia.
How do I start using LaTeX on Windows XP? I have programming experience in Python and MATLAB. I would prefer to start out "raw" or low-level, without any WYSIWYG's, so that I can get my hands dirty and understand how it works. But any answers about WYSIWYG's would surely be helpful as well.
I have just installed LyX, but I'm not sure if it fits my "raw" preference well enough.
|
https://tex.stackexchange.com/users/791
|
How do I get started with LaTeX on Windows XP?
| false
|
You basically have to do three things
* Install [MikTeX](http://miktex.org/).
* Install [TeXnicCenter](http://www.texniccenter.org/) (or another alternative [IDE](https://tex.stackexchange.com/questions/339/latex-editors-ides)).
* Read some of the entry level [guides and tutorials](https://tex.stackexchange.com/questions/11/what-is-the-best-book-to-start-learning-latex).
LyX is definitely *not* “raw” level. It might sound too harsh, but I wouldn't recommend LyX for anything. Conceptually, there is really not much difference between LyX and Word, which could sound like an advantage but it's actually more like a flaw. LaTeX offers you a completely different way to “think” about documents, allowing you to clearly separate the format from the content of a document. Really, try the *real* LaTeX, specially if you already are a programmer, you will be amazed by the power and the new perspective that it brings to you.
|
3
|
https://tex.stackexchange.com/users/169
|
1708
| 1,195
|
https://tex.stackexchange.com/questions/1706
|
18
|
My only knowledge of LaTeX is that it is a markup language that lets me concentrate on the structure of my document rather than its appearance. It uses tags similar to HTML.
My problem is that I've only experienced all that through reading tutorials and Wikipedia.
How do I start using LaTeX on Windows XP? I have programming experience in Python and MATLAB. I would prefer to start out "raw" or low-level, without any WYSIWYG's, so that I can get my hands dirty and understand how it works. But any answers about WYSIWYG's would surely be helpful as well.
I have just installed LyX, but I'm not sure if it fits my "raw" preference well enough.
|
https://tex.stackexchange.com/users/791
|
How do I get started with LaTeX on Windows XP?
| false
|
LyX may be a good way to entice users of Microsoft Word to structural markup, but it is inappropriate for a low-level LaTeX start.
My recommendation: Use [TeXworks](http://tug.org/texworks/) as the editor of your choice - it combines an editor for "raw" LaTeX code with a preview window that shows the corresponding final output. Load the file `sample2e.tex` which offers a selection of basic LaTeX commands, compile it, then play around with the code.
|
2
|
https://tex.stackexchange.com/users/510
|
1709
| 1,196
|
https://tex.stackexchange.com/questions/1706
|
18
|
My only knowledge of LaTeX is that it is a markup language that lets me concentrate on the structure of my document rather than its appearance. It uses tags similar to HTML.
My problem is that I've only experienced all that through reading tutorials and Wikipedia.
How do I start using LaTeX on Windows XP? I have programming experience in Python and MATLAB. I would prefer to start out "raw" or low-level, without any WYSIWYG's, so that I can get my hands dirty and understand how it works. But any answers about WYSIWYG's would surely be helpful as well.
I have just installed LyX, but I'm not sure if it fits my "raw" preference well enough.
|
https://tex.stackexchange.com/users/791
|
How do I get started with LaTeX on Windows XP?
| true
|
It's a very good decision to start with LaTeX.
For working with it, you need a LaTeX distribution. You could choose between two:
* [TeX Live](http://tug.org/texlive/) ist cross-platform and maintained by many people or
* [MiKTeX](http://miktex.org/) is very user-friendly, runs only on Windows and is maintained by one man.
Both distributions install [TeXworks](http://tug.org/texworks/), a cross-platform LaTeX editor. It's easy to use and not overloaded, so you are encouraged to learn LaTeX instead of learning buttons and toolbars. Start TeXworks and you're ready to go. It comes with an integrated pdf previewer supporting SyncTeX. That means: clicking somewhere in the output would get you to the corresponding line in the source code, and the other way round as well. That's very handy with large documents.
If you prefer a more complex editor, you may try the outstanding [TeXnicCenter](http://www.texniccenter.org/) or [Texmaker](http://www.xm1math.net/texmaker/).
Perhaps have a look at [Distributions, Editors and Viewer for Windows](http://texblog.net/latex-link-archive/distribution-editor-viewer/windows/).
By the way, the new version 2.9 of MiKTeX is expected to be released this month, and TeX Live 2010 may be released at the end of August or in September. A [pretest version](http://tug.org/texlive/pretest.html) is available.
|
13
|
https://tex.stackexchange.com/users/213
|
1710
| 1,197
|
https://tex.stackexchange.com/questions/1713
|
23
|
I am just starting out with LaTeX on Windows XP, and I was advised to install MiKTeX.
What would I get in the complete MiKTeX that isn't in basic MiKTeX?
|
https://tex.stackexchange.com/users/791
|
What is the difference between the basic MiKTeX and the complete MiKTeX?
| true
|
The basic MiKTeX installs a small set of packages. The complete one installs all of the ones that MiKTeX knows about. As MiKTeX can install packages 'on the fly', the main advantages of the complete install are
1. When using MiKTeX on a PC that is not always connected to the internet
2. For multi-user installations where it is best to ensure that a known set of packages are available.
If you are using your own PC and will be attached to the internet most of the time then you can happily use the basic installation and add packages 'as needed'.
A bit more detail on multi-user systems. MiKTeX will install packages for each user separately, which is fine for a couple of people using a small set of packages, but would be bad for a system used by lots of people with very varying requirements. Hence for network-type installations a 'full' install or at least a bigger set of packages than the 'basic' is usually preferable.
|
25
|
https://tex.stackexchange.com/users/73
|
1714
| 1,198
|
https://tex.stackexchange.com/questions/1712
|
8
|
I have a revision string automatically saved to a file VERSION (it is the output of `git describe` and usually looks like v2.2-19-g0a51c27), and define a command
```
\newcommand*\fileversion{\input{VERSION}}
```
However, each time the command is used, the file is read once. So if I put the command on every page, VERSION will be read many times (= number of pages).
Currently I use savebox to avoid this problem but unfortunately this can not pick up the surrounding formatting style, for example, if surrounding text is in footnotesize, the savebox still uses normal size.
I also tried `\edef\fileversion{\input{VERSION}}` but somehow TeX gave me 'stack limit' error.
So my question is how to define a command that expands to the contents of VERSION and not \input{VERSION}.
|
https://tex.stackexchange.com/users/337
|
Avoid inputting a file multiple times
| true
|
A solution in plain tex could be like this (assuming a one-line file)
```
\newread\versionread
\immediate\openin\versionread = VERSION
\immediate\read\versionread to \fileversion
\immediate\closein\versionread
```
A (much) sneakier definition of \fileversion is also possible if you are using the etex extensions (which is probably true these days):
```
\makeatletter
{\everyeof{\noexpand}\xdef\fileversion{\@@input VERSION }}
\makeatother
```
|
7
|
https://tex.stackexchange.com/users/89
|
1715
| 1,199
|
https://tex.stackexchange.com/questions/1712
|
8
|
I have a revision string automatically saved to a file VERSION (it is the output of `git describe` and usually looks like v2.2-19-g0a51c27), and define a command
```
\newcommand*\fileversion{\input{VERSION}}
```
However, each time the command is used, the file is read once. So if I put the command on every page, VERSION will be read many times (= number of pages).
Currently I use savebox to avoid this problem but unfortunately this can not pick up the surrounding formatting style, for example, if surrounding text is in footnotesize, the savebox still uses normal size.
I also tried `\edef\fileversion{\input{VERSION}}` but somehow TeX gave me 'stack limit' error.
So my question is how to define a command that expands to the contents of VERSION and not \input{VERSION}.
|
https://tex.stackexchange.com/users/337
|
Avoid inputting a file multiple times
| false
|
Expanding on what Taco has just posted, I'd go for
```
\newcommand*\fileversion{%
\newread\myread
\openin\myread=VERSION
\read\myread to \fileversion
\closein\myread
\fileversion
}
```
as this will automatically redefine itself and print the version on first use.
|
2
|
https://tex.stackexchange.com/users/73
|
1716
| 1,200
|
https://tex.stackexchange.com/questions/1712
|
8
|
I have a revision string automatically saved to a file VERSION (it is the output of `git describe` and usually looks like v2.2-19-g0a51c27), and define a command
```
\newcommand*\fileversion{\input{VERSION}}
```
However, each time the command is used, the file is read once. So if I put the command on every page, VERSION will be read many times (= number of pages).
Currently I use savebox to avoid this problem but unfortunately this can not pick up the surrounding formatting style, for example, if surrounding text is in footnotesize, the savebox still uses normal size.
I also tried `\edef\fileversion{\input{VERSION}}` but somehow TeX gave me 'stack limit' error.
So my question is how to define a command that expands to the contents of VERSION and not \input{VERSION}.
|
https://tex.stackexchange.com/users/337
|
Avoid inputting a file multiple times
| false
|
I am pretty sure you're using LuaTeX :)
```
\edef\fileversion{%
\directlua{
local f = io.open('VERSION')
tex.print(f:read())
f:close()
}}
```
|
2
|
https://tex.stackexchange.com/users/243
|
1717
| 1,201
|
https://tex.stackexchange.com/questions/1666
|
17
|
I have used Computer Modern, and I love it.
Is there any other complete METAFONT font that can be used with LaTeX?
|
https://tex.stackexchange.com/users/777
|
What fonts are available for LaTeX?
| false
|
Essentially any font will work with LaTeX as a text font, you just have to set it up first. Math fonts are more trouble because they need more symbols. A list of free math fonts is at <http://www.ctan.org/tex-archive/info/Free_Math_Font_Survey/survey.html> . There are also commercial LaTeX font sets, including all math fonts, for Times (known as MathTime) and Lucida.
There is also a program called XeTeX that is supposed to have very good support for fonts already installed on your computer. I haven't tried it, though.
|
7
|
https://tex.stackexchange.com/users/386
|
1718
| 1,202
|
https://tex.stackexchange.com/questions/1720
|
7
|
I just found out about the `versions` package here and am interested in using it to hide solutions in a problem set document. Recall that, to create versions block, in the preamble, you need
```
\usepackage{versions}
\excludeversion{sol}
%\includeversion{sol}
```
and, in the document,
```
\begin{sol} ... \end{sol}
```
Here, the blocks labeled "sol" will be excluded.
In my document, I define a new environment "Solution" as
```
\newenvironment{Solution}{\begin{sol} \\ \textbf{Solution: }}{\end{sol}}
```
This construction works perfectly if I instruct LaTeX to include the "sol" blocks, but chokes if I try to exclude them. For example, the following code chokes and gives an `Incomplete \iffalse` error:
```
\documentclass{article}
\usepackage{versions}
\excludeversion{sol}
%\includeversion{sol}
\newenvironment{Solution}{
\begin{sol}\\ \textbf{Solution: }}{
\end{sol}}
\begin{document}
\section{Question 1}
What is $2+2$?
\begin{Solution}
It is $2+2=4$.
\end{Solution}
\end{document}
```
If I change the commenting and include "sol", then this code works as expected. I'm guessing that there's something going on with the way that the versions package works. Any suggestions?
|
https://tex.stackexchange.com/users/758
|
Using versions environment tags inside a new environment definition
| true
|
Don't use `\begin{sol} ... \end{sol}` in the definition of the Solution environment. `\begin ... \end` blocks don't nest very well. Rather, use `\sol ... \endsol`. Thus:
```
\documentclass{article}
\usepackage{versions}
\excludeversion{sol}
%\includeversion{sol}
\newenvironment{Solution}{
\sol\\ \textbf{Solution: }}{
\endsol}
\begin{document}
\section{Question 1}
What is $2+2$?
\begin{Solution}
It is $2+2=4$.
\end{Solution}
\end{document}
```
works.
|
6
|
https://tex.stackexchange.com/users/86
|
1721
| 1,203
|
https://tex.stackexchange.com/questions/1719
|
6
|
In my document (KOMA script article) I use the `listings` package for code listings and the `caption` package for additional control over captions.
My problem is that some listings flow over multiple pages. When this occurs I would like to have something like "Listing n, continued", or something to that effect at the start of each additional page --- so a contination caption.
I know the captions package supports breaking up captions and doing the "continued" stuff, but am unsure how to get the listings package on board. Any ideas?
|
https://tex.stackexchange.com/users/753
|
Listings and continuation captions
| false
|
If you don't find a ready-to-use feature here's an approach using the header: right before the long listing you could use \markboth to add the listings name to the header entry. No matter how long the (perhaps external) file is, the header would show the name, perhaps in addition to the section name.
If you like this approach I could create an example.
|
2
|
https://tex.stackexchange.com/users/213
|
1722
| 1,204
|
https://tex.stackexchange.com/questions/828
|
5
|
Is there a way to determine the height of the current line? More specifically, after the hbox comprising the current line is finalized, I'd like to determine it's height (and perhaps also depth) and write this information to an auxiliary file. The application I have in mind is placing something in the margin which is vertically aligned with the center of the current line, rather than with the baseline of the current line. I'm primarily interested in the case where the current line is a displayed equation.
(This is a more focused version of [this older question](https://tex.stackexchange.com/questions/464/aligning-marginal-notes-with-center-of-line-rather-than-baseline).)
|
https://tex.stackexchange.com/users/203
|
Determining the height of the current line, especially in displayed math
| false
|
There is some discussion along these lines in the TeXbook, appendix D (dirty tricks). For example, set `\vsize` very small so the lines get sent one at a time to the output routine, which can process them and then send them back to the page builder for regular processing (with a normal value of `\vsize` this time). Or, more close to your question, have the output routine write out notes to a file in a first pass, and process those notes on a second pass.
|
3
|
https://tex.stackexchange.com/users/627
|
1723
| 1,205
|
https://tex.stackexchange.com/questions/674
|
98
|
I am submitting a paper to a conference that has a limit of 10 pages. I have edited and edited the text, but the paper still fills 11 pages, and I am reluctant to remove anything. What tricks can I use to make the paper fit in 10 pages?
I know about `\vspace{-1mm}`, but are other and better tricks? How can I squeeze a little bit between lines, around the elements produced by \maketitle, around headlines, etc. in a way that is consistent and does not look too ugly? Is it possible to reduce the font size from 11 points to, say, 10.9?
(This should be community wiki, but I don't have enough rep yet.)
|
https://tex.stackexchange.com/users/35
|
Squeezing scientific paper to fit within page limits
| false
|
Find a long paragraph with only 1 or 2 words on the last line, and say `\looseness=-1` immediately after the last word of the paragraph, to ask tex to try to reset that paragraph a line shorter.
|
31
|
https://tex.stackexchange.com/users/627
|
1724
| 1,206
|
https://tex.stackexchange.com/questions/1725
|
53
|
I need to include some licensing information on the back cover of a free CC-licensed book. Instead of frankly mentioning the license ("This work is licensed under CC-by-nc-sa, Google knows more"), I'd like to have complete information about the rights it gives, i.e. comparable to what the license description says on their [site](http://creativecommons.org/licenses/by-nc-sa/2.5/), both images and text. I imagined the following to be in the code for that:
```
\usepackage{creativecommons}
...
\license[2.5]{by-nc-sa}
...
% images only
\shortlicense[3.0]{by-nc-sa}
```
Does anyone know of a package that makes such licensing notices easier?
|
https://tex.stackexchange.com/users/267
|
How do I generate Creative Commons license information?
| true
|
For typesetting the Creative Commons licence logos you could use the [`cclicenses`](http://ctan.org/pkg/cclicenses) package.
|
18
|
https://tex.stackexchange.com/users/213
|
1726
| 1,207
|
https://tex.stackexchange.com/questions/1727
|
39
|
I have a `scrbook` document with an `openright` option, i.e. every once in a while a blank left page appears in the document. Not that I really want to do this, but how could I include the infamous "This page has been intentionally left blank" in those blank pages cleanly, i.e. without too many hacks?
Bonus points for including a different famous quote on each blank page instead of the dull default ;)
|
https://tex.stackexchange.com/users/267
|
How do I make pages which were "intentionally left blank"?
| true
|
You could redefine `\cleardoublepage`. Here's an example:
```
\documentclass[openright]{scrbook}
\newcommand*{\blankpage}{%
\vspace*{\fill}
{\centering This page would be intentionally left blank if we would not wish to inform about that.\par}
\vspace{\fill}}
\makeatletter
\renewcommand*{\cleardoublepage}{\clearpage\if@twoside \ifodd\c@page\else
\blankpage
\thispagestyle{empty}
\newpage
\if@twocolumn\hbox{}\newpage\fi\fi\fi}
\makeatother
\begin{document}
Text
\chapter{First chapter}
\end{document}
```
`\blankpage` just prints what you like, both vertically and horizontally centered.
|
35
|
https://tex.stackexchange.com/users/213
|
1729
| 1,208
|
https://tex.stackexchange.com/questions/674
|
98
|
I am submitting a paper to a conference that has a limit of 10 pages. I have edited and edited the text, but the paper still fills 11 pages, and I am reluctant to remove anything. What tricks can I use to make the paper fit in 10 pages?
I know about `\vspace{-1mm}`, but are other and better tricks? How can I squeeze a little bit between lines, around the elements produced by \maketitle, around headlines, etc. in a way that is consistent and does not look too ugly? Is it possible to reduce the font size from 11 points to, say, 10.9?
(This should be community wiki, but I don't have enough rep yet.)
|
https://tex.stackexchange.com/users/35
|
Squeezing scientific paper to fit within page limits
| false
|
Is there a lot of math in your document? If you suspect that the blocks of displayed math are taking up too much space (and possibly interfering with natural column/page breaks), then you might want to try these tricks:
* Reducing the font size of only the math environment block
* Allowing breaks within the math environment block
To achieve this, you can define the following commands in the preamble:
```
\newcommand{\startcompact}[1]{\par\vspace{-0.75em}\begin{#1}%
\allowdisplaybreaks\ignorespaces}
\newcommand{\stopcompact}[1]{\end{#1}\ignorespaces}
```
and use them in your document like this:
```
\startcompact{small} % or footnotesize, scriptsize, etc.
\begin{align}
E &= mc^2\\
a^2 + b^2 &= c^2
\end{align}
\stopcompact{small}
```
If you want to allow breaks for *all* displayed math blocks, you can just put `\allowdisplaybreaks` in the preamble on its own;
then to prevent breaks across individual lines, simply use `\\*` instead of `\\`.
This approach works quite well for the IEEE templates.
(I would even argue that the compiled document looks better.)
|
4
|
https://tex.stackexchange.com/users/802
|
1730
| 1,209
|
https://tex.stackexchange.com/questions/1728
|
22
|
Is there a way to access environment variables from within a LaTeX document?
Suppose I define a variable in a batch file:
```
set MY_VAR=HelloWorld
```
How can I programmatically print the string "HelloWorld" inside my LaTeX document, without resorting to creating a new source document with the string in it?
|
https://tex.stackexchange.com/users/802
|
Accessing environment variables within a document
| true
|
You could use the write18 feature. For example:
```
\documentclass{article}
\immediate\write18{echo $MY_VAR > var.tex}
\begin{document}
\input{var}
\end{document}
```
Though, a file var.tex would be automatically created. You may have to enable the write18 feature, for instance by compiling with
```
pdflatex --enable-write18 filename.tex
```
or configuring your editor accordingly.
I just tested this example with the line
```
\immediate\write18{kpsewhich -var-value=TEXMFHOME > var.tex}
```
and got `C:/Users/stefan/texmf` as output in the pdf file.
|
15
|
https://tex.stackexchange.com/users/213
|
1731
| 1,210
|
https://tex.stackexchange.com/questions/741
|
66
|
The first few pages of my document (introductory material) should be numbered using roman numerals. Starting with a specific chapter, the remaining pages should be numbered arabic, starting from one (`1`) again.
*How can i achieve this? Are there any pitfalls i need to look after?*
|
https://tex.stackexchange.com/users/142
|
How to have roman numerals at the beginning of the document?
| false
|
If you are using an article you can use:
```
\pagenumbering{Roman}
\pagenumbering{arabic}
```
|
40
|
https://tex.stackexchange.com/users/795
|
1735
| 1,212
|
https://tex.stackexchange.com/questions/1736
|
133
|
I'm using `titlepage` to create a title/abstract page for a paper, and I don't want a page number to appear, so I use the following fragment:
```
\begin{titlepage}
\clearpage\thispagestyle{empty}
\maketitle
\begin{abstract}
\end{abstract}
\end{titlepage}
```
inside a default article class. While the page number resets correctly (so the second page is labelled '1'), the page number '1' still appears on the first page. I'm sure there's some obvious mistake I'm making here, and would be grateful for some help.
|
https://tex.stackexchange.com/users/103
|
removing page number for title page
| true
|
`\maketitle` sets the page style to `plain`, so you need to move `\thispagestyle{empty}` to *after* `\maketitle`:
```
\clearpage\maketitle
\thispagestyle{empty}
```
|
178
|
https://tex.stackexchange.com/users/226
|
1737
| 1,213
|
https://tex.stackexchange.com/questions/1728
|
22
|
Is there a way to access environment variables from within a LaTeX document?
Suppose I define a variable in a batch file:
```
set MY_VAR=HelloWorld
```
How can I programmatically print the string "HelloWorld" inside my LaTeX document, without resorting to creating a new source document with the string in it?
|
https://tex.stackexchange.com/users/802
|
Accessing environment variables within a document
| false
|
A LuaTeX solution:
```
\edef \myvar{%
\directlua{
tex.sprint(os.getenv('MY_VAR'))
}}
\myvar
```
|
13
|
https://tex.stackexchange.com/users/243
|
1739
| 1,214
|
https://tex.stackexchange.com/questions/1727
|
39
|
I have a `scrbook` document with an `openright` option, i.e. every once in a while a blank left page appears in the document. Not that I really want to do this, but how could I include the infamous "This page has been intentionally left blank" in those blank pages cleanly, i.e. without too many hacks?
Bonus points for including a different famous quote on each blank page instead of the dull default ;)
|
https://tex.stackexchange.com/users/267
|
How do I make pages which were "intentionally left blank"?
| false
|
[`memoir`](http://mirror.ctan.org/macros/latex/contrib/memoir/memman.pdf) has `\cleartooddpage` (and `\cleartoevenpage`) which do just this. Paraphrased from the manual:
>
> A likely example for the optional
> argument is
>
>
>
> ```
> \cleartooddpage[\vspace*{\fill}
> THIS
> PAGE ACCIDENTALLY PRINTED
> ON
> \vspace*{\fill}]
>
> ```
>
> which will put ‘THIS PAGE ACCIDENTALLY PRINTED ON’ in the centre of any potential skipped
> (empty) even numbered page.
>
>
>
|
10
|
https://tex.stackexchange.com/users/344
|
1741
| 1,216
|
https://tex.stackexchange.com/questions/1742
|
68
|
Is it possible to automatically "add" `\left` and `\right` commands in front of all brackets? The source code should be left intact, but LaTeX should interpret every pair of brackets as if they were preceded by such commands. This is because adding `\left` and `\right` commands is time consuming and makes source code longer and less readable. I considered defining new commands such as `\lb` and `\rb` for `\left(` and `\right)`, but it doesn't seem very elegant to me: what if I also want to add square brackets for example?
Any ideas? Thanks.
|
https://tex.stackexchange.com/users/808
|
Automatic left and right commands
| false
|
**Edit:** *I'm leaving this answer up for “academic purposes” but, consider [Lev Bishop's](https://tex.stackexchange.com/questions/1742/automatic-left-and-right-commands/1765#1765) answer for an easier solution than mine.*
---
Over the years I've evolved my own solution which I think turned out quite nice. It gives you a command which you can call like
```
\newdelimcommand{parens}{(}{)}
```
which in turn will define for you a `\parens` command which you can then use as `\parens{thing}` to produce something like `(thing)` where, moreover, the parenthesis automatically resize. In fact you can use the command in three different ways
```
\parens{thing} % automatic resize
\parens*{thing} % no resize
\parens[big]{thing} % use the specified size
```
For the latter option you can use `auto` (the default), `base` (no resize), or one of the sizes: `big`, `Big`, `bigg`, `Bigg`.
Furthermore, inside of `thing` you can use the commands `\ldelim`, `\rdelim`, and `\mdelim` to create even more delimiters with the appropriate size selected by the given options. This allows, for example, to use `\mdelim` to automagically resize a “middle” bar. (See example at the end of the code).
For this to work you have to drop the following code in a .sty file and include it in your main .tex file with `\usepackage`.
```
\RequirePackage{amsmath}
% delim sizing options
\let\delim@autol\left \let\delim@autor\right \let\delim@autom\middle
\let\delim@basel\relax \let\delim@baser\relax \let\delim@basem\relax
\let\delim@bigl\bigl \let\delim@bigr\bigr \let\delim@bigm\big
\let\delim@Bigl\Bigl \let\delim@Bigr\Bigr \let\delim@Bigm\Big
\let\delim@biggl\biggl \let\delim@biggr\biggr \let\delim@biggm\bigg
\let\delim@Biggl\Biggl \let\delim@Biggr\Biggr \let\delim@Biggm\Bigg
% default definitions
\newcommand\ldelim{\relax}
\newcommand\rdelim{\relax}
\newcommand\mdelim{\relax}
% the actual command
\newcommand\delim@command[4]{{% #1 size #2 ldelim #3 rdelim #4 content
\def\ldelim{\csname delim@#1l\endcsname}%
\def\rdelim{\csname delim@#1r\endcsname}%
\def\mdelim{\csname delim@#1m\endcsname}%
\ldelim#2#4\rdelim#3}}
% a factory to define new delimiter commands
\newcommand{\newdelimcommand}[3]{% #1 name #2 ldelim #3 rdelim
\expandafter\newcommand\csname delim@#1@st\endcsname[1]{% ##1 content
\delim@command{base}{#2}{#3}{##1}}%
\expandafter\newcommand\csname delim@#1@ns\endcsname[2][auto]{%
% ##1 size ##2 content
\delim@command{##1}{#2}{#3}{##2}}%
\expandafter\DeclareRobustCommand\csname#1\endcsname{%
\@ifstar{\csname delim@#1@st\endcsname}{\csname delim@#1@ns\endcsname}%
}%
}
% syntactically named delimiters
\newdelimcommand{braces}{\lbrace}{\rbrace}
\newdelimcommand{angles}{\langle}{\rangle}
\newdelimcommand{verts}{\lvert}{\rvert}
\newdelimcommand{Verts}{\lVert}{\rVert}
\newdelimcommand{brackets}{[}{]}
% semantically named delimiters
\newcommand{\set}{\braces}
\newcommand{\abs}{\verts}
\newcommand{\size}{\verts}
\newcommand{\norm}{\Verts}
\newcommand{\tuple}{\angles}
% Automagic `such that' for set comprehension. Inside an automagic
% delimiter command, the vertical bar will resize appropriately
% Example:
% \set{ x \in W \st x > 0 }
\newcommand{\st}{\;\mdelim\vert\;}
```
I've been thinking to eventually release this (and other bits of code) as a proper style file. But for the time being here it is for you to copy&paste. :)
|
22
|
https://tex.stackexchange.com/users/169
|
1744
| 1,217
|
https://tex.stackexchange.com/questions/1743
|
5
|
I am using the gfsneohellenic for my paper (which is in English). I load it using:
```
\usepackage[LGR,T1]{fontenc}
\usepackage[default]{gfsneohellenic}
```
Everything works fine except for capital greek letters! In other words when I use $\Lambda$ instead of using the corresponding lambda in the neohellenic package LaTeX uses Lambda from computer modern!
This is really annoying since computer modern looks quite different from neohellenic and the inconsistency makes my paper look very ugly.
|
https://tex.stackexchange.com/users/809
|
How do I get a proper mathematical \Lambda when using gfsneohellenic?
| false
|
According to the package documentation you should load `cmbright` as well as `gfsneohellenic`. Did you try something like
```
\documentclass{article}
\usepackage{cmbright}
\usepackage[default]{gfsneohellenic}
\begin{document}
\[ \Lambda = \lambda \]
\end{document}
```
|
1
|
https://tex.stackexchange.com/users/73
|
1745
| 1,218
|
https://tex.stackexchange.com/questions/553
|
461
|
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: [“I have used the following packages / classes”](https://tex.meta.stackexchange.com/a/1574/ "TeX Community Polls")
|
https://tex.stackexchange.com/users/86
|
What packages do people load by default in LaTeX?
| false
|
Since my files nowadays has [UTF-8 character encoding](https://en.wikipedia.org/wiki/Utf8), I use this
```
\usepackage[utf8]{inputenc}
```
|
123
|
https://tex.stackexchange.com/users/795
|
1746
| 1,219
|
https://tex.stackexchange.com/questions/553
|
461
|
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: [“I have used the following packages / classes”](https://tex.meta.stackexchange.com/a/1574/ "TeX Community Polls")
|
https://tex.stackexchange.com/users/86
|
What packages do people load by default in LaTeX?
| false
|
To use the palatino font (it's just a nice looking font)
```
\usepackage[sc]{mathpazo}
```
Note that the old `palatino` package is deprecated.
|
28
|
https://tex.stackexchange.com/users/795
|
1747
| 1,220
|
https://tex.stackexchange.com/questions/553
|
461
|
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: [“I have used the following packages / classes”](https://tex.meta.stackexchange.com/a/1574/ "TeX Community Polls")
|
https://tex.stackexchange.com/users/86
|
What packages do people load by default in LaTeX?
| false
|
To make sure you have ISO formated dates (YYYY-MM-DD).
```
\usepackage[english]{isodate}
```
or
```
\usepackage{datetime}
\renewcommand{\dateseparator}{-}
\newcommand{\todayiso}{\the\year \dateseparator \twodigit\month \dateseparator \twodigit\day}
```
|
26
|
https://tex.stackexchange.com/users/795
|
1748
| 1,221
|
https://tex.stackexchange.com/questions/1742
|
68
|
Is it possible to automatically "add" `\left` and `\right` commands in front of all brackets? The source code should be left intact, but LaTeX should interpret every pair of brackets as if they were preceded by such commands. This is because adding `\left` and `\right` commands is time consuming and makes source code longer and less readable. I considered defining new commands such as `\lb` and `\rb` for `\left(` and `\right)`, but it doesn't seem very elegant to me: what if I also want to add square brackets for example?
Any ideas? Thanks.
|
https://tex.stackexchange.com/users/808
|
Automatic left and right commands
| false
|
I use the following newcommands:
```
\newcommand{\of}[1]{\left(#1\right)}
\newcommand{\off}[1]{\left[#1\right]}
\newcommand{\offf}[1]{\left\{#1\right\}}
```
Hence, in the text, `f\of{x}` will appear as `f(x)`, `M\ast\offf{g\off{x}+h\off{x}}` will appear as `M*{g[x]+h[x]}`, etc. with the `\left` and `\right` commands automatically built-in.
|
7
|
https://tex.stackexchange.com/users/nan
|
1749
| 1,222
|
https://tex.stackexchange.com/questions/1750
|
36
|
I want to attach a footnote to each author of a paper and write that their research was supported by different grants. How do I do that? Simply `\footnote` after each author does not work.
|
https://tex.stackexchange.com/users/nan
|
How to write a footnote attached to the author in a LaTeX paper?
| false
|
I think the command you're looking for is `\thanks`
```
\documentclass{article}
\title{My great paper}
\author{One author\thanks{some info} \and Another author\thanks{more info}}
\begin{document}
\maketitle
\end{document}
```
|
34
|
https://tex.stackexchange.com/users/169
|
1751
| 1,223
|
https://tex.stackexchange.com/questions/940
|
105
|
TeX and LaTeX are widely used in Computer Science. What other academic disciplines or professionals use it?
|
https://tex.stackexchange.com/users/356
|
What professions use TeX/LaTeX besides CS?
| false
|
Some computer programmers use it.
1. Layout from content is separated
2. It's pure text so you can use your favourite editor (like vim).
3. Make can be used to bind it together
4. Easy to create LaTeX files with scripts.
More or less, as a programmer you can reuse a lot of tools...
|
10
|
https://tex.stackexchange.com/users/795
|
1752
| 1,224
|
https://tex.stackexchange.com/questions/1742
|
68
|
Is it possible to automatically "add" `\left` and `\right` commands in front of all brackets? The source code should be left intact, but LaTeX should interpret every pair of brackets as if they were preceded by such commands. This is because adding `\left` and `\right` commands is time consuming and makes source code longer and less readable. I considered defining new commands such as `\lb` and `\rb` for `\left(` and `\right)`, but it doesn't seem very elegant to me: what if I also want to add square brackets for example?
Any ideas? Thanks.
|
https://tex.stackexchange.com/users/808
|
Automatic left and right commands
| false
|
Adding `\left` and `\right` to all delimiters is difficult and likely not to yield the desired result in many places.
The [`nath`](http://www.ctan.org/pkg/nath) package aims at making `\left` and `\right` obsolete. From the readme:
>
> delimiters adapt their size to the material enclosed, rendering `\left` and `\right` almost obsolete.
>
>
>
|
26
|
https://tex.stackexchange.com/users/565
|
1753
| 1,225
|
https://tex.stackexchange.com/questions/161
|
111
|
I use revision control (Subversion, to be exact) to keep track of the edits to my LaTeX documents. Is there a LaTeX package that interfaces with revision control? Specifically, it would be nice to see the revision number and time and date inside the document. (Obviously, I'd turn this off in the final version.) Also, it might be nice to get a PDF showing what was added and removed in a given revision.
|
https://tex.stackexchange.com/users/52
|
LaTeX packages for use with revision control
| false
|
To do this I don't use a LaTeX package, but I play with a Makefile and some simple shell scripts. (But that also mean that this is a Unix/Linux/Cygwin hack).
Add something like this a Makefile
```
SVN_INFO=svn.info.tex
svninfo:
$(shell svn info > $(SVN_INFO) )
```
Then add something like this in a .tex file
```
\section{SVN info}
{\scriptsize \verbatiminput{svn.info.tex}}
```
Maybe with a check so you don't get a error if you don't want to include this svn info.
```
\IfFileExists{svn.info.tex}
{
.....
}
```
---
This can be changed to include some kind of diff if you rather would like that.
Add something like this in your Makefile to include a diff between the current version and verison 40.
```
DIFF_INFO=diff.info.tex
DIFF_REV=40
diffinfo:
$(shell svn diff --revision $(DIFF_REV) $(NAME).tex > $(DIFF_INFO) )
```
Then add something like this to your .tex.
```
\IfFileExists{diff.info.tex}
{
\newpage
\begin{landscape}
\section{Diff}
{\scriptsize \verbatiminput{diff.info.tex}}
\end{landscape}
}
```
---
And this can then be enhanced with whatever shell scripts you feel like,
so I don't see any problem doing more or less the same for other systems like git.
/Have fun
|
6
|
https://tex.stackexchange.com/users/795
|
1755
| 1,226
|
https://tex.stackexchange.com/questions/1750
|
36
|
I want to attach a footnote to each author of a paper and write that their research was supported by different grants. How do I do that? Simply `\footnote` after each author does not work.
|
https://tex.stackexchange.com/users/nan
|
How to write a footnote attached to the author in a LaTeX paper?
| true
|
If your document class is `amsart` then the syntax is a bit different
```
\documentclass{amsart}
\title{My great paper}
\author{Fist author}
\thanks{The first author wants to thank someone.}
\author{Second author}
\thanks{The second author wants to thank someone else.}
\begin{document}
\maketitle
\end{document}
```
Note that in the `\thanks` command you have to explicitly mention which information corresponds to which author, since no footnote “marks” will be printed with the acknowledgements. This is apparently the preferred style for AMS as discussed for example at the [The AMS article document class](https://doi.org/10.1007/978-0-387-68852-7_11).
|
26
|
https://tex.stackexchange.com/users/169
|
1757
| 1,227
|
https://tex.stackexchange.com/questions/1756
|
189
|
I have heard a lot about `LaTeX`, but never used it myself.
It is mainly used for typesetting professional research papers. But I am not writing research papers.
Is `LaTeX` for me? If yes, why should I be shifting from `OpenOffice` to `LaTeX`? What does `LaTeX` offer to the normal user who uses word processing software to make all kind of report documents?
|
https://tex.stackexchange.com/users/813
|
Why should I use LaTeX?
| false
|
There are bound to be several answers to this question, and different aspects that people highlight. I'll try to list a few. There are a number of webpages with detail on the reasons to use LaTeX: I'll highlight a few.
LaTeX is a typesetting system, not a word processor. LaTeX uses source code to generate a document: you edit one file and typeset it to a generate the output (usually PDF nowadays). This is in contrast to a word processor, where you edit the text as it appears. For a critique of word processors, look at <http://ricardo.ecn.wfu.edu/~cottrell/wp.html>.
LaTeX does things that word processors do not do but that well-designed published material does do. For example, LaTeX uses a hyphenation algorithm which generates well-spaced out justified paragraphs. It also uses ligatures where applicable, which means that letters which 'go together' look better than if the letter design is all done separately. See for example <http://nitens.org/taraborelli/latex> for more details.
LaTeX is intended to focus on document structure rather than appearance. Of course, some set up is needed to get the correct appearance, but once it is done most of the source you write is focused on structure. For example, there are commands such as `\section` for document structure rather than making everything bold, italic or whatever. This structured approach helps when you want to do things that are repetitive, as the formatting is always taken care of 'behind the scenes'.
There are a large number of add-ons to LaTeX (called packages) that are designed to help with particular tasks. Many of these have an academic focus but this is not true of every package. For example, the [`datatool`](http://ctan.org/pkg/datatool) package can be used to do mail-merging from a list of names and addresses, which is common for business documents.
|
43
|
https://tex.stackexchange.com/users/73
|
1758
| 1,228
|
https://tex.stackexchange.com/questions/1756
|
189
|
I have heard a lot about `LaTeX`, but never used it myself.
It is mainly used for typesetting professional research papers. But I am not writing research papers.
Is `LaTeX` for me? If yes, why should I be shifting from `OpenOffice` to `LaTeX`? What does `LaTeX` offer to the normal user who uses word processing software to make all kind of report documents?
|
https://tex.stackexchange.com/users/813
|
Why should I use LaTeX?
| false
|
Regarding the benefits of LaTeX, some in short:
* LaTeX provides very high quality and is extremely customizable.
* It's extremely stable, no matter how complex the documents are.
* It's free and Open Source, we can study and improve everything as we do on this site.
* LaTeX is portable concerning its implementation, your document source and its output -- all is cross-platform.
* It provides a logical approach to create documents instead of a physical, enhancing consistency.
* Your document is safe because the file format is open and there's no virus threat.
I elaborated these points in this article: [Getting Started with LaTeX](http://www.packtpub.com/article/getting-started-lateX).
If you have questions to any of these points, don't hesitate to ask.
|
47
|
https://tex.stackexchange.com/users/213
|
1759
| 1,229
|
https://tex.stackexchange.com/questions/1756
|
189
|
I have heard a lot about `LaTeX`, but never used it myself.
It is mainly used for typesetting professional research papers. But I am not writing research papers.
Is `LaTeX` for me? If yes, why should I be shifting from `OpenOffice` to `LaTeX`? What does `LaTeX` offer to the normal user who uses word processing software to make all kind of report documents?
|
https://tex.stackexchange.com/users/813
|
Why should I use LaTeX?
| true
|
Superficially, one of the advantages of LaTeX over other more traditional systems (e.g. Word or OpenOffice) is the **high typographical quality of the documents** that you'll be able to produce. This is particularly true for documents that are heavy on mathematics, but documents for [any other area](https://tex.stackexchange.com/questions/940/what-professions-use-tex-latex-besides-cs) could also take advantage of these qualities.
A less obvious advantage, but much more important, is that LaTeX allows you to **clearly separate the *content* from the *format* of your document**. As a writer (scientist, researcher or not), this gives you the opportunity to focus on the “what”, the creative part of your work, rather than the “how” is it going to look printed out in paper (that is the work of LaTeX document class designers).
Now, **you shouldn't use LaTeX** if
* **You don't have time to learn it.** Unlike most other point&click systems, LaTeX
does take some time to learn. There are of course [many guides and tutorials](https://tex.stackexchange.com/questions/11/what-is-the-best-book-to-start-learning-latex)
that can help you with this, but don't try to learn LaTeX if you have, say, less than
24 hours to prepare a manuscript.
* **Your document is already written.** Say, if you have already
written your thesis in Word, there isn't much point in trying to “convert” your
document to LaTeX. You can do it, but the results won't be pretty. LaTeX isn’t just another
document type to “Save-As”, it's a complete system to help you write those documents.
* **What you care about *is* the design of the document.** If you *do* care about creating
your own designs for your documents (rather than the content), LaTeX is perhaps not
the best system for you. There are a number of packages (perhaps most
notably [memoir](http://www.ctan.org/pkg/memoir)) that allow you to customize the look of your document, but things
are not always straightforward. Having said that, if you *are* a designer, of course
we would welcome your help in designing new document classes and templates!
|
150
|
https://tex.stackexchange.com/users/169
|
1760
| 1,230
|
https://tex.stackexchange.com/questions/1756
|
189
|
I have heard a lot about `LaTeX`, but never used it myself.
It is mainly used for typesetting professional research papers. But I am not writing research papers.
Is `LaTeX` for me? If yes, why should I be shifting from `OpenOffice` to `LaTeX`? What does `LaTeX` offer to the normal user who uses word processing software to make all kind of report documents?
|
https://tex.stackexchange.com/users/813
|
Why should I use LaTeX?
| false
|
`plain text`, `programmability` and `highest-quality` output are what make me use LaTeX.
I used to think that for short one-off documents, word processors are better. But since having a wiki live right inside my text editor (I use [orgmode](http://orgmode.org)), this is no longer the case. That is one can use LaTeX as the backend and use wiki markup as the input language.
|
22
|
https://tex.stackexchange.com/users/337
|
1761
| 1,231
|
https://tex.stackexchange.com/questions/1743
|
5
|
I am using the gfsneohellenic for my paper (which is in English). I load it using:
```
\usepackage[LGR,T1]{fontenc}
\usepackage[default]{gfsneohellenic}
```
Everything works fine except for capital greek letters! In other words when I use $\Lambda$ instead of using the corresponding lambda in the neohellenic package LaTeX uses Lambda from computer modern!
This is really annoying since computer modern looks quite different from neohellenic and the inconsistency makes my paper look very ugly.
|
https://tex.stackexchange.com/users/809
|
How do I get a proper mathematical \Lambda when using gfsneohellenic?
| true
|
You could redefine `\Lambda` to use gfsneohellenic:
```
\documentclass{article}
\usepackage[default]{gfsneohellenic}
\usepackage[greek,english]{babel}
\usepackage{amsmath}
\let\CMLambda\Lambda
\newcommand*{\gfs}[2]{\renewcommand*{#1}{\mathalpha{\text{%
\selectlanguage{greek}\textneohellenic{#2}}}}}
\gfs{\Lambda}{L}
\begin{document}
\begin{tabular}{ll}
Neohellenic text: & {\selectlanguage{greek}\textneohellenic{L}} \\
Neohellenic math: & $\Lambda$ \\
Computer Modern: & $\CMLambda$
\end{tabular}
\end{document}
```
I saved the original Computer Modern `\Lambda` in `\CMLambda`. This way it's still accessible for comparing. Here's the output:
For convenience, here's the an example font table of gfshellenic:
I created it using this code:
```
\documentclass{article}
\usepackage{fonttable}
\begin{document}
\fonttable{gneohellenicrg6r}
\end{document}
```
Replace `gneohellenicrg6r` by `cmr9` to see a Roman table. This might help you to get the correspondence that you asked for in your comments.
|
7
|
https://tex.stackexchange.com/users/213
|
1762
| 1,232
|
https://tex.stackexchange.com/questions/1756
|
189
|
I have heard a lot about `LaTeX`, but never used it myself.
It is mainly used for typesetting professional research papers. But I am not writing research papers.
Is `LaTeX` for me? If yes, why should I be shifting from `OpenOffice` to `LaTeX`? What does `LaTeX` offer to the normal user who uses word processing software to make all kind of report documents?
|
https://tex.stackexchange.com/users/813
|
Why should I use LaTeX?
| false
|
With LaTeX, you have the option to control "content" and "presentation" separate. And you should.
You might compare it to HTML+CSS in a modern webpage: the content is stored in the HTML file (pretty much everything after `\begin{document}`), with style tags that control what's the name of the format for the specific element, and CSS (the preamble), where you *define* the styles that will render your document the way you want it - with these font shapes and sizes, with such and such margins, footnotes, etc.
This way, if you decide at a later stage to reformat your document (e.g. different figure caption styles, changed headers and numbering) you would only change this in one place --- in the preamble. All occurrences of the corresponding styles will change automatically.
It's not that you can't do the same in Word or OpenOffice.org, but in these programs it's easier (and pretty much the norm) to get sloppy and just do quick manual formatting with a shortcut instead of using proper style definitions and formatting for all your document elements.
If you've ever struggled formatting a document for two or more printing medias (e.g. two journals with specific stylistic guidelines) or paper formats. If you've ever written anything over 50 pages (think master thesis), and you remember your frustration making everything "just right" --- like table of contents, index, figure and equation numbering, references --- you'd be reborn with LaTeX.
|
32
|
https://tex.stackexchange.com/users/711
|
1763
| 1,233
|
https://tex.stackexchange.com/questions/940
|
105
|
TeX and LaTeX are widely used in Computer Science. What other academic disciplines or professionals use it?
|
https://tex.stackexchange.com/users/356
|
What professions use TeX/LaTeX besides CS?
| false
|
Nobody mentioned engineers --- everybody from my research group (optimization-driven design) is using LaTeX for all our publications, reports, compendiums, lab assignments, etc., despite the fact we're pretty much a Microsoft shop up here.
Some journals in the field, however, started accepting .doc or .odf files as well, much to my frustration. But as long as LaTeX is an option, no way we're switching to something else.
|
49
|
https://tex.stackexchange.com/users/711
|
1764
| 1,234
|
https://tex.stackexchange.com/questions/1742
|
68
|
Is it possible to automatically "add" `\left` and `\right` commands in front of all brackets? The source code should be left intact, but LaTeX should interpret every pair of brackets as if they were preceded by such commands. This is because adding `\left` and `\right` commands is time consuming and makes source code longer and less readable. I considered defining new commands such as `\lb` and `\rb` for `\left(` and `\right)`, but it doesn't seem very elegant to me: what if I also want to add square brackets for example?
Any ideas? Thanks.
|
https://tex.stackexchange.com/users/808
|
Automatic left and right commands
| false
|
The `\DeclarePairedDelimiter` command from [mathtools](http://www.ctan.org/pkg/mathtools) is useful. For example defining an absolute value macro;
```
\DeclarePairedDelimiter\abs{\lvert}{\rvert}
```
gives also a starred version with `\left` and `\right`
```
\abs*{\frac{a}{b}}
```
and the unstarred version takes an optional argument that can be `\big`, `\Big`, etc
```
\abs[\Bigg]{\frac{a}{b}}
```
|
44
|
https://tex.stackexchange.com/users/627
|
1765
| 1,235
|
https://tex.stackexchange.com/questions/553
|
461
|
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: [“I have used the following packages / classes”](https://tex.meta.stackexchange.com/a/1574/ "TeX Community Polls")
|
https://tex.stackexchange.com/users/86
|
What packages do people load by default in LaTeX?
| false
|
I can't live without [`listings`](http://www.ctan.org/tex-archive/macros/latex/contrib/listings/) --- pretty-printing (colours, formatting and all) algorithms and code is indispensable --- in pretty much any programming languages and dialects under the sun. Plus, I can import a source file directly from the repository, and the latest version will be automatically rendered.
|
63
|
https://tex.stackexchange.com/users/711
|
1766
| 1,236
|
https://tex.stackexchange.com/questions/64
|
151
|
A lot of people write makefiles that say something like
```
paper.pdf: paper.tex
pdflatex paper
bibtex paper
pdflatex paper
pdflatex paper
```
To handle re-running TeX to get new/changed references and so forth. Is there a better way to do this?
|
https://tex.stackexchange.com/users/60
|
Tools for automating document compilation
| false
|
There is nothing wrong with Makefiles, the magic is to understand the dependency chain that exist so make don't rerun everything all the time and when he reruns he does this in the right order.
How about a simple example with table of context, that is stored in a .toc file.
So just add .toc as a dependency in the Makefile,
that way it will run twice the first time but only once the following times.
```
NAME=MyTestFile
pdf: $(NAME).toc
pdflatex $(NAME).tex
$(NAME).toc:
pdflatex -draftmode $(NAME).tex
```
And when it is time to to a final version make sure you do a "clean" so everything builds and links together in a correct way.
---
**Update**:
After reading you question (and comment), I will change my answer to.
There is nothing wrong with makefiles but it is not the most optimal solution for all people in all circumstances.
If you don't plan to add some command line magic in your makefile and never plan to script anything at all maybe the makefile method is unnecessary complicated.
But if you plan to use LaTeX in a little bit unorthodox way and with some command line magic, a Makefile will help you a lot.
|
7
|
https://tex.stackexchange.com/users/795
|
1767
| 1,237
|
https://tex.stackexchange.com/questions/1768
|
19
|
I want to compile sections of the article independently. Clearly, I can make their numbers right just by using something like `\setcounter{section}{4}`.
How can I get something like `\ref{VeryUsefulTheorem}` working if the command `\label{VeryUsefulTheorem}` is in another section (i.e., in another TeX file, which is compiled to its own PDF file)?
I'm using the [`hyperref`](https://www.ctan.org/pkg/hyperref) package, and, therefore, inter-document links are clickable. Is it possible to make links to a stuff in a different PDF file clickable?
|
https://tex.stackexchange.com/users/475
|
How to reference another document in LaTeX?
| true
|
Use the [xr](http://ctan.org/pkg/xr) package and [xr-hyper](http://ctan.org/pkg/xr-hyper) if you need hyperref.
If all you want to do is compile selected parts of you document you should \include them and use \includeonly to select which files to compile. This will keep track of references and numbering.
|
14
|
https://tex.stackexchange.com/users/565
|
1769
| 1,238
|
https://tex.stackexchange.com/questions/1118
|
89
|
Why would I need to use version control with my LaTeX documents? I know people who do it, and I've seen questions about it on here and on SO, but I haven't understood what value there is to doing it...
[Maybe this should be CW?]
|
https://tex.stackexchange.com/users/215
|
What are the advantages of using version control (git, etc.) in LaTeX documents
| false
|
I agree with the others,
but the most "non technical" reason is to think about it as "unlimited undo" between the versions that was saved in the VCS.
You can always get a old version back regardless what you do.
This is the meaning of the "automatic backup" that is a little bit tricky to understand.
---
SubVersion is a simple to understand system, that works well for small teams.
Git on the other hand is is more technical advanced and scales better,
but for small teams this is a academical question.
But the point is that any VCS is better than not using this type of systems at all.
|
0
|
https://tex.stackexchange.com/users/795
|
1770
| 1,239
|
https://tex.stackexchange.com/questions/1118
|
89
|
Why would I need to use version control with my LaTeX documents? I know people who do it, and I've seen questions about it on here and on SO, but I haven't understood what value there is to doing it...
[Maybe this should be CW?]
|
https://tex.stackexchange.com/users/215
|
What are the advantages of using version control (git, etc.) in LaTeX documents
| false
|
For why this is needed, look at the other (very good) answers.
I would like to add that I use [DropBox](http://dropbox.com) for my LyX documents. It does pretty much what you would get with a VCS (without branches/merges etc. - but as a single use for a document, you probably won't need it), but it does that automatically. It syncs your files between computers and it makes your documents available to you online.
|
1
|
https://tex.stackexchange.com/users/5
|
1772
| 1,241
|
https://tex.stackexchange.com/questions/1774
|
86
|
How to insert pipe symbol `|` in TeX (LaTeX)?
I have tried this sample with `pdflatex tmp.tex`
```
\documentclass{extarticle}
\begin{document}
\textpipe
\end{document}
```
And it give `undefined control sequence` error
```
This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)
restricted \write18 enabled.
entering extended mode
(./tmp.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, loaded.
(/usr/share/texmf-texlive/tex/latex/extsizes/extarticle.cls
Document Class: extarticle 1996/10/08 v1.0 Non Standard LaTeX document class
(/usr/share/texmf-texlive/tex/latex/base/size10.clo)
(/usr/share/texmf-texlive/tex/latex/base/exscale.sty))
No file tmp.aux.
! Undefined control sequence.
l.3 \textpipe
```
|
https://tex.stackexchange.com/users/816
|
How to insert pipe symbol in (La)TeX?
| true
|
The pipe symbol may be used directly in the input and will produce the desired output if you use T1 font encoding. For example:
```
\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}
Pipe sign: |
\end{document}
```
Output:
Compare these tables to see the difference between the two font encodings: [OT1 (Standard encoding)](http://www.micropress-inc.com/fonts/encoding/ot1.htm) vs. [T1 (Cork encoding)](http://www.micropress-inc.com/fonts/encoding/t1.htm). The OT1 table doesn't contain the pipe symbol, but it can be found in the T1 table. It's position is 7C. With OT1 7C means a wide dash, that's why we get a wide dash instead of the pipe symbol in standard encoding.
See [Special LaTeX characters](http://texblog.net/latex-archive/fonts/symbols/) for some more information.
For using the command `\textpipe` loading a package like `tipa` or `t4phonet` is necessary.
|
67
|
https://tex.stackexchange.com/users/213
|
1775
| 1,242
|
https://tex.stackexchange.com/questions/1774
|
86
|
How to insert pipe symbol `|` in TeX (LaTeX)?
I have tried this sample with `pdflatex tmp.tex`
```
\documentclass{extarticle}
\begin{document}
\textpipe
\end{document}
```
And it give `undefined control sequence` error
```
This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)
restricted \write18 enabled.
entering extended mode
(./tmp.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, loaded.
(/usr/share/texmf-texlive/tex/latex/extsizes/extarticle.cls
Document Class: extarticle 1996/10/08 v1.0 Non Standard LaTeX document class
(/usr/share/texmf-texlive/tex/latex/base/size10.clo)
(/usr/share/texmf-texlive/tex/latex/base/exscale.sty))
No file tmp.aux.
! Undefined control sequence.
l.3 \textpipe
```
|
https://tex.stackexchange.com/users/816
|
How to insert pipe symbol in (La)TeX?
| false
|
As a side note: MikTeX supports using pipes in \input if you supply the flag -enable-pipes. This is useful for calling external programs directly from your document.
Here is an example of getting input from Octave and a listing of the document files:
```
%& -enable-pipes
\documentclass{article}
\usepackage{amsmath}
\newcommand\octave[2][]{%
\input"|octave -qf --eval 'format #1;disp(#2)'"
}
\begin{document}
Foo $\pi \approx \octave{pi}$ bar.
\begin{align}
\pi &\approx \octave[long]{pi} \\
\sqrt 2 &\approx \octave[short]{sqrt(2)} \\
\pi\exp(3\pi) &\approx \octave[short g]{pi*exp(3*pi)}
\end{align}
{\obeylines
List of files:
\input"|ls -l \jobname.*"
}
\end{document}
```
I am using MikTeX on a Linux system. If you are running windows you must make changes to the example accordingly.
|
6
|
https://tex.stackexchange.com/users/565
|
1779
| 1,245
|
https://tex.stackexchange.com/questions/36
|
475
|
I’m interested in the differences and commonalities between the “new” (La)TeX processors:
* [**LuaTeX**](http://www.luatex.org/),
* [**XeTeX**](http://tug.org/xetex/), and
* [**ConTeXt**](http://wiki.contextgarden.net/Main_Page).
Personally, I’ve only used XeTeX so far and without having the time to try out all three systems, I’m having a surprisingly hard time setting them off from one each other.
As I understand it, these systems are actually *very* different in some regards. So I’m explicitly asking for strengths and weaknesses in every-day use (whatever that is), rather than very special scenarios.
(I’ve already asked a [similar question](https://superuser.com/questions/112818/difference-between-xetex-and-luatex) on Super User some time ago.)
|
https://tex.stackexchange.com/users/42
|
Differences between LuaTeX, ConTeXt and XeTeX
| false
|
Joseph Wright's answer sums up the differences very well, I just want to add that luatex is also a scripting language in its own right: when you run the `luatex` executable as `texlua`
(or alternatively, run `luatex --luaonly`) it will behave as a lua script interpreter with a few library additions.
In this mode, no typesetting can be done, but that does not mean it is not useful. For example, as far as I know, this is the only script interpreter with a built-in kpathsea interface. None of the typesetting-related features are exposed, but the other lua functionality in luatex is available to scripts:
* *kpse*, for file searching
* *fontloader*, to investigate font files
* *mplib*, for creating metapost graphics
* *epdf*, to investigate pdf files (still experimental)
Also, some useful lua libraries from the internet have been added:
* *luamd5*, for checksum calculations
* *luasocket*, for network i/o
* *luafilesystem*, for disk i/o
* *slnunicode*, for unicode string processing
* *luazip*, for zipfile input
* *lpeg*, for writing parsers
This scripting capability of luatex is used for some of the scripts in TeXLive 2010, and hopefully this more scripts can be replaced in the future.
|
62
|
https://tex.stackexchange.com/users/89
|
1781
| 1,247
|
https://tex.stackexchange.com/questions/1783
|
4
|
I've finally manged to produce my custom \bibliographystyle (.bst) file. Below is the output (sample) of listed references. Is it possible to remove the comma after the last author (just before the year)? I would also like to get rid of "Literatura" title that is assigned as well. Any help appreciated.
```
Literatura
Abbiati, M., Bianchi, C. N., Castelli, A., 1987. Polychaete vertical zonation along a
littoral cliff in the western Mediterranean. Marine ecology, 8(1): 33–48.
Antoniadou, C., Nicolaidou, A., Chintiroglou, C., 2004. Polychaetes associated with
the sciaphilic alga community in the northern Aegena Sea: spatial and temporal
variability. Helgoland Marine Research, 58: 168–182.
```
|
https://tex.stackexchange.com/users/72
|
remove comma after the last author
| false
|
The heading for the bibliography is stored in \bibname in the standard classes. Try:
```
\renewcommand\bibname{Your title}
```
As for the comma after the author list you will have to check your custom bst file to see where it is coming from.
|
2
|
https://tex.stackexchange.com/users/565
|
1784
| 1,249
|
https://tex.stackexchange.com/questions/1783
|
4
|
I've finally manged to produce my custom \bibliographystyle (.bst) file. Below is the output (sample) of listed references. Is it possible to remove the comma after the last author (just before the year)? I would also like to get rid of "Literatura" title that is assigned as well. Any help appreciated.
```
Literatura
Abbiati, M., Bianchi, C. N., Castelli, A., 1987. Polychaete vertical zonation along a
littoral cliff in the western Mediterranean. Marine ecology, 8(1): 33–48.
Antoniadou, C., Nicolaidou, A., Chintiroglou, C., 2004. Polychaetes associated with
the sciaphilic alga community in the northern Aegena Sea: spatial and temporal
variability. Helgoland Marine Research, 58: 168–182.
```
|
https://tex.stackexchange.com/users/72
|
remove comma after the last author
| false
|
I've found the little bugger. To remove the comma after the last author, I edited these lines in the .bst file (took out 4th line and replaced with with the 5th):
```
FUNCTION {output.nonnull}
{ 's :=
output.state mid.sentence =
%{ ", " * write$ }
{ " " * write$ }
{ output.state after.block =
{ add.period$ write$
newline$
"\newblock " write$
}
{ output.state before.all =
'write$
{ add.period$ " " * write$ }
if$
}
if$
mid.sentence 'output.state :=
}
if$
s
}
```
|
3
|
https://tex.stackexchange.com/users/72
|
1785
| 1,250
|
https://tex.stackexchange.com/questions/1783
|
4
|
I've finally manged to produce my custom \bibliographystyle (.bst) file. Below is the output (sample) of listed references. Is it possible to remove the comma after the last author (just before the year)? I would also like to get rid of "Literatura" title that is assigned as well. Any help appreciated.
```
Literatura
Abbiati, M., Bianchi, C. N., Castelli, A., 1987. Polychaete vertical zonation along a
littoral cliff in the western Mediterranean. Marine ecology, 8(1): 33–48.
Antoniadou, C., Nicolaidou, A., Chintiroglou, C., 2004. Polychaetes associated with
the sciaphilic alga community in the northern Aegena Sea: spatial and temporal
variability. Helgoland Marine Research, 58: 168–182.
```
|
https://tex.stackexchange.com/users/72
|
remove comma after the last author
| true
|
Regarding the "Literatura" title: I suppose you're using babel like
```
\usepackage[slovene]{babel}
```
In that case use `\addto` like:
```
\addto{\captionsslovene}{%
\renewcommand*{\refname}{Bibliography title}%
\renewcommand*{\bibname}{\refname}%
}
```
Depending on your document class either `\refname` (article) or `\bibname` (book, report) would be used. This definition applies to both of them.
|
5
|
https://tex.stackexchange.com/users/213
|
1786
| 1,251
|
https://tex.stackexchange.com/questions/1319
|
976
|
If you were asked to show examples of beautifully typeset documents in TeX & friends, what would you suggest? Preferably documents available online (I'm aware I could go to a bookstore and find many such documents called 'books'). Extra bonus for documents whose LaTeX source is available.
This is not an idle question. Seeing great examples of any craft is both educational and inspiring, let alone explaining why we prefer TeX to Word or other text editors.
For instance, I like how Philipp Lehman's [Font Installation Guide](https://texdoc.org/serve/fontinstallationguide/0) looks. I don't know enough LaTeX to realize how much customization was done, but the ToC looks polished.
Your nominations, please ...
|
https://tex.stackexchange.com/users/564
|
Showcase of beautiful typography done in TeX & friends
| false
|
I really like the documentation of Philipp Lehman. The [Font Installation Guide](http://mirrors.ctan.org/info/Type1fonts/fontinstallationguide/fontinstallationguide.pdf) was mentioned in the question, but I also think for a simpler article (rather than the book style) his package documentation is hard to beat aesthetically, e.g. [`biblatex`'s](http://tug.org/svn/texlive/branches/branch2012/Master/texmf-dist/doc/latex/biblatex/biblatex.pdf?revision=26942&view=co)
In *[biblatex manual [was: Can I make a document that looks like this?]](http://newsgroups.derkeiler.com/Archive/Comp/comp.text.tex/2008-06/msg00210.html)*, the author explains how to recreate this style (fonts and such).
|
31
|
https://tex.stackexchange.com/users/759
|
1787
| 1,252
|
https://tex.stackexchange.com/questions/1159
|
15
|
I'm trying to use `\beginpgfgraphicnamed` to externalise some complex figures in a large document, using the latest released version of TiKZ (2.00). This produces standalone PDF images but for me the graphic is shifted up: the top part of the image is cut off and the bottom part has unnecessary whitespace. The overall PDF that is generated by pdflatex when these externalised images are used has the same visual problem, so I'm having to drop the idea of externalising graphics for now.
As far as I can tell the overall size of the pictures is correct (when comparing to the version without externalisation). *I am using a custom thesis style file that changes margins*, which is probably breaking several of the [`l2tabu`](http://www.ctan.org/tex-archive/info/l2tabu/english/) no-no's.
>
> How does PGF/TiKZ calculate the positioning of pictures on the page, at least as this affects positioning of externalised pictures?
>
>
>
In particular, are there specific things to tweak or to avoid tweaking to ensure this problem does not happen? I'm trying to not embark on a big LaTeX hacking project like redoing the style based on a more modern `documentclass` than `report`, so ways to steer clear of this would be especially welcome.
|
https://tex.stackexchange.com/users/132
|
How does TiKZ calculate positioning of picture on page?
| false
|
To position a picture on the page you could use the `current page` node. Here is an example doing it that way, placing a blue square in the top left corner of the page:
```
\documentclass[svgnames]{report}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[remember picture,overlay]
\node[yshift=-1cm] at (current page.north west) {%
\begin{tikzpicture}[remember picture, overlay]
\draw[fill=LightSkyBlue] (0,0) rectangle (1cm,1cm);
\end{tikzpicture}
};
\end{tikzpicture}
\end{document}
```
|
5
|
https://tex.stackexchange.com/users/213
|
1788
| 1,253
|
https://tex.stackexchange.com/questions/1632
|
51
|
So let's say I have a large amount of documents (from ArXiv.org, suppose) that I have the LaTeX source for, and for which I would like to compile particularly Kindle-friendly versions. In particular, I would like to accomplish some combination of the following things:
* Generate at specifically 1200x824 and/or 600x800 resolution
* Make margins as small as possible since screen real estate is precious on the Kindle
* Generate diagrams directly to 4-bit grayscale (the Kindle will do this conversion anyway, but I have a feeling it will be easier if the diagrams are just generated that way)
* Do not draw boxes around links/references in the paper. These are useful on a computer but they still show up on the Kindle where it's not possible to click or select them anyway.
Does anybody know of the easiest way to apply settings such as these to a large number of document source files?
|
https://tex.stackexchange.com/users/767
|
Creating Kindle-friendly versions of existing LaTeX documents
| true
|
This will only be possible with a *lot* of manual intervention. (Many arXiv documents use plain tex or context or amstex instead of latex. But your question specified latex, so I'll assume that much.)
The main problem is that tex isn't very good at doing fully-automated typesetting. In particular, it will not rebreak displayed equations to fit with your new margins. It also has a pretty perfectionist view of regular text. It will try to set what it thinks is a beautiful paragraph, but if it fails then rather than making a compromise paragraph it will just give up and make an underfull/overfull box for the author to deal with (by rewording the paragraph, by adding explicit `\linebreak`s, by telling tex about additional hyphenations). This isn't a problem when you're editing your own paper, but it's very bad when you want to batch convert a large number of documents in an automatic way. Some tricks are discussed [in this FAQ answer](https://texfaq.org/FAQ-overfull).
However, here are partial solutions to the problems you pointed out.
### Resolution
Tex generates DVI and pdftex generates PDF. Both of these are resolution independent. If you want to convert to a bitmap format, then you can use something like pdf2png (slow) or dvipng (fast).
### Margins
The [geometry](http://www.ctan.org/pkg/geometry) package gives a lot of control of margins.
### Figures in grayscale
Figures on the arXiv will be in a huge variety of formats. EPS, PNG, PDF, not to mention metapost code, PSTricks, PSFrag, and the latex picture environment. The standard formats can all be rasterized to a 4-bit PNG at a decent resolution using something like [GraphicsMagick](http://www.graphicsmagick.org/), but it will likely need manual intervention or some really clever scripting. Once you've got the bitmap, you need to feed it to latex, dealing with the fact that some submissions use latex (which doesn't understand png) and others use pdflatex (which doesn't understand eps), they will use a combination of packages, such as graphics, graphicx, epsfig and various journal classes with their own twists, so there will need to be some intelligent editing of the latex file. For metapost, PSTricks, PSFrag you will need more extensive editing.
### Removing boxes around hyperlinks
This one is relatively easy. In many cases, simply compiling the arXiv tarball will do this already, because the arXiv uses hypertex to add these links, and if you compile with regular tex this won't happen. If the authors used the [hyperref](http://www.ctan.org/pkg/hyperref) you can in many cases remove the `\usepackage` line, or, more safely since maybe the author used some commands from hyperref, add the `colorlinks` option to colour the links instead of drawing boxes (you can set the colour to black if you don't even want to see them that way).
|
20
|
https://tex.stackexchange.com/users/627
|
1790
| 1,254
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.