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/975
|
19
|
<http://www.ctan.org/tex-archive/macros/latex/contrib/hyperref/> has this note copied below:
>
> amsmath
>
> -------------
>
> The environments `equation` and `eqnarray` are not supported too well.
> For example, there might be spacing problems (`eqnarray` isn't recommended
> anyway, see CTAN:info/l2tabu/, the situation for `equation` is unclear,
> because nobody is interested in investigating). Consider using the
> environments that package `amsmath` provide, e.g. `gather` for `equation`.
> The environment `equation` can even redefined to use gather:
>
>
>
> ```
> \usepackage{amsmath}
> \let\equation\gather
> \let\endequation\endgather`
>
> ```
>
>
However, `gather` and `equation` environment have the spacing difference as in the answer by Will in [align vs equation](https://tex.stackexchange.com/questions/321/align-vs-equation). Thus my question:
In a document using both hyperref and amsmath, what is the best replacement for `equation`?
|
https://tex.stackexchange.com/users/337
|
What to do with this hyperref note on amsmath?
| false |
My rule of thumb is to always use `align` everywhere for math. Works with hyperref just fine =)
To suppress too much whitespace do not place a double carridge-return after the environment.
```
bla:
\begin{align}
a^2+b^2=c^2
\end{align}
More text straight away
```
|
0
|
https://tex.stackexchange.com/users/137
|
1059
| 730 |
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 |
Depends on the university I guess. Here in University of Hull only a few engineering and maths professors use LaTeX, there are no LaTeX classes for thesis nor assignments. The LaTeX installation on the machine is from 2004 and hasn't been updated since.
Over the past 4 years I haven't seen a single PhD student use LaTeX. =(
|
7
|
https://tex.stackexchange.com/users/137
|
1060
| 731 |
https://tex.stackexchange.com/questions/1061
|
11
|
My question is along the lines of [How do I ensure that figures appear in the section they're associated with?](https://tex.stackexchange.com/questions/279/how-do-i-ensure-that-figures-appear-in-the-section-theyre-associated-with), but slightly different. I have a figure that occupies a full page. By default, LaTeX wants it to go on the very last page of the document. The previous question was answered with Rob Hyndman's suggestion of using a `\FloatBarrier` from the `placeins` package to demand that it appears before the start of a section. But if I do that, I get a pattern like this:
>
> page (n-1): Section S of text ends halfway down the page.
>
>
> page n: Full-page figure.
>
>
> page (n+1): Section S+1 begins at the top of the page.
>
>
>
This is arguably better than having the figure at the end of the document, but it isn't the behavior I want. What I really want is the full-page figure in the middle, but Section S+1 beginning on page (n-1), so that the text flows normally from page (n-1) to page (n+1), with a page in the middle for the figure. Is there an easy way to achieve this?
The code looks something like this (`\FIGURE` comes from the `JHEP3` class supplied by the Journal of High-Energy Physics, but I don't think this is sensitive to details of that file).
```
\FIGURE[!p]{
\begin{tabular}{cc}
\includegraphics[scale=0.5]{curve1.pdf}&
\includegraphics[scale=0.5]{curve2.pdf}\\
\includegraphics[scale=0.5]{curve3.pdf}&
\includegraphics[scale=0.5]{curve4.pdf}\\
\includegraphics[scale=0.5]{curve5.pdf}&\includegraphics[scale=0.5]{curve6.pdf}\\
\includegraphics[scale=0.5]{curve7.pdf}&\includegraphics[scale=0.5]{curve8.pdf}
\caption{Curves for case A (left), case B (right)}
\end{tabular}
\label{fig: constraints}}
```
|
https://tex.stackexchange.com/users/505
|
Full-page figure without extraneous whitespace in text?
| true |
The [`afterpage`](http://ctan.org/pkg/afterpage) package might be useful here:
```
\usepackage{afterpage}
...
\section{S+1}
\afterpage{\clearpage}
% or \afterpage{\FloatBarrier}
```
|
8
|
https://tex.stackexchange.com/users/213
|
1062
| 732 |
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 |
Those makefile are always a bit difficult, in part because they have to interact with the engine to find out how many compilation runs are necessary, which additional tools need to be run etc. and these steps are usually harder than trivial with makefiles.
That being said, I'd suggest you to try [latex-makefile](http://code.google.com/p/latex-makefile/), which is a make-only solution, which goes long ways to accomplish what's needed. It's not complete, however it's better than most makefile solutions out there, tries covering all generation steps including converting images to right formats and most importantly it supports PDF(La)TeX and Xe(La)TeX out of the box now!
|
3
|
https://tex.stackexchange.com/users/267
|
1063
| 733 |
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 |
In addition to all of the good answers above, users on Windows using MiKTeX can use the `texify` program, which has a number of options to adjust output mode (DVI or PDF), options for BibTeX and MakeIndex and so on.
|
13
|
https://tex.stackexchange.com/users/73
|
1064
| 734 |
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 |
I use [scons](http://scons.org), a python based make tool. Some documents I have contain R code, scons (with rpy2) works well in handling them. I had to program the rules for document creation by myself, but it was basically calling texify.
|
7
|
https://tex.stackexchange.com/users/507
|
1065
| 735 |
https://tex.stackexchange.com/questions/961
|
19
|
I'm looking for a BibTeX style that formats the reference list at the end in the way shown below. The key points are:
* The references are sorted by the (list of) authors, and then each author has a list of references keyed by year.
* Each author has a full line for the name, and then the references for that author are listed below with no name, not even "—"
I'm not too worried about the exact punctuation; if I had any class that sorted by authors, I could hack the punctuation if I had to.
I have seen this style in various books. One modern example is Jech's *Set Theory*, 3rd edition. But I have never found a BibTeX style that generates this kind of output.
---
Example of desired output:
```
Jones, Sam
[2001] "Paper", Journal, etc
[2002] "Other paper", Journal, etc
Lewis, Jo
[1999a] Some book, Publisher, etc
[1999b] "Another paper", Big Journal, etc
```
---
|
https://tex.stackexchange.com/users/386
|
BibTeX style that groups by author
| false |
The `jurabib` style/package is able to do something sort of like this, if you use it with the `bibformat=ibidemalt` option.
```
\usepackage[bibformat=ibidemalt]{jurabib}
```
It will group references by author name but it won't put the year in front of each one.
I would suggest contacting the authors or publishers of books you've seen that use this format, and ask if any of them were prepared using LaTeX and if so, could they point you to a BibTeX style file that does what you want. If not, you could try to prepare a custom style file that does it for you, probably by copying `jurabib.sty` and modifying it. BibTeX uses a wacky language to define styles, but once you spend some time with it, it's not too opaque. (Alternatively: search this site for a mention of biblatex, which might be easier if it works for you)
|
3
|
https://tex.stackexchange.com/users/125
|
1067
| 737 |
https://tex.stackexchange.com/questions/537
|
15
|
I'd like to use the [gentium](http://en.wikipedia.org/wiki/Gentium) font in a LaTeX document, and the instructions I found
[at this site](http://tclab.kaist.ac.kr/ipe/pdftex_3.html) make it look rather difficult.
Is there a simple package that is now available that would allow me to use the gentium font more easily?
|
https://tex.stackexchange.com/users/136
|
Is there a simple way to use the gentium font in latex?
| true |
Posting the XeLaTeX comment as an answer, per suggestion. You just `\setromanfont{Gentium}`.
Note that the font Gentium [doesn't yet](http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&item_id=Gentium_status) have a bold variant, so if you need to use **bold** frequently, it's recommended that you use a different font. (If your interest in Gentium is because of its wide character repertoire, you may want to use a font like Charis SIL. If your interest was in the appearance, then there's a "Gentium Basic" that doesn't include Greek or Cyrillic characters, but has bold variants.) But in practice I found I could use Gentium with Gentium Basic Bold as the bold font, and it looks natural to my eyes (you still won't have bold Greek, of course):
```
\documentclass{article}
\usepackage{fontspec}
\setromanfont[BoldFont={Gentium Basic Bold},ItalicFont={Gentium Italic}]{Gentium}
\begin{document}
Look:\\
Hèllö wőrld: γεντιυμ \textit{Italic} \textbf{Bold}\\
\textbf{Hèllö wőrld}: γεντιυμ \textit{Italic} Bold
\end{document}
```
|
13
|
https://tex.stackexchange.com/users/48
|
1068
| 738 |
https://tex.stackexchange.com/questions/953
|
187
|
I feel as though I have been hearing about the LaTeX3 project for a very long time.
Why is it taking so long for it to come into fruition? Are there major technical difficulties, or is it purely a lack of developers that is causing a bottleneck?
|
https://tex.stackexchange.com/users/136
|
Why is LaTeX3 taking so long to come out?
| false |
When Don Knuth wrote TeX he wanted to create "just a typesetting language" but in response to user demand the macro language grew and grew. He also said that, if at the time he wrote TeX there was "a universal simple interpretive language that was common to other systems, naturally I would have latched onto that right away".
The future in my view is to use TeX or similar as (largely) just a typesetting language, and use another language (Python is my choice), and to largely drop the TeX macro language. After all, no-one except specialists write PostScript by hand today.
The LaTeX 3 project insists on doing almost everything using TeX macros, and the long-standing delay (already over 15 years) is proof not of the difficulty of the task but of the problems in the approach.
The other problem is that to make progress one has to let go of a large amount of legacy code. But this can be done, as is proved by ConTeXt.
|
66
|
https://tex.stackexchange.com/users/176
|
1069
| 739 |
https://tex.stackexchange.com/questions/991
|
17
|
Greyness, or [typographic color](http://en.wikipedia.org/wiki/Typography#Color) is the [apparent blackness of a block of text](http://www.businessdictionary.com/definition/typographic-color.html).
I would be curious how you deal with improving it in TeX. How much can TeX's inherent line-breaking algorithm be fine-tuned to obtain the best solution?
(Edit: Rephrased the question.)
|
https://tex.stackexchange.com/users/359
|
How to obtain perfect greyness with TeX?
| false |
Perfect grayness, for typical text, is possible only at the expense of ugliness somewhere else. Clearly, allowing arbitrary hyphenation will make perfect grayness much easier, and forbidding hyphenation will make it much harder.
Conversely, relaxing grayness would make perfect hyphenation (i.e. none) much easier.
Typography can often be improved by rewriting to fit the context (measure = text width, and location on the page).
TeX's big achievement in line breaking are, in my view, the use of [dynamic programming](http://en.wikipedia.org/wiki/Dynamic_programming), and the care, experience and diligence applied to the many details involved in the problem.
A large part of the art of typesetting is the art of breaking things, but gracefully. Best results will always require an element of hand adjustment, but TeX does a good job automatically, most of the time.
|
13
|
https://tex.stackexchange.com/users/176
|
1071
| 741 |
https://tex.stackexchange.com/questions/851
|
55
|
I'd like to set `$1024 \times 768$` without any space between the three items. Is this possible? If so, how?
E.g., what I get is:
>
> 1024 x 768
>
>
>
and what I want is:
>
> 1024x768
>
>
>
|
https://tex.stackexchange.com/users/27
|
Removing spaces between "words" in math mode
| false |
It seems to me that what you really want is a multiplication sign that works in text mode. You can get this by writing $\times$ or, to answer your whole question
**1024$\times$768**.
By the way, nice question. This is a good example of where it makes sense not to use normal math typography.
|
3
|
https://tex.stackexchange.com/users/176
|
1073
| 742 |
https://tex.stackexchange.com/questions/1072
|
105
|
There exist several types of graphics files, such as jpeg eps pdf png tif jif. Some work with LaTeX + Dvips and some work with PDFLaTeX. How to know which type is for which processor?
Just to confuse matters, metapost produces .eps files, but I can use these with PDFLaTeX as long as I put in a four line incantation.
Can anyone explain this?
|
https://tex.stackexchange.com/users/511
|
Which graphics formats can be included in documents processed by LaTeX or PDFLaTeX?
| false |
This is not an answer to the question *as asked*, but I think it may be of use to those trying to work out which format to use and how to select it.
If you are using the [graphicx](http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=graphicx) package and your intention is to be flexible (in that you want to be able to produce different output formats from the same source file) then there is a simple way to avoid having to know which to use: if you leave off the file extension in the `\includegraphics` command then it selects the best one available according to the mode. Thus if you've got the `.eps` and the `.pdf` versions of the graphic available, then `latex + dvips` will choose the `.eps` whilst `pdflatex` will choose the `.pdf`. The command is:
```
\includegraphics{MonaLisa}
```
Which one it chooses is even customisable: there's a list of extensions for each output type and it goes through the list until it finds a file that exists. Redefining that list changes the priorities. The list is stored in a comma-separated macro called `\Gin@extensions` so redefining that will change the order. Here's a simple way to ensure that `.pdf` is selected first when producing PDF output (since, oddly, the list for PDF output starts with `.png`):
```
\documentclass{article}
\usepackage{ifpdf}
\ifpdf
\PassOptionsToPackage{pdftex}{graphicx}
\fi
\usepackage{graphicx}
\ifpdf
\makeatletter
\let\orig@Gin@extensions\Gin@extensions
\def\Gin@extensions{.pdf,\orig@Gin@extensions} %prepend .pdf before .png
\makeatother
\fi
\begin{document}
\includegraphics{pullback}
\end{document}
```
For actually converting between formats, there are of course many ways to do that. TeXLive comes with a program `epstopdf` which converts an `.eps` file to a `.pdf` and there is even a LaTeX package [epstopdf](http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=epstopdf-pkg) which will attempt to do the conversion for you (assuming that PDFTeX is allowed to do shell escapes) if it detects an `.eps` image!
For commandline conversion (ie on a U\*nx system, including MacOSX), ghostscript can easily convert back and forth and comes with two scripts `pdf2ps` and `ps2pdf` that will do the conversion and the `netpbm` tools can convert between PDF, PS and lots of other graphics formats (of course there are many other such tools).
Thus by ensuring that you have each type of the image in the directory, you can be ensure that latex will pick up the right one for the right output.
|
19
|
https://tex.stackexchange.com/users/86
|
1074
| 743 |
https://tex.stackexchange.com/questions/1072
|
105
|
There exist several types of graphics files, such as jpeg eps pdf png tif jif. Some work with LaTeX + Dvips and some work with PDFLaTeX. How to know which type is for which processor?
Just to confuse matters, metapost produces .eps files, but I can use these with PDFLaTeX as long as I put in a four line incantation.
Can anyone explain this?
|
https://tex.stackexchange.com/users/511
|
Which graphics formats can be included in documents processed by LaTeX or PDFLaTeX?
| true |
Formats that work with LaTeX (`dvi` mode, using `dvips`):
* `eps`
Formats that work with LaTeX (`dvi` mode, using [`dvipdfm`](http://gaspra.kettering.edu/dvipdfm/)([`x`](http://project.ktug.or.kr/dvipdfmx/))):
* `pdf`
* `png`
* `jpeg`
* `eps`
Formats that work with pdfLaTeX (`pdf` mode):
* `eps`(\*)
* `pdf`
* `png`
* `jpeg`
* [`jbig2`](https://en.wikipedia.org/wiki/JBIG2)
LuaTeX can also read
* [`jpeg 2000`](https://en.wikipedia.org/wiki/Jpeg2000)
The reason for this way of working is that in `dvi` mode TeX simply leaves a space for the graphics. `eps` are included in the output by `dvips`.
pdfLaTeX includes graphics directly in the `pdf`, using the features available in that format. The `pdf` format can include other `pdfs` (no surprise), `png`, `jpeg`, `jpeg2000` and `jbig2` graphics.
(\*) Although pdfTeX can't incorporate `eps` files directly, the set up in a modern TeX system will automatically convert them to `pdf`, and thus they are supported in practice.
XeTeX always uses the `xdvipdfmx` driver so has the same outcomes as using `dvipdfmx` with a classical DVI-based route.
---
Note that the LaTeX `graphics` package and associated helper code will search automatically for appropriate file extensions. As a result the extension should be *omitted* when including a graphic, for example
```
\includegraphics{foo}
```
for a file `foo.eps`. With a recent TeX system this will allow *e.g.* pdfLaTeX to auto-convert and `.eps` file to PDF format and find it 'auto-magically'.
|
101
|
https://tex.stackexchange.com/users/73
|
1075
| 744 |
https://tex.stackexchange.com/questions/1072
|
105
|
There exist several types of graphics files, such as jpeg eps pdf png tif jif. Some work with LaTeX + Dvips and some work with PDFLaTeX. How to know which type is for which processor?
Just to confuse matters, metapost produces .eps files, but I can use these with PDFLaTeX as long as I put in a four line incantation.
Can anyone explain this?
|
https://tex.stackexchange.com/users/511
|
Which graphics formats can be included in documents processed by LaTeX or PDFLaTeX?
| false |
Nowadays everything is actually very simple. In essence, you only need to worry about three different file formats:
* PDF for vector graphics
* JPEG for photos
* PNG for other kinds of raster graphics.
pdflatex supports *all* of these, and virtually any graphics file can be converted to one of these formats.
And pdflatex not only supports these, but it does it extremely well. For example, a JPEG file is included in the resulting PDF file *as is*. It is not uncompressed and re-compressed; nothing is lost, and you know that including a 100 KB JPEG file in your document will enlarge the resulting PDF file by exactly 100 KB.
(With tools such as latex + dvips + ps2pdf, all bets are off; typically you will get huge PDF files or low-quality re-compressed JPEG files or both. But fortunately nowadays you can use almost always pdflatex instead of latex.)
|
36
|
https://tex.stackexchange.com/users/100
|
1076
| 745 |
https://tex.stackexchange.com/questions/438
|
4
|
Why doesn't the following code work? From [a failed, now fixed, SO answer](https://stackoverflow.com/questions/3282319/correct-way-to-define-macros-etc-ie-in-latex/3285603#3285603) of mine:
```
\documentclass{article}
\usepackage{expl3}
\ExplSyntaxOn
\newcommand\latinabbrev[1]{
\peek_meaning:NTF . {% Same as \@ifnextchar
#1\@}
{ \peek_charcode:NTF a {% Check whether next char has same catcode as \'a, i.e., is a letter
#1.\@ }
{#1.\@}}}
\ExplSyntaxOff
%Omit final dot from each def.
\def\cf{\latinabbrev{cf}}
\begin{document}
Knuth, \cf The TeXbook.
\end{document}
```
This code should check the next character to see if it is a dot (so the code shouldn't insert another dot, and it should space the coming dot as if it at the end of a sentence), or catcode 10 (then it should insert a dot and a space), or something else (then it should insert a dot).
Although the other two branches seem to work, the `\peek_charcode:NTF` never seems to take its true branch, e.g., in the `\cf T` case. Why not?
|
https://tex.stackexchange.com/users/175
|
How to test whether next token on input stream is catcode 10
| false |
Use \futurelet. It's a TeX primitive, and it's the only way to do this sort of thing. In fact, that's why it was introduced.
The LaTeX 3 stuff uses \futurelet under the hood, and to my way of thinking makes things more complicated and considerably slower.
If you understand this you can solve the problem yourself (except perhaps for the problem of getting a space token into the \test macro).
```
$ tex
This is TeX, Version 3.1415926 (TeX Live 2009)
**\relax
*\def\test{\message{\ifcat\tmp_YES\else NO\fi}}
*\futurelet\tmp\test a
NO
*\futurelet\tmp\test _
YES!
Missing $ inserted.
```
|
5
|
https://tex.stackexchange.com/users/176
|
1077
| 746 |
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 |
I'm a UK based psychology PhD student. I'm using LaTeX for my dissertation and use Beamer for presentations. The only other person using it in my department trained as an econometrician. I'm forced to use MS Word for journal articles as a) coauthors generally use it, and b) most journals only accept .doc or .rtf.
|
9
|
https://tex.stackexchange.com/users/515
|
1079
| 747 |
https://tex.stackexchange.com/questions/537
|
15
|
I'd like to use the [gentium](http://en.wikipedia.org/wiki/Gentium) font in a LaTeX document, and the instructions I found
[at this site](http://tclab.kaist.ac.kr/ipe/pdftex_3.html) make it look rather difficult.
Is there a simple package that is now available that would allow me to use the gentium font more easily?
|
https://tex.stackexchange.com/users/136
|
Is there a simple way to use the gentium font in latex?
| false |
While the XeLaTeX way is probably easier, if you wanted to stick with pdflatex, you could try the [fontinst](http://ctan.org/pkg/fontinst) tool for creating the necessary package.
|
1
|
https://tex.stackexchange.com/users/411
|
1080
| 748 |
https://tex.stackexchange.com/questions/53
|
72
|
As opposed to LaTeX, which is addressed in another question.
Most of the references I've seen get too complex too quickly. I'm looking for something that gives me a top-down view of the language - what the parts of a document are and how (and when) each is processed before proceeding to infinite detail like character classes (e.g.). Something heavily example-based, with real-world examples, would be helpful as well. I just find the language incredibly obscure and difficult to grok.
|
https://tex.stackexchange.com/users/76
|
What is the best way to learn TeX?
| false |
TeX has several components, including (1) typesetting (2) fonts and (3) macros.
Often, it is macros that people have the most difficulty with. For this there are some key concepts, such as the token stream and the action of the expansion of macros.
The expansion of a macro edits the stream of tokens. This is a key concept. Try running some very simple macros with `\tracingall` on.
A good lesson would be to read through and understand the output of
```
$ tex '\relax \tracingall \input story \end'
```
|
8
|
https://tex.stackexchange.com/users/176
|
1081
| 749 |
https://tex.stackexchange.com/questions/49
|
257
|
I know LaTeX and I've heard that LaTeX is a set of macros in TeX.
But what does it exactly mean?
|
https://tex.stackexchange.com/users/69
|
What is the difference between TeX and LaTeX?
| false |
Don Knuth provide both the TeX typesetting program and the plain TeX macros (the file plain.tex).
TeX the program does the typesetting. The preloaded macros (and the input documents, of course) control what is typeset.
Typically, the macros and input document place items on a horizontal list and then, when the \par command (for example, a blank line) is issued TeX the program breaks the paragraphs into lines.
If you run TeX with \tracingall you can see what are macros and what are TeX commands. I suggest you try this with
```
$ tex '\relax \tracingall \input story \end'
```
rather than a LaTeX document. LaTeX does a lot of macro processing, particularly for font selection.
|
17
|
https://tex.stackexchange.com/users/176
|
1083
| 750 |
https://tex.stackexchange.com/questions/451
|
218
|
I'm quite happy hacking TeX macros and cobbling together bits and pieces from different style files to suit my own ends, but I have a suspicion that my resulting hacks are not quite as elegant as they could be. In particular, with regard to when to expand and when not to expand macros.
A common occurrence for me is defining a meta-command that defines a whole slew of sub-commands. So the *names* of the sub-commands will contain parameters depending on the parameter passed to the meta-command, and the *contents* of the sub-commands will also vary a little depending on what the meta-command got. Often it won't be a direct substitution but rather a "if `#1` is `a` do `\this` else do `\that`", but `\this` and `\that` need expansion at define time, not call time.
Here's a very simple example just involving direct substitution:
```
\def\cohtheory#1{
\expandafter\newcommand\expandafter{\csname #1func\endcsname}[1][*]{%
\MakeUppercase{#1}^{##1}}
}
```
Sometimes I worry that my commands are more complicated than they need be. For example, if I want to call a command with two arguments and the arguments expand before the command, here's how I've coded it:
```
\expandafter
\expandafter
\expandafter
\command\expandafter
\expandafter
\expandafter
{\expandafter
\argone
\expandafter
}\expandafter
{\argtwo}
```
So I'm looking for guidance on when and how to control expansion in defining macros. I strongly suspect that such cannot be given in a simple answer, so to make this a focussed question, let me phrase it thus:
>
> Where's a good reference for writing TeX macros that includes advice on how to best deal with how to handle expansions?
>
>
>
Of course, if anyone can formulate some advice in short answer, I'd be only to happy to read it.
(Note: this was partially motivated by juannavarroperez's adaptation of my answer to [this question](https://tex.stackexchange.com/questions/48/how-can-i-specify-a-long-list-of-math-operators) where over 20 `\expandafter`s got condensed down to just 1!)
|
https://tex.stackexchange.com/users/86
|
When to use \edef, \noexpand, and \expandafter?
| false |
For the particular problem of creating control sequences dynamically, I suggest you use something like
```
\def\csarg #1{%
\begingroup
\expandafter
\endgroup
\expandafter #1\csname
}
```
You use it like
```
\csarg\mycommandbuilder <whatever> \endcsname
```
You can even use it like this
```
\csarg\mycommandbuilder <whatever> \expandafter\endcsname
\csname <whatever2> \expandafter\endcsname
\csname <whatever3> \endcsname
```
However, take care with the spaces. The above code constructs control sequences that have spaces in their names!
|
10
|
https://tex.stackexchange.com/users/176
|
1084
| 751 |
https://tex.stackexchange.com/questions/624
|
12
|
Inspired by a part of [this question](https://tex.stackexchange.com/questions/615/where-can-i-find-a-datasheet-document-class-or-a-tutorial-on-how-to-create-one), this seemed like an interesting question to ask. Advocates of LaTeX often say that you can see the difference in typesetting quality when you look at a document prepared with LaTeX and compare it to something prepared in, say, MS Word. I certainly don't dispute this; I can often tell, but it's hard to put my finger on exactly why. So what are these differences? What are the distinctive features that make a document look like it was prepared in LaTeX, rather than some other system? In other words, if I have a PDF file and I would like to make an educated guess as to whether it was created in LaTeX or not, what should I be looking for? (ignoring any PDF metadata that identifies the creator)
I have my own ideas about this but I'll refrain from self-answering, at least for now, to see what other people may suggest.
|
https://tex.stackexchange.com/users/125
|
How can I recognize documents prepared in (La)TeX?
| false |
* Proper small caps
* Optical Sizes (small text looks more robust and headlines look more skinny)
* Floated figures with proper figure captions
* Whitespace (noobs will get this wrong however)
* Wide use of numerical cross-references (word processors make this cumbersome to use)
* Margin Kerning
* Text blocks centered vertically on the page
* Lines on opposing pages not on the same baseline
* Sentence spacing. Longer space after period (not with `\frenchspacing`)
* General consistency
|
4
|
https://tex.stackexchange.com/users/368
|
1086
| 752 |
https://tex.stackexchange.com/questions/624
|
12
|
Inspired by a part of [this question](https://tex.stackexchange.com/questions/615/where-can-i-find-a-datasheet-document-class-or-a-tutorial-on-how-to-create-one), this seemed like an interesting question to ask. Advocates of LaTeX often say that you can see the difference in typesetting quality when you look at a document prepared with LaTeX and compare it to something prepared in, say, MS Word. I certainly don't dispute this; I can often tell, but it's hard to put my finger on exactly why. So what are these differences? What are the distinctive features that make a document look like it was prepared in LaTeX, rather than some other system? In other words, if I have a PDF file and I would like to make an educated guess as to whether it was created in LaTeX or not, what should I be looking for? (ignoring any PDF metadata that identifies the creator)
I have my own ideas about this but I'll refrain from self-answering, at least for now, to see what other people may suggest.
|
https://tex.stackexchange.com/users/125
|
How can I recognize documents prepared in (La)TeX?
| false |
Lines that are too long. Sad but true.
If you use virtually any word processor to produce fully justified text, they will simply add arbitrarily long inter-word spaces to do that. Latex avoids that, it gives up, outputs a warning and produces a document with a line that is too long.
Of course authors should read the warnings and fix the problem (or at the very least have a look at the final PDF file before sending it to the publisher). Anyway, it is very common to see Latex-prepared articles in conference proceedings with overfull lines.
|
9
|
https://tex.stackexchange.com/users/100
|
1087
| 753 |
https://tex.stackexchange.com/questions/826
|
241
|
How can I make LaTeX use symbols (\*, †, ‡, and so on) instead of numbers to mark footnotes? (The numbers are confusing because I use superscripted numbers for citations.)
|
https://tex.stackexchange.com/users/35
|
Symbols instead of numbers as footnote markers
| false |
You may also want to reset the footnote counter for each page. People are not familiar with the symbols beyond the double dagger, and more than (at most) 16 footnotes in a single chapter will result in an error message. To reset the counter per page, either use the footmisc option `perpage` or the following code:
```
\usepackage{perpage}
\MakePerPage{footnote}
```
|
39
|
https://tex.stackexchange.com/users/510
|
1088
| 754 |
https://tex.stackexchange.com/questions/1085
|
18
|
While writing articles about algebraic topology, I have had to typeset spectral sequences. These are tools for calculating homology and cohomology. Examples appear on page 10 of [this book](http://www.math.cornell.edu/~hatcher/SSAT/SSch1.pdf) by Hatcher.
So far I've typeset these using xypic, but I'm not completely satisfied with this. It doesn't produce the best-looking spectral sequences, I have difficulty creating arrows leaving or entering the visible part of the page and I haven't figured out yet how to shade the background in a checkerboard style (or any other style), which is sometimes useful if your page contains many zeroes. An alternative is Tilman Bauer's package, but I don't really like the "turtle"-approach, moving a cursor between entries and dropping characters.
My questions are: Are there other methods for typesetting spectral sequences? What is, in your opinion, the "best" one? Do you have any tips for typesetting spectral sequences?
|
https://tex.stackexchange.com/users/517
|
What is the best way to typeset spectral sequences?
| false |
As long as there's no good package specialized in spectral sequences I would use
* TikZ with its nodes and arrows,
* its matrix library and a matrix of math nodes,
* also shapes and colors are no problem with TikZ.
Here's a very simple demo example which you could extend:
```
\documentclass{article}
\usepackage{tikz}
\usepackage{dsfont}
\usetikzlibrary{matrix}
\newcommand*\Z{\mathds{Z}}
\newcommand*\ZZ{|[draw,circle]| \Z_2}
\begin{document}
\begin{tikzpicture}
\matrix (m) [matrix of math nodes,
nodes in empty cells,nodes={minimum width=5ex,
minimum height=5ex,outer sep=-5pt},
column sep=1ex,row sep=1ex]{
& & & & \\
1 & \ZZ & 0 & \ZZ & \\
0 & \Z & \ZZ & 0 & \\
\quad\strut & 0 & 1 & 2 & \strut \\};
\draw[-stealth] (m-3-3.north west) -- (m-2-2.south east);
\draw[thick] (m-1-1.east) -- (m-4-1.east) ;
\draw[thick] (m-4-1.north) -- (m-4-5.north) ;
\end{tikzpicture}
\end{document}
```
Output:
|
16
|
https://tex.stackexchange.com/users/213
|
1089
| 755 |
https://tex.stackexchange.com/questions/472
|
52
|
I often want to have more than one index in a longer LaTeX document. For instance, I might want a general concept index, an index of named persons, and an index of symbolism. How can I have two or more distinct indexes in LaTeX?
|
https://tex.stackexchange.com/users/93
|
How can I have two or more distinct indexes?
| false |
One problem with `multind` is that the index heading(s) will not be formatted corresponding to your other chapter (or section) headings but simply with `\Large\bf`.
If you want multiple indexes that respect the general formatting of your document class (and also work with other than the standard classes), use the [`splitidx`](http://www.ctan.org/pkg/splitindex) package.
|
12
|
https://tex.stackexchange.com/users/510
|
1090
| 756 |
https://tex.stackexchange.com/questions/633
|
75
|
I would really love to have a software or tool which provided real time compilation of my LaTeX document (to be able to see the final pdf or dvi document as I type the latex code), especially for when I am drawing pictures using tikZ. So far, I know of two things, but none of them work for me. They are:
* **[KtikZ](http://www.hackenberger.at/blog/ktikz-editor-for-the-tikz-language)**: This is only for tikZ, which would be perfect for me, but unfortunately as far as I know it only works with Ubuntu and Debian, and I use Mac OS X (so I have never actually tried it, though I did dig a lot to see whether I would be able to install on my mac and from what I see it is really what I want - I am even considering installing Ubuntu just to use it!).
* **[WhizzyTeX](http://cristal.inria.fr/whizzytex/)**: This is a minor mode for Emacs. It was extremely hard to get it to work on the mac (see my quest [here](https://stackoverflow.com/questions/3025890/can-i-install-whizzytex-for-emacs-on-a-mac-is-mac-os-x-a-unix-environment)), and it is not all that fast. The speed is not all that big of a deal for me, but the fact that it does not work with tikZ pictures is (the nodes all collapse in one point so that the words are all one on the top of the other).
So my question is: is there a software ideally like KtikZ or another type of editor which provides real-time compilation and that I can use on my mac? I guess if you know of a Windows/Linux option I would also like to know, and the same for a way to set up a script to get the document compiled every 5 seconds or so (I am sure I have seen this written somewhere, but I don't know whether I can do it with a mac or whether it is editor/pdf viewer dependent), but what I really want is a software/tool which would work with a mac.
To be clear, I am not after something like LyX, that is, I am not after a WYSIWYG-type thing, but rather something where I can type real LaTeX and see my code, but have at the same time another window showing me the pdf (or dvi) file compiled.
|
https://tex.stackexchange.com/users/14
|
Is there any way to get real-time compilation for LaTeX?
| false |
Linux has a relatively new editor called [Gummi](https://github.com/alexandervdm/gummi) that gives real-time output. Unfortunately it has crashed a few times for me (which is a few times too many). I plan to watch this editor closely as it becomes more stable.
I currently use Ktikz to edit my LaTeX documents in real-time. By default only tikz pictures are compiled, but by simply writing an empty template with the text
```
<>
```
ktikz will compile an entire LaTeX document.
|
16
|
https://tex.stackexchange.com/users/520
|
1091
| 757 |
https://tex.stackexchange.com/questions/999
|
14
|
What is the recommended way to keep my TeX Live installation up to date? Is there any package manager (like MiKTeX on Windows) that could help me with this?
If it helps I'm running on Mac OS X and my installation comes from MacTeX, but I guess solutions for other \*nix systems might also be useful.
|
https://tex.stackexchange.com/users/169
|
How to keep my TeX Live installation up to date?
| false |
If you have installed the full MacTeX, it comes with a extra application called "TeX Live Utility.app" which is a GUI version of tlmgr. In fact it looks very similar to Fink Commander and you can read the info pdf right there.
|
4
|
https://tex.stackexchange.com/users/342
|
1093
| 758 |
https://tex.stackexchange.com/questions/1092
|
328
|
Debian and Ubuntu have very good texlive packaging. But I'd like to use `tlmgr` to have a more fine-grained control about upgrades and which packages I want to be installed.
So how do I install "vanilla" TeXLive on Debian/Ubuntu?
Also how do I make `dpkg` aware that I have TeXLive installed?
|
https://tex.stackexchange.com/users/137
|
How to install "vanilla" TeXLive on Debian or Ubuntu?
| true |
Use the net installer script from [this page on the official tug.org website](http://tug.org/texlive/acquire-netinstall.html) to install “vanilla” TeXlive.
Tricking Ubuntu into satisfying the package dependencies is more involved and requires using the equivs package. There are basic guidelines for doing so [in this post on TeXblog](http://texblog.net/latex-archive/linux/kile-texlive-2008-equivs/) (an unofficial blog). (This page is a bit old and was aimed at older versions of Ubuntu.) The package list there is a bit old, but the same overall procedure should still work. I’m afraid I don’t have a list offhand of what the dummy package should contain; maybe someone else will. (You can always just create new dummy packages as need be if you try to install something it tells you you have unsatisfied texlive dependencies.)
|
87
|
https://tex.stackexchange.com/users/411
|
1094
| 759 |
https://tex.stackexchange.com/questions/885
|
78
|
I need to generate documents from a web application and would like to do this using the Python language and LaTeX, are there any tools that will help me?
**Edit**
This Application will be hosted on Linux, we can run any external commands using popen, there is currently no defined input document format, nor any storage format, but output to the end user should be PDF.
**Edit 2**
These documents will have complex tables, graphs, and require typeset equations - hence the reason to use LaTeX. We would also prefer not to use intermediate files such as xml->html->pdf
Ideally I would like something like pyTeX or plasTeX that could render directly to PDF.
|
https://tex.stackexchange.com/users/43
|
How can I use LaTeX from Python.
| false |
Where does the data for the PDF you want to generate come from? A database?
I ask because (despite being a big Python fan) I once used PHP to generate a latex file with data populated from a database (this was for a very small conference proceedings). It's a bit messy, but works reasonably well; you can easily intermingle PHP code which pulls from the database with latex source, in the same way that you can mix PHP with HTML. Then just compile the resulting latex file to get a PDF.
|
2
|
https://tex.stackexchange.com/users/490
|
1096
| 760 |
https://tex.stackexchange.com/questions/326
|
100
|
Aside from CTAN, what are good resources/repositories for Latex templates? In particular, I'm looking for some pretty Thesis templates (I'm familiar with classicthesis)
|
https://tex.stackexchange.com/users/171
|
LaTeX templates for writing a thesis
| false |
In my case, I actually found it easiest to roll my own using the memoir package as a base. It's very well documented, and setting the appropriate margins, double/one-half line spacing, etc. was very easy. And it makes it easy to play around a bit within the thesis guidelines, for instance making fancy chapter headings.
|
32
|
https://tex.stackexchange.com/users/490
|
1097
| 761 |
https://tex.stackexchange.com/questions/1085
|
18
|
While writing articles about algebraic topology, I have had to typeset spectral sequences. These are tools for calculating homology and cohomology. Examples appear on page 10 of [this book](http://www.math.cornell.edu/~hatcher/SSAT/SSch1.pdf) by Hatcher.
So far I've typeset these using xypic, but I'm not completely satisfied with this. It doesn't produce the best-looking spectral sequences, I have difficulty creating arrows leaving or entering the visible part of the page and I haven't figured out yet how to shade the background in a checkerboard style (or any other style), which is sometimes useful if your page contains many zeroes. An alternative is Tilman Bauer's package, but I don't really like the "turtle"-approach, moving a cursor between entries and dropping characters.
My questions are: Are there other methods for typesetting spectral sequences? What is, in your opinion, the "best" one? Do you have any tips for typesetting spectral sequences?
|
https://tex.stackexchange.com/users/517
|
What is the best way to typeset spectral sequences?
| false |
I'm not a user of spectral sequences (although I know what they are and what they look like). Here is a sort of meta-answer. For TeX articles on the [arXiv](http://www.arxiv.org) you can download the TeX source. So when you see a nicely typeset spectral sequence, look for the paper on the arXiv, download the source and see how its done.
|
12
|
https://tex.stackexchange.com/users/176
|
1098
| 762 |
https://tex.stackexchange.com/questions/885
|
78
|
I need to generate documents from a web application and would like to do this using the Python language and LaTeX, are there any tools that will help me?
**Edit**
This Application will be hosted on Linux, we can run any external commands using popen, there is currently no defined input document format, nor any storage format, but output to the end user should be PDF.
**Edit 2**
These documents will have complex tables, graphs, and require typeset equations - hence the reason to use LaTeX. We would also prefer not to use intermediate files such as xml->html->pdf
Ideally I would like something like pyTeX or plasTeX that could render directly to PDF.
|
https://tex.stackexchange.com/users/43
|
How can I use LaTeX from Python.
| false |
Depending on what you want to do, [Sphinx](http://sphinx.pocoo.org/contents.html) may suit you. I think its the best Python-based tool for technical documentation, and it supports restructured text.
|
8
|
https://tex.stackexchange.com/users/176
|
1099
| 763 |
https://tex.stackexchange.com/questions/867
|
62
|
Is there any way to include Python code in a LaTeX file and automatically color its syntax? Is it possible to do syntax coloring with any other language? If yes what packages can I use to do that?
|
https://tex.stackexchange.com/users/230
|
Syntax Coloring in LaTeX
| false |
For technical documentation my preferred method is to use [Sphinx](http://sphinx.pocoo.org/contents.html). The output LaTeX looks ugly (well, machine generated) but the output looks nice. It uses Pygments behind the scenes.
I've not used `minted`, but from what people say it should work just as well, and allow you to author a LaTeX document. (But if you use Sphinx, you'll get HTML and other outputs. They're working on epub.)
|
4
|
https://tex.stackexchange.com/users/176
|
1100
| 764 |
https://tex.stackexchange.com/questions/1021
|
20
|
Recently, I made a beamer presentation and I want to link to a pdf I have made before, but I can only link to the first page of pdf document using the command:
```
\href{doc/mydoc.pdf}{thedoc}
```
and I want to link to a specific page.
Someone told me to use
```
\href{doc/mydoc.pdf#page.5}{thedoc}
```
or
```
\href{doc/mydoc.pdf#page=5}{thedoc}
```
but they don't work.
Does anyone know how to do this?
|
https://tex.stackexchange.com/users/478
|
How to link to specified page of an outer pdf document?
| true |
All `hyperref`/pdfLaTeX can do is insert a link of a certain form. It's up to the PDF viewer what to do with that link, and I don’t think there’s a standard link format for pages of external PDF files. Even if some viewers have implemented something for this, it wouldn’t be a robust solution.
My suggestion would be to actually include the linked-to PDF in the PDF you’re creating, and then you can use features of the [`pdfpages`](http://ctan.org/pkg/pdfpages) package to insert hyperlink targets for the included pages, and then you can use internal links. A quick example:
```
\documentclass{article}
\usepackage{pdfpages}
\usepackage{hyperref}
\begin{document}
Here's a \hyperlink{included.pdf.2}{link to to page 2 of the included pdf}.
\includepdf[pages=1-5,link=true]{included.pdf}
\end{document}
```
With `beamer`, at the end, you probably want something like:
```
{
\beamertemplatenavigationsymbolsempty
\setbeamercolor{background canvas}{bg=}
\includepdf[pages=1-5,link=true,fitpaper]{included.pdf}
}
```
so that the included PDF fits the paper size of the original for the included pages, and `beamer`'s background color and navigation bars are suppressed on those pages.
|
12
|
https://tex.stackexchange.com/users/411
|
1101
| 765 |
https://tex.stackexchange.com/questions/1085
|
18
|
While writing articles about algebraic topology, I have had to typeset spectral sequences. These are tools for calculating homology and cohomology. Examples appear on page 10 of [this book](http://www.math.cornell.edu/~hatcher/SSAT/SSch1.pdf) by Hatcher.
So far I've typeset these using xypic, but I'm not completely satisfied with this. It doesn't produce the best-looking spectral sequences, I have difficulty creating arrows leaving or entering the visible part of the page and I haven't figured out yet how to shade the background in a checkerboard style (or any other style), which is sometimes useful if your page contains many zeroes. An alternative is Tilman Bauer's package, but I don't really like the "turtle"-approach, moving a cursor between entries and dropping characters.
My questions are: Are there other methods for typesetting spectral sequences? What is, in your opinion, the "best" one? Do you have any tips for typesetting spectral sequences?
|
https://tex.stackexchange.com/users/517
|
What is the best way to typeset spectral sequences?
| false |
My go at it would be to say that [mlpost](http://mlpost.lri.fr/) is quite advisable. If you don't know how to program with OCaml, it takes some learning, of course. But if you are trying to achieve non-trivial things, I'd say it's the way to go.
|
0
|
https://tex.stackexchange.com/users/nan
|
1102
| 766 |
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 |
The package [`xspace`](http://www.ctan.org/pkg/xspace) lets you define commands that don't eat up whitespace after them. So you can define an abbreviation like
`\newcommand{\sA}{\mathcal{A}\xspace}`
and then you can type `objects of \sA are called widgets` instead of `objects of \sA\ are called widgets`.
|
61
|
https://tex.stackexchange.com/users/535
|
1103
| 767 |
https://tex.stackexchange.com/questions/885
|
78
|
I need to generate documents from a web application and would like to do this using the Python language and LaTeX, are there any tools that will help me?
**Edit**
This Application will be hosted on Linux, we can run any external commands using popen, there is currently no defined input document format, nor any storage format, but output to the end user should be PDF.
**Edit 2**
These documents will have complex tables, graphs, and require typeset equations - hence the reason to use LaTeX. We would also prefer not to use intermediate files such as xml->html->pdf
Ideally I would like something like pyTeX or plasTeX that could render directly to PDF.
|
https://tex.stackexchange.com/users/43
|
How can I use LaTeX from Python.
| false |
Depending on exactly what you want to do, you may want to take a look at [plasTeX](http://plastex.sourceforge.net/). It's a python version of the TeX engine. It's not a *true* LaTeX interpreter, but if you have control over the input format of the documents then it could be possible to write them in such a manner that plasTeX can render them. At present, it renders the document to XHTML.
So if you wanted web-viewable copies, you could have it so that your documents were sufficiently simple that plasTeX can read them, then use plasTeX for XHTML-rendering and call pdflatex externally for PDF.
|
8
|
https://tex.stackexchange.com/users/86
|
1104
| 768 |
https://tex.stackexchange.com/questions/1105
|
7
|
A simple question (in theory): is there any (La)TeX distribution for Windows that is capable of running as a daemon? I am not aware that either MiKTeX or TeX Live are capable as running as daemons on Windows, but are there any other solutions? Failing this, if I wanted to hack an existing TeX distribution to run as a daemon, what would be the best approach?
A few features that the daemon should have, ideally:
* One-time loading.
* Load the preamble separately, so multiple documents can be generated without reloading the preamble.
* Run as a Windows Service. (optional)
* Callable as a library/API. (optional)
* Input TeX and output DVI/PNG via standard I/O or pipes. (optional)
Any information or suggestions on the subject would be much appreciated.
**Edit 1:** Specifically, I am also rather curious how the [*preview-latex*](http://www.gnu.org/software/auctex/preview-latex.html) package for EMACS works. This seems to have a very similar usage in mind to what I intend.
**Edit 2:** I've just recalled that the [Instant Preview](http://wiki.lyx.org/LyX/InstantPreview) feature of LyX also closely represents what I want to achieve. Additionally, this seems to work on Windows. An explanation/overview of this system and the daemon it uses would be very helpful.
|
https://tex.stackexchange.com/users/303
|
TeX daemon for Windows
| false |
There is William Blum's LaTeXDaemon:
<http://william.famille-blum.org/software/latexdaemon/index.html>
It's on Google code as well, but I am only allowed one hyperlink.
It will generate a format for the preamble and re-compile every time the document is saved.
|
6
|
https://tex.stackexchange.com/users/nan
|
1106
| 769 |
https://tex.stackexchange.com/questions/365
|
20
|
I usually use LyX to prepare lecture notes, course summaries, etc.
The reason I use LyX and not LaTex directly is twofold -
1. I usually need to type in real time - summing a lecture. I think for this I'd still need LyX.
2. I write all these documents in Hebrew, and it seems to me that writing Hebrew documents with LaTeX will be a real pain (different direction of text, etc.).
So I'm looking to solve #2 - have you ever used LaTeX for a right-to-left language effectively? What IDEs support this? What do you do when you need to write a document in such a language?
|
https://tex.stackexchange.com/users/5
|
IDE / Best known method for writing Hebrew documents with LaTeX
| false |
I wouldn't necessarily say you need LyX for quick writing of documents/note-taking (it's more to ease the learning curve), but the following method should work well with either plain LaTeX or LyX I believe.
At present there exist the excellent [babel](http://www.ctan.org/tex-archive/help/Catalogue/entries/babel.html) and `hebfont` packages. The combination of these two packages is likely the best option for typesetting Hebrew text. The former provides support for Hebrew characters/text encoding, RTL rendering, and switching between Hebrew/Latin/other scripts, while the latter provides a variety of fonts for rendering Hebrew characters.
You can turn 'Hebrew mode' on simply with the `\sethebrew` macro, and off again with the `\unsethebrew` macro.
Boris Lavva has written a [very useful guide](http://sites.huji.ac.il/tex/newlatex_usage.txt) to typesetting Hebrew in LaTex 2e, which should get you going. It would probably be fairly straightforward to set up a template for Hebrew documents. Apart from a handful of new macros to learn, you should essentially be able to use Hebrew in LaTeX as you would normal LaTeX.
Note: There is even a `hebtech` document class for preparing formal technical documents/theses in Hebrew, if you find the need.
|
11
|
https://tex.stackexchange.com/users/303
|
1107
| 770 |
https://tex.stackexchange.com/questions/1108
|
13
|
I am writing a report and would like to include as appendix another document which is in pdf format.
|
https://tex.stackexchange.com/users/546
|
Include pdf pages in a latex document as appendix
| true |
Use the [pdfpages](http://ctan.org/pkg/pdfpages) package to include the relevant pages.
|
19
|
https://tex.stackexchange.com/users/73
|
1109
| 771 |
https://tex.stackexchange.com/questions/1092
|
328
|
Debian and Ubuntu have very good texlive packaging. But I'd like to use `tlmgr` to have a more fine-grained control about upgrades and which packages I want to be installed.
So how do I install "vanilla" TeXLive on Debian/Ubuntu?
Also how do I make `dpkg` aware that I have TeXLive installed?
|
https://tex.stackexchange.com/users/137
|
How to install "vanilla" TeXLive on Debian or Ubuntu?
| false |
Some comments:
1. According to the Ubuntu package listing, the [texlive](http://packages.ubuntu.com/lucid/texlive) package is a dummy package whose only purpose is to install a decent selection of dependencies. So it is possible to install this texlive package *without* installing any of its dependencies. This requires using `dpkg` instead of `aptitude` (as far as I can see, and I don't know if it's possible through the synaptic package manager): passing the `--ignore-depends=texlive` option to `dpkg` will cause it to forego the dependency check. Then anything that depends on `texlive` will afterwards install fine (I believe), though if something depends on, say, `texlive-bin` then it *will* complain.
2. Whilst checking the options for `aptitude` and `dpkg` for the above, I came across the following snippet from `aptitude`: the command
```
aptitude install texlive&m
```
will mark `texlive` as having been manually installed. (Note that the `&` will probably need some sort of shell escaping to avoid it being interpreted by the shell.) I *believe* this basically says to the system "I've installed this myself, so you can stop bothering with it.".
3. Possibly the easiest solution (and the one I use myself) is to simply ignore the system one and install your own version as well. If you do this right, you get the best of both worlds because one possible problem with *replacing* the system version with your own version is that the upgade may break some dependencies from other packages. It's less likely with something like TeX, but you can imagine that lots might go wrong if you upgrade one of the core system libraries without upgrading all the programs that use it. This is what the `/usr/local` directory is for. Put your installation of TeXLive in `/usr/local/texlive` or somewhere using the standard installation (as mentioned by frabjous, for example). By ensuring that `/usr/local` appears before `/usr/bin` in your path, and that `$TEXMFCNF` points to the right place, you can effectively ignore the system installation whilst being able to fall back on it if necessary.
|
19
|
https://tex.stackexchange.com/users/86
|
1110
| 772 |
https://tex.stackexchange.com/questions/1082
|
10
|
[ This is an updated version of <https://stackoverflow.com/questions/3233031/latex-defining-a-custom-wrapfig-environment> ]
The `wrapfig` package interacts badly with the setup and teardown done by `\begin` and `\end`. Concretely, this is not typeset correctly:
```
\documentclass{article}
\usepackage{wrapfig}
\newenvironment{pullquote}
{\begin{wrapfigure}{o}{2in}\large}
{\end{wrapfigure}}
\begin{document}
\begin{pullquote}
Chicken chicken
\end{pullquote}
Chicken chicken chicken chicken,
chicken chicken chicken chicken.
Chicken chicken, chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken.
\end{document}
```
The "pull quote" is displaced downward to the end of the document (or to the next wrapfigure, if any) and I get a warning about collisions between wrapping environments in the log file.
But this *is* typeset correctly (note the dirty-trick use of the internal macros defined by `\newenvironment`):
```
\documentclass{article}
\usepackage{wrapfig}
\newenvironment{pullquote}
{\begin{wrapfigure}{o}{2in}\large}
{\end{wrapfigure}}
\begin{document}
\pullquote
Chicken chicken
\endpullquote
Chicken chicken chicken chicken,
chicken chicken chicken chicken.
Chicken chicken, chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken.
\end{document}
```
I am looking for concrete advice on how to fix this apparent bug in wrapfig, which AFAICT is unmaintained.
|
https://tex.stackexchange.com/users/514
|
Defining a custom ‘wrapfig’ environment
| true |
One suggestion: shift the "dirty trick" inside the definition. This seems to work for me:
```
\documentclass{article}
\usepackage{wrapfig}
\newenvironment{pullquote}
{\wrapfigure{o}{2in}\large}
{\endwrapfigure}
\begin{document}
\begin{pullquote}
Chicken chicken
\end{pullquote}
Chicken chicken chicken chicken,
chicken chicken chicken chicken.
Chicken chicken, chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken.
\end{document}
```
I noticed from the source that the `wrapfigure` environment is not itself defined using `\newenvironment` but simply a `\def\wrapfigure{\wrapfloat{figure}}` and `\let\endwrapfigure\endwrapfloat`. I don't know if this has anything to do with the bad behaviour, though.
|
7
|
https://tex.stackexchange.com/users/86
|
1112
| 773 |
https://tex.stackexchange.com/questions/1111
|
27
|
For [answering a question yesterday](https://tex.stackexchange.com/questions/40/how-do-i-label-different-rows-or-columns-of-a-matrix-using-braces/1070#1070) I wanted to define a shortcut for creating a matrix inside a `tikzpicture`. As a minimal example, consider
```
\newcommand\mymatrix[1]{
\begin{tikzpicture}
\matrix[matrix of math nodes] {#1};
\end{tikzpicture}%
}
```
which would then be used as
```
\mymatrix{
a & b \\
e & f \\
}
```
But LaTeX complains about `Package pgfbasematrix Error: Single ampersand used with wrong catcode` at the line with the closing brace of `\amatrix{}`. Why does it do that and how can I avoid it?
|
https://tex.stackexchange.com/users/83
|
Problem with defining shortcuts for TikZ matrices
| false |
From p179 of the manual (emphasis added, one minor but significant error corrected):
>
> Even though TikZ seems to use `&` to separate cells, pgf actually uses a different command to separate cells,
> namely the command `\pgfmatrixnextcell` and using a normal `&` character will normally fail. What happens
> is that, TikZ makes & an active character and then defines this character to be equal to `\pgfmatrixnextcell`.
> In most situations this will work nicely, but sometimes `&` cannot be made active; for instance because the
> **matrix is used in an argument of some macro** or the matrix contains nodes that contain normal {tabular}
> environments. In this case you can use the following option to avoid having to type `\pgfmatrixnextcell`
> each time:
>
>
>
> ```
> /tikz/ampersand replacement= macro name or empty (no default)
>
> ```
>
> If a macro name is provided, this macro will be defined to be equal to `\pgfmatrixnextcell` inside
> matrices and `&` will not be made active. For instance, you could say `ampersand replacement=\&` and
> then use `\&` to separate columns as in the following example:
>
>
>
> ```
> \tikz
> \matrix [ampersand replacement=\&]
> {
> \draw (0,0) circle (4mm); \& \node[rotate=10] {Hello}; \\
> \draw (0.2,0) circle (2mm); \& \fill[red] (0,0) circle (3mm); \\
> };
>
> ```
>
>
There is presumably some horrendously complicated way to turn on the active nature of the ampersand again inside the macro argument, but the above would seem the cleanest way.
|
16
|
https://tex.stackexchange.com/users/86
|
1113
| 774 |
https://tex.stackexchange.com/questions/1111
|
27
|
For [answering a question yesterday](https://tex.stackexchange.com/questions/40/how-do-i-label-different-rows-or-columns-of-a-matrix-using-braces/1070#1070) I wanted to define a shortcut for creating a matrix inside a `tikzpicture`. As a minimal example, consider
```
\newcommand\mymatrix[1]{
\begin{tikzpicture}
\matrix[matrix of math nodes] {#1};
\end{tikzpicture}%
}
```
which would then be used as
```
\mymatrix{
a & b \\
e & f \\
}
```
But LaTeX complains about `Package pgfbasematrix Error: Single ampersand used with wrong catcode` at the line with the closing brace of `\amatrix{}`. Why does it do that and how can I avoid it?
|
https://tex.stackexchange.com/users/83
|
Problem with defining shortcuts for TikZ matrices
| true |
TikZ cannot make the ampersand given in the argument to an active character. You could
use `\pgfmatrixnextcell` instead of & and perhaps define a shortcut for it,
or use the ampersand replacement option:
```
\newcommand\mymatrix[1]{
\begin{tikzpicture}
\matrix[ampersand replacement=\&,matrix of math nodes] {#1};
\end{tikzpicture}%
}
\mymatrix{
a \& b \\
e \& f \\
}
```
|
26
|
https://tex.stackexchange.com/users/213
|
1114
| 775 |
https://tex.stackexchange.com/questions/1043
|
28
|
There is a [very active question](https://tex.stackexchange.com/q/339) about LaTeX editors and IDEs. I personally use Vim with LaTeX-suite for any LaTeX editing, and I am very happy with it. Lately I began to use ConTeXt more and more. I would like to know what people use for editing ConTeXt. Especially is there is a set of Vim macros similar to LaTeX-suite.
I know there is a page about Vim on ConTeXt garden, but as far as I can tell, it has not been updated in quite a while.
|
https://tex.stackexchange.com/users/396
|
ConTeXt editors
| false |
As a devoted Emacs user I prefer using [AUCTeX](http://www.gnu.org/software/auctex/), which supports ConTeXt. Another useful Emacs addition is [etexshow](http://levana.de/emacs/), which is an Emacs port of texshow, a browser for ConTeXt commands (not all, but most of them).
|
11
|
https://tex.stackexchange.com/users/359
|
1115
| 776 |
https://tex.stackexchange.com/questions/1105
|
7
|
A simple question (in theory): is there any (La)TeX distribution for Windows that is capable of running as a daemon? I am not aware that either MiKTeX or TeX Live are capable as running as daemons on Windows, but are there any other solutions? Failing this, if I wanted to hack an existing TeX distribution to run as a daemon, what would be the best approach?
A few features that the daemon should have, ideally:
* One-time loading.
* Load the preamble separately, so multiple documents can be generated without reloading the preamble.
* Run as a Windows Service. (optional)
* Callable as a library/API. (optional)
* Input TeX and output DVI/PNG via standard I/O or pipes. (optional)
Any information or suggestions on the subject would be much appreciated.
**Edit 1:** Specifically, I am also rather curious how the [*preview-latex*](http://www.gnu.org/software/auctex/preview-latex.html) package for EMACS works. This seems to have a very similar usage in mind to what I intend.
**Edit 2:** I've just recalled that the [Instant Preview](http://wiki.lyx.org/LyX/InstantPreview) feature of LyX also closely represents what I want to achieve. Additionally, this seems to work on Windows. An explanation/overview of this system and the daemon it uses would be very helpful.
|
https://tex.stackexchange.com/users/303
|
TeX daemon for Windows
| false |
[MathTran](http://www.mathtran.org) runs TeX as a daemon. For macros it runs a secure variant of plain TeX, but with some LaTeX additions, such as `\frac`. Several years ago it could typeset a single formula in about 10 milliseconds (and so too cheap to be worth caching).
There's an [experimental online editor](http://www.mathtran.org/editor/), which gives instant preview (if you have a good internet connection).
To learn more about the technology behind MathTran go to [its wiki](http://www.mathtran.org/wiki/).
*Disclaimer*: I'm the developer of MathTran.
|
6
|
https://tex.stackexchange.com/users/176
|
1117
| 777 |
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 |
The same advantages you get of using version control for any other kind of documents.
Helps for many people to collaborate on a single document/project, keeps track of all the changes to the document as it evolves, you can revert and/or merge edits.
|
5
|
https://tex.stackexchange.com/users/169
|
1119
| 778 |
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
| true |
As a single user the main advantages are
* Automatic backups: If you accidentally delete some file (or part of a file) you can undelete it. If you change something and want to undo it, the VCS can do so.
* Sharing on multiple computers: VCSes are designed to help multiple people collaboratively edit text files. This makes sharing between multiple computers (say your desktop and laptop) particularly easy. You do not need to bother if you always copied the newest version; the VCS will do that for you. Even if you are offline and change files on both computers, the VCS will merge the changes intelligently once you are online.
* Version control and branching: Say you published some class notes as a pdf and want to fix some typos in them while simultaneously working on the notes for next year. No problem. And you only need to fix the typos once, the VCS will merge them to the other versions.
|
78
|
https://tex.stackexchange.com/users/83
|
1121
| 779 |
https://tex.stackexchange.com/questions/1030
|
14
|
The [movie15](http://www.ctan.org/tex-archive/help/Catalogue/entries/movie15.html) package (an interface to embed movies, sounds and 3D objects into PDF documents for use with LaTeX as well as pdfLaTeX) requires 3D files to be in [u3d](http://www.ecma-international.org/publications/standards/Ecma-363.htm) format for embedding into pdf. This works fine with the sample files provided, and I have no problem generating suitable 3D files, but so far, I have not found a way to convert them to u3d. [MeshLab](http://sourceforge.net/search/?group_artifact_id=774731&type_of_search=artifact&group_id=149444&words=u3d), usually the first place to go for such things, crashes during u3d export.
Does anyone know of a way to produce u3d files suitable for use with the movie15 package?
As I am a newbie, I can only post one link, so I put a version of this question with some links on [my blog](http://ways.org/en/blogs/2010/aug/04/for_movie15based_3d_embeds_how_to_get_u3d_files).
(Links added in edit)
Edit: I have to add that my question was about 3D files generated on the basis of imaging data; since some of the initial answers were specific for drawing.
|
https://tex.stackexchange.com/users/44890
|
For movie15-based 3D embeds, how to get u3d files?
| true |
I found one way which worked for me (seen in [this old blog post](http://artandlogic.blogspot.com/2008/08/blender-to-acrobat-3d.html)): [DAZ Studio 3D](http://www.daz3d.com/) can import many 3D file types and export to a few formats, including u3d. It is cross-platform and free (though not open), and the End User License demands that I tell at least two people about it who did not already know it (which I hope is satisfied by this post).
|
4
|
https://tex.stackexchange.com/users/44890
|
1123
| 780 |
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'm also someone who uses version control as a single user. All of Caramdir's reasons are ones that I agree with, and I'll add the following:
* **Tagging**. When I send a paper off to a journal, I can "tag" that version and so even if I make my own improvements in the meantime, when I get the referee's report back then I can easily revert to the version that the comments are on. Plus it's easy to see when I sent a copy to which journal or to collaborators or to eprint repositories.
* **Working with collaborators *even if they don't have the VCS themselves***. I can make a branch copy for my collaborator on my own system and simply copy in their corrections to that each time, then merge them into the main branch as if they'd been using the VCS all along. Keeps the advantages of using version control but without requiring all collaborators to use it.
* **Maintaining different versions**. Caramdir already said this, but I'd like to emphasise it as it happens a lot more than one might expect. When I write a paper, I write it first for myself. So I make life easy on myself by using lots of macros and the like to make it easy for me to type. But then I want to submit it to a journal, send it to the arXiv, send it to some other eprint servers, put a copy on my webpage, put an *accessible* copy on my webpage ... Each of these might require a slight change to the document, for example one eprint server I use doesn't have a decent set of fonts so I have to "downgrade" my papers before sending it there. But of course, I'm still working on the paper after sending a version to all these different places and so a VCS helps me keep all of them in step.
Incidentally, I switched to using a version control system around about the time I started taking online notes of everything that I did. So I wrote up some notes on the process [here](http://loopspace.mathforge.org/HowDidIDoThat/TeX/VCS/). I also found an [article](http://www.tug.org/pracjourn/2007-3/henningsen/henningsen.pdf) (also available as a [wikibook](http://en.wikibooks.org/wiki/LaTeX/Collaborative_Writing_of_LaTeX_Documents)) on the subject that was very helpful to me in deciding to switch to a version control system and on what to look for in one.
|
86
|
https://tex.stackexchange.com/users/86
|
1124
| 781 |
https://tex.stackexchange.com/questions/1030
|
14
|
The [movie15](http://www.ctan.org/tex-archive/help/Catalogue/entries/movie15.html) package (an interface to embed movies, sounds and 3D objects into PDF documents for use with LaTeX as well as pdfLaTeX) requires 3D files to be in [u3d](http://www.ecma-international.org/publications/standards/Ecma-363.htm) format for embedding into pdf. This works fine with the sample files provided, and I have no problem generating suitable 3D files, but so far, I have not found a way to convert them to u3d. [MeshLab](http://sourceforge.net/search/?group_artifact_id=774731&type_of_search=artifact&group_id=149444&words=u3d), usually the first place to go for such things, crashes during u3d export.
Does anyone know of a way to produce u3d files suitable for use with the movie15 package?
As I am a newbie, I can only post one link, so I put a version of this question with some links on [my blog](http://ways.org/en/blogs/2010/aug/04/for_movie15based_3d_embeds_how_to_get_u3d_files).
(Links added in edit)
Edit: I have to add that my question was about 3D files generated on the basis of imaging data; since some of the initial answers were specific for drawing.
|
https://tex.stackexchange.com/users/44890
|
For movie15-based 3D embeds, how to get u3d files?
| false |
Another way that did not work for me but quite possibly might for others is using the [u3d export plugin](http://ultimate3d.org/U3DExportHelp.htm) for [Blender](http://www.blender.org/).
|
1
|
https://tex.stackexchange.com/users/44890
|
1125
| 782 |
https://tex.stackexchange.com/questions/1122
|
12
|
I've been pulling my hair out trying to get [latexdiff](http://www.ctan.org/tex-archive/help/Catalogue/entries/latexdiff.html) to work with a mathematics document. It produces output that latex can't compile if one of the files is this:
```
\documentclass{amsart}
\begin{document}
\begin{equation} \label{eq:Psi-action}
2=1+1
\end{equation}
\end{document}
```
and the other is this:
```
\documentclass{amsart}
\begin{document}
yo
\end{document}
```
But I think it chokes on other things as well. Am I doing something wrong? Is anyone able to use latexdiff for mathematics documents more than a few lines long? If anyone is able to use it by making some easy changes to their LaTeX code, are there general guidelines about what kind of LaTeX code to avoid?
Update 1: It appears that [`latexdiff`](https://www.ctan.org/pkg/latexdiff) doesn't like things like `\big(`. You can sort of get around this by changing every `\big(` to a `\left(`.
Update 2: Here is another pair of files that breaks it:
```
\documentclass{amsart}
\begin{document}
\begin{equation*}
X_{[1],n}
\end{equation*}
\end{document}
```
and
```
\documentclass{amsart}
\begin{document}
\begin{equation*}
[1]X_{n}
\end{equation*}
\end{document}
```
I had only a few such examples and was able to get around them by just commenting out the offending code, but it would be nice to know if there are any rules of thumb to avoid having to worry about it in the first place, like Andrew's helpful comment about Perl and line breaks.
|
https://tex.stackexchange.com/users/541
|
Can latexdiff be used for mathematics documents?
| true |
I can get the example that you gave to compile by moving the `\label{eq:Psi-action}` on to a line by itself:
```
\documentclass{amsart}
\begin{document}
\begin{equation}
\label{eq:Psi-action}
2=1+1
\end{equation}
\end{document}
```
Without that, what seemed to be happening was that it was recognising the `\end{equation}` as the end of a mathematics environment that was in one file but not the other, so it marked it up as `\end{MATHMODE}`. But for some reason it didn't spot the beginning of that environment so there was no corresponding `\begin{MATHMODE}`. Putting the `\label` on the new line seems to be enough to make it recognise the `\begin{equation}` once again.
Whilst doing a pretty fair job, `latexdiff` doesn't interpret TeX documents in the same way that TeX does. In particular, since `latexdiff` is a perl program, I imagine it works on a line-by-line basis, so new-lines are more important to `latexdiff` than to TeX. So if there are other things that are causing it to complain, try adding more new-lines to separate things so that `latexdiff` recognises them as separate.
And, of course, if it gets stuck on something else, ask again!
|
8
|
https://tex.stackexchange.com/users/86
|
1127
| 783 |
https://tex.stackexchange.com/questions/1120
|
11
|
Recently I've come across [a question](https://tex.stackexchange.com/questions/1105/tex-daemon-for-windows) that asks about "TeX daemon" for Windows.
I always thought that nature of TeX is compilation of document sources. Why would anyone use a daemon for that?
So, what is a "TeX daemon", and why is it used?
|
https://tex.stackexchange.com/users/280
|
What is "TeX daemon" and why and how is it used?
| true |
It can have all kind of uses.
[One of the answers](http://william.famille-blum.org/software/latexdaemon/index.html) to the question you refer to shows an example: for one particular document, you can precompile the preamble and have the daemon run in the background, waiting for the document body to be modified, thus accelerating the usual edit-compile-preview cycle.
A variant of this is the ability to preview the result of your TeX source as you type it, such as is provided by the `preview-latex` package for Emacs; but I don't think it uses a daemon.
Another example is given by [this other answer](http://www.mathtran.org/) to the same question: you use TeX as a web service. Of course you could run a new instance of TeX for each request and send the result back to the user, but a daemon is much more appropriate for that. It's not different in nature from a [hypertext preprocessor](http://en.wikipedia.org/wiki/PHP).
The ConTeXt distribution contains a script that is a variant of the latter example: it uses LuaTeX to typeset font samples and to show the effect of the different OpenType features for each font you have installed. In fact, the script runs the web server itself, as it is written in Lua, while the actual typesetting of the font samples is of course done in TeX. Now, there is no actual daemon here (apart from the web server), we need a new process for each new sample, but this is exactly the kind of use a TeX daemon could have.
I can't think of other uses right now, but I'm sure there are.
|
15
|
https://tex.stackexchange.com/users/170
|
1128
| 784 |
https://tex.stackexchange.com/questions/1126
|
22
|
As a follow-up to [this question](https://tex.stackexchange.com/questions/845/infinite-depth-list), I'd like to know if it is possible to automatically include the current section number, including all nesting levels, in the list number. How do I accomplish this?
Example of what I want:
```
\section{This is section 1}
\pointedenum\begin{enumerate}
\item This item has number 1.1.
\item This item has number 1.2.
\pointedenum\begin{enumerate}
\item This item has number 1.2.1.
\end{enumerate}
\end{enumerate}
\subsection{This is section 1.1}
\pointedenum\begin{enumerate}
\item This item has number 1.1.1.
\item This item has number 1.1.2.
\end{enumerate}
% etcetera...
```
|
https://tex.stackexchange.com/users/223
|
Include section number in list number
| false |
The variables governing the labels for the items in an enumerated list are `\labelenumi` (for the top level), `\labelenumii` (next-to-top level),... You can use `\renewcommand` to redefine them to anything you want.
I would expect this to work, but I have not tried it:
```
\renewcommand{\labelenumi}{\thesection.\arabic{enumi}}
\renewcommand{\labelenumii}{\thesection.\arabic{enumi}.\arabic{enumii}}
```
|
5
|
https://tex.stackexchange.com/users/18
|
1129
| 785 |
https://tex.stackexchange.com/questions/1126
|
22
|
As a follow-up to [this question](https://tex.stackexchange.com/questions/845/infinite-depth-list), I'd like to know if it is possible to automatically include the current section number, including all nesting levels, in the list number. How do I accomplish this?
Example of what I want:
```
\section{This is section 1}
\pointedenum\begin{enumerate}
\item This item has number 1.1.
\item This item has number 1.2.
\pointedenum\begin{enumerate}
\item This item has number 1.2.1.
\end{enumerate}
\end{enumerate}
\subsection{This is section 1.1}
\pointedenum\begin{enumerate}
\item This item has number 1.1.1.
\item This item has number 1.1.2.
\end{enumerate}
% etcetera...
```
|
https://tex.stackexchange.com/users/223
|
Include section number in list number
| true |
You could redefine `\theenumi` using `\thesection`:
```
\renewcommand*{\theenumi}{\thesection.\arabic{enumi}}
\renewcommand*{\theenumii}{\theenumi.\arabic{enumii}}
```
In that case omit `\pointedenum`, it would destroy that redefinition.
That may also be done using `\thesubsection`.
Alternatively, here's code using the `enumitem` package:
```
\usepackage{enumitem}
\setenumerate[1]{label=\thesection.\arabic*.}
\setenumerate[2]{label*=\arabic*.}
```
Using `enumitem` you're able to continue numbering by `\begin{enumerate}[resume]` if you like.
|
31
|
https://tex.stackexchange.com/users/213
|
1130
| 786 |
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 |
Version control systems are also very useful to view differences between versions of a document.
This functionality is only relevant for files in plain text format, but thanks god, you use \*TeX :)
|
1
|
https://tex.stackexchange.com/users/439
|
1131
| 787 |
https://tex.stackexchange.com/questions/1132
|
8
|
I have a set of commands for producing various kinds of specific list-items, such as
```
\newcommand{\staritem}{\item[$\star$]} % not really, but you get the gist
```
All the ones I currently have can be used in the same way as `\item`, that is, just specify the item type at the start of the paragraph, and then write text as normal.
Now, I want to create a `\bolditem` command, that produces an `\item` and wraps the text in `\textbf{...}`. However, I'd like to make it available with the same syntax (so the users don't have to wrap the entire item text in braces).
Is this possible? How?
|
https://tex.stackexchange.com/users/223
|
Define command for bold list-item
| true |
Assuming I understand correctly what you want, here's one way to do it:
```
\documentclass{article}
\let\origitem\item
\renewcommand{\item}{\normalfont\origitem}
\newcommand{\bolditem}{\normalfont\origitem\bfseries}
\begin{document}
Before the list
\begin{enumerate}
\item First item
\bolditem Second item
\item Third item
\bolditem Fourth item
\end{enumerate}
After the list
\end{document}
```
That produces:
>
> Before the list
>
>
> 1. First item
> 2. **Second item**
> 3. Third item
> 4. **Fourth item**
>
>
> After the list
>
>
>
If you want the numbers in bold font as well, put the `\bfseries` *before* the `\origitem`. If you want to be able to write `\bolditem[A]` then that will work with the `\bfseries` before the `\origitem` without further modification (but would need a modicum of modification if you don't want the numbers in bold font).
|
8
|
https://tex.stackexchange.com/users/86
|
1133
| 788 |
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 |
If you haven't used a version control tool before, I seriously recommend you start using one. Otherwise you will version control manually i.e. paper-v5, paper-v6 etc which may be sufficient for one-off, short-term projects.
You can see version control as recording a (discrete) history of your project allowing you to associate notes with the changes you make and to inspect at later stage why they were made. This might sound cumbersome but most good editors let you seamlessly integrate it into your workflow. In fact you will soon find version control tool indispensable.
|
1
|
https://tex.stackexchange.com/users/337
|
1134
| 789 |
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 |
Using revision control makes you unafraid to make radical changes to your document. As one of my friends, Peter Boothe, [put it,](http://imprompt.us/2010/why-version-control/)
> you can now freely throw away bits and pieces, secure in the knowledge that if you actually want them back, they are there in the revision control system. Interestingly, almost nobody actually uses this feature. Revision control systems are not there to save your old work. They are there to give you permission to throw that old work away.
|
47
|
https://tex.stackexchange.com/users/52
|
1135
| 790 |
https://tex.stackexchange.com/questions/1095
|
6
|
(My first problem of compiling at all is solved, so I'm now posing a slightly different question).
Hi, I'd like some help with producing handouts for my students. I'm using LyX as I'm far from fluent in LaTeX. I find the default fonts very serious, and would prefer to use something unusual on the title and footer, to make the document a little friendlier. I followed these instructions for installing XeTeX: <http://wiki.lyx.org/LyX/XeTeX>, and for changing the fonts manually with [`fontspec`](https://www.ctan.org/pkg/fontspec) in ERT. I checked that the installation is fine: if I don't use any `fontspec` commands, it doesn't compile within LyX but does work if I use the command line. But when I try it with the `fontspec`, I don't get a PDF.
My LyX file: <http://math.stanford.edu/~amyp/test2.lyx>
The `.tex` file that LyX generated: <http://math.stanford.edu/~amyp/test2.tex>
My log: <http://math.stanford.edu/~amyp/test2.log>
The font I tried here is located at `C:\Windows\Fonts\PRISTINA.TTF` on my computer, Windows tells me it's an Open Type font. I'm not too particular about the font (just that it's non-standard and readable).
|
https://tex.stackexchange.com/users/nan
|
Custom title font in LyX
| false |
It sounds like LyX is not running XeTeX at all. Here’s a simple way to check it: run the following document in Lyx
```
\documentclass{minimal}
\usepackage{ifxetex}
\begin{document}
\ifxetex{I'm running XeTeX}\else{I'm \textbf{not} running XeTeX}\fi
\end{document}
```
and see if the output file contains “I’m running XeTeX” or “I’m **not** running XeTeX”. In the latter case, you should go again through the instructions to set up LyX to use XeTeX and not pdfTeX (or whatever it’s using); I can’t really help you there, as I’ve never used LyX.
Also, if you’re going to use XeTeX and fontspec and use system fonts, you should absolutely not use the `fontenc` package. It’s not compatible with XeTeX. The line above it in your code (`\renewcommand{\familydefault}{\rmdefault}`) may also cause problems, and interacts anyway with what `fontspec` does, so you’re better off deleting it.
|
1
|
https://tex.stackexchange.com/users/170
|
1136
| 791 |
https://tex.stackexchange.com/questions/1137
|
629
|
I know how to define a package or a class, but how do I make it available (to myself) at all times?
Say I have the package file `commonstuff.sty` (or `myprettyclass.cls`), that I want to be able to include in any `.tex` file I create on my computer. Where do I put it? Do I need to run some installer on it, or is it enough to keep it in a certain folder?
*Note: I know I can just place it in the same folder as the `.tex` file, but that's not what I'm after here. I'm looking for a way to "install" the package* centrally *on my computer.*
|
https://tex.stackexchange.com/users/223
|
Where do I place my own .sty or .cls files, to make them available to all my .tex files?
| true |
You could create a folder below your TeX home directory and put your `.sty` file therein. Use this command at the command prompt to find out where:
```
kpsewhich -var-value=TEXMFHOME
```
On my computer it shows
```
C:/Users/stefan/texmf
```
but it might also be `~/texmf/` on a Linux or Unix computer.
Following the TeX directory structure, you should place your file in a subdirectory like `~/texmf/tex/latex/commonstuff/`, according to Arthur's comment below. This has the advantage that ***it is not necessary to update the package database*** as TeX searches your personal `texmf` tree directly. If there is an `ls-R` file in your home `texmf` tree you can safely delete it as TeX will not use it anyway. (Note: this assumes your personal tree is on a local file system: users with remotely-mounted home folders may still need to hash.)
Regarding MiKTeX, have a look at the section "Installing sty or cls files" in the answer to the question [How can I manually install a package on MikTex (Windows)](https://tex.stackexchange.com/questions/2063/how-can-i-manually-install-a-package-on-miktex-windows).
You can then verify what file will be used with:
```
kpsewhich filename.sty
```
This will show the path to the file picked up by the TeX implementation.
|
396
|
https://tex.stackexchange.com/users/213
|
1138
| 792 |
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 |
`\frontmatter` and `\mainmatter` will suffice for different styles of page numbering, but not for roman numbering of introductory tables (which are quite uncommon). Assuming you have only one frontmatter chapter that includes tables, the following should do the trick:
```
\documentclass{book}
\begin{document}
\frontmatter
\begingroup
\renewcommand{\thetable}{\Roman{table}}
\chapter{foo}
Some text.
\begin{table}
\caption{bla}
\end{table}
\endgroup
\mainmatter
\chapter{bar}
Some text.
\begin{table}
\caption{blubb}
\end{table}
\end{document}
```
For `report` and similar classes, replace `\frontmatter` with `\pagenumbering{Roman}` and `\mainmatter` with `\cleardoublepage\pagenumbering{arabic}`.
|
15
|
https://tex.stackexchange.com/users/510
|
1140
| 793 |
https://tex.stackexchange.com/questions/1137
|
629
|
I know how to define a package or a class, but how do I make it available (to myself) at all times?
Say I have the package file `commonstuff.sty` (or `myprettyclass.cls`), that I want to be able to include in any `.tex` file I create on my computer. Where do I put it? Do I need to run some installer on it, or is it enough to keep it in a certain folder?
*Note: I know I can just place it in the same folder as the `.tex` file, but that's not what I'm after here. I'm looking for a way to "install" the package* centrally *on my computer.*
|
https://tex.stackexchange.com/users/223
|
Where do I place my own .sty or .cls files, to make them available to all my .tex files?
| false |
The `.sty` files need to be put it some subdirectory of `tex/latex` in a texmf tree. Those trees have a rather fixed structure, but their location may vary according to your OS and TeX distribution. If you use Unix (including Mac OS) and TeX Live, there's by default a hierarchy
```
/usr/local/texlive/2009/texmf
/usr/local/texlive/2009/texmf-dist
/usr/local/texlive/texmf-local
```
as well as other directories. You want to put it in the `texmf-local` directory, *not* in the other directories that are managed by the TeX Live installer; when you upgrade TeX Live, your package may be overwritten. The `texmf-local` hierarchy, as the names hints, is for local packages managed by you; it won't be touched by updates (which is also why it's directly under the `texlive` directory, and not `texlive/2009`, for instance).
You may also choose to create a directory called `texmf` in your home directory, and the package will be visible only to you, not the other users on your computer.
On Windows with MiKTeX, I believe the directory for local installs is `C:\Localtexmf` by default.
In any case and whatever your distribution, you have to place the `.sty` file inside `.../texmf-local/tex/latex` and not directly in the root directory; it's just won't work otherwise.
Then, if you've installed the package in your home directory, you have nothing to do. If you've put in `texmf-local`, on the other hand, you need to run the utility `mktexlsr` (or `texhash`, it's an alias).
|
50
|
https://tex.stackexchange.com/users/170
|
1141
| 794 |
https://tex.stackexchange.com/questions/1137
|
629
|
I know how to define a package or a class, but how do I make it available (to myself) at all times?
Say I have the package file `commonstuff.sty` (or `myprettyclass.cls`), that I want to be able to include in any `.tex` file I create on my computer. Where do I put it? Do I need to run some installer on it, or is it enough to keep it in a certain folder?
*Note: I know I can just place it in the same folder as the `.tex` file, but that's not what I'm after here. I'm looking for a way to "install" the package* centrally *on my computer.*
|
https://tex.stackexchange.com/users/223
|
Where do I place my own .sty or .cls files, to make them available to all my .tex files?
| false |
On Linux, you can pick any directory you like, and then add a line like
```
export TEXINPUTS=".:~/latex:"
```
to your .bashrc file (you can add multiple directories, separated by colons. I think you do need the '.' in the beginning). There may be something similar in Windows. I find this easier, since it separates "my" stuff from the texmf tree. Probably not great if you're writing a big package, but handy for some small things you just want to share between all your projects.
|
49
|
https://tex.stackexchange.com/users/490
|
1142
| 795 |
https://tex.stackexchange.com/questions/883
|
13
|
The presence of floats appears to disrupt the setting of `\mark`s, so that `\topmark` ends up with the wrong value.
For example, consider this:
```
\documentclass{article}
\textheight 50mm
\textwidth 50mm
\makeatletter \def\@oddhead{[\topmark/\firstmark/\botmark]} \makeatother
\def\block#1{\textbf{#1}\mark{#1}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua.
Foo bar baz.\par}
\begin{document}
\block a
\block b
\block c
\block d
%\begin{figure}\hrule width 1pt height 20mm depth 0pt \end{figure}
\block e
\end{document}
```
That works as it should: the page break appears in the middle of block 'c', blocks 'd' and 'e' start on page 2, and the header therefore shows '[c/d/e]'. That's correct.
If I uncomment the `{figure}` line, however, then the 'figure' appears on page 3, and page 2 is unchanged (page breaks within blocks 'c' and 'e'), but the header now shows '[d/d/e]'.
I am perplexed as to why this happens. I can't find anything in `\@float` or `\@caption` which touches the marks, and in general nothing in `latex.ltx` that uses `\markboth` or `\markright` (which are the only things in `latex.ltx` which call `\mark`). `article.cls` has a few things that call `\@mkboth`, but they're associated with `\@part`, and with lists of figures and the index.
What is it I'm missing?
|
https://tex.stackexchange.com/users/96
|
Why do floats change the \mark?
| true |
**Answering my own question...**
The problem here is, bluntly, that LaTeX messes up the TeX `\mark` system: `\firstmark` and `\botmark` still work, but `\topmark` doesn't. This is because LaTeX's float algorithm, which handles `\marginpar` as well as figures and tables, can invoke the output routine at times other than between pages. That necessarily moves `\botmark` into `\topmark` in a way which means that `\topmark` is no longer the value that `\botmark` had at the end of the previous page.
LaTeX's `\markboth` system uses the TeX `\mark` system, but is specialised to the case of running section headings, and doesn't seem repurposable.
The multicol and fixltx2e packages (and the fixmarks package, which they both cite) address this problem for the case of multi-column pages, but not in a way which makes `\topmark` work in the case illustrated here.
My particular case is this: I'm setting exam papers, and want to put a [Qx cont'd] at the top of pages which start in the middle of question x. I had beeing putting `\mark{x}` at the beginning of each question: testing `\topmark` worked fine, until the paper included figures. I've got it working in a slightly clunky way. I put `\mark{1x}` at the beginning of each question, and `\mark{0x}` at the end: I can then tell by looking at the number at the beginning of `\firstmark` whether I'm still in a question or not.
**Edit:** while that's a nice idea, it turns out that the a more effective solution is to save the `\botmark` manually, with `\xdef\my@topmark{\botmark}` in the page footer. This can be examined in the following page header, where it has (exactly?) the same semantics as `\topmark`. There might be some pathological cases where this doesn't work, but I haven't run into them.
|
11
|
https://tex.stackexchange.com/users/96
|
1143
| 796 |
https://tex.stackexchange.com/questions/874
|
27
|
India has recently introduced a new symbol for its currency, the Indian rupee -- see <http://en.wikipedia.org/wiki/Indian_rupee_sign>. How can I typeset this in TeX / LaTeX?
|
https://tex.stackexchange.com/users/232
|
Indian rupee symbol
| false |
Today the package [`tfrupee`](http://ctan.org/pkg/tfrupee) has been released on CTAN, providing LaTeX support for the [techfat font](http://techfat.blogspot.com/) containing the Indian rupee. It's been converted to Adobe Type 1 format.
|
19
|
https://tex.stackexchange.com/users/213
|
1148
| 799 |
https://tex.stackexchange.com/questions/1105
|
7
|
A simple question (in theory): is there any (La)TeX distribution for Windows that is capable of running as a daemon? I am not aware that either MiKTeX or TeX Live are capable as running as daemons on Windows, but are there any other solutions? Failing this, if I wanted to hack an existing TeX distribution to run as a daemon, what would be the best approach?
A few features that the daemon should have, ideally:
* One-time loading.
* Load the preamble separately, so multiple documents can be generated without reloading the preamble.
* Run as a Windows Service. (optional)
* Callable as a library/API. (optional)
* Input TeX and output DVI/PNG via standard I/O or pipes. (optional)
Any information or suggestions on the subject would be much appreciated.
**Edit 1:** Specifically, I am also rather curious how the [*preview-latex*](http://www.gnu.org/software/auctex/preview-latex.html) package for EMACS works. This seems to have a very similar usage in mind to what I intend.
**Edit 2:** I've just recalled that the [Instant Preview](http://wiki.lyx.org/LyX/InstantPreview) feature of LyX also closely represents what I want to achieve. Additionally, this seems to work on Windows. An explanation/overview of this system and the daemon it uses would be very helpful.
|
https://tex.stackexchange.com/users/303
|
TeX daemon for Windows
| false |
The "mysterious precompilation" by LaTeXDeamon is done by creating a custom format using [mylatex](http://ctan.org/pkg/mylatex).
|
3
|
https://tex.stackexchange.com/users/565
|
1149
| 800 |
https://tex.stackexchange.com/questions/13
|
32
|
My experience at the present moment is restricted to Microsoft Word and is likely to remain for most of my collaborative work. However, for my individual authored documents I would like to use LaTeX. I am familiar with some tex notation but have not used LaTeX extensively.
In light of the above I was wondering what is the best way to make the transition from Word to LaTeX?
|
https://tex.stackexchange.com/users/nan
|
What is the best way to make the transition from Microsoft Word to LaTeX?
| false |
There is pretty old, but still quite nice “manual”: LaTeX for Word Processor Users by Guido Gonzato: <http://www.ctan.org/tex-archive/help/Catalogue/entries/latex4wp.html> It translates some things from one language (WP) to the other (LaTeX).
|
3
|
https://tex.stackexchange.com/users/291
|
1150
| 801 |
https://tex.stackexchange.com/questions/1105
|
7
|
A simple question (in theory): is there any (La)TeX distribution for Windows that is capable of running as a daemon? I am not aware that either MiKTeX or TeX Live are capable as running as daemons on Windows, but are there any other solutions? Failing this, if I wanted to hack an existing TeX distribution to run as a daemon, what would be the best approach?
A few features that the daemon should have, ideally:
* One-time loading.
* Load the preamble separately, so multiple documents can be generated without reloading the preamble.
* Run as a Windows Service. (optional)
* Callable as a library/API. (optional)
* Input TeX and output DVI/PNG via standard I/O or pipes. (optional)
Any information or suggestions on the subject would be much appreciated.
**Edit 1:** Specifically, I am also rather curious how the [*preview-latex*](http://www.gnu.org/software/auctex/preview-latex.html) package for EMACS works. This seems to have a very similar usage in mind to what I intend.
**Edit 2:** I've just recalled that the [Instant Preview](http://wiki.lyx.org/LyX/InstantPreview) feature of LyX also closely represents what I want to achieve. Additionally, this seems to work on Windows. An explanation/overview of this system and the daemon it uses would be very helpful.
|
https://tex.stackexchange.com/users/303
|
TeX daemon for Windows
| false |
The [BaKoMa TeX system](http://www.bakoma-tex.com/) has a dynamical preview feature that you might find interesting as well.
|
3
|
https://tex.stackexchange.com/users/565
|
1151
| 802 |
https://tex.stackexchange.com/questions/13
|
32
|
My experience at the present moment is restricted to Microsoft Word and is likely to remain for most of my collaborative work. However, for my individual authored documents I would like to use LaTeX. I am familiar with some tex notation but have not used LaTeX extensively.
In light of the above I was wondering what is the best way to make the transition from Word to LaTeX?
|
https://tex.stackexchange.com/users/nan
|
What is the best way to make the transition from Microsoft Word to LaTeX?
| false |
I think that a good way of starting is doing all you have to do in LaTeX, no matter how trivial it is (but try not to put the learning process above other responsibilities). A good place to look for examples and different packages that may help is [The LaTeX Companion](http://rads.stackoverflow.com/amzn/click/0201362996).
|
3
|
https://tex.stackexchange.com/users/401
|
1152
| 803 |
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 nearly always use the `tikz` package. Once you learn how to draw with it, you can do almost any vector graphic you need.
|
128
|
https://tex.stackexchange.com/users/401
|
1154
| 804 |
https://tex.stackexchange.com/questions/1153
|
13
|
I'm a beginner with LaTex and writing an article in it (letter-sized). WinEDT and MikTeX (versions seen in the log).
I have a PNG chart (obtained from R/ggplot2) which is 471 x 335 pixels and which I'm including as below.
The problem: in the PDF the image is scaled up to occupy the width of the page and thus becomes blurry. I see the warnings in the log, but am not sure what I need to do given it's a picture, not text.
```
\documentclass[12pt]{article}
\usepackage[letterpaper]{geometry}
\geometry{top=1.0in, bottom=1.0in, left=1.5in, right=1.0in}
\usepackage{graphicx}
\begin{figure}
\includegraphics{chart}\\ % line 35
\caption{Adjusted Relative Risk (RR)}\label{mylabel} % line 36
\end{figure}
```
The output log shows:
```
Command Line: texify.exe --pdf --tex-option=--synctex=-1 "C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW\test1.tex"
Startup Folder: C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW
This is pdfTeX, Version 3.1415926-1.40.10 (MiKTeX 2.8)
entering extended mode
("C:/Documents and Settings/myself/Application Data/WinEdt Team/WinEdt 6/RW/test1.tex"
LaTeX2e
Babel and hyphenation patterns for english, dumylang, nohyphenation, ge
rman, ngerman, german-x-2009-06-19, ngerman-x-2009-06-19, french, loaded.
(C:\MiKTeX\tex\latex\base\article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(C:\MiKTeX\tex\latex\base\size12.clo)) (C:\MiKTeX\tex\generic\babel\babel.sty
*************************************
* Local config file bblopts.cfg used
*
(C:\MiKTeX\tex\latex\00miktex\bblopts.cfg)
(C:\MiKTeX\tex\generic\babel\english.ldf (C:\MiKTeX\tex\generic\babel\babel.def
))) (C:\MiKTeX\tex\latex\graphics\graphicx.sty
(C:\MiKTeX\tex\latex\graphics\keyval.sty)
(C:\MiKTeX\tex\latex\graphics\graphics.sty
(C:\MiKTeX\tex\latex\graphics\trig.sty)
(C:\MiKTeX\tex\latex\00miktex\graphics.cfg)
(C:\MiKTeX\tex\latex\pdftex-def\pdftex.def)))
(C:\MiKTeX\tex\latex\geometry\geometry.sty
(C:\MiKTeX\tex\generic\oberdiek\ifpdf.sty)
(C:\MiKTeX\tex\generic\oberdiek\ifvtex.sty)
(C:\MiKTeX\tex\latex\geometry\geometry.cfg))
(C:\MiKTeX\tex\latex\base\flafter.sty)
(C:\MiKTeX\tex\latex\setspace\setspace.sty
Package: `setspace' 6.7
)
("C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW\t
est1.aux") (C:\MiKTeX\tex\context\base\supp-pdf.tex
[Loading MPS to PDF converter (version 2006.09.02).]
)
*geometry* driver: auto-detecting
*geometry* detected driver: pdftex
[1{C:/MiKTeX/pdftex/config/pdftex.map}] [2]
Overfull \hbox (39.14508pt too wide) in paragraph at lines 35--36
[][]
Underfull \hbox (badness 10000) in paragraph at lines 35--36
[3] [4 ] [5]
("C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW\t
est1.aux") )
(see the transcript file for additional information)
Output written on test1.pdf (5 pages, 100528 bytes).
SyncTeX written on test1.synctex
Transcript written on test1.log.
```
|
https://tex.stackexchange.com/users/564
|
Included png appears too big in PDF
| false |
You could write
```
\pdfimageresolution=300
```
if the image has a resolution of 300 dpi etc. Perhaps it has a higher resolution but the standard value is 72 dpi. Or save it with setting 72 dpi.
|
7
|
https://tex.stackexchange.com/users/213
|
1155
| 805 |
https://tex.stackexchange.com/questions/1153
|
13
|
I'm a beginner with LaTex and writing an article in it (letter-sized). WinEDT and MikTeX (versions seen in the log).
I have a PNG chart (obtained from R/ggplot2) which is 471 x 335 pixels and which I'm including as below.
The problem: in the PDF the image is scaled up to occupy the width of the page and thus becomes blurry. I see the warnings in the log, but am not sure what I need to do given it's a picture, not text.
```
\documentclass[12pt]{article}
\usepackage[letterpaper]{geometry}
\geometry{top=1.0in, bottom=1.0in, left=1.5in, right=1.0in}
\usepackage{graphicx}
\begin{figure}
\includegraphics{chart}\\ % line 35
\caption{Adjusted Relative Risk (RR)}\label{mylabel} % line 36
\end{figure}
```
The output log shows:
```
Command Line: texify.exe --pdf --tex-option=--synctex=-1 "C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW\test1.tex"
Startup Folder: C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW
This is pdfTeX, Version 3.1415926-1.40.10 (MiKTeX 2.8)
entering extended mode
("C:/Documents and Settings/myself/Application Data/WinEdt Team/WinEdt 6/RW/test1.tex"
LaTeX2e
Babel and hyphenation patterns for english, dumylang, nohyphenation, ge
rman, ngerman, german-x-2009-06-19, ngerman-x-2009-06-19, french, loaded.
(C:\MiKTeX\tex\latex\base\article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(C:\MiKTeX\tex\latex\base\size12.clo)) (C:\MiKTeX\tex\generic\babel\babel.sty
*************************************
* Local config file bblopts.cfg used
*
(C:\MiKTeX\tex\latex\00miktex\bblopts.cfg)
(C:\MiKTeX\tex\generic\babel\english.ldf (C:\MiKTeX\tex\generic\babel\babel.def
))) (C:\MiKTeX\tex\latex\graphics\graphicx.sty
(C:\MiKTeX\tex\latex\graphics\keyval.sty)
(C:\MiKTeX\tex\latex\graphics\graphics.sty
(C:\MiKTeX\tex\latex\graphics\trig.sty)
(C:\MiKTeX\tex\latex\00miktex\graphics.cfg)
(C:\MiKTeX\tex\latex\pdftex-def\pdftex.def)))
(C:\MiKTeX\tex\latex\geometry\geometry.sty
(C:\MiKTeX\tex\generic\oberdiek\ifpdf.sty)
(C:\MiKTeX\tex\generic\oberdiek\ifvtex.sty)
(C:\MiKTeX\tex\latex\geometry\geometry.cfg))
(C:\MiKTeX\tex\latex\base\flafter.sty)
(C:\MiKTeX\tex\latex\setspace\setspace.sty
Package: `setspace' 6.7
)
("C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW\t
est1.aux") (C:\MiKTeX\tex\context\base\supp-pdf.tex
[Loading MPS to PDF converter (version 2006.09.02).]
)
*geometry* driver: auto-detecting
*geometry* detected driver: pdftex
[1{C:/MiKTeX/pdftex/config/pdftex.map}] [2]
Overfull \hbox (39.14508pt too wide) in paragraph at lines 35--36
[][]
Underfull \hbox (badness 10000) in paragraph at lines 35--36
[3] [4 ] [5]
("C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW\t
est1.aux") )
(see the transcript file for additional information)
Output written on test1.pdf (5 pages, 100528 bytes).
SyncTeX written on test1.synctex
Transcript written on test1.log.
```
|
https://tex.stackexchange.com/users/564
|
Included png appears too big in PDF
| false |
You can specify the printed width: `\includegraphics[width=2in]{chart}`
|
4
|
https://tex.stackexchange.com/users/467
|
1156
| 806 |
https://tex.stackexchange.com/questions/1153
|
13
|
I'm a beginner with LaTex and writing an article in it (letter-sized). WinEDT and MikTeX (versions seen in the log).
I have a PNG chart (obtained from R/ggplot2) which is 471 x 335 pixels and which I'm including as below.
The problem: in the PDF the image is scaled up to occupy the width of the page and thus becomes blurry. I see the warnings in the log, but am not sure what I need to do given it's a picture, not text.
```
\documentclass[12pt]{article}
\usepackage[letterpaper]{geometry}
\geometry{top=1.0in, bottom=1.0in, left=1.5in, right=1.0in}
\usepackage{graphicx}
\begin{figure}
\includegraphics{chart}\\ % line 35
\caption{Adjusted Relative Risk (RR)}\label{mylabel} % line 36
\end{figure}
```
The output log shows:
```
Command Line: texify.exe --pdf --tex-option=--synctex=-1 "C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW\test1.tex"
Startup Folder: C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW
This is pdfTeX, Version 3.1415926-1.40.10 (MiKTeX 2.8)
entering extended mode
("C:/Documents and Settings/myself/Application Data/WinEdt Team/WinEdt 6/RW/test1.tex"
LaTeX2e
Babel and hyphenation patterns for english, dumylang, nohyphenation, ge
rman, ngerman, german-x-2009-06-19, ngerman-x-2009-06-19, french, loaded.
(C:\MiKTeX\tex\latex\base\article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(C:\MiKTeX\tex\latex\base\size12.clo)) (C:\MiKTeX\tex\generic\babel\babel.sty
*************************************
* Local config file bblopts.cfg used
*
(C:\MiKTeX\tex\latex\00miktex\bblopts.cfg)
(C:\MiKTeX\tex\generic\babel\english.ldf (C:\MiKTeX\tex\generic\babel\babel.def
))) (C:\MiKTeX\tex\latex\graphics\graphicx.sty
(C:\MiKTeX\tex\latex\graphics\keyval.sty)
(C:\MiKTeX\tex\latex\graphics\graphics.sty
(C:\MiKTeX\tex\latex\graphics\trig.sty)
(C:\MiKTeX\tex\latex\00miktex\graphics.cfg)
(C:\MiKTeX\tex\latex\pdftex-def\pdftex.def)))
(C:\MiKTeX\tex\latex\geometry\geometry.sty
(C:\MiKTeX\tex\generic\oberdiek\ifpdf.sty)
(C:\MiKTeX\tex\generic\oberdiek\ifvtex.sty)
(C:\MiKTeX\tex\latex\geometry\geometry.cfg))
(C:\MiKTeX\tex\latex\base\flafter.sty)
(C:\MiKTeX\tex\latex\setspace\setspace.sty
Package: `setspace' 6.7
)
("C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW\t
est1.aux") (C:\MiKTeX\tex\context\base\supp-pdf.tex
[Loading MPS to PDF converter (version 2006.09.02).]
)
*geometry* driver: auto-detecting
*geometry* detected driver: pdftex
[1{C:/MiKTeX/pdftex/config/pdftex.map}] [2]
Overfull \hbox (39.14508pt too wide) in paragraph at lines 35--36
[][]
Underfull \hbox (badness 10000) in paragraph at lines 35--36
[3] [4 ] [5]
("C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW\t
est1.aux") )
(see the transcript file for additional information)
Output written on test1.pdf (5 pages, 100528 bytes).
SyncTeX written on test1.synctex
Transcript written on test1.log.
```
|
https://tex.stackexchange.com/users/564
|
Included png appears too big in PDF
| false |
What Geoff said, additionally you can specify the height, or even both: `\includegraphics[width=5cm,height=5cm]{chart}`
That being said, if you use only one of them graphicx (the package providing the `\includegraphics` macro) will take care of maintaining the proper aspect ratio.
|
9
|
https://tex.stackexchange.com/users/313
|
1157
| 807 |
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 me, one of the main reasons for using a VCS is to avoid cluttering my working directory with lots of mainly useless files with cryptic filenames like:
mydocument20103001.tex
mydocument20103001aa.tex
mudocument20091221.tex
mydocument20091221jonsversion.tex
With such a system, it is hard to keep track of which changes occurred in which version. It gets worse if you have multiple authors collaborating on a document with different file naming conventions. It gets even worse if you are using a similar system for your bibtex and image files, as you have to keep remembering to update the references to the files in the main document. It gets even more worse if you are collaborating via sending email attachments and don't know for sure that you have saved every single version that was emailed into your working directory.
With a VCS you just have one copy of each file, so you have a much cleaner and easier to navigate working directory. The VCS should make it easy for you to find out where changes were made, so that you can easily find things when you want to restore something that you previously edited out. Since the VCS stores everything, you know that every version of the file is available in one place. It should also declutter your email inbox a little bit as you won't need the attachments and emails that just announce updates to the document are no longer needed.
|
11
|
https://tex.stackexchange.com/users/376
|
1160
| 808 |
https://tex.stackexchange.com/questions/1153
|
13
|
I'm a beginner with LaTex and writing an article in it (letter-sized). WinEDT and MikTeX (versions seen in the log).
I have a PNG chart (obtained from R/ggplot2) which is 471 x 335 pixels and which I'm including as below.
The problem: in the PDF the image is scaled up to occupy the width of the page and thus becomes blurry. I see the warnings in the log, but am not sure what I need to do given it's a picture, not text.
```
\documentclass[12pt]{article}
\usepackage[letterpaper]{geometry}
\geometry{top=1.0in, bottom=1.0in, left=1.5in, right=1.0in}
\usepackage{graphicx}
\begin{figure}
\includegraphics{chart}\\ % line 35
\caption{Adjusted Relative Risk (RR)}\label{mylabel} % line 36
\end{figure}
```
The output log shows:
```
Command Line: texify.exe --pdf --tex-option=--synctex=-1 "C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW\test1.tex"
Startup Folder: C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW
This is pdfTeX, Version 3.1415926-1.40.10 (MiKTeX 2.8)
entering extended mode
("C:/Documents and Settings/myself/Application Data/WinEdt Team/WinEdt 6/RW/test1.tex"
LaTeX2e
Babel and hyphenation patterns for english, dumylang, nohyphenation, ge
rman, ngerman, german-x-2009-06-19, ngerman-x-2009-06-19, french, loaded.
(C:\MiKTeX\tex\latex\base\article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(C:\MiKTeX\tex\latex\base\size12.clo)) (C:\MiKTeX\tex\generic\babel\babel.sty
*************************************
* Local config file bblopts.cfg used
*
(C:\MiKTeX\tex\latex\00miktex\bblopts.cfg)
(C:\MiKTeX\tex\generic\babel\english.ldf (C:\MiKTeX\tex\generic\babel\babel.def
))) (C:\MiKTeX\tex\latex\graphics\graphicx.sty
(C:\MiKTeX\tex\latex\graphics\keyval.sty)
(C:\MiKTeX\tex\latex\graphics\graphics.sty
(C:\MiKTeX\tex\latex\graphics\trig.sty)
(C:\MiKTeX\tex\latex\00miktex\graphics.cfg)
(C:\MiKTeX\tex\latex\pdftex-def\pdftex.def)))
(C:\MiKTeX\tex\latex\geometry\geometry.sty
(C:\MiKTeX\tex\generic\oberdiek\ifpdf.sty)
(C:\MiKTeX\tex\generic\oberdiek\ifvtex.sty)
(C:\MiKTeX\tex\latex\geometry\geometry.cfg))
(C:\MiKTeX\tex\latex\base\flafter.sty)
(C:\MiKTeX\tex\latex\setspace\setspace.sty
Package: `setspace' 6.7
)
("C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW\t
est1.aux") (C:\MiKTeX\tex\context\base\supp-pdf.tex
[Loading MPS to PDF converter (version 2006.09.02).]
)
*geometry* driver: auto-detecting
*geometry* detected driver: pdftex
[1{C:/MiKTeX/pdftex/config/pdftex.map}] [2]
Overfull \hbox (39.14508pt too wide) in paragraph at lines 35--36
[][]
Underfull \hbox (badness 10000) in paragraph at lines 35--36
[3] [4 ] [5]
("C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW\t
est1.aux") )
(see the transcript file for additional information)
Output written on test1.pdf (5 pages, 100528 bytes).
SyncTeX written on test1.synctex
Transcript written on test1.log.
```
|
https://tex.stackexchange.com/users/564
|
Included png appears too big in PDF
| true |
This is not exactly an answer to the question you asked, but do you know that R/ggplot2 can write out your charts as pdf files that can be `\includegraphics`ed? Just use pdf() instead of png() when setting up the output device, or if you're using ggsave(), give the file a .pdf extension instead of png. Then you get real text and vector graphics, which pdfTeX can scale without blurriness. Note: the width and height arguments to pdf() are in inches, not pixels. Also, you may have to delete the .png file to get pdfTeX to pick up the PDF.
|
12
|
https://tex.stackexchange.com/users/514
|
1161
| 809 |
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?
| true |
You can set the bounding box of a `tikzpicture` explicitly by using `\useasboundingbox`
or more TikZ'ish:
```
\path[use as bounding box] (0,0) rectangle (10,10); % adjust to fit
```
in your `tikzpicture`.
You will have to provide some more information if the above is not what you want. As stated above, the way to control the size of a `tikzpicture` is to set the bounding box manually if you are not happy with what TikZ is calculating. To quote the pgfmanual (section Establishing a bounding Box):
>
> pgf is reasonably good at keeping track of the size of your picture and reserving just the right amount of
> space for it in the main document. However, in some cases you may want to say things like "do not count
> this for the picture size" or "the picture is actually a little large." For this you can use the option use as
> bounding box or the command `\useasboundingbox`, which is just a shorthand for `\path[use as bounding
> box]`.
>
>
>
You might also try using the external library
```
\usetikzlibrary{external}
\tikzexternalize
```
this offers some additional functionality on top of the
```
\beginpgfgraphicnamed ...\endpgfgraphicnamed.
```
Alternatively, the `preview` package offers a way to extract tightly cropped parts of a document
```
\usepackage[active,pdftex,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
```
|
15
|
https://tex.stackexchange.com/users/565
|
1163
| 810 |
https://tex.stackexchange.com/questions/1158
|
36
|
The answers to [this question](https://tex.stackexchange.com/questions/1118/what-are-the-advantages-of-using-version-control-git-cvs-etc-in-latex-document/1121#1121) have convinced me I want to start using some kind of version control system. The question is, which should I use? First this is mainly just for myself, not for collaboration.
What are the pros and cons of git, SVN, mercurial... others?
I'd like to be able to have a version number in the header or footer of my drafts. Ideally, I'd like a system which allowed me to compile a document such that differences between selected versions of the file are highlighted in the pdf output somehow (a sort of "track changes" like behaviour). And I'd like to have nice integration with emacs, my editor of choice.
Pros and cons of one versioning system per answer please
(I've CWed this, but discuss whether I should undo that...)
|
https://tex.stackexchange.com/users/215
|
What version control system should I use for my LaTeX documents?
| true |
Firstly, almost every common VCS is supported by an Emacs extension so that is not a key concern.
The only VCS that can output things to your drafts that I am aware of is SVN. To do this you have to install a couple of LaTeX packages, as described here: <http://www.tug.org/pracjourn/2007-3/kalderon-svnmulti/> These allow you to put SVN version numbers and other details into your drafts. There is no real reason why this can't be done with other VCSs, but so far nobody has released any LaTeX packages for them.
I don't know of any LaTeX packages that allow you to track changes in the pdf itself, but they all allow you to do this for the .tex file via the various diff commands. Again, getting this in the pdf file would be a matter of writing LaTeX packages.
Aside from these issues, the main thing you need to decide is whether to use a centralized (e.g. CVS, SVN) or distributed (e.g. git, Mercurial) system. Distributed systems have a number of advantages and, as far as I can tell, no disadvantages for use with LaTeX. For one thing, you can use them without setting up a server to just work with single-author projects on your own machine. They also store the whole history of the project on your local machine so you always have access to it even if you are offline (one of my coauthors is very picky about this).
Personally, I use Mercurial rather than git for the following reasons:
* Git is undoubtedly more powerful than Mercurial, but the extra functionality is mainly relevant to software developers and you are extremely unlikely to need it for a LaTeX document.
* Mercurial has a better user interface in the sense that, unlike git, most commands do what you would expect them to do and you won't need to use lots of flags and command line options to get it to do what you want. (WARNING! The Git vs. Mercurial debate is an example of a holy war. This is the personal view of the author and you are free to disagree, but if you do disagree then it is probably because you have never worked with anyone who is not intimately familiar with a \*nix command line.)
* Mercurial has excellent documentation, especially Mercurial:The Definitive Guide, which is available for free online. I didn't find anything nearly as good for git.
* Mercurial makes it easy to throw up a repository server on even the most backwards shared hosting provider that you can get for $5 a month. The standard ways of serving git repositories require persistent processes, which means you may have to pay more for hosting. Of course, this is moot if you run your own server or have in house IT staff to do it for you.
In summary, Mercurial will scare your collaborators who are only reluctantly agreeing to use a VCS in the first place a lot less than git would.
|
13
|
https://tex.stackexchange.com/users/376
|
1165
| 811 |
https://tex.stackexchange.com/questions/1137
|
629
|
I know how to define a package or a class, but how do I make it available (to myself) at all times?
Say I have the package file `commonstuff.sty` (or `myprettyclass.cls`), that I want to be able to include in any `.tex` file I create on my computer. Where do I put it? Do I need to run some installer on it, or is it enough to keep it in a certain folder?
*Note: I know I can just place it in the same folder as the `.tex` file, but that's not what I'm after here. I'm looking for a way to "install" the package* centrally *on my computer.*
|
https://tex.stackexchange.com/users/223
|
Where do I place my own .sty or .cls files, to make them available to all my .tex files?
| false |
All of the other answers cover things quite well, but I thought a slightly different version might be helpful.
There are two parts to telling TeX about a new `.sty` file. First, you have to put it in the 'right' place and second you need to update the database TeX uses to find files. The place to put the file depends on your operating system. Assuming you have a standard installation, this will probably be:
* Windows 10 (and miktex)
`C:\Users\<user name>\Appdata\Local\MikTex\<number>\tex\latex\local\`
* Windows Vista/7 `C:\Users\<user name>\texmf\tex\latex\local\`
* Windows XP `C:\Documents and Settings\<user name>\texmf\tex\latex\local\`
* Linux `~/texmf/tex/latex/local/`
* Mac OS X `/Users/<user name>/Library/texmf/tex/latex/local/`
*Note: the* `local/` *folder might not exist; in this case, go ahead and create it.*
A few of notes on that. First, on Windows the 'Users' part of the location is language dependent. Second, I've represented your home/user folder as '`<user name>`': this will obviously be dependent on your system. The folder I've indicated may well not exist: you may just have the `texmf` part, bits within that or nothing at all. The file location is important, and although you could just put your file inside `texmf/tex/latex` is is usual to keep things organised by package. The `local` folder is reserved for stuff installed on individual machines.
Letting TeX 'know' about the file means running a program that builds a database of file locations. There are graphical interfaces to do this, but the way that works on all operating systems is to use the Command Prompt/Terminal and type `texhash`. This will build the databases for your tree (the one that is in your home folder). Once the 'hash' is created TeX should be able to find your file. For recent TeXLive distributions, this step is not necessary for files in the local folder.
|
237
|
https://tex.stackexchange.com/users/73
|
1167
| 812 |
https://tex.stackexchange.com/questions/1166
|
43
|
A number of related questions have already been asked about this issue:
* [align vs equation](https://tex.stackexchange.com/questions/321/align-vs-equation)
* [which is preferable to](https://tex.stackexchange.com/questions/503/why-is-preferable-to)
* [what to do with this hyperref note on amsmath](https://tex.stackexchange.com/questions/975/what-to-do-with-this-hyperref-note-on-amsmath)
* and even [eqnarray vs align](https://tex.stackexchange.com/questions/196/eqnarray-vs-align)
But I'm still confused by the conflicting suggestions that have been given so far. So I'm trying again.
**Which should be the preferred command to produce a displayed equation in my LaTeX documents?**
So far the suggestions indicate that one should use `\[ ... \]`, maybe `\begin{equation*} ... \end{equation*}`, or maybe even the `gather*` or `align*` environments from `amsmath`.
And one should definitely **avoid** using either `$$...$$` or the `eqnarray` environment.
Now I have to say that, from a language perspective, I have a *strong* preference for the `equation*` environment because it is less cryptic than the `\[ ... \]` notation and it is [semantically](https://tex.stackexchange.com/questions/605/what-is-the-deal-about-these-semantic-vs-syntactic-commands) the most accurate.
So, is it fine to use `equation*`? Maybe only after loading `amsmath`? Or should the `equation`/`equation*` environment be redefined to something else so that spacing, package support, or whatever is improved?
|
https://tex.stackexchange.com/users/169
|
Which command should I use for displayed equations?
| false |
The `equation` environment cannot be compared to `\[...\]` because it's *numbered*. The equivalent to `\[...\]` is the `displaymath` environment. So you may use that for unnumbered equations.
Though amsmath redefines equation to allow a starred version.
As using amsmath is always recommended, using `equation` and `equation*` might be more consistent.
`$$` and `eqnarray` are out of question, whereas `gather`, `align` and the like are designed for multi-line formulas, I wouldn't misuse them for single-line equations.
|
12
|
https://tex.stackexchange.com/users/213
|
1169
| 813 |
https://tex.stackexchange.com/questions/1164
|
2
|
For example, currently if I do a `\cite{name}` I get this:
(AUTHOR1, 2000)
(AUTHOR1; AUTHOR2, 2000)
(AUTHOR1; AUTHOR2; AUTHOR3, 2000)
What I'd like is to have et al. beyond 2 authors and have "and" when there are just 2. So:
(AUTHOR1, 2000)
(AUTHOR1 and AUTHOR2, 2000)
(AUTHOR1 et al., 2000)
Is it possible to get that?
I've found these packages being imported by the model:
```
\usepackage[bibjustif,abnt-etal-cite=3,abnt-full-initials=yes]{abntcite}
\usepackage[toc,page]{modelo/tex/appendix}
\usepackage[portuguese,brazilian,portuges]{babel}
\usepackage[utf8]{inputenc}
\usepackage{abnt-alf}
\usepackage{graphicx}
\usepackage{multicol}
\usepackage{listings}
\usepackage{booktabs}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{eucal}
\usepackage{amssymb}
\usepackage{mathrsfs}
```
If I edit the `abnt-etal-cite=2` I can get the et al. as I need, but what about the separator between 2 authors names?
|
https://tex.stackexchange.com/users/572
|
Changing the way authors' names are displayed in a citation?
| false |
I suggest taking out the `\usepackage[bibjustif,abnt-etal-cite=3,abnt-full-initials=yes]{abntcite}` and putting somewhere `\bibliographystyle{plainnat}`. That should work. Also, try loading `\usepackage[round]{natbib}` and using the command `\citep{ }` for cites in parenthesis and `\citet{ }` for textual cites.
|
0
|
https://tex.stackexchange.com/users/401
|
1170
| 814 |
https://tex.stackexchange.com/questions/1164
|
2
|
For example, currently if I do a `\cite{name}` I get this:
(AUTHOR1, 2000)
(AUTHOR1; AUTHOR2, 2000)
(AUTHOR1; AUTHOR2; AUTHOR3, 2000)
What I'd like is to have et al. beyond 2 authors and have "and" when there are just 2. So:
(AUTHOR1, 2000)
(AUTHOR1 and AUTHOR2, 2000)
(AUTHOR1 et al., 2000)
Is it possible to get that?
I've found these packages being imported by the model:
```
\usepackage[bibjustif,abnt-etal-cite=3,abnt-full-initials=yes]{abntcite}
\usepackage[toc,page]{modelo/tex/appendix}
\usepackage[portuguese,brazilian,portuges]{babel}
\usepackage[utf8]{inputenc}
\usepackage{abnt-alf}
\usepackage{graphicx}
\usepackage{multicol}
\usepackage{listings}
\usepackage{booktabs}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{eucal}
\usepackage{amssymb}
\usepackage{mathrsfs}
```
If I edit the `abnt-etal-cite=2` I can get the et al. as I need, but what about the separator between 2 authors names?
|
https://tex.stackexchange.com/users/572
|
Changing the way authors' names are displayed in a citation?
| false |
The package abntcite is not available on CTAN. According to [this discussion](http://www.latex-community.org/forum/viewtopic.php?f=5&p=9743), the package and/or the accompanying style files were somewhat faulty two years ago. I suggest that you use the package [`biblatex`](http://ctan.org/pkg/biblatex) instead, which handles author names the way you want.
```
\documentclass{article}
\usepackage[style=authoryear,maxnames=2]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@misc{Aut10a,
author = {Author, A.},
year = {2010},
title = {And now for something completely different},
}
@misc{Aut10b,
author = {Author, A. and Buthor, B.},
year = {2010},
title = {And now for something completely different},
}
@misc{Aut10c,
author = {Author, A. and Buthor, B. and Cuthor, C.},
year = {2010},
title = {And now for something completely different},
}
\end{filecontents}
\bibliography{\jobname}
\begin{document}
\parencite{Aut10a}
\parencite{Aut10b}
\parencite{Aut10c}
% Name cap also in bibliography
\printbibliography
% No name cap in bibliography
\printbibliography[maxnames=99]
\end{document}
```
|
5
|
https://tex.stackexchange.com/users/510
|
1171
| 815 |
https://tex.stackexchange.com/questions/1172
|
2
|
Using LyX 1.6.5/MacTex-2009 my floating sideways figures only occupy half the page and the other half of the figure disappears off the left margin. I tried the rotfloat and rotating packages and they both give the same result.
The environment begins with `\begin{sidewaysfigure}`. The text is properly rotated but it just never gets past the half-way point of the page (along the short dimension in portrait).
Anyone have any ideas?
|
https://tex.stackexchange.com/users/153
|
How to get rotating and/or rotfloat to work
| false |
This example is compilable and works as expected:
```
\documentclass[demo]{article}
\usepackage{rotating}
\begin{document}
\begin{sidewaysfigure}
\centering
\includegraphics[width=0.8\textwidth,height=0.5\textheight]{Test}
\caption{Test example}
\end{sidewaysfigure}
\end{document}
```
Perhaps do it like this or post some concrete code.
|
2
|
https://tex.stackexchange.com/users/213
|
1173
| 816 |
https://tex.stackexchange.com/questions/885
|
78
|
I need to generate documents from a web application and would like to do this using the Python language and LaTeX, are there any tools that will help me?
**Edit**
This Application will be hosted on Linux, we can run any external commands using popen, there is currently no defined input document format, nor any storage format, but output to the end user should be PDF.
**Edit 2**
These documents will have complex tables, graphs, and require typeset equations - hence the reason to use LaTeX. We would also prefer not to use intermediate files such as xml->html->pdf
Ideally I would like something like pyTeX or plasTeX that could render directly to PDF.
|
https://tex.stackexchange.com/users/43
|
How can I use LaTeX from Python.
| false |
This question should be closed because it actually has nothing to do with LaTeX and is more suited for StackOverflow. In any case the answer is that just like with HTML the best way is to use a templating system like Jinja2 and just output a LaTeX file. Once you have a LaTeX file simply use the [subprocess](http://docs.python.org/library/subprocess.html) module to run pdflatex (obviously you need it installed on your server). Don't forget to use the "-interaction nonstopmode" flag. I could go into technical details but again it's really more suited for a different site.
|
17
|
https://tex.stackexchange.com/users/nan
|
1174
| 817 |
https://tex.stackexchange.com/questions/1176
|
30
|
I have to type the product of n variables, `$x_1\cdot\ldots\cdot x_n$`.
Although maybe this is semantically the right way (like it is for the sum), it doesn't look very well. What should be, typographically, a better way to do it?
For example:
Just the ldots as in `$x_1\ldots x_n$` is confusing when there are going to be also lists of the variables separated by commas in nearby sentences.
With `\dotsc` like in `$x_1\dotsc x_n$` maybe, but is there a better idea?
|
https://tex.stackexchange.com/users/574
|
How to type the three dots in a product?
| true |
Use `\cdots`. (See also: `\vdots` and `\ddots`.)
Edit
----
Actually, I just read in the [«Short Math Guide for LaTeX» by the AMS](http://tug.ctan.org/info/short-math-guide/short-math-guide.pdf) that:
* `\dotsc` is for dots with commas,
* `\dotsb` is for dots with binary operators,
* `\dotsm` is for multiplication dots,
* `\dotsi` is for dots with integrals,
* `\dotso` is for other dots.
So, `\cdots` and `\ldots` are commonly used but the AMS convention is to use the more semantic commands.
|
50
|
https://tex.stackexchange.com/users/nan
|
1178
| 818 |
https://tex.stackexchange.com/questions/1177
|
11
|
Many packages come with switches, to be defined in the preamble. Is it possible to hit such a switch also in the body of the document?
Example: Can I switch from the functionality of
```
\usepackage[russian]{babel}
```
to that of
```
\usepackage[french]{babel}
```
within one section or figure caption?
Edit: [`babel`](https://www.ctan.org/pkg/babel) is just one example for which I have a good idea about what the switches actually do, but the question is meant to be more general. By the way, is there a generic name for these switches that could be used, e.g., to search the documentation of a package? Or a term for cases when both options can be used in parallel (like in `babel`) or not?
|
https://tex.stackexchange.com/users/44890
|
Package switches within the document?
| false |
If you specifically mean `babel`, then you load the package with both languages
```
\usepackage[russian,french]{babel}
```
then switch with `\selectlanguage{russian}` (In the example, `french` will be the main language.) See the `babel` documentation for more detail.
(Other packages with load time options also provide methods to alter settings, but this is package-dependent.)
|
9
|
https://tex.stackexchange.com/users/73
|
1179
| 819 |
https://tex.stackexchange.com/questions/1166
|
43
|
A number of related questions have already been asked about this issue:
* [align vs equation](https://tex.stackexchange.com/questions/321/align-vs-equation)
* [which is preferable to](https://tex.stackexchange.com/questions/503/why-is-preferable-to)
* [what to do with this hyperref note on amsmath](https://tex.stackexchange.com/questions/975/what-to-do-with-this-hyperref-note-on-amsmath)
* and even [eqnarray vs align](https://tex.stackexchange.com/questions/196/eqnarray-vs-align)
But I'm still confused by the conflicting suggestions that have been given so far. So I'm trying again.
**Which should be the preferred command to produce a displayed equation in my LaTeX documents?**
So far the suggestions indicate that one should use `\[ ... \]`, maybe `\begin{equation*} ... \end{equation*}`, or maybe even the `gather*` or `align*` environments from `amsmath`.
And one should definitely **avoid** using either `$$...$$` or the `eqnarray` environment.
Now I have to say that, from a language perspective, I have a *strong* preference for the `equation*` environment because it is less cryptic than the `\[ ... \]` notation and it is [semantically](https://tex.stackexchange.com/questions/605/what-is-the-deal-about-these-semantic-vs-syntactic-commands) the most accurate.
So, is it fine to use `equation*`? Maybe only after loading `amsmath`? Or should the `equation`/`equation*` environment be redefined to something else so that spacing, package support, or whatever is improved?
|
https://tex.stackexchange.com/users/169
|
Which command should I use for displayed equations?
| true |
You should use the environments from amsmath. In practice, `equation` and `align` are all you usually need.
* If you have a single equation, use `equation`. (Or `equation*` if you don't want it numbered. Most of the other environments below also have similar \* variants.)
* If you have a single equation spanning multiple lines, you can either use `multline`, or use `split` (inside `equation`) to have the parts aligned.
* If you have multiple equations and you want them to be aligned, use `align` (or `align*`).
* If you simply want to typeset multiple equations independently (with no alignment), use `gather`.
There are also `flalign` and `alignat`, for some special cases. See the [Short Math Guide for LaTeX](ftp://ftp.ams.org/pub/tex/doc/amsmath/short-math-guide.pdf) or `texdoc amsldoc` ([PDF](ftp://ftp.ams.org/pub/tex/doc/amsmath/amsldoc.pdf)) for more documentation on these environments.
`\[` simply says "set the following in a math display", like plain TeX 's `$$` (which you should not use), and is equivalent to `displaymath`. You can use it if you want an unnumbered equation and are too lazy to type (not good practice, semantically speaking), or, I guess, when you're simply "displaying" some long bit of mathematics that isn't an actual equation. And [never use](http://www.tug.org/pracjourn/2006-4/madsen/) [eqnarray](http://texblog.net/latex-archive/maths/eqnarray-align-environment/).
|
35
|
https://tex.stackexchange.com/users/48
|
1180
| 820 |
https://tex.stackexchange.com/questions/1177
|
11
|
Many packages come with switches, to be defined in the preamble. Is it possible to hit such a switch also in the body of the document?
Example: Can I switch from the functionality of
```
\usepackage[russian]{babel}
```
to that of
```
\usepackage[french]{babel}
```
within one section or figure caption?
Edit: [`babel`](https://www.ctan.org/pkg/babel) is just one example for which I have a good idea about what the switches actually do, but the question is meant to be more general. By the way, is there a generic name for these switches that could be used, e.g., to search the documentation of a package? Or a term for cases when both options can be used in parallel (like in `babel`) or not?
|
https://tex.stackexchange.com/users/44890
|
Package switches within the document?
| false |
For Babel, you have the command `\selectlanguage` that does exactly that. Obviously, you need such a thing to switch language inside a document body, because it wouldn't make sense to select all the languages at the same time! As you probably know, the convention in Babel is that the *last* language in the list of option is activated at `\begin{document}`; hence a command like `\usepackage[french,russian]{babel}` will declare the document to be in Russian by default, and use the settings of `russian.ldf`.
Generally speaking, any package you use should provide such switches because that's exactly what you need, as a user. If the functionality of the package implies that you can switch between different options, the developer has probably foreseen such use, and it should be mentioned in the documentation.
But you can't load a package mid-document (`\usepackage` forbids that). This is a technical limitation that has its justification from the point of view of an interface designer. It is a guarantee to both the user and the developer: if someone writes a package for LaTeX, he knows that it will be loaded before `\begin{document}`, and hence before any text will be output to the page; this means he will be able to make implementation choices depending on this (that might fail if this condition wasn't true). If you were, as a user, to modify `\usepackage`'s behaviour so that it could be invoked after the preamble—it shouldn't be too hard, by tweaking the LaTeX sources—, and you used that new possibility, you could unknowingly be in a situation that hasn't been foreseen at all by the developer, because it's impossible given the way LaTeX is currently written (and this is a design *choice*, not a technical problem). Hence you, the user, depend on the user interface the package developer has programmed for you; just like the package developer depends on the programming interface the LaTeX core provides.
Of course, loading a package mid-document (with or without different switches) could be completely harmless in many cases, but this is not something you can rely on; the only guarantee the user has are the switches the package developer has provided himself.
Sorry I can't think of any concrete example right now.
|
9
|
https://tex.stackexchange.com/users/170
|
1181
| 821 |
https://tex.stackexchange.com/questions/1177
|
11
|
Many packages come with switches, to be defined in the preamble. Is it possible to hit such a switch also in the body of the document?
Example: Can I switch from the functionality of
```
\usepackage[russian]{babel}
```
to that of
```
\usepackage[french]{babel}
```
within one section or figure caption?
Edit: [`babel`](https://www.ctan.org/pkg/babel) is just one example for which I have a good idea about what the switches actually do, but the question is meant to be more general. By the way, is there a generic name for these switches that could be used, e.g., to search the documentation of a package? Or a term for cases when both options can be used in parallel (like in `babel`) or not?
|
https://tex.stackexchange.com/users/44890
|
Package switches within the document?
| true |
babel is perhaps not the best example, because you could state both options and switch by `\selectlanguage`:
```
\usepackage[russian,french]{babel}
...
\selectlanguage{french}
...
\selectlanguage{russian}
```
Many packages provide their own way to change options aka switches: `hyperref` uses `\hypersetup`, `caption` uses `\captionsetup`, even classes offer such late configuration like KOMA-Script classes by `\KOMAoption` and `\KOMAoptions`.
|
12
|
https://tex.stackexchange.com/users/213
|
1182
| 822 |
https://tex.stackexchange.com/questions/1176
|
30
|
I have to type the product of n variables, `$x_1\cdot\ldots\cdot x_n$`.
Although maybe this is semantically the right way (like it is for the sum), it doesn't look very well. What should be, typographically, a better way to do it?
For example:
Just the ldots as in `$x_1\ldots x_n$` is confusing when there are going to be also lists of the variables separated by commas in nearby sentences.
With `\dotsc` like in `$x_1\dotsc x_n$` maybe, but is there a better idea?
|
https://tex.stackexchange.com/users/574
|
How to type the three dots in a product?
| false |
Or you can use `\dots` which can be used both inside and outside of math-mode.
|
6
|
https://tex.stackexchange.com/users/313
|
1183
| 823 |
https://tex.stackexchange.com/questions/975
|
19
|
<http://www.ctan.org/tex-archive/macros/latex/contrib/hyperref/> has this note copied below:
>
> amsmath
>
> -------------
>
> The environments `equation` and `eqnarray` are not supported too well.
> For example, there might be spacing problems (`eqnarray` isn't recommended
> anyway, see CTAN:info/l2tabu/, the situation for `equation` is unclear,
> because nobody is interested in investigating). Consider using the
> environments that package `amsmath` provide, e.g. `gather` for `equation`.
> The environment `equation` can even redefined to use gather:
>
>
>
> ```
> \usepackage{amsmath}
> \let\equation\gather
> \let\endequation\endgather`
>
> ```
>
>
However, `gather` and `equation` environment have the spacing difference as in the answer by Will in [align vs equation](https://tex.stackexchange.com/questions/321/align-vs-equation). Thus my question:
In a document using both hyperref and amsmath, what is the best replacement for `equation`?
|
https://tex.stackexchange.com/users/337
|
What to do with this hyperref note on amsmath?
| true |
You can see a spacing problem with the following example. The two equations have different spacing with hyperref, but the same spacing (as they should) without it:
```
\documentclass[fleqn]{article}
\usepackage{amsmath}
\usepackage{hyperref}
\begin{document}
This is a test to check the spacing of the equation environment. Too much?
\begin{equation}
a=b
\end{equation}
This is a test to check the spacing of the equation environment.
This is a test to check the spacing of the equation environment. Too much?%
\begin{equation}
a=b
\end{equation}
This is a test to check the spacing of the equation environment.
\end{document}
```
But this problem is imo not enough to stop using the equation environment. The other math environments produce too much space if the sentence before the displayed math is short:
```
\documentclass{article}
\usepackage{amsmath}
\begin{document}
This is a test to check the spacing of the equation environment. Too much? Foo.
\begin{equation}
a=b
\end{equation}
This is a test to check the spacing of the equation environment.
This is a test to check the spacing of the align environment. Too much? Foo.
\begin{align}
a=b
\end{align}
This is a test to check the spacing of the align environment.
\end{document}
```
which is a much more common problem.
|
15
|
https://tex.stackexchange.com/users/565
|
1184
| 824 |
https://tex.stackexchange.com/questions/1072
|
105
|
There exist several types of graphics files, such as jpeg eps pdf png tif jif. Some work with LaTeX + Dvips and some work with PDFLaTeX. How to know which type is for which processor?
Just to confuse matters, metapost produces .eps files, but I can use these with PDFLaTeX as long as I put in a four line incantation.
Can anyone explain this?
|
https://tex.stackexchange.com/users/511
|
Which graphics formats can be included in documents processed by LaTeX or PDFLaTeX?
| false |
unfortunately, the psfrag command which can be of little help when dealing with graphics is not handled by pdflatex. For font consistency along your document, it may be a non-negligible shortcoming (you can still use tikz instead). Also, the next-generation vector format svg should become the most used one soon. I cannot tell if either latex or pdflatex accept it.
|
4
|
https://tex.stackexchange.com/users/371
|
1185
| 825 |
https://tex.stackexchange.com/questions/1030
|
14
|
The [movie15](http://www.ctan.org/tex-archive/help/Catalogue/entries/movie15.html) package (an interface to embed movies, sounds and 3D objects into PDF documents for use with LaTeX as well as pdfLaTeX) requires 3D files to be in [u3d](http://www.ecma-international.org/publications/standards/Ecma-363.htm) format for embedding into pdf. This works fine with the sample files provided, and I have no problem generating suitable 3D files, but so far, I have not found a way to convert them to u3d. [MeshLab](http://sourceforge.net/search/?group_artifact_id=774731&type_of_search=artifact&group_id=149444&words=u3d), usually the first place to go for such things, crashes during u3d export.
Does anyone know of a way to produce u3d files suitable for use with the movie15 package?
As I am a newbie, I can only post one link, so I put a version of this question with some links on [my blog](http://ways.org/en/blogs/2010/aug/04/for_movie15based_3d_embeds_how_to_get_u3d_files).
(Links added in edit)
Edit: I have to add that my question was about 3D files generated on the basis of imaging data; since some of the initial answers were specific for drawing.
|
https://tex.stackexchange.com/users/44890
|
For movie15-based 3D embeds, how to get u3d files?
| false |
u3d has initially been developed by Right Hemisphere [link text](http://www.righthemisphere.com/) and some of the patents purchased by Adobe to create Acrobat 3D. This tool is able to translate most of the existing 3D formats to u3d but is not free. I think that new extensions are slowly replacing the u3d protocol.
|
0
|
https://tex.stackexchange.com/users/371
|
1186
| 826 |
https://tex.stackexchange.com/questions/1030
|
14
|
The [movie15](http://www.ctan.org/tex-archive/help/Catalogue/entries/movie15.html) package (an interface to embed movies, sounds and 3D objects into PDF documents for use with LaTeX as well as pdfLaTeX) requires 3D files to be in [u3d](http://www.ecma-international.org/publications/standards/Ecma-363.htm) format for embedding into pdf. This works fine with the sample files provided, and I have no problem generating suitable 3D files, but so far, I have not found a way to convert them to u3d. [MeshLab](http://sourceforge.net/search/?group_artifact_id=774731&type_of_search=artifact&group_id=149444&words=u3d), usually the first place to go for such things, crashes during u3d export.
Does anyone know of a way to produce u3d files suitable for use with the movie15 package?
As I am a newbie, I can only post one link, so I put a version of this question with some links on [my blog](http://ways.org/en/blogs/2010/aug/04/for_movie15based_3d_embeds_how_to_get_u3d_files).
(Links added in edit)
Edit: I have to add that my question was about 3D files generated on the basis of imaging data; since some of the initial answers were specific for drawing.
|
https://tex.stackexchange.com/users/44890
|
For movie15-based 3D embeds, how to get u3d files?
| false |
u3d has initially been developed by [Right Hemisphere](http://www.righthemisphere.com/) and some of the patents purchased by Adobe to create Acrobat 3D. This tool is able to translate most of the existing 3D formats to u3d but is not free. I think that new extensions are slowly replacing the u3d protocol.
|
1
|
https://tex.stackexchange.com/users/371
|
1187
| 827 |
https://tex.stackexchange.com/questions/975
|
19
|
<http://www.ctan.org/tex-archive/macros/latex/contrib/hyperref/> has this note copied below:
>
> amsmath
>
> -------------
>
> The environments `equation` and `eqnarray` are not supported too well.
> For example, there might be spacing problems (`eqnarray` isn't recommended
> anyway, see CTAN:info/l2tabu/, the situation for `equation` is unclear,
> because nobody is interested in investigating). Consider using the
> environments that package `amsmath` provide, e.g. `gather` for `equation`.
> The environment `equation` can even redefined to use gather:
>
>
>
> ```
> \usepackage{amsmath}
> \let\equation\gather
> \let\endequation\endgather`
>
> ```
>
>
However, `gather` and `equation` environment have the spacing difference as in the answer by Will in [align vs equation](https://tex.stackexchange.com/questions/321/align-vs-equation). Thus my question:
In a document using both hyperref and amsmath, what is the best replacement for `equation`?
|
https://tex.stackexchange.com/users/337
|
What to do with this hyperref note on amsmath?
| false |
i'm writing on behalf of the maintainers of amsmath. we do maintain a list of bugs reported for both amsmath and friends and the ams document classes, and are now actively examining the list in preparation for an upgrade of the entire collection.
the spacing problem mentioned in this thread appears to be a bug, though not identical to any that have already been reported (a vertical spacing mismatch between equation and multline is on our list), so this example will be examined and added to the list if verified.
**Update:**
Maintenance of this package was transferred to the LaTeX Project team in 2016.
Bug reports can be opened (category amslatex) at
<https://latex-project.org/bugs/>.
|
24
|
https://tex.stackexchange.com/users/579
|
1188
| 828 |
https://tex.stackexchange.com/questions/1072
|
105
|
There exist several types of graphics files, such as jpeg eps pdf png tif jif. Some work with LaTeX + Dvips and some work with PDFLaTeX. How to know which type is for which processor?
Just to confuse matters, metapost produces .eps files, but I can use these with PDFLaTeX as long as I put in a four line incantation.
Can anyone explain this?
|
https://tex.stackexchange.com/users/511
|
Which graphics formats can be included in documents processed by LaTeX or PDFLaTeX?
| false |
The graphics formats that you can use depend on the graphics driver not on (pdf)LaTeX:
As others have said pdfLaTeX in *pdf-mode* can use pdf, png, jpg, and mps.
LaTeX in *dvi-mode* and *dvips* as driver can use eps (and mps).
LaTeX in *dvi-mode* and *dvipdfmx* as driver can use eps (and mps), pdf, png, and jpg if you provide information about the bounding box and inform graphicx that you use dvipdfmx:
```
% test.tex
\documentclass{article}
\usepackage[dvipdfm]{graphicx}
\begin{document}
\includegraphics{demo.png}
\end{document}
```
First generate `demo.bb` with the bounding box information:
```
ebb demo.png
```
then compile to dvi with latex:
```
latex test.tex
```
and finally generate the pdf:
```
dvipdfmx test.dvi
```
|
11
|
https://tex.stackexchange.com/users/565
|
1189
| 829 |
https://tex.stackexchange.com/questions/1191
|
84
|
When I run pdfLaTeX, I get very verbose output:
```
(/usr/local/texlive/2008/texmf-dist/tex/generic/pgf/frontendlayer/tikz/librarie
s/tikzlibrarycalc.code.tex)
...
```
Is there a script to soak up all the verbose output and allow the important stuff to pass through, like errors, overfull hboxes, and so on?
Also, is there a reason why it sends a hard return to the console for lines longer than 79 characters?
|
https://tex.stackexchange.com/users/512
|
Reducing the console output of LaTeX
| false |
This is what the [silence](http://ctan.org/pkg/silence) package is intended to help with.
|
20
|
https://tex.stackexchange.com/users/565
|
1192
| 830 |
https://tex.stackexchange.com/questions/1191
|
84
|
When I run pdfLaTeX, I get very verbose output:
```
(/usr/local/texlive/2008/texmf-dist/tex/generic/pgf/frontendlayer/tikz/librarie
s/tikzlibrarycalc.code.tex)
...
```
Is there a script to soak up all the verbose output and allow the important stuff to pass through, like errors, overfull hboxes, and so on?
Also, is there a reason why it sends a hard return to the console for lines longer than 79 characters?
|
https://tex.stackexchange.com/users/512
|
Reducing the console output of LaTeX
| false |
The line feed after 79 characters is defined in Web2C's configuration file, called texmf.cnf. The variable name is `max_print_line` which you can change in the file (not recommended in general, but in that case the setting is *really* harmless); and if you run TeX from a shell you can also set this variable in the environment (`export max_print_line=1048576` for Korn-like shells, `set max_print_line 1048576` for C shells).
I am not aware of a way to forbid line breaks entirely; I only set the variable to a very large value when this behaviour annoys me.
|
34
|
https://tex.stackexchange.com/users/170
|
1193
| 831 |
https://tex.stackexchange.com/questions/1191
|
84
|
When I run pdfLaTeX, I get very verbose output:
```
(/usr/local/texlive/2008/texmf-dist/tex/generic/pgf/frontendlayer/tikz/librarie
s/tikzlibrarycalc.code.tex)
...
```
Is there a script to soak up all the verbose output and allow the important stuff to pass through, like errors, overfull hboxes, and so on?
Also, is there a reason why it sends a hard return to the console for lines longer than 79 characters?
|
https://tex.stackexchange.com/users/512
|
Reducing the console output of LaTeX
| false |
[Rubber](https://launchpad.net/rubber/) has (among other things) some filtering capabilities, and generally gives errors in a very compressed form. You can also tell it to give you only certain kinds of warnings using `--warn=`.
|
20
|
https://tex.stackexchange.com/users/490
|
1194
| 832 |
https://tex.stackexchange.com/questions/577
|
85
|
What resources (online or otherwise) exist that give good advice on *best practices* for TeX, etc.? I'm looking particularly for things that assume you already know TeX or LaTeX, and aim to help you achieve better results, with rationales explained. Resources with some specific focus are welcome. I'll start a list with two suggestions of my own so you can see what I mean.
Somewhat to my surprise I haven't found this question asked here already. (Please point me to it if I'm wrong!) Note that what I'm asking is somewhat different from [What are good learning resources for a LaTeX beginner?](https://tex.stackexchange.com/questions/11/what-is-the-best-book-to-start-learning-latex) and [What are other good resources on-line for information about TeX, LaTeX and friends?](https://tex.stackexchange.com/questions/162/what-are-other-good-respources-on-line-for-information-about-tex-latex-and-frien), although there's lots of room for overlapping answers.
|
https://tex.stackexchange.com/users/206
|
Best practices references
| false |
Though apparently removed from Stack Overflow1, there is a similar question available at archive.org: [Best practices in LaTeX [closed]](https://web.archive.org/web/20140810161750/https://stackoverflow.com/questions/193298/best-practices-in-latex)
The answers are quite useful.
---
1. <https://stackoverflow.com/questions/193298/best-practices-in-latex>
|
17
|
https://tex.stackexchange.com/users/564
|
1196
| 834 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.