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/1940
|
7
|
I'd like to define acronyms via the `\de`f command. I know that the acronym package exists, but that's too much typing (`\ac{myacronym}` vs. `\myacronym`).
The problem that I have is that for `\def\myacronym{acronym expanded}`, it won't have an empty space after it, so I can only use it in front of punctuation. For `\def\myacronym{acronym expanded }`, I cannot use it before punctuation because it always causes an empty space.
My question is: How can I detect whether punctuation comes after the acronym, so I can dynamically generate a space only if needed. Also, it would be nice to be able to detect whether there is the string ". " before my acronym, so I could make the acronym uppercase dynamically.
I guess this is kind of hard to do since those parameters are not passed to the function, but maybe somebody has an idea.
|
https://tex.stackexchange.com/users/nan
|
Custom acronyms via \def
| false |
If I understand it correctly, the `\xspace` macro from the xspace package does this.
Usage:
```
\usepackage{xspace}
...
\newcommand\myacronym{whatever\xspace}
```
similar for plain.tex.
|
10
|
https://tex.stackexchange.com/users/243
|
1942
| 1,355 |
https://tex.stackexchange.com/questions/1940
|
7
|
I'd like to define acronyms via the `\de`f command. I know that the acronym package exists, but that's too much typing (`\ac{myacronym}` vs. `\myacronym`).
The problem that I have is that for `\def\myacronym{acronym expanded}`, it won't have an empty space after it, so I can only use it in front of punctuation. For `\def\myacronym{acronym expanded }`, I cannot use it before punctuation because it always causes an empty space.
My question is: How can I detect whether punctuation comes after the acronym, so I can dynamically generate a space only if needed. Also, it would be nice to be able to detect whether there is the string ". " before my acronym, so I could make the acronym uppercase dynamically.
I guess this is kind of hard to do since those parameters are not passed to the function, but maybe somebody has an idea.
|
https://tex.stackexchange.com/users/nan
|
Custom acronyms via \def
| false |
I don't know of any way to look behind to tell whether or not the acronym should be capitalised, but you could fake it. If you define `\Myacronym` to be the correctly capitalised version then you can use `\myacronym` or `\Myacronym` accordingly. Although this isn't quite what you want, it will actually look better when scanning the source text: compare
>
> And so to bed. \Myacronym got up early in the morning.
>
>
>
with
>
> And so to bed. \myacronym got up early in the morning.
>
>
>
On a quick scan, the eye doesn't recognise the `\` and disregards it as noise; thus the small 'm' looks a bit odd on the second one.
|
1
|
https://tex.stackexchange.com/users/86
|
1944
| 1,356 |
https://tex.stackexchange.com/questions/1938
|
20
|
I'd like to format two groups of equations such that all their equal signs line up and such that I can put a big brace to the right of each block to annotate that block. The last part is easily achieved using the `aligned` environment of `amsmath`:
```
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
\left.\begin{aligned}
\alpha_X \times \alpha_Y &= \chi \\
\alpha_X \times \beta_Y &= \xi \\
\beta_X \times \beta_Y &= \zeta
\end{aligned}\right\} \quad X<Y \\[2em]
\left.\begin{aligned}
\Upsilon_j &= 0 \\
\Psi_j &= \sqrt{\sinh E - \tan^2\tfrac{F}{2}} \\
\Gamma_j &= F
\end{aligned}\right\} \quad j=1,\ldots,g
\end{align}
\end{document}
```
But that doesn't line up the equal signs. I guess I could achieve this with some manual horizontal white space, but I'd like something automatic. Something like the `split` environment which supports reusing the anchor points of the outside 'align' environment:
```
\begin{align}
A &= 0 \\
BB &= AVE + VEA + EAV \\
\begin{split}
CCC &= UVWXY + VWXYU + WXYUV \\
&\quad {} + XYUVW + YUVWX
\end{split}
\end{align}
```
Is there a way to make aligned reuse the anchor points of the outside `align`?
Also, is there an automatic way to additionally line up the big braces in the first example?
|
https://tex.stackexchange.com/users/598
|
Aligning across 'aligned' equation blocks
| true |
Here's a solution using the widths of the widest expression on each side. You have to specify which expression it is:
```
\documentclass{article}
\usepackage{amsmath}
\newlength{\leftside}
\newlength{\rightside}
\newcommand*{\leftterm}{}
\newcommand*{\rightterm}{}
\newcommand*{\term}[1]{$\displaystyle#1$}
\begin{document}
\[
\renewcommand*{\leftterm}{\alpha_X \times \alpha_Y}
\renewcommand*{\rightterm}{\sqrt{\sinh E - \tan^2\tfrac{F}{2}}}
\settowidth{\leftside}{\term{\leftterm}}
\settowidth{\rightside}{\term{\rightterm}}
\begin{array}{l}
\left.\begin{aligned}
\leftterm &= \makebox[\rightside][l]{\term{\chi}} \\
\alpha_X \times \beta_Y &= \xi \\
\beta_X \times \beta_Y &= \zeta
\end{aligned}\right\} \quad X<Y \\[2em]
\left.\begin{aligned}
\makebox[\leftside][r]{\term{\Upsilon_j}} &= 0 \\
\Psi_j &= \rightterm \\
\Gamma_j &= F
\end{aligned}\right\} \quad j=1,\ldots,g
\end{array}
\]
\end{document}
```
Equal signs as well as the big braces line up:
|
7
|
https://tex.stackexchange.com/users/213
|
1946
| 1,357 |
https://tex.stackexchange.com/questions/1940
|
7
|
I'd like to define acronyms via the `\de`f command. I know that the acronym package exists, but that's too much typing (`\ac{myacronym}` vs. `\myacronym`).
The problem that I have is that for `\def\myacronym{acronym expanded}`, it won't have an empty space after it, so I can only use it in front of punctuation. For `\def\myacronym{acronym expanded }`, I cannot use it before punctuation because it always causes an empty space.
My question is: How can I detect whether punctuation comes after the acronym, so I can dynamically generate a space only if needed. Also, it would be nice to be able to detect whether there is the string ". " before my acronym, so I could make the acronym uppercase dynamically.
I guess this is kind of hard to do since those parameters are not passed to the function, but maybe somebody has an idea.
|
https://tex.stackexchange.com/users/nan
|
Custom acronyms via \def
| false |
You have gotten the answer to the \def question.
This is just a note.
I used to format acronyms as I go and find that very distracting with long documents. So now while drafting I input acronyms as is (all caps) and at final stage use the text editor to change all of them into the markup I need. It takes about 0.3 second for each chapter and save me from all those extra typings.
BTW, in general I'd recommend the package `glossaries` for typesetting acronyms.
|
2
|
https://tex.stackexchange.com/users/337
|
1948
| 1,358 |
https://tex.stackexchange.com/questions/1811
|
24
|
```
\usepackage[utf8]{inputenc}
```
or
```
\usepackage[latin1]{inputenc}
```
I write in German if that matters.
Pro and contra?
|
https://tex.stackexchange.com/users/817
|
utf8 or latin1 encoding – German
| false |
I would also suggest using utf8, but you should **definitely** check whether all the editors you are going to use (if working with many platforms) actually support it. Although it is 2010, this may *still* pose a problem. Shame on some developers.
In my personal opinion, using the package `ngerman` and encoding umlauts via `"` (i.e. `ä = "a`) may work better in the long run. It takes a few days to adjust to writing like this, but then your TeX files are ASCII files. With ASCII files, you will never run into any problems.
[I realize that this is not the most modern approach. I myself am quite happy with using utf8 and the venerable `vim` editor. Your mileage may vary...]
|
2
|
https://tex.stackexchange.com/users/870
|
1949
| 1,359 |
https://tex.stackexchange.com/questions/1924
|
4
|
Whenever I try to use the `alignat` environment, it doesn't seem to work on my computer! I tried the following simple code (my file had `\usepackage{amsmath}`):
```
\begin{alignat}{3}
\min \quad x_1 & + 2x_2 & + 4x_3 & & & \\
\text{s.t.} \quad x_1 & + x_2 & + 3x_3 & = & 5 & \\
2x_1 & + x_2 & + 6x_3 & = & 8 & \\
x_1 &, x_2 &, x_3 & \geq & 0 & .
\end{alignat}
```
On compilation, I get the following error:
```
! Missing # inserted in alignment preamble. <to be read again>
\crcr l.114 \end{alignat}
```
Any ideas why this might be?
|
https://tex.stackexchange.com/users/nan
|
alignat problem
| false |
Your code also compiles for me, and as [Lev suggested](https://tex.stackexchange.com/questions/1924/alignat-problem#1927) constructing a [minimal example](https://tex.meta.stackexchange.com/questions/228/ive-just-been-told-i-have-to-write-a-minimal-example-what-is-that) will really help to narrow down where your problem lies, but I was able to generate a similar error to what you have by incorrectly using the `tabular` environment inside the `alignat` environment.
For example,
```
\begin{document}
\begin{alignat}{3}
\begin{tabular}{||}
test
\end{tabular}
\end{alignat}
```
results in the error
```
! Missing # inserted in alignment preamble.
<to be read again>
\cr
l.9 \end{alignat}
```
Since the `l.9` and `l.114` just refer to line numbers in the code, the main difference is that my error includes `\cr` where yours says `\crcr`.
I can solve my alignment preamble error by using at least one correct column alignment character in the `tabular` environment, for example by switching to `\begin{tabular}{|c|}`.
|
1
|
https://tex.stackexchange.com/users/32
|
1951
| 1,360 |
https://tex.stackexchange.com/questions/1952
|
43
|
I had not been aware of [Tikz](http://www.texample.net/tikz/examples/) before joining this site, but am impressed with what it appears to be able to accomplish. Before I jump in and start learning all about it though, I wanted to see if people have any experience with submitting papers that use TikZ to scientific journals. Do they tend to automatically support it, or definitely not accept it, or work with you if you can convince them it's needed? Something else entirely? (I recognize that it would be possible to use TikZ in my copy of a paper, then generate a raster image from the output, and include that in place of the `tikzpicture` in the copy I submit, but that's not what I'm wondering about here.)
I'm personally interested in physics journals, but I think answers from any field could be potentially useful to others who may be wondering the same thing.
|
https://tex.stackexchange.com/users/32
|
Using TikZ in journal articles
| false |
If the journal doesn't support TikZ directly, you could create pdf images of your TikZ pictures. That's much better than providing raster images. pdf should be supported well and keeps the high quality. You still could provide the TikZ source with it.
|
28
|
https://tex.stackexchange.com/users/213
|
1955
| 1,363 |
https://tex.stackexchange.com/questions/1957
|
17
|
I'm investigating about possible strategies to get nice vectors, discarding bold fonts. To make it simple, I'm not very happy with traditional ways of writing vectors with arrows. Please compare `$\overrightarrow{OM}$`, `$\overrightarrow{M}$`, `$\vec{OM}$` and `$\vec{M}$`. My preference goes to the `$\vec{M}$` command which is not suited for longer names like `$\vec{OM}$` and I do not like `\overrightarrow`. I would be interested in possibles ways to overcome these problems. Thank you
|
https://tex.stackexchange.com/users/371
|
Strategies for nice vectors
| true |
The [`esvect`](http://ctan.org/pkg/esvect) package allows to choose between several vector arrows:
Width (according to the argument) and size (according to the context, normal, subscripts, subsubscripts) are automatically calculated.
|
24
|
https://tex.stackexchange.com/users/213
|
1958
| 1,365 |
https://tex.stackexchange.com/questions/1959
|
143
|
In the inline math mode (`$...$`), if the formula is too long, LaTeX will try to break it on operators, e.g.
```
very long text followed by a very long equation like $a+b+c+d+e+f+g+h+i+j+k+l$ etc
```
may be rendered as
```
very long text followed
by a very long equation
like a+b+c+d+e+f+g+h+i+
j+k+l etc
```
However, the break won't happen if they are separated by commas, e.g.
```
very long text followed by a very long equation like $a,b,c,d,e,f,g,h,i,j,k,l$ etc
```
will overflow the page like
```
very long text followed
by a very long equation
like a,b,c,d,e,f,g,h,i,j,k,l
etc
```
How to make LaTeX able to insert line breaks after a comma too?
|
https://tex.stackexchange.com/users/82
|
Allowing line break at ',' in inline math mode?
| true |
If the expression contains many commas then consider to break it into several math expressions, separated by commas. It reads like a list of math expressions. This way TeX can break the line.
To achieve line breaks after a comma, you could insert `\allowbreak` after the comma and before the next math symbol. If necessary, leave a blank after `\allowbreak`.
If you would like to have a document wide solution, you could redefine the comma. One solution, following the tip [here](http://users.ugent.be/~gdschrij/LaTeX/textricks.html#mathcommabreak) would be:
```
\makeatletter
\def\old@comma{,}
\catcode`\,=13
\def,{%
\ifmmode%
\old@comma\discretionary{}{}{}%
\else%
\old@comma%
\fi%
}
\makeatother
```
|
127
|
https://tex.stackexchange.com/users/213
|
1960
| 1,366 |
https://tex.stackexchange.com/questions/1961
|
4
|
I am currently writing a document in LyX and I'm using hyperref to have links in the ToC, citations etc. The problem is that I added a figure (with float) and when I make a cross-reference in the text, the reference itself becomes a link that leads to the page that contains the actual figure. For example:
```
------Sample Graphic-------
Figure 1.1: Example of a graphic
```
And in the text that follows:
```
As we can see in figure 1.1 there is...
```
Now if I hover the mouse over 1.1 there is a link pointing to the location of the actual figure. Is there any way to disable the links for figures? Perhaps using "hypersetup" or a renewcommand...?
|
https://tex.stackexchange.com/users/876
|
How can I disable the linking for figures in LyX?
| true |
You could use the starred form `\ref*` to suppress the link. If you want to suppress all links for cross-references in your document, you could write
```
\makeatletter
\let\ref\@refstar
\makeatother
```
after `\begin{document}`. With LyX that means, insert it as ERT at the beginning of your document.
Note, this definition wouldn't work this way in the preamble because hyperref makes changes after the preamble. So, it might be done with `\AtBeginDocument{...}` after loading hyperref but I guess the simple solution may be sufficient.
|
8
|
https://tex.stackexchange.com/users/213
|
1962
| 1,367 |
https://tex.stackexchange.com/questions/1963
|
10
|
What are relative merits of these two Latex editors:
[TeXnicCenter](http://www.texniccenter.org/) and [Texmaker](http://www.xm1math.net/texmaker/)?
What are their shortcomings to prefer one over other?
Inspired by [this](https://stackoverflow.com/questions/270121/best-latex-editor-for-windows) SO question.
|
https://tex.stackexchange.com/users/69
|
Texmaker and TeXnicCenter.
| false |
* Texmaker is cross-platform, working on Windows, Linux and Mac OS X while TeXnicCenter works only on Windows.
* Texmaker supports Unicode, for TeXnicCenter it's been announced for the new version.
* Texmaker provides a built-in pdf viewer and can launch external viewers. TeXnicCenter supports any external pdf viewer. Both provide forward and inverse search with pdf and dvi.
* Note, for Texmaker there's a fork [TeXstudio](http://texstudio.sourceforge.net/) (formerly named TexmakerX) with some improvements.
|
15
|
https://tex.stackexchange.com/users/213
|
1964
| 1,368 |
https://tex.stackexchange.com/questions/1963
|
10
|
What are relative merits of these two Latex editors:
[TeXnicCenter](http://www.texniccenter.org/) and [Texmaker](http://www.xm1math.net/texmaker/)?
What are their shortcomings to prefer one over other?
Inspired by [this](https://stackoverflow.com/questions/270121/best-latex-editor-for-windows) SO question.
|
https://tex.stackexchange.com/users/69
|
Texmaker and TeXnicCenter.
| false |
Personally, I prefer [Winshell](http://winshell.de) when I'm working on Windows. A main sticking point is the possibility to better manage my papers by organizing all files for each paper into a project, so I can quickly switch between the papers and see which file belongs to which project (I like to use a large number of .tex files -- one per section/subsection, if applicable). WinShell also has a BibTeX manager, if you need it.
One drawback is that it's not open-source (but is completely free), so if you have strong feelings about this, you should probably look elsewhere.
I'm also checking regularly the progress on [TeXWorks](http://tug.org/texworks/), which is under development, but has a built-in PDF reader and synchronized scrolling of both the source and the rendered document. It lacks a lot of other features that I'd like to have --- notably, file organization, that I mentioned above.
|
2
|
https://tex.stackexchange.com/users/711
|
1965
| 1,369 |
https://tex.stackexchange.com/questions/1959
|
143
|
In the inline math mode (`$...$`), if the formula is too long, LaTeX will try to break it on operators, e.g.
```
very long text followed by a very long equation like $a+b+c+d+e+f+g+h+i+j+k+l$ etc
```
may be rendered as
```
very long text followed
by a very long equation
like a+b+c+d+e+f+g+h+i+
j+k+l etc
```
However, the break won't happen if they are separated by commas, e.g.
```
very long text followed by a very long equation like $a,b,c,d,e,f,g,h,i,j,k,l$ etc
```
will overflow the page like
```
very long text followed
by a very long equation
like a,b,c,d,e,f,g,h,i,j,k,l
etc
```
How to make LaTeX able to insert line breaks after a comma too?
|
https://tex.stackexchange.com/users/82
|
Allowing line break at ',' in inline math mode?
| false |
You could take a look at the [`breqn`](http://ctan.org/pkg/breqn) package, which is aimed at solving this problem in a general sense.
|
43
|
https://tex.stackexchange.com/users/73
|
1967
| 1,370 |
https://tex.stackexchange.com/questions/1966
|
31
|
I've been just reading through this [Latex wikibook](http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions) and I spotted they advocate use of `\subfloat` in figures. I've always used `\subfigure`.
What is the difference?
|
https://tex.stackexchange.com/users/69
|
What is the difference between \subfigure and \subfloat?
| true |
`\subfigure` belongs to the obsolete package with the name `subfigure`. It's still supported in the newer `subfig` package because of backward compatibility. I recommend to use `\subfloat`.
`subfig` should be preferref to `subfigure`, that's why the command `\subfigure` is not needed. Though it's available if you load the configuration `altsf.cfg`. It defines simply
```
\@ifundefined{c@subfigure}{\newsubfloat{figure}}{}
\def\subfigure{\subfloat}
\@ifundefined{c@subtable}{\newsubfloat{table}}{}
\def\subtable{\subfloat}
```
and further options for captions.
|
21
|
https://tex.stackexchange.com/users/213
|
1968
| 1,371 |
https://tex.stackexchange.com/questions/1969
|
21
|
I'm making a beamer presentation and I'd like to use `natbib` because of its `\citet` and that it recognizes URLs. However, when I try to compile it, while doing the third PDFLaTeX pass, there appear this error (among others):
```
[28] (./presentacion.toc) [29] (./presentacion.bbl
(./presentacion.toc
! Missing } inserted.
<inserted text>
}
l.3 ...r@sectionintoc {1}{Introducci\'on}{4}{0}{1}
```
When I take out the `natbib` package, everything works well, including the `\bibliography`
Is there a way to solve this, or I shouldn't use `natbib` with `beamer`?
|
https://tex.stackexchange.com/users/401
|
Beamer and Natbib
| true |
The `beamer` class is not working with `natbib`. The initial author of the class Till Tantau said:
>
> Currently, beamer does not work with
> natbib since beamer meddles with the
> same things as natbib and beamer's
> meddling is not done in such a way
> that natbib can tolerate this. Also,
> it is not possible to "switch off
> beamer's meddling"
>
>
>
However, you may use it in article mode.
You can read it [here](http://osdir.com/ml/tex.latex.beamer.general/2005-07/msg00005.html) in the tex.latex.beamer.general mailing list.
|
14
|
https://tex.stackexchange.com/users/213
|
1970
| 1,372 |
https://tex.stackexchange.com/questions/1969
|
21
|
I'm making a beamer presentation and I'd like to use `natbib` because of its `\citet` and that it recognizes URLs. However, when I try to compile it, while doing the third PDFLaTeX pass, there appear this error (among others):
```
[28] (./presentacion.toc) [29] (./presentacion.bbl
(./presentacion.toc
! Missing } inserted.
<inserted text>
}
l.3 ...r@sectionintoc {1}{Introducci\'on}{4}{0}{1}
```
When I take out the `natbib` package, everything works well, including the `\bibliography`
Is there a way to solve this, or I shouldn't use `natbib` with `beamer`?
|
https://tex.stackexchange.com/users/401
|
Beamer and Natbib
| false |
Here is a working example. I compiled this on MacTex-2009, using pdflatex. No errors, no warnings (except a message about pgfbaseimage.sty being obsolete, which is unrelated).
```
\documentclass[hyperref={pdfpagelabels=false}]{beamer}
\usepackage[scaled]{helvet}
\usepackage[round]{natbib}
\newcommand{\newblock}{}
\begin{document}
\begin{frame}
See \citet{foo}.
\begin{thebibliography}{22}
\bibitem[Foo(1988)]{foo} Foo (1998). Bar. \emph{CONF 1988}.
\end{thebibliography}
\end{frame}
\end{document}
```
The result is a PDF document that looks like this:
```
See Foo (1988).
Foo (1998). Bar. CONF 1988.
```
---
And another example using Bibtex; *test.tex*:
```
\documentclass[hyperref={pdfpagelabels=false}]{beamer}
\usepackage[scaled]{helvet}
\usepackage[round]{natbib}
\newcommand{\newblock}{}
\begin{document}
\begin{frame}
See \citet{foo}.
\bibliographystyle{abbrvnat}
\bibliography{test}
\end{frame}
\end{document}
```
and *test.bib*:
```
@INPROCEEDINGS{foo,
author={Bar Foo},
year={1988},
title={Foo},
booktitle={CONF 1988}
}
```
Again, works fine.
|
14
|
https://tex.stackexchange.com/users/100
|
1971
| 1,373 |
https://tex.stackexchange.com/questions/1972
|
42
|
I'm using babel package for spanish language. However, each time I compile my document, the package babel throws me a warning:
```
Package babel Warning: No hyphenation patterns were loaded for
(babel) the language `Spanish'
(babel) I will use the patterns loaded for \language=0 instead.
```
What goes?
Thank you...
|
https://tex.stackexchange.com/users/496
|
No hyphenation patterns were loaded for the language
| true |
You may have to install spanish language support for TeX on your operating system. For instance, on Debian or Ubuntu it means to install `texlive-lang-spanish` I guess.
Afterwards it may be necessary to rebuilt the format files, for instance by
```
fmtutil --all
```
at the command prompt or the package manager of your TeX distribution.
I suggest you add some information to your question regarding operating system and TeX distribution.
However, this topic in the TeX FAQ may help you: [Using a new language with Babel](https://texfaq.org/FAQ-newlang). It deals with this warning message and shows ways how to fix that.
|
48
|
https://tex.stackexchange.com/users/213
|
1973
| 1,374 |
https://tex.stackexchange.com/questions/1975
|
18
|
How do I overwrite the default `$l$` character so that it is substituted by `$\ell$` throughout math mode?
(More generally, is there an easy way to make such symbol substitutions?)
|
https://tex.stackexchange.com/users/802
|
Substituting character $l$ with $\ell$ throughout math mode
| false |
There is if you are using Lyx or SWP. E.g., you can have SWP search for l in math (SWP is wysiwym) and replace it with \ell. It will do this and ignore l in text.
|
6
|
https://tex.stackexchange.com/users/714
|
1976
| 1,375 |
https://tex.stackexchange.com/questions/1952
|
43
|
I had not been aware of [Tikz](http://www.texample.net/tikz/examples/) before joining this site, but am impressed with what it appears to be able to accomplish. Before I jump in and start learning all about it though, I wanted to see if people have any experience with submitting papers that use TikZ to scientific journals. Do they tend to automatically support it, or definitely not accept it, or work with you if you can convince them it's needed? Something else entirely? (I recognize that it would be possible to use TikZ in my copy of a paper, then generate a raster image from the output, and include that in place of the `tikzpicture` in the copy I submit, but that's not what I'm wondering about here.)
I'm personally interested in physics journals, but I think answers from any field could be potentially useful to others who may be wondering the same thing.
|
https://tex.stackexchange.com/users/32
|
Using TikZ in journal articles
| false |
I know that [arXiv](http://arxiv.org/) support TikZ, though not necessarily the most recent versions. I imagine that you would run into the same problems with publishers, so Stefan's idea of creating PDF images seems best to me. In the TikZ manual, there is a section on **Externalizing Graphics**. It gives detailed instructions on how to do convert inline images to PDFs.
|
17
|
https://tex.stackexchange.com/users/870
|
1978
| 1,376 |
https://tex.stackexchange.com/questions/1975
|
18
|
How do I overwrite the default `$l$` character so that it is substituted by `$\ell$` throughout math mode?
(More generally, is there an easy way to make such symbol substitutions?)
|
https://tex.stackexchange.com/users/802
|
Substituting character $l$ with $\ell$ throughout math mode
| false |
I think your best plan is to do a search and replace. You'll need to use some kind of regular expression (or, as user714 notes, so set up that can search selectively within math). The advantage of altering the source is you avoid any nasty side issues.
|
5
|
https://tex.stackexchange.com/users/73
|
1981
| 1,377 |
https://tex.stackexchange.com/questions/1979
|
61
|
When typing (La)TeX some keys are used a lot more often then in plain text, especially `\`, `{`, `}`, `[`, `]`, `$`, `^` and `_`. On most keyboard layouts these keys are rather cumbersome to type. The English QWERTY keyboard is a lot better than the German QWERTZ, but is still far from optimal.
Given that I mostly type mathematical texts in English, what keyboard layout would you recommend?
Bonus points for the following:
* Ability to type non-English Latin characters, especially German umlauts.
* Some similarity to QWERTZ or QWERTY as I'm most used to these layouts (I currently use the US-International layout from Linux)
* Ability to type math symbols directly (Greek letters, `\times`, etc.)
|
https://tex.stackexchange.com/users/83
|
Good keyboard layouts for typing (La)TeX
| false |
I now use a czech programmer keybord (custom made) which has the special symbols in the english number row accessible by using right alt and the rest of important symbols ({}[]\/=) are on the home row (ASDF...) again with right alt. Very convenient.
|
2
|
https://tex.stackexchange.com/users/628
|
1982
| 1,378 |
https://tex.stackexchange.com/questions/1980
|
217
|
In the comments section of [Does it matter if I use \textit or \it, \bfseries or \bf, etc](https://tex.stackexchange.com/questions/516/does-it-matter-if-i-use-textit-or-it), I asked for a clarification of these points. The clarification has mostly been made, but it was requested that I turn this into a question to provide for more room for this question to be fielded.
So here it is:
**Please explain the difference between `\emph` and `\textit`. When should they be used, respectively?**
|
https://tex.stackexchange.com/users/84
|
\emph or \textit
| true |
Those are very different commands even if the output happens to look the same.
* If you want to emphasize a word or some text, use `\emph`. Don't just make the text italic or bold. If needed, you may change the behaviour of `\emph` whenever you wish in the preamble and the whole document will be adjusted accordingly.
* If you want to get italic text, use `\textit`. `\emph` might have a different effect, a package like `ulem` might change it to underlining for instance.
* `\emph` may be nested: emphasized text within emphasized text may be upright. In contrary, nesting `\textit` just keeps the italic shape.
* Further, I rarely use physical font commands in my body text. I use them to define styles in the preamble and use the styles in the document afterwards, ensuring consistency and allowing changes to be easily made.
|
245
|
https://tex.stackexchange.com/users/213
|
1983
| 1,379 |
https://tex.stackexchange.com/questions/1979
|
61
|
When typing (La)TeX some keys are used a lot more often then in plain text, especially `\`, `{`, `}`, `[`, `]`, `$`, `^` and `_`. On most keyboard layouts these keys are rather cumbersome to type. The English QWERTY keyboard is a lot better than the German QWERTZ, but is still far from optimal.
Given that I mostly type mathematical texts in English, what keyboard layout would you recommend?
Bonus points for the following:
* Ability to type non-English Latin characters, especially German umlauts.
* Some similarity to QWERTZ or QWERTY as I'm most used to these layouts (I currently use the US-International layout from Linux)
* Ability to type math symbols directly (Greek letters, `\times`, etc.)
|
https://tex.stackexchange.com/users/83
|
Good keyboard layouts for typing (La)TeX
| true |
Since you're asking for german umlauts: There is the [Neo layout](http://wiki.neo-layout.org/wiki/) which is for german language. The wiki sounds rather interesting! There are even pages for TeX. (I have not used it myself, though).
<http://wiki.neo-layout.org/wiki/>
and
<http://wiki.neo-layout.org/wiki/Neo%20f%C3%BCr%20Latex>
|
21
|
https://tex.stackexchange.com/users/243
|
1984
| 1,380 |
https://tex.stackexchange.com/questions/1979
|
61
|
When typing (La)TeX some keys are used a lot more often then in plain text, especially `\`, `{`, `}`, `[`, `]`, `$`, `^` and `_`. On most keyboard layouts these keys are rather cumbersome to type. The English QWERTY keyboard is a lot better than the German QWERTZ, but is still far from optimal.
Given that I mostly type mathematical texts in English, what keyboard layout would you recommend?
Bonus points for the following:
* Ability to type non-English Latin characters, especially German umlauts.
* Some similarity to QWERTZ or QWERTY as I'm most used to these layouts (I currently use the US-International layout from Linux)
* Ability to type math symbols directly (Greek letters, `\times`, etc.)
|
https://tex.stackexchange.com/users/83
|
Good keyboard layouts for typing (La)TeX
| false |
Long, long ago in a galaxy far, far away, I attempted starting a blog. It didn't last, but one of the things I posted was about this very subject. When I deleted the blog, I kept the articles. So here's that one. I apologise for the length.
---
A few years back I started to get what I think was RSI in my hands. I never got it officially diagnosed so I can't be sure, but all the symptoms seemed clear. It was worse when I was typing, and worst in my little fingers.
Think about typing. How much work do the little fingers do compared to the others? As well as having their own letters, they also work many of the punctuation characters and the shift (and control) keys. I found I was often having to stretch my hand to type characters and this was putting a lot of strain on my little fingers.
It's even worse when typing LaTeX documents. A quick scan through a thirty-page paper reveals that the five most typed characters are:
* space 15525
* e 7266
* \ 6834
* o 5476
* t 5470
There then follow a few more lowercase letters, in 14th and 15th place are the parentheses (worryingly not the same number of each - must have some half-open intervals in there). 22nd is the underscore, 24th and 25th are the curly braces (quick check: the same number this time) with just over a thousand occurrences. The first number, 1, is way down the list with only 362 appearances.
By the way, if you want to generate this list, there are probably more elegant ways but here's my two-minute hack:
```
~% cat paper.tex| \
perl -lne 'while ($_) {
$_ =~ s/(.)//;
$count{$1}++};
END {
@chars = sort {$count{$b} <=> $count{$a}} keys %count;
while (@chars) {
$c = shift @chars;
print "$c $count{$c}";
}
}'
```
The backslash key is often hard to stretch to, the curly braces usually require shift (or Alt-Gr on some international keyboards). That's a lot of work for what is, as far as catching mammoths is concerned, something pretty useless.
My solution was to modify the keyboard. No, *not* with a hammer. With a nifty
little program called [xmodmap](http://www.xfree86.org/4.2.0/xmodmap.1.html). This is a UNIX program which allows you to modify what the keys on the keyboard actually *do*. I use it to put the backslash where the semi-colon is (after all, who uses a semi-colon these days?), swap the curly braces and square brackets, and swap the numbers with their symbols (so pressing '3' produces '#' and 'Shift+3' produces '3').
Unfortunately, this method isn't very portable and I have to set it up for each machine. The problem is that it is a translation table from what the keyboard currently does to what you want it to do, so you first have to know what it currently does. However, it's fairly simple to explain how to set it up.
Suppose you want to put the backslash where the semi-colon is. First you need to find the keycode for the semi-colon. There are two ways to do this. Firstly, from a terminal run a program called xev. When you press a key in its window, it tells you lots of information about it in the terminal - including the keycode. The other way to do it is to run `xmodmap -pke`. This produces a list of all the current assignments from which you can read off the keycode for the semi-colon.
```
~% xmodmap -pke | grep semicolon
keycode 47 = semicolon colon oslash Oslash
```
(Yeah, I'm on a Norwegian keyboard.) Now you just need to remap that:
```
~% xmodmap -e 'keycode 47 = backslash colon oslash Ooslash'
```
Lo and behold! Keyboard modified.
Three things to note. Save the initial output of xmodmap -pke since if everything goes wrong typing:
```
~% xmodmap original_list
```
will reset it (though that might be difficult if you've reset *all* the keys! In that case, log out and log back in again). Secondly, to save you typing in all those commands every time, you can put them all in a file called, say, .xmodmap and put a line `xmodmap ~/.xmodmap` in your startup file. Gnome actually goes looking for these files and asks if you want to load them so you don't need to put them in your startup file. The final point is that you might want to consider having different keyboards for different tasks. I have a keyboard for writing LaTeX documents and a "normal" one for everything else; switching between them is easy using "hot keys".
Several years after figuring this out, I discovered that I was alone neither in the problem nor in the solution. [Greg Kuperberg](http://www.math.ucdavis.edu/~greg/pinky-rsi.html) has also written about this, though his solution uses XKB rather than xmodmap. Your mileage may vary.
---
Here's the actual layout:
```
` 1 2 3 4 5 6 7 8 9 0 _ +
~ ! @ # $ % ^ & * ( ) - =
TAB Q W E R T Y U I O P [ ]
q w e r t y u i o p { }
Ctrl A S D F G H J K L : " |
a s d f g h j k l \ ' /
Shift > Z X C V B N M < > ? Shift
< z x c v b n m , . ;
```
In addition, the "weird" keys along the bottom are mapped to various modifiers which give me access to other characters (most usually, øæå, as I'm in Norway). This is actually done with a two-stage xmodmaprc: the first stage changes my Scandinavian keyboard into something I'm a little more used to; the second stage does the TeX-related changes. I have one hotkey that starts Emacs *and* changes the keyboard all in one go!
|
32
|
https://tex.stackexchange.com/users/86
|
1985
| 1,381 |
https://tex.stackexchange.com/questions/1980
|
217
|
In the comments section of [Does it matter if I use \textit or \it, \bfseries or \bf, etc](https://tex.stackexchange.com/questions/516/does-it-matter-if-i-use-textit-or-it), I asked for a clarification of these points. The clarification has mostly been made, but it was requested that I turn this into a question to provide for more room for this question to be fielded.
So here it is:
**Please explain the difference between `\emph` and `\textit`. When should they be used, respectively?**
|
https://tex.stackexchange.com/users/84
|
\emph or \textit
| false |
The `\emph` macro is designed to be semantic markup. So while by convention it makes text italic, this is not always the case. For example, the `beamer` class makes `\emph` text red as this works better in presentations than using italic.
On the other hand, `\textit` makes text italic, with no variation. Thus it is intended for making text italic when that is exactly what you want.
I would usually favour using `\textit` in a design context, where you are deciding 'these things should be italic'. Normally, that would be in the preamble or a class file, perhaps something like:
```
\newcommand*\latin[1]{\textit{#1}}
```
In the document body, I'd favour the semantic approach and use `\emph`, as this can then be defined in the preamble to do something else entirely.
|
87
|
https://tex.stackexchange.com/users/73
|
1986
| 1,382 |
https://tex.stackexchange.com/questions/1979
|
61
|
When typing (La)TeX some keys are used a lot more often then in plain text, especially `\`, `{`, `}`, `[`, `]`, `$`, `^` and `_`. On most keyboard layouts these keys are rather cumbersome to type. The English QWERTY keyboard is a lot better than the German QWERTZ, but is still far from optimal.
Given that I mostly type mathematical texts in English, what keyboard layout would you recommend?
Bonus points for the following:
* Ability to type non-English Latin characters, especially German umlauts.
* Some similarity to QWERTZ or QWERTY as I'm most used to these layouts (I currently use the US-International layout from Linux)
* Ability to type math symbols directly (Greek letters, `\times`, etc.)
|
https://tex.stackexchange.com/users/83
|
Good keyboard layouts for typing (La)TeX
| false |
I completely gave up trying to use "national" keyboards to type anything. When you're a programmer, you need to have easy access to the same keys the designer(s) of the language had easy access to on his or her own keyboard, and that holds for TeX, too. I use both QWERTY or Dvorak keyboards (where the "special" characters are at the same location as on QWERTY), with shortcuts to typeset the different accented characters for the languages that need it (my favourite layout is a Compose-like key as on Sun keyboards, but dead keys are OK too, although usually leas general).
|
4
|
https://tex.stackexchange.com/users/170
|
1987
| 1,383 |
https://tex.stackexchange.com/questions/1975
|
18
|
How do I overwrite the default `$l$` character so that it is substituted by `$\ell$` throughout math mode?
(More generally, is there an easy way to make such symbol substitutions?)
|
https://tex.stackexchange.com/users/802
|
Substituting character $l$ with $\ell$ throughout math mode
| false |
To do it via an external search-and-replace, you could use a script that I wrote called [mathgrep](https://github.com/loopspace/mathgrep). It's a perl script designed to do search and search-and-replace within maths sections of a LaTeX document.
The main limitation of this script is that it doesn't regard dollars as valid maths delimiters - but then, no-one uses them, right? Actually, I wrote a script to deal with that as well, which I called [debuck](https://github.com/loopspace/debuck) for some reason that escapes me now.
(Oh yeah, I remember: dollar = buck.)
|
6
|
https://tex.stackexchange.com/users/86
|
1988
| 1,384 |
https://tex.stackexchange.com/questions/1975
|
18
|
How do I overwrite the default `$l$` character so that it is substituted by `$\ell$` throughout math mode?
(More generally, is there an easy way to make such symbol substitutions?)
|
https://tex.stackexchange.com/users/802
|
Substituting character $l$ with $\ell$ throughout math mode
| true |
This is similar to how `MinionPro` deals with open vs closed mathematical g's.
```
\documentclass{article}
\mathcode`l="8000
\begingroup
\makeatletter
\lccode`\~=`\l
\DeclareMathSymbol{\lsb@l}{\mathalpha}{letters}{`l}
\lowercase{\gdef~{\ifnum\the\mathgroup=\m@ne \ell \else \lsb@l \fi}}%
\endgroup
\begin{document}
\( l = 2 \) \( \lim = 2 \)
\end{document}
```
|
19
|
https://tex.stackexchange.com/users/627
|
1990
| 1,385 |
https://tex.stackexchange.com/questions/1989
|
41
|
I am writing a long document with many chapters. They are all included from a root document using `\input{chapterX.tex}` etc. Compiling everything takes pretty long.
As a workaround to make compilation faster, I typically comment out most `\input` commands and include only the chapter I'm currently working on. But that's a bad method because then the references to chapters that are not currently included won't work, and the table of contents is almost empty.
I'm wondering if there is a method that does precompilation? Ideally, it would detect that, while I am working on `chapter1.tex`, nothing in `chapter2.tex` etc. has changed, and reuse the results from previous compilation runs.
Is that possible? It would be like separate compilation units in languages like `C`.
|
https://tex.stackexchange.com/users/3860
|
Speed up compilation by (pre-)compiling chapters separately?
| true |
You can't precompile chapters, but you can use the `\includeonly` mechanism to ensure that your cross-references and page numbers stay correct while choosing to only include parts of your source.
|
37
|
https://tex.stackexchange.com/users/73
|
1991
| 1,386 |
https://tex.stackexchange.com/questions/1989
|
41
|
I am writing a long document with many chapters. They are all included from a root document using `\input{chapterX.tex}` etc. Compiling everything takes pretty long.
As a workaround to make compilation faster, I typically comment out most `\input` commands and include only the chapter I'm currently working on. But that's a bad method because then the references to chapters that are not currently included won't work, and the table of contents is almost empty.
I'm wondering if there is a method that does precompilation? Ideally, it would detect that, while I am working on `chapter1.tex`, nothing in `chapter2.tex` etc. has changed, and reuse the results from previous compilation runs.
Is that possible? It would be like separate compilation units in languages like `C`.
|
https://tex.stackexchange.com/users/3860
|
Speed up compilation by (pre-)compiling chapters separately?
| false |
Extending Joseph's answer a bit: This mean that you use `\include` and *not* `\input` for including the desired chapters. See [here](http://user.medunigraz.at/alexander.binder/texhelp/ltx-245.html) for example usage.
|
18
|
https://tex.stackexchange.com/users/870
|
1992
| 1,387 |
https://tex.stackexchange.com/questions/1979
|
61
|
When typing (La)TeX some keys are used a lot more often then in plain text, especially `\`, `{`, `}`, `[`, `]`, `$`, `^` and `_`. On most keyboard layouts these keys are rather cumbersome to type. The English QWERTY keyboard is a lot better than the German QWERTZ, but is still far from optimal.
Given that I mostly type mathematical texts in English, what keyboard layout would you recommend?
Bonus points for the following:
* Ability to type non-English Latin characters, especially German umlauts.
* Some similarity to QWERTZ or QWERTY as I'm most used to these layouts (I currently use the US-International layout from Linux)
* Ability to type math symbols directly (Greek letters, `\times`, etc.)
|
https://tex.stackexchange.com/users/83
|
Good keyboard layouts for typing (La)TeX
| false |
Following up on Andrew Stacey's answer, I have this in my .Xmodmap:
```
keysym Alt_R = Multi_key
```
That makes the right alt behave as a Compose key: first you press this key, then a combination of keys. There is a list of valid combinations (depending on your locale), and once you reach something that is valid, the combination is output. So, for example, Schröder is:
S,c,h,r,Alt-R,",o,d,e,r
Many keyboard layouts on linux have shift+Alt\_R or the right windows key as Multi\_key by default, but I find the first a that a lot harder to type, probably because I am lefthanded, and my keyboard does not have windows keys.
Further, I use a Qwerty US 102-key keyboard that migrated with me from an old Compaq ever since the nineties.
|
2
|
https://tex.stackexchange.com/users/89
|
1993
| 1,388 |
https://tex.stackexchange.com/questions/1979
|
61
|
When typing (La)TeX some keys are used a lot more often then in plain text, especially `\`, `{`, `}`, `[`, `]`, `$`, `^` and `_`. On most keyboard layouts these keys are rather cumbersome to type. The English QWERTY keyboard is a lot better than the German QWERTZ, but is still far from optimal.
Given that I mostly type mathematical texts in English, what keyboard layout would you recommend?
Bonus points for the following:
* Ability to type non-English Latin characters, especially German umlauts.
* Some similarity to QWERTZ or QWERTY as I'm most used to these layouts (I currently use the US-International layout from Linux)
* Ability to type math symbols directly (Greek letters, `\times`, etc.)
|
https://tex.stackexchange.com/users/83
|
Good keyboard layouts for typing (La)TeX
| false |
I am recently started to use [autohotkey](http://www.autohotkey.com/). You can write your own little macros. I started to program some macros- easily accessable by hitting space+letter. I think this could save a little time in typing. The same tool also allows remapping of keys
```
Space & t::
Send, \begin{`{}table{`}}{[}{`!}htb{]}{enter}
send, \centering{enter}
send, \caption{`{}{`}}{enter}
send, \label{`{}tab{`:}{`}}{enter}{enter}
send, \end{`{}table{`}}{UP}
return
```
|
2
|
https://tex.stackexchange.com/users/632
|
1995
| 1,389 |
https://tex.stackexchange.com/questions/1756
|
189
|
I have heard a lot about `LaTeX`, but never used it myself.
It is mainly used for typesetting professional research papers. But I am not writing research papers.
Is `LaTeX` for me? If yes, why should I be shifting from `OpenOffice` to `LaTeX`? What does `LaTeX` offer to the normal user who uses word processing software to make all kind of report documents?
|
https://tex.stackexchange.com/users/813
|
Why should I use LaTeX?
| false |
In my opinion, Latex is the best system to typesetting that I have ever seen. Because the quality of its output is great. I strongly recommend you to use Latex and throw away systems like Word and Open office.
|
7
|
https://tex.stackexchange.com/users/885
|
1996
| 1,390 |
https://tex.stackexchange.com/questions/1547
|
18
|
I'm working in a project ([Ubuntu Manual](http://ubuntu-manual.org/), if you're curious) which requires TeX to create a PDF document. But when we have almost all translated, I've found that there wasn't an hyphenation pattern for my language (Asturian). Actually, there isn't almost anything. `:)`
So, I started creating a new one, which involved some hard mining in obscure Internet dungeons to get some documentation on how to do that. `;)`
My approach is creating a list of hyphenated words (etymological when I'm 100% sure, syllabic else) from our [Aspell](http://aspell.net/) word list. When I've got a decent list, I'll use a hyphenation generator (I can't remember the actual name of the script) to have the Asturian hyphenation file, then I'll try and install under my TeX Live installation to test it, and then I'll upload it to TeX repositories.
No, [OpenOffice.org](http://www.openoffice.org/) hyphenation is not an option (it still doesn't exist).
My question is this: *Is there anything else I'm missing to have a working hyphenation for my language? Am I fully wrong and that won't work?*
Thank you in advance.
|
https://tex.stackexchange.com/users/733
|
New language - hyphenation
| false |
Once you have the pattern file (the standard way to generate it from a word list is to use PatGen, as has been said), you need to edit your distribution's language.dat file and to regenerate the formats, because hyphenation patterns are only loaded at iniTeX time (except for LuaTeX). Then you can send the file to [us](http://tug.org/tex-hyphen) in order to be included in TeX Live :-)
|
7
|
https://tex.stackexchange.com/users/170
|
1997
| 1,391 |
https://tex.stackexchange.com/questions/1979
|
61
|
When typing (La)TeX some keys are used a lot more often then in plain text, especially `\`, `{`, `}`, `[`, `]`, `$`, `^` and `_`. On most keyboard layouts these keys are rather cumbersome to type. The English QWERTY keyboard is a lot better than the German QWERTZ, but is still far from optimal.
Given that I mostly type mathematical texts in English, what keyboard layout would you recommend?
Bonus points for the following:
* Ability to type non-English Latin characters, especially German umlauts.
* Some similarity to QWERTZ or QWERTY as I'm most used to these layouts (I currently use the US-International layout from Linux)
* Ability to type math symbols directly (Greek letters, `\times`, etc.)
|
https://tex.stackexchange.com/users/83
|
Good keyboard layouts for typing (La)TeX
| false |
Quick advice
------------
Get a good keyboard, get a good text editor, and practice.
Detailed suggestions
--------------------
A good programming keyboard will make your fingers happy with no re-mapping. Personally, I use the [Happy Hacking Keyboard Professional II](http://elitekeyboards.com/products.php?sub=pfu_keyboards,hhkbpro2&pid=pdkb400b). I find that I can still type around 40 WPM, even stumbling over LaTeX syntax, when using this keyboard.
A good text editor with syntax highlighting and auto-complete will make writing LaTeX documents much, much easier. I got the keyboard above when I was using [GNU Emacs](http://www.gnu.org/software/emacs/), since it replaces the Caps-Lock key with a control key (you can accomplish the same with software remapping). Since then, I've used [MacVIM](http://code.google.com/p/macvim/), which uses a nice [LaTeX Bundle](http://vim-latex.sourceforge.net/). Currently, I use [TextMate](http://macromates.com/). If you're on Windows, you can use the similar [E-Text Editor](http://www.e-texteditor.com/). I switched to TextMate because working with tables is much, much easier with the included bundle. TextMate also auto closes the `(),$$,[],` and `{}` sequences, plus others. It also handles quoting automatically (typing two backticks closes with straight quotes). I find the shortcuts for automatically closing environments is helpful, as well.
The one thing I picked up from [Andrew Stacey's post](https://tex.stackexchange.com/questions/1979/good-keyboard-layouts-for-typing-latex/1985#1985) is that your most common characters are going to be alpha characters. Typing math is going to be equally painful on most layouts. I find with enough practice, my fingers find special characters easily enough. If you're interested is gaining speed from typing alpha characters, I hear [Dvorak](http://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard) is all the nerd-rage, but its efficacy is [dubious](http://www.utdallas.edu/~liebowit/keys1.html).
Special characters
------------------
For printing special characters... that's why I use LaTeX. To me, typing `\alpha` is a lot easier than remembering an alt-code or option-key press, and faster than hunting and pecking on a character map. Umlauts, graves (or diacrticals), and special math characters are best expressed using the LaTeX macros, in my opinion. It avoids any problems that might arise when sharing files with others (no worries about UTF compatibilities). For instance, it's easy to type `ü` on my Mac, but it's just as simple to type `\"u` in LaTeX.
|
8
|
https://tex.stackexchange.com/users/887
|
1998
| 1,392 |
https://tex.stackexchange.com/questions/1952
|
43
|
I had not been aware of [Tikz](http://www.texample.net/tikz/examples/) before joining this site, but am impressed with what it appears to be able to accomplish. Before I jump in and start learning all about it though, I wanted to see if people have any experience with submitting papers that use TikZ to scientific journals. Do they tend to automatically support it, or definitely not accept it, or work with you if you can convince them it's needed? Something else entirely? (I recognize that it would be possible to use TikZ in my copy of a paper, then generate a raster image from the output, and include that in place of the `tikzpicture` in the copy I submit, but that's not what I'm wondering about here.)
I'm personally interested in physics journals, but I think answers from any field could be potentially useful to others who may be wondering the same thing.
|
https://tex.stackexchange.com/users/32
|
Using TikZ in journal articles
| false |
At least some parts of Elsevier support TiKZ.
|
7
|
https://tex.stackexchange.com/users/132
|
1999
| 1,393 |
https://tex.stackexchange.com/questions/1979
|
61
|
When typing (La)TeX some keys are used a lot more often then in plain text, especially `\`, `{`, `}`, `[`, `]`, `$`, `^` and `_`. On most keyboard layouts these keys are rather cumbersome to type. The English QWERTY keyboard is a lot better than the German QWERTZ, but is still far from optimal.
Given that I mostly type mathematical texts in English, what keyboard layout would you recommend?
Bonus points for the following:
* Ability to type non-English Latin characters, especially German umlauts.
* Some similarity to QWERTZ or QWERTY as I'm most used to these layouts (I currently use the US-International layout from Linux)
* Ability to type math symbols directly (Greek letters, `\times`, etc.)
|
https://tex.stackexchange.com/users/83
|
Good keyboard layouts for typing (La)TeX
| false |
I use the [vim](http://www.vim.org/) editor, which I think partially solves your issues despite not being a keyboard layout. There's a bit of a learning curve, but I found it much easier learning vim than trying to switch to a Dvorak keyboard layout.
Vim is highly programmable so with some LaTeX, snippet and delimiter plugins you can simplify a lot of the typing, with the added bonus of very simple latex compilation and parsing of the error log from within the editor.
**Some plugins I find useful:**
**[SnipMate](http://www.vim.org/scripts/script.php?script_id=2540)** lets you make snippets, where you type say `desc`, hit `TAB` and it turns into
```
\begin{description}
\item[]
\end{description}
```
where the cursor is in the square brackets of \item making it easy to start a list without ever hitting any of the annoyingly placed `\[]{}` keys.
**[delimitMate](http://www.vim.org/scripts/script.php?script_id=2754)** automatically fills in delimiters (quotes, brackets, parentheses...) so you don't have to type as many.
**[LatexBox](http://www.vim.org/scripts/script.php?script_id=3109)** provides a bunch of simple helpful additions like autocomplete of standard commands, and simple wrapping of text in a latex command/environment, which works as follows:
You have typed some text:
```
...the experiment showed a detrimental effect on...
```
But you now want to wrap detrimental in some macro (e.g. `\emph`), so you select it and hit a shortcut (F5 by default I think, but easily customised) and it adds in the `\{` and `}` for you, and puts the cursor after the `\` ready for you to type your macro:
```
...the experiment showed a \|{detrimental} effect on...
```
where `|` is the cursor position. There's another key to wrap a selection in a new environment.
Further customisation lets you do things like highlight text and hit a shortcut (cmd+I for me) to wrap it in `\emph{` and `}`. So as you can see you avoid actually having to hit those keys a lot with some customisation.
Another very popular one is **[Vim-Latex-Suite](http://vim-latex.sourceforge.net/)** (I personally find that one does a bit *too* much, but a lot of people use it and find it very useful). That provides you very simple short-cuts for entering environments, greek symbols, etc. To be honest, I guess I should recommend checking this out **first** and if you find it's a bit too complex try the ones above as simpler alternatives.
I've also used the [TextMate](http://macromates.com/) editor (Mac OS X only), which is where the snipMate and delimitMate plugins get their inspiration, which provides a lot of these features in a more "traditional" editor. It's not as cheap (since its not free) and doesn't work on Linux/Windows.
|
5
|
https://tex.stackexchange.com/users/644
|
2000
| 1,394 |
https://tex.stackexchange.com/questions/1914
|
46
|
I often see people creating new macros where the macro token is surrounded by braces. For example,
```
\newcommand{\foo}{foo}
```
This is unnecessary and I find the extra braces make it harder to read. Why do people do this?
(As an aside, I've even seen people try to use `\let{\foo}{\bar}` which, of course, doesn't work.)
|
https://tex.stackexchange.com/users/647
|
Why do people use unnecessary braces?
| false |
I use braces after `\newcommand` mainly to remind myself that I'm not using `\def`.
But there is one (not very weighty) reason to keep the braces: a good LaTeX
spellchecker like Excalibur looks for them, to forestall definition errors.
Inserting the braces makes spellchecking painless. (Yes, I can spell, but it's best
to stamp out misprints before sending files to my coauthors.)
|
6
|
https://tex.stackexchange.com/users/796
|
2001
| 1,395 |
https://tex.stackexchange.com/questions/1706
|
18
|
My only knowledge of LaTeX is that it is a markup language that lets me concentrate on the structure of my document rather than its appearance. It uses tags similar to HTML.
My problem is that I've only experienced all that through reading tutorials and Wikipedia.
How do I start using LaTeX on Windows XP? I have programming experience in Python and MATLAB. I would prefer to start out "raw" or low-level, without any WYSIWYG's, so that I can get my hands dirty and understand how it works. But any answers about WYSIWYG's would surely be helpful as well.
I have just installed LyX, but I'm not sure if it fits my "raw" preference well enough.
|
https://tex.stackexchange.com/users/791
|
How do I get started with LaTeX on Windows XP?
| false |
I suggest MikTeX and TeXnicCenter to start, download and instalation are easy. You can then, very easily download template documents from many websites, I suggest articles to start. The advantage of TeXnicCenter is that it includes buttons which write the corresponding code for you, this will allow you to see how different things look like, e.g. equation environments, greek letters, etc.
I also suggest the LaTeX cook book [avilable here](http://www.personal.ceu.hu/tex/cookbook.html) to get started with , probably-not-so-basic stuff. You'll find this tremendously easy to follow and experiment.
I hope you have fun.
|
1
|
https://tex.stackexchange.com/users/888
|
2002
| 1,396 |
https://tex.stackexchange.com/questions/1966
|
31
|
I've been just reading through this [Latex wikibook](http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions) and I spotted they advocate use of `\subfloat` in figures. I've always used `\subfigure`.
What is the difference?
|
https://tex.stackexchange.com/users/69
|
What is the difference between \subfigure and \subfloat?
| false |
Note that you might prefer `subfig` to `subfloat` if wanting to use `tocloft` (\*) to configure your TOC, LOF and LOT look and feel.
In which case, for example,
```
\@ifpackageloaded{subfig}
{\usepackage[subfigure,...]{tocloft}}
{\usepackage[...]{tocloft}}
\renewcommand{\cftchappresnum}{...}
...
\@ifpackageloaded{subfig}{\renewcommand{\cftsubfigpresnum}{...}}{}
...
\renewcommand{\cftchappagefont}{...}
...
\@ifpackageloaded{subfig}{\renewcommand{\cftsubfigpagefont}{...}}{}
```
(\*) I'm sure `tocloft`'s [Current Maintainer](https://tex.stackexchange.com/users/179/will-robertson "Will Robertson") could provide the canonicals should anyone want to ask.
|
5
|
https://tex.stackexchange.com/users/416
|
2004
| 1,397 |
https://tex.stackexchange.com/questions/2003
|
15
|
TeX puts no space between `\mathrel` characters, so one can type := to make a definition.
But careless authors often type stuff like
```
< a, b > = < c, d >
```
to indicate that two scalar products are equal, and get the central three characters stuck together with no space around the equality sign. (I do tell them to use `\langle` and `\rangle`, fat lot of good it does.) Is there any clever way to override the `\mathrel` convention, at least in this instance, so that the equality sign is separated from the others, but remains a math relation character?
|
https://tex.stackexchange.com/users/796
|
The trestle problem: how to avoid >=< in the output
| false |
Probably the best thing to do is to offer them a macro (package) that makes typing easier.
Now I am a very lazy typist, so I would do something like this:
```
\def\<#1>{\langle #1\rangle}
$\<a,b> = \<c,d>$
```
but probably `\<` is already used for somethingelse in LaTeX?
In LuaTeX, you can actually change the internal math spacing table, like this:
```
\Umathrelrelspacing\textstyle=\thickmuskip
\Umathrelrelspacing\displaystyle=\thickmuskip
```
but as you probably cannot use LuaTeX and it has side-effects for predefined relations like `:=`, I doubt that will help you.
|
3
|
https://tex.stackexchange.com/users/89
|
2005
| 1,398 |
https://tex.stackexchange.com/questions/2003
|
15
|
TeX puts no space between `\mathrel` characters, so one can type := to make a definition.
But careless authors often type stuff like
```
< a, b > = < c, d >
```
to indicate that two scalar products are equal, and get the central three characters stuck together with no space around the equality sign. (I do tell them to use `\langle` and `\rangle`, fat lot of good it does.) Is there any clever way to override the `\mathrel` convention, at least in this instance, so that the equality sign is separated from the others, but remains a math relation character?
|
https://tex.stackexchange.com/users/796
|
The trestle problem: how to avoid >=< in the output
| false |
If you can get them to use any macros for this, then something like
```
\newcommand*\sp[2]{\langle#1,#2\rangle}
```
might be the way to go. (Okay, maybe not `\sp` since that's `\let` to `^`, but something to indicate the scalar product.)
Since you probably don't want to have less than and greater than in your final output and your coauthors aren't likely to change, then you might have to simply take a final pass through and fix their little mistakes. This is what I do.
|
10
|
https://tex.stackexchange.com/users/647
|
2007
| 1,399 |
https://tex.stackexchange.com/questions/2006
|
24
|
What viewers do you use for reviewing the beautifully-styled output of your LaTeX source?
List PDF, DVI and PostScript options.
Possibly, one entry per answer, and list platform availability, license conditions (open source vs. freeware/proprietary).
|
https://tex.stackexchange.com/users/711
|
Output viewers for use with LaTeX
| false |
For PDF, I use Preview, evince, or xpdf, depending on which computer I'm using. For dvi, I almost never do not convert the dvi to postscript, but if I don't, I use xdvi.
|
4
|
https://tex.stackexchange.com/users/647
|
2008
| 1,400 |
https://tex.stackexchange.com/questions/2006
|
24
|
What viewers do you use for reviewing the beautifully-styled output of your LaTeX source?
List PDF, DVI and PostScript options.
Possibly, one entry per answer, and list platform availability, license conditions (open source vs. freeware/proprietary).
|
https://tex.stackexchange.com/users/711
|
Output viewers for use with LaTeX
| false |
One unexpected entry here: [Okular](http://okular.kde.org/) on [Windows](http://windows.kde.org/).
Good stuff:
* Light-weight and quick to start, even on Windows (and that says something).
* Rendering quality is perfectly good for a quick check of the output.
* Supports refreshing of the document, so no need to close it and open again. That makes it so quick.
* PDF bookmarks are supported.
* Nicer output than the other viable contender ([Sumatra PDF](http://blog.kowalczyk.info/software/sumatrapdf/index.html)), and works better with .PNG files than the dreaded Reader.
Bad stuff:
* You need to install [KDE for Windows](http://windows.kde.org/) in order to use it, and that takes some extra HDD space (even the minimally required will eat some 200+ MB).
* Some KDE libraries need to be loaded, and this will take up some precious memory (on my system, something like 50 MB just for those)
|
4
|
https://tex.stackexchange.com/users/711
|
2009
| 1,401 |
https://tex.stackexchange.com/questions/2006
|
24
|
What viewers do you use for reviewing the beautifully-styled output of your LaTeX source?
List PDF, DVI and PostScript options.
Possibly, one entry per answer, and list platform availability, license conditions (open source vs. freeware/proprietary).
|
https://tex.stackexchange.com/users/711
|
Output viewers for use with LaTeX
| false |
Mac OS X
--------
* [Skim](http://skim-app.sourceforge.net/) supports "reload when the file changed" and synctex (for forward and backward searching). It has a very nice "preview the internal link" feature (good for checking your bibliography references). It has lots of features, but it misses layer support (OCG).
* Acrobat professional for layer support and to examine the file.
* `less` for looking at the pdf in another way :)
(Others please continue this list)
|
9
|
https://tex.stackexchange.com/users/243
|
2010
| 1,402 |
https://tex.stackexchange.com/questions/2006
|
24
|
What viewers do you use for reviewing the beautifully-styled output of your LaTeX source?
List PDF, DVI and PostScript options.
Possibly, one entry per answer, and list platform availability, license conditions (open source vs. freeware/proprietary).
|
https://tex.stackexchange.com/users/711
|
Output viewers for use with LaTeX
| false |
Linux
-----
I use a whole slew of PDF viewers, basically anything I can get my hand on:
* xpdf. Mostly because it starts up so quickly, but its feature set is quite limited.
* acroread. When you want to be *sure* a pdf is generated ok, this is the best, but it is slow. Also needed for annotation support.
* okular
* evince
* gv
* mupdf
+ llpp
* zathura
|
15
|
https://tex.stackexchange.com/users/89
|
2011
| 1,403 |
https://tex.stackexchange.com/questions/2012
|
29
|
`\outer` is a strange beast. Any control sequence declared `\outer` cannot be used as either the parameter text or replacement text of a macro, at least if the control sequence is declared `\outer` at the time the parameters are tokenized or the definition is scanned, respectively. That is, both the definition of `\bar` and the use of `\baz` are errors:
```
\outer\def\foo{asdf}
\def\bar{\foo}
\def\baz#1{#1}
\baz\foo
```
However, changing this slightly to
```
\def\bar{\foo}
\def\baz#1{\outer\def\foo{asdf}#1}
\baz\foo
\bar
```
so that `\foo` is only declared `\outer` after the definition of `\bar` and after the parameters to `\baz` have been parsed, compiles correctly.
I could see requiring a macro to appear only in vertical mode, but `\outer` doesn't do that. In fact, `\outer` control sequences can appear in any of vertical, internal vertical, horizontal, restricted horizontal, math, and display math modes.
```
\outer\def\foo{asdf}
\foo% vertical mode
foo \foo% horizontal mode
\hbox{\foo}% restricted horizontal mode
\vbox{\foo}% internal vertical mode
$\foo$% math mode
$$\foo$$% display math mode
\bye
```
So given all of that, what is the utility of `\outer`?
|
https://tex.stackexchange.com/users/647
|
When is it appropriate to use \outer?
| false |
I'd assume that commands like `\section` should be `\outer`, so that they don't appear in a macro.
(Depending on the use case, of course)
|
3
|
https://tex.stackexchange.com/users/243
|
2013
| 1,404 |
https://tex.stackexchange.com/questions/2016
|
17
|
Tex has powerful support for extensions triggered by events happen in generating output, by running one of six token lists appropriately:
```
\everycr \everydisplay \everyhbox \everymath \everypar \everyvbox
```
They're used with effect in such places as Latex classes, but they are much less useful than they could be, because the `\everyfoo={\t\o ks}` assignment simply wipes the current value, making it rather tricky to use them by authors of packages and documents. Emacs' Elisp has a widely understood technology for registering and deregistering code to run at events, namely hooks.
The LaTeX3 Project's `expl3` library offers supports for managing token lists, and LuaTeX augments TeX's event handling mechanism with a set of Lua callbacks. Are these the beginning of proper support for event-driven TeX code, as usable as hooks? Is this a priority for developers on these projects?
|
https://tex.stackexchange.com/users/175
|
Will LaTeX3 have proper support for hooks? Does LuaTeX?
| true |
LuaTeX does not offer these hooks out of the box, but you can make them yourself. The LuaLaTeX people do this (thanks!). See <http://github.com/mpg/luatexbase> (and there: `luatexbase-mcb.dtx`).
|
10
|
https://tex.stackexchange.com/users/243
|
2017
| 1,405 |
https://tex.stackexchange.com/questions/2006
|
24
|
What viewers do you use for reviewing the beautifully-styled output of your LaTeX source?
List PDF, DVI and PostScript options.
Possibly, one entry per answer, and list platform availability, license conditions (open source vs. freeware/proprietary).
|
https://tex.stackexchange.com/users/711
|
Output viewers for use with LaTeX
| false |
If you like vim, you might also like [apvlv](http://code.google.com/p/apvlv/). This PDF viewer uses vim-like movement behaviour.
|
1
|
https://tex.stackexchange.com/users/870
|
2020
| 1,406 |
https://tex.stackexchange.com/questions/2015
|
4
|
I plotted a number of curves on the same figure using tikzpicture. but i am having a problem with enlarging part of the curves on the same figure. I searched for that and i found something similar on this website <http://www.texample.net/tikz/examples/difference-quotient/>
but, i tried everything and it is not working, does anyone know anything i can do to fix the problem?
|
https://tex.stackexchange.com/users/891
|
Tikz and enlarging part of the draw.
| false |
See "48 Spy Library: Magnifying Parts of Picutres" in the tikz manual, which contains two short examples on using this library.
But you will need to install the devel version of tikz/pgf. The stable release of tikz/pgf 2.0 (which is included in TeX live) is a bit dated. Meanwhile the devel version has moved forward incorporating bug fixes and new libraries. You can get the devel version by either of the following methods.
```
http://www.texample.net/tikz/builds/ (pre-packaged and hence recommended)
```
or
```
cvs -z3 -d:pserver:anonymous@pgf.cvs.sourceforge.net:/cvsroot/pgf co -P pgf
```
|
4
|
https://tex.stackexchange.com/users/337
|
2021
| 1,407 |
https://tex.stackexchange.com/questions/2006
|
24
|
What viewers do you use for reviewing the beautifully-styled output of your LaTeX source?
List PDF, DVI and PostScript options.
Possibly, one entry per answer, and list platform availability, license conditions (open source vs. freeware/proprietary).
|
https://tex.stackexchange.com/users/711
|
Output viewers for use with LaTeX
| false |
[epdfview](http://trac.emma-soft.com/epdfview/) is also nice. It is more like evince, but does *not* require the GNOME libraries.
|
1
|
https://tex.stackexchange.com/users/870
|
2022
| 1,408 |
https://tex.stackexchange.com/questions/2014
|
2
|
I would like the `ylabel` on a gnuplot to be the same as `$\omega_2(R_{3,n})$` appears in LaTeX. But if I use the following, it overlaps with the plot itself.
```
set ylabel "\\omega_2(R_{3,n})"
```
One way to get around this problem is to rotate the ylabel by `90` degrees. How can that be done?
|
https://tex.stackexchange.com/users/154
|
How to rotate a LaTeX ylabel in gnuplot?
| true |
You could try the following ([source](http://t16web.lanl.gov/Kawano/gnuplot/label3-e.html)):
```
gnuplot> set lmargin 20
gnuplot> set label 1 '\omega_2(R_{3,n})' at graph -0.2, graph 0.5
```
Somewhat unrelated here, but don't you need to use write `$\omega_2(R_{3,n})$` when trying to produce LaTeX-output with gnuplot?
|
2
|
https://tex.stackexchange.com/users/870
|
2023
| 1,409 |
https://tex.stackexchange.com/questions/2012
|
29
|
`\outer` is a strange beast. Any control sequence declared `\outer` cannot be used as either the parameter text or replacement text of a macro, at least if the control sequence is declared `\outer` at the time the parameters are tokenized or the definition is scanned, respectively. That is, both the definition of `\bar` and the use of `\baz` are errors:
```
\outer\def\foo{asdf}
\def\bar{\foo}
\def\baz#1{#1}
\baz\foo
```
However, changing this slightly to
```
\def\bar{\foo}
\def\baz#1{\outer\def\foo{asdf}#1}
\baz\foo
\bar
```
so that `\foo` is only declared `\outer` after the definition of `\bar` and after the parameters to `\baz` have been parsed, compiles correctly.
I could see requiring a macro to appear only in vertical mode, but `\outer` doesn't do that. In fact, `\outer` control sequences can appear in any of vertical, internal vertical, horizontal, restricted horizontal, math, and display math modes.
```
\outer\def\foo{asdf}
\foo% vertical mode
foo \foo% horizontal mode
\hbox{\foo}% restricted horizontal mode
\vbox{\foo}% internal vertical mode
$\foo$% math mode
$$\foo$$% display math mode
\bye
```
So given all of that, what is the utility of `\outer`?
|
https://tex.stackexchange.com/users/647
|
When is it appropriate to use \outer?
| false |
*A Beginner's book of TeX* says it is for error detection.
I think it is a good idea with a bad semantics. It's perfectly reasonable to define wrappers around macros like `\section`, to allow, say, optional indexing information to be added. Throwing an error if the macro is expanded within a box would fit this intended use much better.
I can think of one use for the semantics as it stands: to ensure that macros that change catcodes occur at the definitional top level, making it harder to hide catcode changes, and so make the Tex source that bit easier to understand.
|
5
|
https://tex.stackexchange.com/users/175
|
2024
| 1,410 |
https://tex.stackexchange.com/questions/2018
|
11
|
This might sound odd but I really like the old typewriter books from the pre-TeX era (the type of books that inspired Knuth to make TeX!). I don't know the exact reason, maybe its because I am very fond of typewriter and monospace fonts or just a nostalgia for old math books from 1960s ...
Anyway I am looking for typewriter font with matching math support. It is easy to change the text of a document into a typewriter font however the math font never matches and that results in an ugly combination. An example which I really like is [**Moments, monodromy, and perversity: a diophantine perspective**](http://books.google.ca/books?id=Tp7BN8JAv7AC) by Nick Katz. I contacted the author and unfortunately he has not done this in TeX. The fonts are **bit fonts** created by William Fulton back in the 1980s. So what are your suggestions?
|
https://tex.stackexchange.com/users/809
|
A monospace or typewriter font with matching math support
| false |
They aren't monospace (neither is the font used in the main text of your example), but I think the [Concrete fonts](http://www.ctan.org/pkg/ccfonts) have a bit of a typewrite look.
|
4
|
https://tex.stackexchange.com/users/83
|
2025
| 1,411 |
https://tex.stackexchange.com/questions/2006
|
24
|
What viewers do you use for reviewing the beautifully-styled output of your LaTeX source?
List PDF, DVI and PostScript options.
Possibly, one entry per answer, and list platform availability, license conditions (open source vs. freeware/proprietary).
|
https://tex.stackexchange.com/users/711
|
Output viewers for use with LaTeX
| false |
Windows
-------
The **Foxit Reader** is a small though feature-rich PDF viewer for Windows. Besides the usual features of a reader it provides
* multi-tab browsing, single and multiple document interface mode,
* editing tools like textbox and form filling,
* adding comments with spell checking and undo/redo,
* reviewing and commenting tools like highlighting, underlining and magnifying glass
* conversion to text format,
* adding and modifying bookmarks,
* adding multimedia attachments and links to a document,
* secure reading in safe mode.
Sadly, there's no auto-refresh.
Be careful though when installing: an additional installation of the ask.com toolbar is default.
|
5
|
https://tex.stackexchange.com/users/213
|
2026
| 1,412 |
https://tex.stackexchange.com/questions/2012
|
29
|
`\outer` is a strange beast. Any control sequence declared `\outer` cannot be used as either the parameter text or replacement text of a macro, at least if the control sequence is declared `\outer` at the time the parameters are tokenized or the definition is scanned, respectively. That is, both the definition of `\bar` and the use of `\baz` are errors:
```
\outer\def\foo{asdf}
\def\bar{\foo}
\def\baz#1{#1}
\baz\foo
```
However, changing this slightly to
```
\def\bar{\foo}
\def\baz#1{\outer\def\foo{asdf}#1}
\baz\foo
\bar
```
so that `\foo` is only declared `\outer` after the definition of `\bar` and after the parameters to `\baz` have been parsed, compiles correctly.
I could see requiring a macro to appear only in vertical mode, but `\outer` doesn't do that. In fact, `\outer` control sequences can appear in any of vertical, internal vertical, horizontal, restricted horizontal, math, and display math modes.
```
\outer\def\foo{asdf}
\foo% vertical mode
foo \foo% horizontal mode
\hbox{\foo}% restricted horizontal mode
\vbox{\foo}% internal vertical mode
$\foo$% math mode
$$\foo$$% display math mode
\bye
```
So given all of that, what is the utility of `\outer`?
|
https://tex.stackexchange.com/users/647
|
When is it appropriate to use \outer?
| true |
`\outer` isn't used in LaTeX2e and I'm not aware of any packages that do, either (there are probably some, though). However, I've come across occasion to think it might sometimes be a good idea.
`\outer` prevents a macro from being used inside any other macro. But when is this even desirable? Well, consider the use of `\verb`: because it changes catcodes, and catcodes are frozen when tokenization occurs, `\verb` can never be (reliably) used inside any other macro. For examples, this will not work:
```
\section{The \verb|\outer| primitive}
```
Now, `\verb` contains its own processing to give a suitable error message in this case anyway, but there are other packages that define commands that use catcode-mucking to do their work. For examples, some indexing commands and, say, `\url`, can give bad output if they're used inside macros. In theory, you could use `\outer` to enforce their use in running text only, but this isn't done very often.
Note also that eTeX gives `\scantokens` which relieves many of the restrictions of only being able to change catcodes before tokenization occurs. So `\outer` is less useful these days from that point of view.
|
22
|
https://tex.stackexchange.com/users/179
|
2027
| 1,413 |
https://tex.stackexchange.com/questions/2016
|
17
|
Tex has powerful support for extensions triggered by events happen in generating output, by running one of six token lists appropriately:
```
\everycr \everydisplay \everyhbox \everymath \everypar \everyvbox
```
They're used with effect in such places as Latex classes, but they are much less useful than they could be, because the `\everyfoo={\t\o ks}` assignment simply wipes the current value, making it rather tricky to use them by authors of packages and documents. Emacs' Elisp has a widely understood technology for registering and deregistering code to run at events, namely hooks.
The LaTeX3 Project's `expl3` library offers supports for managing token lists, and LuaTeX augments TeX's event handling mechanism with a set of Lua callbacks. Are these the beginning of proper support for event-driven TeX code, as usable as hooks? Is this a priority for developers on these projects?
|
https://tex.stackexchange.com/users/175
|
Will LaTeX3 have proper support for hooks? Does LuaTeX?
| false |
Sure, it would be great if LaTeX3 provided hooks for this sort of thing—not using the primitives directly, but rather providing an interface to a reliable way to use these token registers.
Unfortunately, ripping out the current LaTeX2e machinery for, say, giving a good way to access `\everypar` simply isn't possible without breaking backwards compatibility with lots and lots of current packages. Experimental LaTeX3 packages such as `galley` are written to start thinking about these ideas, but we're quite a way away from anything that can be used for general purposes.
|
9
|
https://tex.stackexchange.com/users/179
|
2029
| 1,414 |
https://tex.stackexchange.com/questions/2030
|
23
|
I'm using LaTeX and the `book` class and have one problem:
I want that my starred sections (only starred sections) appear in the center of the pages instead of the left side of the pages and also these sections to be added to the table of contents automatically.
|
https://tex.stackexchange.com/users/885
|
Centering \section* and adding them to the ToC
| false |
For the second part of your question (adding these sections to the table of contents), you can use `\addcontentsline{toc}{chapter}{My chapter}` before specifying the `section` command.
|
7
|
https://tex.stackexchange.com/users/870
|
2031
| 1,415 |
https://tex.stackexchange.com/questions/2006
|
24
|
What viewers do you use for reviewing the beautifully-styled output of your LaTeX source?
List PDF, DVI and PostScript options.
Possibly, one entry per answer, and list platform availability, license conditions (open source vs. freeware/proprietary).
|
https://tex.stackexchange.com/users/711
|
Output viewers for use with LaTeX
| false |
**[Sumatra](http://blog.kowalczyk.info/software/sumatrapdf/download.html)**, an open source viewer for Windows. It is very lightweight and fast, supports reload-on-file-change and synctex (for forward and backward searching). It intentionally doesn't have a lot of features, but it works very well.
|
17
|
https://tex.stackexchange.com/users/885
|
2032
| 1,416 |
https://tex.stackexchange.com/questions/2028
|
8
|
I had hoped to use the Minion and Myriad fonts from my new copy of Adobe CS 5 in XeLaTeX; but `\setmainfont{Minion Pro}` produces the following error: (output of `xdvipdfmx -vvv` shown)
>
> DVI File Info
>
> Unit: 25400000 / 473628672
>
> Magnification: 1000
>
> Media Height: 41484288
>
> Media Width: 26673152
>
> Stack Depth: 3
>
> Page count: 1
>
> DVI Comment: XeTeX output 2010.08.20:1057
>
> DVI file font info
>
> TeX Font: MinionPro-Regular loaded at ID= 16, size= 9.96pt (scaled 100.0%)
>
> tufte.xdv -> tufte.pdf
>
> D:/TEMP/dvipdfmx.a0056400001 [1
> \*\* ERROR \*\* Cannot proceed without the "native" font: MinionPro-Regular (Minion Pro Regular)...
>
> Output file removed.
>
>
>
Variations of the argument, such as `MinionPro`, `MinionPro-Regular`, `Minion Pro Regular`, etc., also produce the error. Refreshing the font cache, with `fc-cache -fv`, doesn't change anything either.
I have determined that it is the output driver, xdvipdfmx, that is causing this error, since invoking xelatex with `--no-pdf` works without any problems. Apparently XeLaTeX can find the font, but the output driver can't.
To make things even more bizarre, if I select the font like this:
```
\setmainfont[ExternalLocation,%
BoldFont=MinionPro-Bold.otf,%
ItalicFont=MinionPro-It.otf,%
BoldItalicFont=MinionPro-BoldIt.otf]{MinionPro-Regular.otf}
```
everything works as expected. Can somebody advise me as to what is going on here?
**UPDATE**: I changed above to show the output of `xdvipdfmx -vvv`.
|
https://tex.stackexchange.com/users/677
|
XeLaTeX can find font, but xdvipdfmx can't
| false |
You can try running xdvipdfmx on the XDV file with ascending verbosity levels, -v, -vv, -vvv etc. probably you will be able identify some possible cause.
|
2
|
https://tex.stackexchange.com/users/729
|
2033
| 1,417 |
https://tex.stackexchange.com/questions/2018
|
11
|
This might sound odd but I really like the old typewriter books from the pre-TeX era (the type of books that inspired Knuth to make TeX!). I don't know the exact reason, maybe its because I am very fond of typewriter and monospace fonts or just a nostalgia for old math books from 1960s ...
Anyway I am looking for typewriter font with matching math support. It is easy to change the text of a document into a typewriter font however the math font never matches and that results in an ugly combination. An example which I really like is [**Moments, monodromy, and perversity: a diophantine perspective**](http://books.google.ca/books?id=Tp7BN8JAv7AC) by Nick Katz. I contacted the author and unfortunately he has not done this in TeX. The fonts are **bit fonts** created by William Fulton back in the 1980s. So what are your suggestions?
|
https://tex.stackexchange.com/users/809
|
A monospace or typewriter font with matching math support
| false |
DejaVu Sans Mono have both Latin and Greek plus some math symbols, if you use fontspec and unocode-math then it can be used for simple formulas:
```
\documentclass{article}
\usepackage{amsmath}
\usepackage{fontspec}
\usepackage{unicode-math}
\setmainfont{DejaVu Sans Mono}
\setmathfont[math-style=upright]{DejaVu Sans Mono}
\begin{document}
\(
\text{Sum}(E, f, ψ) ≔ ∑_{x_1,\dots, x_n \text{in} E} ψ_E(f(x_1,\dots, x_n)).
\)
\end{document}
```
But more complex formulas needs OpenType math tables in the font.
|
5
|
https://tex.stackexchange.com/users/729
|
2034
| 1,418 |
https://tex.stackexchange.com/questions/2030
|
23
|
I'm using LaTeX and the `book` class and have one problem:
I want that my starred sections (only starred sections) appear in the center of the pages instead of the left side of the pages and also these sections to be added to the table of contents automatically.
|
https://tex.stackexchange.com/users/885
|
Centering \section* and adding them to the ToC
| true |
I recommend to create a new macro with a different name instead of changing the behaviour of `\section*` and thus redefining `\section`. A separate macro would be a cleaner solution.
The main LaTeX command for sectioning is `\@startsection`. It is documented in source2e.pdf, just type `texdoc source2e` at the command prompt. You would find it in *61.2 Sectioning*.
So, let's create a macro, use `\@startsection` with a `\centering` in the formatting argument:
```
\documentclass{book}
\makeatletter
\newcommand\@csection{\@startsection {section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\normalfont\Large\bfseries\centering}}
\newcommand{\csection}[1]{%
\@csection*{#1}%
\addcontentsline{toc}{section}{#1}%
}
\makeatother
\begin{document}
\tableofcontents
\chapter{First chapter}
\section{First section}
some text
\csection{A centered section}
more filler text.
\end{document}
```
Since `\@startsection` contains the `@` character, I had to use `\makeatletter` ... `\makeatother`. I defined an internal macro `\@csection` that does the sectioning. The final user command `\csection` calls this but additionally adds the entry to the table of contents.
`\csection` does what you asked for: it creates an unnumbered section-level heading with toc entry. Note, it doesn't support an optional argument, since this hadn't been a requirement.
If you need more customization, also regarding other sectioning commands, I recommend to use the [`titlesec`](http://ctan.org/pkg/titlesec) package. It offers a very good interface for sectioning customization.
Output:
|
25
|
https://tex.stackexchange.com/users/213
|
2035
| 1,419 |
https://tex.stackexchange.com/questions/2030
|
23
|
I'm using LaTeX and the `book` class and have one problem:
I want that my starred sections (only starred sections) appear in the center of the pages instead of the left side of the pages and also these sections to be added to the table of contents automatically.
|
https://tex.stackexchange.com/users/885
|
Centering \section* and adding them to the ToC
| false |
You can define a new command to use in place of `\section*`, combining Bran's answer and the `\centering` command:
```
\newcommand{\secstar}[1]{\addcontentsline{toc}{section}{#1}\section*{\centering #1}}
```
The new `\secstar` command takes the section name as an argument, then adds it to the the table of contents and creates a new `\section*`, centering the section title. A complete example of its use is:
```
\documentclass{book}
\newcommand{\secstar}[1]{\addcontentsline{toc}{section}{#1}\section*{\centering #1}}
\begin{document}
\tableofcontents
\section{Test 1}
First numbered section
\secstar{Test 2}
An unnumbered section
\end{document}
```
|
13
|
https://tex.stackexchange.com/users/32
|
2038
| 1,420 |
https://tex.stackexchange.com/questions/2037
|
28
|
>
> **Possible Duplicate:**
>
> [Syntax Coloring in LaTeX](https://tex.stackexchange.com/questions/867/syntax-coloring-in-latex)
>
>
>
I'm relatively new to LaTeX, and am starting to use it for academic paper writing. I'm doing a lot of computer programming as part of my academic work, so need to be able to include code extracts easily.
I know I can easily make them appear in a monospaced font, but what would you suggest for getting automatic syntax highlighting?
|
https://tex.stackexchange.com/users/495
|
How best to include programming source code in LaTeX documents?
| false |
Use package `listings`. But there are other options see: <https://texfaq.org/FAQ-codelist>.
|
13
|
https://tex.stackexchange.com/users/337
|
2039
| 1,421 |
https://tex.stackexchange.com/questions/2037
|
28
|
>
> **Possible Duplicate:**
>
> [Syntax Coloring in LaTeX](https://tex.stackexchange.com/questions/867/syntax-coloring-in-latex)
>
>
>
I'm relatively new to LaTeX, and am starting to use it for academic paper writing. I'm doing a lot of computer programming as part of my academic work, so need to be able to include code extracts easily.
I know I can easily make them appear in a monospaced font, but what would you suggest for getting automatic syntax highlighting?
|
https://tex.stackexchange.com/users/495
|
How best to include programming source code in LaTeX documents?
| true |
As the original developer of **[`minted`](https://www.ctan.org/pkg/minted)**, that’s of course what I recommend.
It uses Pygments to produce beautifully coloured code, e.g.:
On the other hand, I realize that installing `minted` isn’t trivial, and it relies on an external program. Simpler, more efficient (very noticeable for a large number of code fragments!) and already installed on most systems – but also less versatile than `minted` – is the package `listings`. (Furthermore, `listings` has a nice feature to break over-long lines automatically and indent them correctly. `minted` can’t do this.)
|
36
|
https://tex.stackexchange.com/users/42
|
2040
| 1,422 |
https://tex.stackexchange.com/questions/2006
|
24
|
What viewers do you use for reviewing the beautifully-styled output of your LaTeX source?
List PDF, DVI and PostScript options.
Possibly, one entry per answer, and list platform availability, license conditions (open source vs. freeware/proprietary).
|
https://tex.stackexchange.com/users/711
|
Output viewers for use with LaTeX
| false |
Windows
-------
After progressing from Adobe (!) through Sumatra and Foxit, I finally arrived at [PDF-XChange Viewer](http://www.tracker-software.com/product/pdf-xchange-viewer), and am very pleased with it, especially the two full-screen modes (one of which truly is full-screen) and the facilities for annotation.
Hmm, forgot something very important: it also has the ability to add dimension lines, thus feeding my OCD for microscopic fine tuning of page layout!
---
@user714: Yes, your comment is partially valid; but my workflow is probably not the same as yours.
For the quick-and-dirty is-it-working sort of questions, I use the PDF viewer that comes with TeXworks; PDF-XChange is for close work and fine tuning, measuring distances, and so forth.
|
3
|
https://tex.stackexchange.com/users/344
|
2041
| 1,423 |
https://tex.stackexchange.com/questions/2012
|
29
|
`\outer` is a strange beast. Any control sequence declared `\outer` cannot be used as either the parameter text or replacement text of a macro, at least if the control sequence is declared `\outer` at the time the parameters are tokenized or the definition is scanned, respectively. That is, both the definition of `\bar` and the use of `\baz` are errors:
```
\outer\def\foo{asdf}
\def\bar{\foo}
\def\baz#1{#1}
\baz\foo
```
However, changing this slightly to
```
\def\bar{\foo}
\def\baz#1{\outer\def\foo{asdf}#1}
\baz\foo
\bar
```
so that `\foo` is only declared `\outer` after the definition of `\bar` and after the parameters to `\baz` have been parsed, compiles correctly.
I could see requiring a macro to appear only in vertical mode, but `\outer` doesn't do that. In fact, `\outer` control sequences can appear in any of vertical, internal vertical, horizontal, restricted horizontal, math, and display math modes.
```
\outer\def\foo{asdf}
\foo% vertical mode
foo \foo% horizontal mode
\hbox{\foo}% restricted horizontal mode
\vbox{\foo}% internal vertical mode
$\foo$% math mode
$$\foo$$% display math mode
\bye
```
So given all of that, what is the utility of `\outer`?
|
https://tex.stackexchange.com/users/647
|
When is it appropriate to use \outer?
| false |
Latex defines ASCII formfeed `^^L` as an `\outer`. This is the only good use of outer that I can think of. So, the answer to your question is "almost none".
|
6
|
https://tex.stackexchange.com/users/627
|
2042
| 1,424 |
https://tex.stackexchange.com/questions/2006
|
24
|
What viewers do you use for reviewing the beautifully-styled output of your LaTeX source?
List PDF, DVI and PostScript options.
Possibly, one entry per answer, and list platform availability, license conditions (open source vs. freeware/proprietary).
|
https://tex.stackexchange.com/users/711
|
Output viewers for use with LaTeX
| false |
To be useful as a TeX viewer, a program has to allow you to TeX the file while you are viewing it, and then it has to automatically refresh the file (so you are viewing it at the same spot). Neither PDF-XChange nor Foxit seem to do this, so I'm not sure why they are being recommended. Sumatra does do this.
|
3
|
https://tex.stackexchange.com/users/714
|
2043
| 1,425 |
https://tex.stackexchange.com/questions/2044
|
88
|
TikZ is undergoing lots of development with new features being added, but the versions distributed with standard TeX releases are often a little old. How do I get the latest version? If I want to be sure that I get the latest stable version, how do I do that?
---
Note: I'm not asking this question for myself, but because a question like this seems to be useful for pointing to it when a new feature of TikZ is mentioned in an answer to some other question. Feel free to post answers for any operating system/TeX distribution combination.
|
https://tex.stackexchange.com/users/83
|
How to install a current version of TikZ?
| false |
The tikz offical update cycle is rather slow. However, development goes on and the latest build can be found here ([tikz builds](http://www.texample.net/tikz/builds/)). The build has to be installed manually, but comes in the correct tex-tree-structure already.
For Windows users who use MikTeX, it is advisable to create a local-tree to install packages which are not available in the MkTeX package browser.
1. Download the latest build from the link above
2. Create a new folder e.g `C:\LocalTexFiles`
3. Copy the downloaded zip-file in this folder and unpack it
You should now have two new folders in `C:\LocalTexFiles`, namely '`tex`' and '`doc`'
4. Go to *Start*->*Program Files*->*MikTeX2.x*->*Settings (Administrator)*
5. In the settings window click the *Root* tab, click *Add* and browse to `C:\LocalTexFiles` and select it, confirm by clicking *OK*
6. MikTeX should now automatically execute `texhash` and the local tree is from now on the first to be searched by MikTeX
7. If you want to confirm that the latest version is used, create a document with `\usepackage{tikz}` and add the `\listfiles` command before the `\documentclass` command. The log file will then show a file list with dates
|
27
|
https://tex.stackexchange.com/users/632
|
2045
| 1,426 |
https://tex.stackexchange.com/questions/2006
|
24
|
What viewers do you use for reviewing the beautifully-styled output of your LaTeX source?
List PDF, DVI and PostScript options.
Possibly, one entry per answer, and list platform availability, license conditions (open source vs. freeware/proprietary).
|
https://tex.stackexchange.com/users/711
|
Output viewers for use with LaTeX
| false |
**Preview.app** on **Mac OS X** seems to work surprising well as a PDF previewer, and it is a standard part of the operating system.
I usually keep two windows open: editor and Preview.app. I use a keyboard shortcut in my editor to trigger the Latex compilation. Then I cmd-tab to change windows; when I switch to Preview.app, it automatically notices that the document has changed and reloads it quickly. It doesn't lose the current location, zoom level or anything.
Even the following kind of scenarios work flawlessly: I have foo.pdf open in Preview.app. I delete foo.pdf (e.g., using something like "make clean" or "rubber --clean" to get a fresh start). Preview.app is still happy, I can still read the latest version of the document. Then I re-create the file foo.pdf (e.g., using something like "make" or "rubber"). When I switch to Preview.app, it notices that the file has been re-created and automatically reloads it.
Regarding dvi files: do we really need those any more?-)
|
3
|
https://tex.stackexchange.com/users/100
|
2046
| 1,427 |
https://tex.stackexchange.com/questions/2047
|
54
|
The `etex` package provides an interface to e-TeX features. What advantages does it offer to LaTeX users?
Are there any possible disadvantages like incompatibility to any other package or can I just use it without worries?
|
https://tex.stackexchange.com/users/213
|
What are benefits of e-TeX for LaTeX users?
| true |
e-TeX provides lots of additional features for package writers such as an increased number of registers. The thing I find most useful is its extended tracing ability which I usually access through the `trace` package. In particular, tracing commands and tracing assignments are extremely helpful when trying to diagnose a problem.
e-TeX also provides a `\middle` delimiter that works like `\left` and `\right` which can be helpful.
```
\[\left\{\sum_{i=0}^n a_i\ \middle|\ a_0<a_1<\dotsb<a_n\right\}\]
```
Edit: While writing an answer to another question, I just remembered two pretty useful extensions in e-TeX. The first is `\unless` which lets you negate the arms of an `\if`. It's especially useful in loops where you want to loop unless some condition is true. Reading files was my example.
```
\loop\unless\ifeof\file
\readline\file to\foo
% Do something with \foo
\repeat
```
This also shows the second of the two extensions: `\readline`. It acts exactly like `\read` except that all of the characters are given category code other or space. It's very handy for reading in text that contains characters like `$`, `%`, `^`, `&`, `_`, or `\`. For example, here's a cheater's quine.
```
\newread\file
\openin\file\jobname
\endlinechar-1
\tt
\loop\unless\ifeof\file
\readline\file to\foo
\noindent\foo\endgraf
\repeat
\bye
```
There are other category changing commands like `\scantokens` and `\detokenize`, but I've never used either.
|
33
|
https://tex.stackexchange.com/users/647
|
2048
| 1,428 |
https://tex.stackexchange.com/questions/2047
|
54
|
The `etex` package provides an interface to e-TeX features. What advantages does it offer to LaTeX users?
Are there any possible disadvantages like incompatibility to any other package or can I just use it without worries?
|
https://tex.stackexchange.com/users/213
|
What are benefits of e-TeX for LaTeX users?
| false |
`etex.sty` seems aim to be to LaTeX as `etex.src` is to plain TeX. It seems to be useful for giving nice names to e-TeX (the engine)'s magic constants, so you can write `\hboxgrouptype` for 2, `\ligaturenode` for 7, and so on. It is loaded internally by quite a lot of packages.
Another feature it provides is transparently making the extended register pool available if the normal pool gets exhausted. It is recommended for the user to load it to help with 'no room for a new *thing*' errors, as in [this FAQ answer](https://texfaq.org/FAQ-noroom)
|
14
|
https://tex.stackexchange.com/users/627
|
2049
| 1,429 |
https://tex.stackexchange.com/questions/2012
|
29
|
`\outer` is a strange beast. Any control sequence declared `\outer` cannot be used as either the parameter text or replacement text of a macro, at least if the control sequence is declared `\outer` at the time the parameters are tokenized or the definition is scanned, respectively. That is, both the definition of `\bar` and the use of `\baz` are errors:
```
\outer\def\foo{asdf}
\def\bar{\foo}
\def\baz#1{#1}
\baz\foo
```
However, changing this slightly to
```
\def\bar{\foo}
\def\baz#1{\outer\def\foo{asdf}#1}
\baz\foo
\bar
```
so that `\foo` is only declared `\outer` after the definition of `\bar` and after the parameters to `\baz` have been parsed, compiles correctly.
I could see requiring a macro to appear only in vertical mode, but `\outer` doesn't do that. In fact, `\outer` control sequences can appear in any of vertical, internal vertical, horizontal, restricted horizontal, math, and display math modes.
```
\outer\def\foo{asdf}
\foo% vertical mode
foo \foo% horizontal mode
\hbox{\foo}% restricted horizontal mode
\vbox{\foo}% internal vertical mode
$\foo$% math mode
$$\foo$$% display math mode
\bye
```
So given all of that, what is the utility of `\outer`?
|
https://tex.stackexchange.com/users/647
|
When is it appropriate to use \outer?
| false |
I see no real use for `\outer` either, because it semantics are such that it does not do anything helpful except in trivial cases. Even macros that do change category codes can make perfect sense in an argument, in actual cases (for example in the setup macros of more complex environments).
Older versions of LuaTeX silently ignored `\outer`. This was later changed by request to be more compatible with older engines, so now `\outer` can produce an error again, but this backward compatibility feature can still be disabled by specifying
```
\suppressoutererror=1
```
in the source code.
|
13
|
https://tex.stackexchange.com/users/89
|
2051
| 1,430 |
https://tex.stackexchange.com/questions/162
|
55
|
Are there newsgroups, forums, FAQs, and other sites that provide quality information on TeX, LaTeX and friends? Are all of these in English, or is there one in "my language of choice"?
|
https://tex.stackexchange.com/users/87
|
What are other good resources on-line for information about TeX, LaTeX and friends?
| false |
German resources for LuaTeX: <http://www.luatex.de/ressourcen/>
|
2
|
https://tex.stackexchange.com/users/243
|
2052
| 1,431 |
https://tex.stackexchange.com/questions/2053
|
40
|
>
> **Possible Duplicate:**
>
> [How do I use a particular font for a small section of text in my document?](https://tex.stackexchange.com/questions/25249/how-do-i-use-a-particular-font-for-a-small-section-of-text-in-my-document)
>
>
>
I am looking for changing the font just of a little part of my text, not a section title or anything, just some text in my document. If I use `\usepackage{font}` in the doc heading, then I change the whole document's font, but I only want to change the font of certain text.
How can I achieve this?
|
https://tex.stackexchange.com/users/496
|
change font of certain part of the text
| true |
You can set the fontfamily using `\fontfamily{<family>}\selectfont`:
```
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{mathpazo}
\begin{document}
Text in Palatino
{\fontfamily{ptm}\selectfont
Text in Times%
}
\end{document}
```
|
25
|
https://tex.stackexchange.com/users/565
|
2054
| 1,432 |
https://tex.stackexchange.com/questions/2050
|
6
|
I'm writing an thesis in British architecture and I need to follow the MLA style for bibliography.
I'm now using [`biblatex`](http://ctan.org/pkg/biblatex) and [`biblatex-mla`](http://www.ctan.org/tex-archive/help/Catalogue/entries/biblatex-mla.html); but I can't find out how to define official reports (published by gov., commissions, associations, ...) or and web sites references (when it's not an article but just from the main website)
I can't find any clue in the two documentations.
EDIT: `biblatex-mla` adds restrictions to `biblatex`, so `@misc`, `@online` and `@report` are not written in the output file
|
https://tex.stackexchange.com/users/896
|
Biblatex / MLA for official reports and websites
| false |
Reading the `biblatex` documentation, it says that there is an `online` type (like the `book` type you could use for web site referernces. It also has a `url` field.
Regarding the official reports, you could just use the `misc` type and fill its `howpublished` field.
|
2
|
https://tex.stackexchange.com/users/401
|
2055
| 1,433 |
https://tex.stackexchange.com/questions/2050
|
6
|
I'm writing an thesis in British architecture and I need to follow the MLA style for bibliography.
I'm now using [`biblatex`](http://ctan.org/pkg/biblatex) and [`biblatex-mla`](http://www.ctan.org/tex-archive/help/Catalogue/entries/biblatex-mla.html); but I can't find out how to define official reports (published by gov., commissions, associations, ...) or and web sites references (when it's not an article but just from the main website)
I can't find any clue in the two documentations.
EDIT: `biblatex-mla` adds restrictions to `biblatex`, so `@misc`, `@online` and `@report` are not written in the output file
|
https://tex.stackexchange.com/users/896
|
Biblatex / MLA for official reports and websites
| false |
For web site references, the `@misc` type might be sufficient. This is for example what Wikipedia suggests when you click "Cite Page":
```
@misc{ wiki:xxx,
author = "Wikipedia",
title = "BibTeX --- Wikipedia{,} The Free Encyclopedia",
year = "2010",
url = "\url{http://en.wikipedia.org/w/index.php?title=BibTeX&oldid=379386079}",
note = "[Online; accessed 19-August-2010]"
}
```
|
0
|
https://tex.stackexchange.com/users/870
|
2056
| 1,434 |
https://tex.stackexchange.com/questions/2057
|
14
|
I thought PDFLaTeX was simpler and eliminated useless steps as well as possible font issues?
In other words what is the difference between a pdf generated using the LaTeX command and DVI's and the one generated using the PDFLaTeX command?
EDIT #1: As an example, for the submission of a thesis, my university requires the `.tex` file and all the associated files which are required to compile it and a `.dvi` file.
It's in French but here it is anyways:
>
> LaTeX
>
>
> Forme du mémoire ou de la thèse
>
>
> Lorsque le mémoire ou la thèse a été
> rédigé à l'aide de LaTeX, il faut
> acheminer à la Faculté des études
> supérieures le fichier .tex avec tout
> autre document nécessaire à sa
> compilation (images, fichiers de
> bibliographie, fichiers d'index, etc.)
> et le fichier DVI. Pour acheminer le
> mémoire ou la thèse, il est recommandé
> d'utiliser un format de fichier
> compressé.
>
>
>
From the [official webpage](http://www.fes.ulaval.ca/sgc/Etudes/mte/pid/2627).
EDIT #2: Further research shows that Jukka Suomela's answer is right. Here is what is listed on the webpage of a conference I am writing for (right after the part that explains how to compile successfully through DVI-PS-PDF):
>
> Another alternative is to use the
> pdflatex (pdftex) program instead of
> straight LaTeX or TeX. This program
> avoids the Type 3 font problem,
> however you must ensure that all of
> the fonts are embedded (the pdffonts
> utility mentioned above will yield
> this information). If they are not,
> you need to configure pdftex to use a
> font map file that specifies that the
> fonts be embedded. Also you should
> ensure that images are not downsampled
> or otherwise compressed in a lossy
> way. **If you are knowledgeable about
> how pdflatex deals with included
> images and how to ensure that they are
> not compressed or downsampled, please
> email us at submissions@vgtc.org so
> that we might improve our support for
> this program.**
>
>
>
|
https://tex.stackexchange.com/users/10
|
Why does my conference/university require me to use DVI intermediary format?
| true |
In practice, in situations like this, there isn't a good reason.
The instructions are written 10 years ago. By people who haven't really used Latex since 1990s.
To give a stupid example, many ACM conferences require that you submit the PostScript file produced by dvips. The reason for this is that earlier people didn't know how to use latex + dvips + ps2pdf to produce a valid PDF file with all fonts embedded (including those used in EPS figures). Of course, nowadays we could simply use PDF illustrations + pdflatex.
|
16
|
https://tex.stackexchange.com/users/100
|
2058
| 1,435 |
https://tex.stackexchange.com/questions/2059
|
7
|
I have a document containing, among other things, some figures created using the `picture` environment. Now I need to create a postscript file for each figure, but if I simply copy them into otherwise blank documents, each one will take up an entire page.
For example, if I have
```
...
\setlength{\unitlength}{1in}
\begin{picture}(3.14,2.71)
%Draw things
\end{picture}
...
```
then I would like to create a .PS file that is 3.14x2.71 inches and which contains nothing but this drawing. I should be able to change my `picture` environment above to an `\includegraphics` command that loads the new file, and have it make zero change to the document that is output.
>
> What's the best way to create a postscript file from a LaTeX-drawn `picture` with the same dimensions as the original?
>
>
>
|
https://tex.stackexchange.com/users/32
|
How to generate postscript files from LaTeX pictures, with correct dimensions?
| false |
Run `ps2eps` on the postscript file you produce. You'll get an encapsulated postscript that you can view with postscript viewers or embed via `\includegraphics`.
|
2
|
https://tex.stackexchange.com/users/647
|
2060
| 1,436 |
https://tex.stackexchange.com/questions/2059
|
7
|
I have a document containing, among other things, some figures created using the `picture` environment. Now I need to create a postscript file for each figure, but if I simply copy them into otherwise blank documents, each one will take up an entire page.
For example, if I have
```
...
\setlength{\unitlength}{1in}
\begin{picture}(3.14,2.71)
%Draw things
\end{picture}
...
```
then I would like to create a .PS file that is 3.14x2.71 inches and which contains nothing but this drawing. I should be able to change my `picture` environment above to an `\includegraphics` command that loads the new file, and have it make zero change to the document that is output.
>
> What's the best way to create a postscript file from a LaTeX-drawn `picture` with the same dimensions as the original?
>
>
>
|
https://tex.stackexchange.com/users/32
|
How to generate postscript files from LaTeX pictures, with correct dimensions?
| true |
You should look into the (extremely useful) [preview](http://www.ctan.org/pkg/preview) package. You'll probably want the `tightpage` option, and if you want the generated eps to have *exactly* the same dimensions as the original you'll need to `\setlength\PreviewBorder{0 pt}`.
You don't need to copy the `picture` environments into otherwise blank documents, you just need have a `\PreviewEnvironment{picture}` line in the preamble, in order to extract only the pictures.
To expand on your example
```
\documentclass{article}
\usepackage[active,tightpage]{preview}
\setlength\PreviewBorder{0pt}
\PreviewEnvironment{picture}
\begin{document}
\setlength{\unitlength}{1in}
Text before picture
\begin{picture}(3.14,2.71)
Contents of picture environment
\end{picture}
\begin{picture}(1.00,1.00)
Contents of picture environment2
\end{picture}
Text after pictures
\end{document}
```
Gives, when compiled with pdflatex, a pdf which has pages of exactly 3.14in\*2.71in and 1.00in\*1.00in, and when compiled by latex and dvips gives a ps with the same dimension pages. Either the pdf or the ps can be turned into eps using external tools, but if you want to, you can replace `tightpage` with `psfixbb` and then run `dvips -E -i` on the dvi to get a series of eps files each with the correct dimensions (named jobname.001 jobname.002 etc, which you have to rename as jobname.001.eps etc).
Removing the `active` option from the `usepackage` line means the file will compile as if preview was never loaded.
PS: if you want the `\includegraphics` boxes to be very accurately the same as the original ones then you should also look into the `hiresbb` option of the `graphicx` package. Otherwise the dimensions get rounded to 1 `bp` (big point) accuracy.
|
4
|
https://tex.stackexchange.com/users/627
|
2061
| 1,437 |
https://tex.stackexchange.com/questions/2062
|
14
|
A lot of leading-edge programming languages (like Coq and Agda) allow nearly unrestricted use of unicode symbols in program text, so you can have math characters like `$\otimes$` (Unicode U+2A02) as operators in your program.
I'd like to be able to cut and paste these programs directly into my LaTeX documents inside a verbatim-like environment and get a reasonable result. For various reasons I can't use the listings environment -- I need the typeset output to look the same as the program looks on the computer screen, even if the listings package would make it "prettier".
Unfortunately the computer modern typewriter (cmtt) font, which I really like a lot, doesn't have math symbols, but there ought to be some package that acts like verbatim using cmtt wherever possible and falls back to the math fonts when it encounters a unicode symbol that isn't in cmtt.
A package like this would probably require a major effort to "line up" the unicode math symbols with the [Latex Symbols List](http://www.ctan.org/tex-archive/info/symbols/comprehensive/symbols-a4.pdf), but once a table like that were to be compiled it would be really, really useful!
So, I guess my question is in two parts: has anybody compiled such a table, and (more importantly) has anybody used it to produce a verbatim that makes a "reasonable effort" at handling unicode math characters?
|
https://tex.stackexchange.com/users/901
|
unicode \begin{verbatim} with cmtt?
| false |
I recommend using either XeLaTeX or LuaLaTeX and loading an appropriate Unicode font for the verbatim that requires those symbols. pdfLaTeX won't cut it in this case, I'm afraid.
|
11
|
https://tex.stackexchange.com/users/179
|
2064
| 1,438 |
https://tex.stackexchange.com/questions/2063
|
250
|
I'm new to LaTeX, investigating using it for some work projects. I'm using MiKTeX on Windows. My employer's locked-down network blocks the application's automatic installation function. I can take my laptop home and successfully install from there, but if I need a package in the middle of the day I'm stuck.
I am able to access the CTAN website and download the package files (.dtx or .ins?), but I don't know what do do with them. How can I do a manual package installation?
|
https://tex.stackexchange.com/users/902
|
How can I manually install a package on MiKTeX (Windows)
| true |
Firstly, check README files, available documentation of the package, perhaps the beginning of the `.dtx` file to get installation information.
**Installing a package available as dtx/ins bundle:**
* Download the content of the package directory. `dtx` is the extension of a documented source file, `ins` is the extension of an installation file. Put this in a temporary directory.
* If there's nothing differently written in a README file run LaTeX (or TeX) on the `.ins` file. This is best done using the command prompt (`latex packagename.ins`), but you may use your TeX editor in LaTeX/DVI-LaTeX mode or what it is called there. This would usually produce one or more files ending with `.sty`, perhaps some additional files. As you now have cls or sty files or the like, the remaining steps are the same like in the next alternative way:
**Installing sty or cls files:**
* Create a new directory with the package name in your local texmf directory structure, see also [Create a local texmf tree in MiKTeX](https://tex.stackexchange.com/questions/69483/create-a-local-texmf-tree-in-miktex). Why not to choose the main MiKTeX texmf tree see in [Purpose of local texmf trees](https://tex.stackexchange.com/questions/69487/purpose-of-local-texmf-trees).
* Copy the package files (`*.sty`, `*.cls` etc.) into this directory.
* Make the new package known to MiKTeX: refresh the MiKTeX filename database. To do this, click "Start/ Programs/ MiKTeX 2.x/ Maintenance/ Settings" (or similar) to get to the MiKTeX options, click the button "Refresh FNDB". The installation is complete.
* If you did not download the documentation already, you could get it by running pdfLaTeX or LaTeX on the `.dtx` file. Compile twice to get correct references.
**Obtaining and installing packaged universal archives:**
Perhaps you could get a file with the extension `.tds.zip`. Such files are archives fitting to your [TeX directory structure](http://tug.org/tds/tds.html). Open it, check the content structure. You could extract it to the right place. Also here, as after any installation, refresh the MiKTeX filename database.
**Installing a font package**
Installing a font package, especially for Type1 fonts, requires additonal steps. See [Manual font installation](https://tex.stackexchange.com/questions/88423/manual-font-installation).
**Links with further information:**
* [Integrating Local Additions](http://docs.miktex.org/manual/localadditions.html) on MiKTeX.org
* [What are documented LaTeX sources (.dtx files)](https://texfaq.org/FAQ-dtx) in the TeX FAQ
* [Installing things on a (La)TeX system](https://texfaq.org/FAQ-installthings) with detailed general instructions in the TeX FAQ
* [Downloading and Installing Packages](https://www.dickimaw-books.com/latex/novices/html/installsty.html) by Nicola L. C. Talbot
* [The dtx format](http://www.texdev.net/2009/10/05/the-dtx-format/) by Joseph Wright
**A different and very effective way, using a local repository:**
(works only for all in the MiKTeX package repository available packages)
* Use the [MiKTeX net installer](http://miktex.org/download) to download the complete MiKTeX repository to a USB drive.
* On a MiKTeX system, choose this directory as the local package repository in the package manager.
* Use this local repository for installation and updates.
* You may update that local repository later using the net installer: it loads the database from the server, compares and downloads new or updated packages.
|
197
|
https://tex.stackexchange.com/users/213
|
2066
| 1,439 |
https://tex.stackexchange.com/questions/2065
|
8
|
I have a table whose column headings (centre aligned with `\multicolumn{1}{c}{Foobar here}`) are wider than the left-aligned data. This looks somewhat odd, as there are large right-margins in each column.
It is probably easiest to illustrate my query with an example. Let say that the column heading is 10em and the data in the column varies from 2em to 3em. Currently each row of data will have a right margin of between 8em and 7em (as the data is left aligned so the right margin picks up any slack).
What I want is a means of evening this out; so the left margin is (10em - 3em) / 2 = 3.5em and the right margin varying between 3.5em and 4.5em.
How can I go about this? I know the text of each column heading and the text of the widest piece of data in the table.
|
https://tex.stackexchange.com/users/753
|
Padded Left Align for Table Columns
| true |
The `eqparbox` package will solve this. Here is an example (modified from the `eqparbox` documentation to have left-aligned data like you described, and to be more aesthetic by using `booktabs`). (You have to run it through latex twice, for the box widths to converge.)
```
\documentclass{article}
\usepackage{eqparbox}
\usepackage{booktabs}
\begin{document}
\begin{tabular}{@{}lccc@{}} \toprule
& \multicolumn{3}{c}{Sales (in millions)} \\ \cmidrule{2-4}
Product &
October & November & December \\ \midrule
Widgets & \eqparbox{oct}{55.2} &
\eqparbox{nov}{\textbf{89.2}} &
\eqparbox{dec}{57.9} \\
Doohickeys & \eqparbox{oct}{\textbf{65.0}} &
\eqparbox{nov}{64.1} &
\eqparbox{dec}{9.3} \\
Thingamabobs & \eqparbox{oct}{10.4} &
\eqparbox{nov}{8.0} &
\eqparbox{dec}{\textbf{109.7}} \\ \bottomrule
\end{tabular}
\end{document}
```
To make the wrapping in `eqparbox` more automatic, you can do some trickery with the `array` package
```
\documentclass{article}
\usepackage{eqparbox}
\usepackage{array}
\newsavebox{\tempbox}
\newcolumntype{Q}[1]{>{\begin{lrbox}{\tempbox}}%
c<{\end{lrbox}\eqparbox{#1}{\unhcopy\tempbox}}}
\usepackage{booktabs}
\begin{document}
\begin{tabular}{@{}lQ{oct}Q{nov}Q{dec}@{}}
\toprule
& \multicolumn{3}{c}{Sales (in millions)} \\
\cmidrule{2-4}
Product &
\multicolumn{1}{c}{October} &
\multicolumn{1}{c}{November} &
\multicolumn{1}{c}{December} \\
\midrule
Widgets & 55.2 & 89.2 & 57.9 \\
Doohickeys & 65.0 & 64.1 & 9.3 \\
Thingamabobs & 10.4 & 8.0 & 109.7 \\
\bottomrule
\end{tabular}
\end{document}
```
|
9
|
https://tex.stackexchange.com/users/627
|
2067
| 1,440 |
https://tex.stackexchange.com/questions/2059
|
7
|
I have a document containing, among other things, some figures created using the `picture` environment. Now I need to create a postscript file for each figure, but if I simply copy them into otherwise blank documents, each one will take up an entire page.
For example, if I have
```
...
\setlength{\unitlength}{1in}
\begin{picture}(3.14,2.71)
%Draw things
\end{picture}
...
```
then I would like to create a .PS file that is 3.14x2.71 inches and which contains nothing but this drawing. I should be able to change my `picture` environment above to an `\includegraphics` command that loads the new file, and have it make zero change to the document that is output.
>
> What's the best way to create a postscript file from a LaTeX-drawn `picture` with the same dimensions as the original?
>
>
>
|
https://tex.stackexchange.com/users/32
|
How to generate postscript files from LaTeX pictures, with correct dimensions?
| false |
If you create the images as otherwise empty pdf pages (no page number!) you can then use
[pdfcrop](http://www.ctan.org/tex-archive/help/Catalogue/entries/pdfcrop.html) to trim the whitespace
|
1
|
https://tex.stackexchange.com/users/89
|
2069
| 1,441 |
https://tex.stackexchange.com/questions/2062
|
14
|
A lot of leading-edge programming languages (like Coq and Agda) allow nearly unrestricted use of unicode symbols in program text, so you can have math characters like `$\otimes$` (Unicode U+2A02) as operators in your program.
I'd like to be able to cut and paste these programs directly into my LaTeX documents inside a verbatim-like environment and get a reasonable result. For various reasons I can't use the listings environment -- I need the typeset output to look the same as the program looks on the computer screen, even if the listings package would make it "prettier".
Unfortunately the computer modern typewriter (cmtt) font, which I really like a lot, doesn't have math symbols, but there ought to be some package that acts like verbatim using cmtt wherever possible and falls back to the math fonts when it encounters a unicode symbol that isn't in cmtt.
A package like this would probably require a major effort to "line up" the unicode math symbols with the [Latex Symbols List](http://www.ctan.org/tex-archive/info/symbols/comprehensive/symbols-a4.pdf), but once a table like that were to be compiled it would be really, really useful!
So, I guess my question is in two parts: has anybody compiled such a table, and (more importantly) has anybody used it to produce a verbatim that makes a "reasonable effort" at handling unicode math characters?
|
https://tex.stackexchange.com/users/901
|
unicode \begin{verbatim} with cmtt?
| false |
I usually do like this:
```
\usepackage[utf8]{inputenc}
\usepackage{verbatim}
{\scriptsize \verbatiminput{fileToInput.txt}}
```
Maybe \verbatiminput does the work for you?
/Have fun
|
0
|
https://tex.stackexchange.com/users/795
|
2070
| 1,442 |
https://tex.stackexchange.com/questions/2072
|
44
|
I have been using the `Frankfurt` theme in Beamer recently. It includes navigational section titles at the top of the slide and when subsections are included, it adds circles below section titles. Each circle represents a slide. The circle representing the active slide is filled and the circles representing the active subsection are shown in bold.
My question is:
* Is it possible to include navigational circles in a Beamer presentation to represent each slide while having sections, but not subsections?
My motivation:
* I think this would be useful to highlight to readers the number of slides per section and it would also be a useful navigational tool.
|
https://tex.stackexchange.com/users/151
|
Beamer navigation circles without subsections?
| false |
Really? I thought the circles would always be shown, even without declared subsections. That's what the example in the documentation appears to show, and it's the way I seem to remember that theme behaving when I used it in the past. (It was a while ago, perhaps I'm misremembering, and my LaTeX is broken so I can't test)
Anyway, as a quick fix, I suppose you could just declare one nameless subsection per section.
```
\section{Axxqzropy}
\subsection{}
```
Maybe define a command for it,
```
\newcommand*{\ssection}[1]{\section{#1}\subsection{}}
```
although this is admittedly a hack, not an ideal solution.
|
8
|
https://tex.stackexchange.com/users/125
|
2074
| 1,443 |
https://tex.stackexchange.com/questions/2073
|
6
|
So, I am doing a presentation using Beamer.
In my earlier presentation, I used the list elements auto unhiding one each time. : <http://www.slideshare.net/scorpion032/building-pluggable-web-applications-using-django/38>
using the following code:
```
\begin{frame}
\begin{itemize}[<+-| alert@+>] \item
Admin Interface \item
Generic Views \item
Testing Tools \item
Sessions \item
Authentication \item
Caching \item
Internationalization \item
RSS \item
CSRF protection \item
File Storage
\end{itemize}
\end{frame}
```
from <http://github.com/becomingGuru/gids-django-ppt/blob/master/contents.tex>
What I want right now, is the ability to sneak-in a few slides for each of these entries. Is there a simple direct easy way to do it?
Or should I consider using sections and displaying section titles? The problem with that approach is that, there will be way too many sections and given that I am displaying the sections on top bar, there might not be enough space for that.
Also, how do I display the contents page, with the current section highlighted for each section.
|
https://tex.stackexchange.com/users/906
|
Beamer Presentation: Sneak in slides for each bulleted element
| false |
Not sure of the first part, but this may help for "*how do I display the contents page, with the current section highlighted for each section*"
```
\AtBeginSection[]
{
\frame<handout:0>
{
\frametitle{Agenda}
\tableofcontents[currentsection,hideothersubsections]
}
}
```
|
3
|
https://tex.stackexchange.com/users/344
|
2075
| 1,444 |
https://tex.stackexchange.com/questions/2068
|
18
|
I have long despaired of resolving the following glitch: If I am using hyperref with amsrefs, then all `\cite` links to the bibliography point to the line right below where they are supposed to. Here is an example document with the bad behavior and some other links that don't have this problem. In particular, note the target on the second page, which is exactly the code used in [`amsrefs.sty`](https://www.ctan.org/pkg/amsrefs) (lines 595--597) to (apparently) produce its targets.
```
\documentclass{article}
\usepackage{hyperref}
\usepackage{amsrefs}
\begin{document}
\section{First}
\ref{s:second}, \hyperlink{text}{link}, \cite{testbib}
\newpage
\section{Second}
\label{s:second}
\csname hyper@anchorstart\endcsname{text}Text\csname hyper@anchorend \endcsname
\section{References}
\begin{biblist}
\bib{testbib}{article}{author={Ryan Reich},title={Title}}
\end{biblist}
\newpage
\end{document}
```
What is the cause of this problem? It really bugs me. I have asked this on `comp.text.tex` but received no useful reply. Hopefully, it is appropriate for this site.
|
https://tex.stackexchange.com/users/575
|
Hyperlinks to a bibliography are one line off
| true |
Here you go Ryan. This should fix it for you...
```
\usepackage{amsrefs}
\usepackage{hyperref}
\makeatletter
\renewcommand{\BibLabel}{%
\Hy@raisedlink{\hyper@anchorstart{cite.\CurrentBib}\relax\hyper@anchorend}%
[\thebib]%
}
\makeatother
\begin{document}...
```
|
11
|
https://tex.stackexchange.com/users/416
|
2076
| 1,445 |
https://tex.stackexchange.com/questions/2072
|
44
|
I have been using the `Frankfurt` theme in Beamer recently. It includes navigational section titles at the top of the slide and when subsections are included, it adds circles below section titles. Each circle represents a slide. The circle representing the active slide is filled and the circles representing the active subsection are shown in bold.
My question is:
* Is it possible to include navigational circles in a Beamer presentation to represent each slide while having sections, but not subsections?
My motivation:
* I think this would be useful to highlight to readers the number of slides per section and it would also be a useful navigational tool.
|
https://tex.stackexchange.com/users/151
|
Beamer navigation circles without subsections?
| true |
You don't need to declare a subsection, raising it's counter by `\setcounter{subsection}{1}` or `\stepcounter{subsection}` would be sufficient.
But as the section counter resets the subsection counter, I would do it in the preamble together with removing it from the reset:
```
\usepackage{remreset}% tiny package containing just the \@removefromreset command
\makeatletter
\@removefromreset{subsection}{section}
\makeatother
\setcounter{subsection}{1}
```
This way that counter will stay at the value 1 and the circles are shown without any `\subsection`.
A minimal working example demonstrating the solution:
```
\documentclass{beamer}
\usetheme{Frankfurt}
\usepackage{remreset}
\makeatletter
\@removefromreset{subsection}{section}
\makeatother
\setcounter{subsection}{1}
\begin{document}
\section{Test}
\frame{one}
\frame{two}
\frame{three}
\end{document}
```
Output:
If you uncomment the command `\setcounter{subsection}{1}` and compile twice, you could see the original problem of missing circles.
|
31
|
https://tex.stackexchange.com/users/213
|
2078
| 1,446 |
https://tex.stackexchange.com/questions/2079
|
15
|
I have experience in programming Python in NetBeans and using the code hints with `Ctrl`+`Space` or `Tab` is a breeze. Here is my experience with using the code hints in TeXnicCenter:
When I type the following:
```
\begin{d
```
I will then get a popup that says:
>
> \begin{document}
>
>
> \end{document}
>
>
>
At this point I eagerly press `Ctrl`+`Space`. But to my dismay, I get the following:
```
\begin{\begin{document}
\end{document}
```
Any tips on how to use code hints / code completion in TeXnicCenter?
|
https://tex.stackexchange.com/users/791
|
Confusing code auto-completion in TeXnicCenter yields double \begin
| true |
Start typing only the name of the environment, e.g. `docu`, press the code-completion shortcut, and TexnicCenter will create it with `\begin`, and appropriate braces. I've been tripped off by this in the beginning as well, but apparently it's supposed to save more typing.
|
15
|
https://tex.stackexchange.com/users/711
|
2080
| 1,447 |
https://tex.stackexchange.com/questions/2079
|
15
|
I have experience in programming Python in NetBeans and using the code hints with `Ctrl`+`Space` or `Tab` is a breeze. Here is my experience with using the code hints in TeXnicCenter:
When I type the following:
```
\begin{d
```
I will then get a popup that says:
>
> \begin{document}
>
>
> \end{document}
>
>
>
At this point I eagerly press `Ctrl`+`Space`. But to my dismay, I get the following:
```
\begin{\begin{document}
\end{document}
```
Any tips on how to use code hints / code completion in TeXnicCenter?
|
https://tex.stackexchange.com/users/791
|
Confusing code auto-completion in TeXnicCenter yields double \begin
| false |
FYI, Tino Weinkauf regularly publishes news about TeXnicCenter 2 (currently alpha 3) developments at [LaTeX Community](http://www.latex-community.org/forum/viewtopic.php?f=34&t=9001 "LaTeX Community - TeXnicCenter"). Maybe you could ask him about his plans for this feature and if there's any interesting news, add his answer back here.
|
2
|
https://tex.stackexchange.com/users/416
|
2081
| 1,448 |
https://tex.stackexchange.com/questions/2079
|
15
|
I have experience in programming Python in NetBeans and using the code hints with `Ctrl`+`Space` or `Tab` is a breeze. Here is my experience with using the code hints in TeXnicCenter:
When I type the following:
```
\begin{d
```
I will then get a popup that says:
>
> \begin{document}
>
>
> \end{document}
>
>
>
At this point I eagerly press `Ctrl`+`Space`. But to my dismay, I get the following:
```
\begin{\begin{document}
\end{document}
```
Any tips on how to use code hints / code completion in TeXnicCenter?
|
https://tex.stackexchange.com/users/791
|
Confusing code auto-completion in TeXnicCenter yields double \begin
| false |
It's a feature. To save typing, TeXnicCenter additionally inserts `\begin{` when environments are completed. This may be confusing if you don't know it. With this knowledge, it should be easy to use, as mindcorrosive said.
Though, you could change this behavior if you like. To do this, go to TeXnicCenter directory (`C:\Program Files\TeXnicCenter` for instance), change to the subdirectory `Packages` and open the file TeX.xml. It contains these lines:
```
<lxEnvironment name="document"
desc="Starts a new document"
expafter="}

\end{document}"
expbefore="\begin{"
/>
```
If you change the `expbefore`line to
```
expbefore=""
```
then `\begin{do` would be expanded to
```
\begin{document}
\end{document}
```
But the feature just to expand `do` to the complete environment would be replaced. I guess you would keep it the original way, but if you're used to the other kind of code-completion you could adjust TeXnicCenter's behavior like described.
Note, you could add further `.xml` files in that subfolder to extend the code-completion capabilities.
|
12
|
https://tex.stackexchange.com/users/213
|
2082
| 1,449 |
https://tex.stackexchange.com/questions/2065
|
8
|
I have a table whose column headings (centre aligned with `\multicolumn{1}{c}{Foobar here}`) are wider than the left-aligned data. This looks somewhat odd, as there are large right-margins in each column.
It is probably easiest to illustrate my query with an example. Let say that the column heading is 10em and the data in the column varies from 2em to 3em. Currently each row of data will have a right margin of between 8em and 7em (as the data is left aligned so the right margin picks up any slack).
What I want is a means of evening this out; so the left margin is (10em - 3em) / 2 = 3.5em and the right margin varying between 3.5em and 4.5em.
How can I go about this? I know the text of each column heading and the text of the widest piece of data in the table.
|
https://tex.stackexchange.com/users/753
|
Padded Left Align for Table Columns
| false |
I have simply created multiple columns (and used a multi-column heading). Then inside the table body, I just need to replace `&` -> `&&`; not too much typing. In the first row you can add some spacing commands that ensures that the empty columns aren't too narrow.
---
If you want to keep your table body very simple, here is another trick:
```
\newcommand{\filler}{\hspace{2em}}
\begin{tabular}{r@{\filler}r@{\filler}r@{\filler}}
\multicolumn{1}{c}{Long heading} &
\multicolumn{1}{c}{Long heading} &
\multicolumn{1}{c}{Long heading} \\
1 & 2 & 123 \\
111 & 12 & 23 \\
21 & 2 & 3 \\
1 & 22 & 13
\end{tabular}
```
|
1
|
https://tex.stackexchange.com/users/100
|
2084
| 1,450 |
https://tex.stackexchange.com/questions/1957
|
17
|
I'm investigating about possible strategies to get nice vectors, discarding bold fonts. To make it simple, I'm not very happy with traditional ways of writing vectors with arrows. Please compare `$\overrightarrow{OM}$`, `$\overrightarrow{M}$`, `$\vec{OM}$` and `$\vec{M}$`. My preference goes to the `$\vec{M}$` command which is not suited for longer names like `$\vec{OM}$` and I do not like `\overrightarrow`. I would be interested in possibles ways to overcome these problems. Thank you
|
https://tex.stackexchange.com/users/371
|
Strategies for nice vectors
| false |
This has long been a bugbear for me as well. While boldface is standard in my field, and good enough for almost all of my work, there have always been occasions when I wished for extensible and well-placed **harpoons** as well.
Prompted by your question, I've looked once more, and found a potential solution: I submit for your approval the [harpoon](http://tug.ctan.org/tex-archive/macros/latex/contrib/harpoon/) package.
|
1
|
https://tex.stackexchange.com/users/911
|
2086
| 1,451 |
https://tex.stackexchange.com/questions/2073
|
6
|
So, I am doing a presentation using Beamer.
In my earlier presentation, I used the list elements auto unhiding one each time. : <http://www.slideshare.net/scorpion032/building-pluggable-web-applications-using-django/38>
using the following code:
```
\begin{frame}
\begin{itemize}[<+-| alert@+>] \item
Admin Interface \item
Generic Views \item
Testing Tools \item
Sessions \item
Authentication \item
Caching \item
Internationalization \item
RSS \item
CSRF protection \item
File Storage
\end{itemize}
\end{frame}
```
from <http://github.com/becomingGuru/gids-django-ppt/blob/master/contents.tex>
What I want right now, is the ability to sneak-in a few slides for each of these entries. Is there a simple direct easy way to do it?
Or should I consider using sections and displaying section titles? The problem with that approach is that, there will be way too many sections and given that I am displaying the sections on top bar, there might not be enough space for that.
Also, how do I display the contents page, with the current section highlighted for each section.
|
https://tex.stackexchange.com/users/906
|
Beamer Presentation: Sneak in slides for each bulleted element
| false |
One way to do this - if I understand correctly what you want - is to use the `\againframe` command. You label the frame:
```
\begin{frame}[label=list]
```
and, in addition, you tell it to only display the first few slides:
```
\begin{frame}<1-3>[label=list]
```
then when you want to recall the frame, you use the `\againframe` command:
```
\againframe<4-5>{list}
```
It's best if there's no repetition of slides, otherwise the pdf generation gets confused over page labels (I don't know if that causes a problem with hyperlinks or is just annoying errors). Simulated repetition can be done by ensuring that, say, slides 3 and 4 display exactly the same thing.
I used this in [this seminar](http://www.math.ntnu.no/~stacey/Seminars/ottawa.html). As one goes through, a certain definition is modified time and again. So each time, I want to recall the previous version and then modify it. There's only one frame but bits of it are displayed again and again. The code is as follows, I include this to show what can be done - it won't compile for anyone *as is* because it uses a few of my own shortcuts. But by comparing it with the resulting PDF (and in particular, comparing the beamer, trans, and handout versions), it should be clear how to achieve similar things.
```
\begin{frame}<1-3 |trans: 1|handout: 1>[label=definition]
\frametitle{\only<1-4|trans: 1|handout: 1>{First}\only<5-6|trans: 2| handout: 2>{Second}\only<7-8|trans: 3|handout: 3>{Third}\only<9-10| trans: 4|handout: 4>{Fourth}\only<11-12|trans: 5-6|handout: 5-6>{Fifth} Candidate\visible<12|trans: 6|handout: 6>{: Fr\"olicher Space}}
\begin{definition}[{\only<1-4|trans: 1|handout: 1>{First}\only<5-6|trans: 2|handout: 2>{Second}\only<7-8|trans: 3|handout: 3|handout: 3>{Third}\only<9-10|trans: 4|handout: 4|handout: 4>{Fourth}\only<11|trans: 5|handout: 5>{Fifth}\only<1-11|trans: 1-5|handout: 1-5|handout: 1-5>{ Attempt}\only<12|trans: 6|handout: 6>{Fr\"olicher Space}}]
A \alert{\alt<1-11|trans: 1-5|handout: 1-5| handout: 1-5>{smooth}{Fr\"olicher} space} is a triple \((X,\m{\alt<1-11|trans: 1-5|handout: 1-5| handout: 1-5>{I}{C}},\m{\alt<1-11|trans: 1-5| handout: 1-5>{O}{F}})\) where:
%
\begin{itemize}
\item \(X\) is a \alt<1-10|trans: 1-4|handout: 1-4>{\alert<1-3>{topological space}}{\alert<11>{set}}
\item \(\m{\alt<1-11|trans: 1-5|handout: 1-5>{I}{C}}\only<1-8|trans: 1-3| handout: 1-3>{(U)} \subseteq \Hom{\alt<1-10|trans: 1-4|handout: 1-4>{\TopCat}{\Set}}{\alt<1-8|trans: 1-3|handout: 1-3>{U}{\R}}{X}\),\only<1-8|trans: 1-3|handout: 1-3>{ \(U \subseteq \R^m\) open,}
\item \(\m{\alt<1-11|trans: 1-5|handout: 1-5>{O}{F}}\only<1-10|trans: 1-4| hando
ut: 1-4>{(V\only<1-8|trans: 1-3|handout: 1-3>{;\R^m})} \subseteq \Hom{\alt<1-10|trans: 1-4|handout: 1-4>{\TopCat}{\Set}}{\alt<1-10|trans: 1-4|handout: 1-4>{V}{X}}{\alt<1-8|trans: 1-3|handout: 1-3>{\R^m}{\R}}\)\only<1-10|trans: 1-4|handout: 1-4>{, \(V \subseteq X\) open}.
\end{itemize}
\only<1-4|trans: 1|handout: 1>{\medskip}
\pause[2]
\only<5-11|trans: 2-5|handout: 2-5>{
such that
\begin{itemize}
\item \(\m{I}\) and \(\m{O}\) are \alert<5>{compatible},
\item \(\alt<5-6|trans: 2|handout: 2>{\overline{\m{I}}}{\m{I}}\) and \(\alt<5-6|trans: 2|handout: 2>{\overline{\m{O}}}{\m{O}}\) are \only<5-6|trans: 2|handout: 2>{\alert<5>{also compatible}}\only<7-|trans: 3-| handout: 3->{\alert<7>{saturated}: \(\m{I} = \overline{\m{I}}\), \(\m{O} = \overline{\m{O}}\)}.
\end{itemize}
}
\only<12|trans: 6|handout: 6>{
such that
\begin{itemize}
\item \(\m{C} = \{\psi \colon \R \to X : \phi\psi \in \Ci(\R,\R), \phi \in \m{F}\}\)
\item \(\m{F} = \{\phi \colon X \to \R : \phi\psi \in \Ci(\R,\R), \psi \in \m{C}\}\)
\end{itemize}
}
A \alert{morphism} is a \only<1-10|trans: 1-4|handout: 1-4>{continuous }map \(f \colon X \to Y\) such
that
%
\[
\phi f \psi \alt<1-2|trans: 1|handout: 1>{\text{ is }}{\in} \Ci \text{ for } \psi \in \m{\alt<1-11|trans: 1-5|handout: 1-5>{I}{C}}\only<1-2|trans:1|handout: 1>{(U)}, \phi \in \m{\alt<1-11|trans:1-5|handout: 1-5>{O}{F}}\only<1-2|trans: 1|handout: 1>{(V;\R^m)}
\]
\end{definition}
\only<3|trans: 1|handout: 1>{
Notation:
\begin{itemize}
\item smooth map = morphism
\item \(\psi \in \m{I}\), \(\phi \in \m{O}\), \(\theta \in \Ci\)
\end{itemize}
}
\end{frame}
```
I hope that I've understood correctly what you want and that this is of some help to you!
|
5
|
https://tex.stackexchange.com/users/86
|
2087
| 1,452 |
https://tex.stackexchange.com/questions/2085
|
9
|
What is the best way to use non-ASCII (say, Cyrillic) characters in a .sty file?
If it's used in a LaTeX file that uses `\inputenc[utf8]{inputenc}`, than one can just use utf8 encoding in the .sty file and everything's fine. Or the other way round: one can add `\RequirePackage[utf8]{inputenc}` to the .sty file. But in any case, the author of .tex file has to use the encoding used in .sty file.
Is there a way to specify encoding in the .sty file, so it may be used in a .tex file in any encoding?
(Recipe that is also compatible with XeLaTeX would be especially nice.)
|
https://tex.stackexchange.com/users/85
|
Using non-ASCII characters in packages
| true |
**Edited (my original answer was quite confusing):** The `babel` package has this problem, because it needs to translate "Table of contents", and so on into other languages, in a way that doesn't force a particular encoding on the document author. The way `babel` deals with Cyrillic (which can be used in with multiple input encodings) without forcing an a choice, is to use encoding-dependent commands (`\cyrr`, `\cyre`, etc).
|
4
|
https://tex.stackexchange.com/users/627
|
2088
| 1,453 |
https://tex.stackexchange.com/questions/2085
|
9
|
What is the best way to use non-ASCII (say, Cyrillic) characters in a .sty file?
If it's used in a LaTeX file that uses `\inputenc[utf8]{inputenc}`, than one can just use utf8 encoding in the .sty file and everything's fine. Or the other way round: one can add `\RequirePackage[utf8]{inputenc}` to the .sty file. But in any case, the author of .tex file has to use the encoding used in .sty file.
Is there a way to specify encoding in the .sty file, so it may be used in a .tex file in any encoding?
(Recipe that is also compatible with XeLaTeX would be especially nice.)
|
https://tex.stackexchange.com/users/85
|
Using non-ASCII characters in packages
| false |
It's generally not a good idea to use non-ascii characters in LaTeX packages, since TeX doesn't have much understanding of input encodings, but inputenc itself provides a command to specify the encoding:
```
\inputencoding{encoding name}
```
It may perform what you need, but the better idea would be to use standard LaTeX control sequences for such characters. (Of course, this isn't always convenient, hence your question.)
For XeLaTeX packages, it's a different story, because XeTeX can handle different input encodings natively. For this, you can use the `\XeTeXinputencoding` primitive.
|
6
|
https://tex.stackexchange.com/users/179
|
2090
| 1,455 |
https://tex.stackexchange.com/questions/162
|
55
|
Are there newsgroups, forums, FAQs, and other sites that provide quality information on TeX, LaTeX and friends? Are all of these in English, or is there one in "my language of choice"?
|
https://tex.stackexchange.com/users/87
|
What are other good resources on-line for information about TeX, LaTeX and friends?
| false |
For philosophers and others in the humanities there is [the PhilTeX blog](http://charlietanksley.net/philtex) and [the PhilTeX forum](http://charlietanksley.net/philtex/forum).
|
3
|
https://tex.stackexchange.com/users/411
|
2091
| 1,456 |
https://tex.stackexchange.com/questions/2092
|
78
|
Both are vector graphics (typically) and both can be imported painlessly into a pdflatex document (so let's say we ignore dvi for this question).
What are the advantages and disadvantages of each? What should I use?
|
https://tex.stackexchange.com/users/10
|
Which figure type to use: pdf or eps?
| true |
Use PDF. EPS cannot be imported directly by pdftex but must be converted using something like `epstopdf`. These conversion procedures will often cause unwanted changes to the graphics, such as lossy JPEG encoding of embedded bitmap images. Pdftex will include PDF files directly without making any changes (except for unifying fonts, and even that can be disabled if needed), so you can have complete control over the final result by generating a PDF which is exactly as you want it (assuming your image editing software gives you control over image encoding lossiness, colour spaces, etc).
|
64
|
https://tex.stackexchange.com/users/627
|
2093
| 1,457 |
https://tex.stackexchange.com/questions/2092
|
78
|
Both are vector graphics (typically) and both can be imported painlessly into a pdflatex document (so let's say we ignore dvi for this question).
What are the advantages and disadvantages of each? What should I use?
|
https://tex.stackexchange.com/users/10
|
Which figure type to use: pdf or eps?
| false |
EPS doesn't support transparency and embeds bitmap images without compression. PDF all the way.
|
23
|
https://tex.stackexchange.com/users/179
|
2096
| 1,459 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.