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/1162
50
This is a follow-up to [Included png appears too big in PDF](https://tex.stackexchange.com/questions/1153/included-png-appears-too-big-in-pdf), but it's a separate issue so I'll put it in its own question instead of burying it in comments. The problem: an included PNG, included without scaling, appears blurry in the PDF, as if the PDF has run it through a lossy compression. I have tried multiple times with different values for either `\pdfimageresolution` or `\includegraphics[width=...,height=...]` added to the source below but no luck. Is there any way I can check log compresses the image as it appears to do? And to be thorough, I'm looking at the PDF in Foxit 3.2 at 1:1 zoom. ``` \documentclass[12pt]{article} \usepackage[letterpaper]{geometry} \geometry{top=1.0in, bottom=1.0in, left=1.5in, right=1.0in} \usepackage{graphicx} \begin{figure} \includegraphics{chart}\\ % line 35 \caption{Adjusted Relative Risk (RR)}\label{mylabel} % line 36 \end{figure} ``` Log is: ``` Command Line: texify.exe --pdf --tex-option=--synctex=-1 "C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW\test1.tex" Startup Folder: C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW This is pdfTeX, Version 3.1415926-1.40.10 (MiKTeX 2.8) entering extended mode ("C:/Documents and Settings/myself/Application Data/WinEdt Team/WinEdt 6/RW/t est1.tex" LaTeX2e <2009/09/24> Babel <v3.8l> and hyphenation patterns for english, dumylang, nohyphenation, ge rman, ngerman, german-x-2009-06-19, ngerman-x-2009-06-19, french, loaded. (C:\MiKTeX\tex\latex\base\article.cls Document Class: article 2007/10/19 v1.4h Standard LaTeX document class (C:\MiKTeX\tex\latex\base\size12.clo)) (C:\MiKTeX\tex\generic\babel\babel.sty ************************************* * Local config file bblopts.cfg used * (C:\MiKTeX\tex\latex\00miktex\bblopts.cfg) (C:\MiKTeX\tex\generic\babel\english.ldf (C:\MiKTeX\tex\generic\babel\babel.def ))) (C:\MiKTeX\tex\latex\graphics\graphicx.sty (C:\MiKTeX\tex\latex\graphics\keyval.sty) (C:\MiKTeX\tex\latex\graphics\graphics.sty (C:\MiKTeX\tex\latex\graphics\trig.sty) (C:\MiKTeX\tex\latex\00miktex\graphics.cfg) (C:\MiKTeX\tex\latex\pdftex-def\pdftex.def))) (C:\MiKTeX\tex\latex\geometry\geometry.sty (C:\MiKTeX\tex\generic\oberdiek\ifpdf.sty) (C:\MiKTeX\tex\generic\oberdiek\ifvtex.sty) (C:\MiKTeX\tex\latex\geometry\geometry.cfg)) (C:\MiKTeX\tex\latex\base\flafter.sty) (C:\MiKTeX\tex\latex\setspace\setspace.sty Package: `setspace' 6.7 <2000/12/01> ) ("C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW\t est1.aux") (C:\MiKTeX\tex\context\base\supp-pdf.tex [Loading MPS to PDF converter (version 2006.09.02).] ) *geometry* driver: auto-detecting *geometry* detected driver: pdftex [1{C:/MiKTeX/pdftex/config/pdftex.map}] [2] <chart.png, id=15, 362.11884pt x 257.55798pt> <use chart.png> Underfull \hbox (badness 10000) in paragraph at lines 37--38 [3] [4 <C:/Documents and Settings/myself/Application Data/WinEdt Team/WinEdt 6/RW/chart.png (PNG copy)>] ("C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW\t est1.aux") ) (see the transcript file for additional information)<C:/MiKTeX/fonts/type1/publ ic/amsfonts/cm/cmbx12.pfb><C:/MiKTeX/fonts/type1/public/amsfonts/cm/cmr10.pfb>< C:/MiKTeX/fonts/type1/public/amsfonts/cm/cmr12.pfb><C:/MiKTeX/fonts/type1/publi c/amsfonts/cm/cmr17.pfb><C:/MiKTeX/fonts/type1/public/amsfonts/cm/cmr7.pfb><C:/ MiKTeX/fonts/type1/public/amsfonts/cm/cmr8.pfb><C:/MiKTeX/fonts/type1/public/am sfonts/cm/cmti10.pfb> Output written on test1.pdf (4 pages, 100135 bytes). SyncTeX written on test1.synctex Transcript written on test1.log. ``` **Clarification**: The blurriness is visible on-screen when looking at the PDF at 1:1 zoom. I haven't printed it.
https://tex.stackexchange.com/users/564
Included PNG appears blurry in PDF
false
You could try [png2pdf](http://png2pdf.sourceforge.net/usage.html) or a similar tool. Check the result with it, perhaps specify interpolation to be off. Interpolation might cause the image to look blurry.
3
https://tex.stackexchange.com/users/213
1197
835
https://tex.stackexchange.com/questions/577
85
What resources (online or otherwise) exist that give good advice on *best practices* for TeX, etc.? I'm looking particularly for things that assume you already know TeX or LaTeX, and aim to help you achieve better results, with rationales explained. Resources with some specific focus are welcome. I'll start a list with two suggestions of my own so you can see what I mean. Somewhat to my surprise I haven't found this question asked here already. (Please point me to it if I'm wrong!) Note that what I'm asking is somewhat different from [What are good learning resources for a LaTeX beginner?](https://tex.stackexchange.com/questions/11/what-is-the-best-book-to-start-learning-latex) and [What are other good resources on-line for information about TeX, LaTeX and friends?](https://tex.stackexchange.com/questions/162/what-are-other-good-respources-on-line-for-information-about-tex-latex-and-frien), although there's lots of room for overlapping answers.
https://tex.stackexchange.com/users/206
Best practices references
false
The book *LaTeX: A Document Preparation System* by Leslie Lamport is very easy to use and contains very concise explanations with practical examples.
1
https://tex.stackexchange.com/users/589
1199
836
https://tex.stackexchange.com/questions/1191
84
When I run pdfLaTeX, I get very verbose output: ``` (/usr/local/texlive/2008/texmf-dist/tex/generic/pgf/frontendlayer/tikz/librarie s/tikzlibrarycalc.code.tex) ... ``` Is there a script to soak up all the verbose output and allow the important stuff to pass through, like errors, overfull hboxes, and so on? Also, is there a reason why it sends a hard return to the console for lines longer than 79 characters?
https://tex.stackexchange.com/users/512
Reducing the console output of LaTeX
false
I have used [rubber-info](http://www.pps.jussieu.fr/~beffara/soft/rubber/) and it is the best TeX error parser I have seen. The package is not actively maintained though. I have it report error through [growl](http://growl.info/) as in this screenshot:
10
https://tex.stackexchange.com/users/337
1200
837
https://tex.stackexchange.com/questions/1043
28
There is a [very active question](https://tex.stackexchange.com/q/339) about LaTeX editors and IDEs. I personally use Vim with LaTeX-suite for any LaTeX editing, and I am very happy with it. Lately I began to use ConTeXt more and more. I would like to know what people use for editing ConTeXt. Especially is there is a set of Vim macros similar to LaTeX-suite. I know there is a page about Vim on ConTeXt garden, but as far as I can tell, it has not been updated in quite a while.
https://tex.stackexchange.com/users/396
ConTeXt editors
true
Hans Hagen (the author of ConteXt) uses SciTE and, more recently, [textadept](http://foicica.com/textadept/). He also wrote support files for those editors and these are part of the ConTeXt distribution. The ConTeXt distribution also comes with a full set of support files for TeXWorks. The support for the various other editors mentioned above and on the ConTeXt wiki page are written by other people. If you want the best possible editor support, you should probably use one of the three that are actively supported by ConTeXt, but I have heard that Emacs and TextMate (at least) are also working well. See also: <http://wiki.contextgarden.net/Text_Editors>
20
https://tex.stackexchange.com/users/89
1201
838
https://tex.stackexchange.com/questions/1162
50
This is a follow-up to [Included png appears too big in PDF](https://tex.stackexchange.com/questions/1153/included-png-appears-too-big-in-pdf), but it's a separate issue so I'll put it in its own question instead of burying it in comments. The problem: an included PNG, included without scaling, appears blurry in the PDF, as if the PDF has run it through a lossy compression. I have tried multiple times with different values for either `\pdfimageresolution` or `\includegraphics[width=...,height=...]` added to the source below but no luck. Is there any way I can check log compresses the image as it appears to do? And to be thorough, I'm looking at the PDF in Foxit 3.2 at 1:1 zoom. ``` \documentclass[12pt]{article} \usepackage[letterpaper]{geometry} \geometry{top=1.0in, bottom=1.0in, left=1.5in, right=1.0in} \usepackage{graphicx} \begin{figure} \includegraphics{chart}\\ % line 35 \caption{Adjusted Relative Risk (RR)}\label{mylabel} % line 36 \end{figure} ``` Log is: ``` Command Line: texify.exe --pdf --tex-option=--synctex=-1 "C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW\test1.tex" Startup Folder: C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW This is pdfTeX, Version 3.1415926-1.40.10 (MiKTeX 2.8) entering extended mode ("C:/Documents and Settings/myself/Application Data/WinEdt Team/WinEdt 6/RW/t est1.tex" LaTeX2e <2009/09/24> Babel <v3.8l> and hyphenation patterns for english, dumylang, nohyphenation, ge rman, ngerman, german-x-2009-06-19, ngerman-x-2009-06-19, french, loaded. (C:\MiKTeX\tex\latex\base\article.cls Document Class: article 2007/10/19 v1.4h Standard LaTeX document class (C:\MiKTeX\tex\latex\base\size12.clo)) (C:\MiKTeX\tex\generic\babel\babel.sty ************************************* * Local config file bblopts.cfg used * (C:\MiKTeX\tex\latex\00miktex\bblopts.cfg) (C:\MiKTeX\tex\generic\babel\english.ldf (C:\MiKTeX\tex\generic\babel\babel.def ))) (C:\MiKTeX\tex\latex\graphics\graphicx.sty (C:\MiKTeX\tex\latex\graphics\keyval.sty) (C:\MiKTeX\tex\latex\graphics\graphics.sty (C:\MiKTeX\tex\latex\graphics\trig.sty) (C:\MiKTeX\tex\latex\00miktex\graphics.cfg) (C:\MiKTeX\tex\latex\pdftex-def\pdftex.def))) (C:\MiKTeX\tex\latex\geometry\geometry.sty (C:\MiKTeX\tex\generic\oberdiek\ifpdf.sty) (C:\MiKTeX\tex\generic\oberdiek\ifvtex.sty) (C:\MiKTeX\tex\latex\geometry\geometry.cfg)) (C:\MiKTeX\tex\latex\base\flafter.sty) (C:\MiKTeX\tex\latex\setspace\setspace.sty Package: `setspace' 6.7 <2000/12/01> ) ("C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW\t est1.aux") (C:\MiKTeX\tex\context\base\supp-pdf.tex [Loading MPS to PDF converter (version 2006.09.02).] ) *geometry* driver: auto-detecting *geometry* detected driver: pdftex [1{C:/MiKTeX/pdftex/config/pdftex.map}] [2] <chart.png, id=15, 362.11884pt x 257.55798pt> <use chart.png> Underfull \hbox (badness 10000) in paragraph at lines 37--38 [3] [4 <C:/Documents and Settings/myself/Application Data/WinEdt Team/WinEdt 6/RW/chart.png (PNG copy)>] ("C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW\t est1.aux") ) (see the transcript file for additional information)<C:/MiKTeX/fonts/type1/publ ic/amsfonts/cm/cmbx12.pfb><C:/MiKTeX/fonts/type1/public/amsfonts/cm/cmr10.pfb>< C:/MiKTeX/fonts/type1/public/amsfonts/cm/cmr12.pfb><C:/MiKTeX/fonts/type1/publi c/amsfonts/cm/cmr17.pfb><C:/MiKTeX/fonts/type1/public/amsfonts/cm/cmr7.pfb><C:/ MiKTeX/fonts/type1/public/amsfonts/cm/cmr8.pfb><C:/MiKTeX/fonts/type1/public/am sfonts/cm/cmti10.pfb> Output written on test1.pdf (4 pages, 100135 bytes). SyncTeX written on test1.synctex Transcript written on test1.log. ``` **Clarification**: The blurriness is visible on-screen when looking at the PDF at 1:1 zoom. I haven't printed it.
https://tex.stackexchange.com/users/564
Included PNG appears blurry in PDF
false
This bit of the log: > > 6/RW/chart.png (PNG copy)>] > > > Explicitly notes that the PNG file is included as-is. Any issues with the display quality are therefore either caused by the previewer you use, or by the PNG image itself.
43
https://tex.stackexchange.com/users/89
1202
839
https://tex.stackexchange.com/questions/1203
9
I switched to using the `memoir` class and stopped including subfigures. All of my subfigures now interpret the caption as actual text, i.e. as `[caption...]`, which shows up in the document with the square brackets. How do I created captioned subfigures using memoir?
https://tex.stackexchange.com/users/512
How do I format subfigures captions using memoir?
true
Use ``` \newsubfloat{<float>} ``` to activate ``` \subbottom \subtop ``` inside environments.
7
https://tex.stackexchange.com/users/565
1205
840
https://tex.stackexchange.com/questions/363
25
It seems that a common operation needed when defining new commands is to scan over a list of arguments (separated e.g. by a comma, but maybe by something else) and do something with each argument in the list, find the last one, or whatever. For example to write commands that look like `\Command{a,b,c}` or `\Command{c.d.e}` and do something with each `a`, `b`, and `c`. See e.g. questions on [defining a list of operators](https://tex.stackexchange.com/questions/48/how-can-i-specify-a-long-list-of-math-operators) and [ignoring even numbered inputs](https://tex.stackexchange.com/questions/71/need-macro-to-ignore-specific-even-numbered-inputs). Some solutions have been posted there, but what would be the best idiom to perform such kind of operations? LaTeX's `\@for` looks very nice, but is it possible to use it to scan anything other than comma-separated lists?
https://tex.stackexchange.com/users/169
What is the best way to scan over a list of somethings?
true
I have not progressed to the level of processing a list myself but I have been using `etoolbox` by Philipp Lehman for some other TeX programming tasks I am doing. I believe [3.7 List processing](http://mirror.ctan.org/macros/latex/contrib/etoolbox/etoolbox.pdf) should give you a good solution. For example (on a recent version of `etoolbox`) you can write: ``` \DeclareListParser*{\myfor}{;} \myfor{\fbox}{item1; item2; item3} ```
20
https://tex.stackexchange.com/users/337
1206
841
https://tex.stackexchange.com/questions/1203
9
I switched to using the `memoir` class and stopped including subfigures. All of my subfigures now interpret the caption as actual text, i.e. as `[caption...]`, which shows up in the document with the square brackets. How do I created captioned subfigures using memoir?
https://tex.stackexchange.com/users/512
How do I format subfigures captions using memoir?
false
In addition to Marin's answer, if you also want to use `cleveref` with `memoir`, I have found sub figures can not be properly referenced unless loading `subfig`. Here is what I do: ``` \RequirePackage[caption=false,position=top]{subfig} \let\subtop\subfloat ``` so that I can continue using `\subtop` and if one day I decide to drop subfig my document needs no change. A full example can look like this: ``` \begin{figure} \subtop[1 pass]{\includegraphics{eye1}}% \subtop[5 passes]{\includegraphics{eye5}}% \caption{loop performance comparison} \label{fig:eye-comparison} \end{figure} ```
6
https://tex.stackexchange.com/users/337
1207
842
https://tex.stackexchange.com/questions/1204
7
I am tired of writing company reports using MS Word, so I am looking for a way to define a custom template that follows the company branding. Basically what I would need to define is the following: * Enforce font-type and font-size * Custom color for normal text (some sort of blue) and custom color for the section title, sub-title and sub-sub-title (each have different colors) * Standardized title page with watermark, document title, author and date * Standardized last page with watermark, and list of office addresses in a tabular way Could any one help me?
https://tex.stackexchange.com/users/331
How to customize the standard report template
true
Depending on which font you need you might want to consider using xelatex and the fontspec package to set the document font. The textcolor can be set using color/xcolor packages. Section titles can be customised using titletoc or sectsty or choose a flexible documentclass like memoir that has customisation tools build-in. For inspiration on how to change the titlepage see <http://www.ctan.org/pkg/titlepages>. Watermarks can be added with package atbegshi <http://www.ctan.org/pkg/atbegshi>.
7
https://tex.stackexchange.com/users/565
1208
843
https://tex.stackexchange.com/questions/1162
50
This is a follow-up to [Included png appears too big in PDF](https://tex.stackexchange.com/questions/1153/included-png-appears-too-big-in-pdf), but it's a separate issue so I'll put it in its own question instead of burying it in comments. The problem: an included PNG, included without scaling, appears blurry in the PDF, as if the PDF has run it through a lossy compression. I have tried multiple times with different values for either `\pdfimageresolution` or `\includegraphics[width=...,height=...]` added to the source below but no luck. Is there any way I can check log compresses the image as it appears to do? And to be thorough, I'm looking at the PDF in Foxit 3.2 at 1:1 zoom. ``` \documentclass[12pt]{article} \usepackage[letterpaper]{geometry} \geometry{top=1.0in, bottom=1.0in, left=1.5in, right=1.0in} \usepackage{graphicx} \begin{figure} \includegraphics{chart}\\ % line 35 \caption{Adjusted Relative Risk (RR)}\label{mylabel} % line 36 \end{figure} ``` Log is: ``` Command Line: texify.exe --pdf --tex-option=--synctex=-1 "C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW\test1.tex" Startup Folder: C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW This is pdfTeX, Version 3.1415926-1.40.10 (MiKTeX 2.8) entering extended mode ("C:/Documents and Settings/myself/Application Data/WinEdt Team/WinEdt 6/RW/t est1.tex" LaTeX2e <2009/09/24> Babel <v3.8l> and hyphenation patterns for english, dumylang, nohyphenation, ge rman, ngerman, german-x-2009-06-19, ngerman-x-2009-06-19, french, loaded. (C:\MiKTeX\tex\latex\base\article.cls Document Class: article 2007/10/19 v1.4h Standard LaTeX document class (C:\MiKTeX\tex\latex\base\size12.clo)) (C:\MiKTeX\tex\generic\babel\babel.sty ************************************* * Local config file bblopts.cfg used * (C:\MiKTeX\tex\latex\00miktex\bblopts.cfg) (C:\MiKTeX\tex\generic\babel\english.ldf (C:\MiKTeX\tex\generic\babel\babel.def ))) (C:\MiKTeX\tex\latex\graphics\graphicx.sty (C:\MiKTeX\tex\latex\graphics\keyval.sty) (C:\MiKTeX\tex\latex\graphics\graphics.sty (C:\MiKTeX\tex\latex\graphics\trig.sty) (C:\MiKTeX\tex\latex\00miktex\graphics.cfg) (C:\MiKTeX\tex\latex\pdftex-def\pdftex.def))) (C:\MiKTeX\tex\latex\geometry\geometry.sty (C:\MiKTeX\tex\generic\oberdiek\ifpdf.sty) (C:\MiKTeX\tex\generic\oberdiek\ifvtex.sty) (C:\MiKTeX\tex\latex\geometry\geometry.cfg)) (C:\MiKTeX\tex\latex\base\flafter.sty) (C:\MiKTeX\tex\latex\setspace\setspace.sty Package: `setspace' 6.7 <2000/12/01> ) ("C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW\t est1.aux") (C:\MiKTeX\tex\context\base\supp-pdf.tex [Loading MPS to PDF converter (version 2006.09.02).] ) *geometry* driver: auto-detecting *geometry* detected driver: pdftex [1{C:/MiKTeX/pdftex/config/pdftex.map}] [2] <chart.png, id=15, 362.11884pt x 257.55798pt> <use chart.png> Underfull \hbox (badness 10000) in paragraph at lines 37--38 [3] [4 <C:/Documents and Settings/myself/Application Data/WinEdt Team/WinEdt 6/RW/chart.png (PNG copy)>] ("C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW\t est1.aux") ) (see the transcript file for additional information)<C:/MiKTeX/fonts/type1/publ ic/amsfonts/cm/cmbx12.pfb><C:/MiKTeX/fonts/type1/public/amsfonts/cm/cmr10.pfb>< C:/MiKTeX/fonts/type1/public/amsfonts/cm/cmr12.pfb><C:/MiKTeX/fonts/type1/publi c/amsfonts/cm/cmr17.pfb><C:/MiKTeX/fonts/type1/public/amsfonts/cm/cmr7.pfb><C:/ MiKTeX/fonts/type1/public/amsfonts/cm/cmr8.pfb><C:/MiKTeX/fonts/type1/public/am sfonts/cm/cmti10.pfb> Output written on test1.pdf (4 pages, 100135 bytes). SyncTeX written on test1.synctex Transcript written on test1.log. ``` **Clarification**: The blurriness is visible on-screen when looking at the PDF at 1:1 zoom. I haven't printed it.
https://tex.stackexchange.com/users/564
Included PNG appears blurry in PDF
true
A 94dpi PNG figure included in a PDF file will certainly look blurry on screen. Most likely your PDF viewer doesn't show your document so that 1 pixel in the PNG file corresponds to 1 pixel on screen. Even if you manage to find exactly the right zoom level, the origin of the PNG file is not necessarily aligned with screen pixels. Some kind of interpolation is done in virtually any situation if you have PNG (or JPEG) figures in PDF files. How to do it correctly: * Use vector graphics for line drawings. * Use high-resolution JPEG files for photos. Something like 300 dpi is usually enough; looks good on screen and when printed. There is always some scaling and interpolation involved when displayed on screen, but in practice you don't really see any softness in photos. * If you have a line drawing and if you really must use raster files instead of vector graphics, then use *very high-resolution* PNG files. Something like 600 dpi is usually enough. It looks good when printed. It will look *reasonably* good on screen; there *will be* some softness, e.g. horizontal and vertical lines are not as sharp as you would like, but you can usually live with this solution fairly well.
52
https://tex.stackexchange.com/users/100
1209
844
https://tex.stackexchange.com/questions/1162
50
This is a follow-up to [Included png appears too big in PDF](https://tex.stackexchange.com/questions/1153/included-png-appears-too-big-in-pdf), but it's a separate issue so I'll put it in its own question instead of burying it in comments. The problem: an included PNG, included without scaling, appears blurry in the PDF, as if the PDF has run it through a lossy compression. I have tried multiple times with different values for either `\pdfimageresolution` or `\includegraphics[width=...,height=...]` added to the source below but no luck. Is there any way I can check log compresses the image as it appears to do? And to be thorough, I'm looking at the PDF in Foxit 3.2 at 1:1 zoom. ``` \documentclass[12pt]{article} \usepackage[letterpaper]{geometry} \geometry{top=1.0in, bottom=1.0in, left=1.5in, right=1.0in} \usepackage{graphicx} \begin{figure} \includegraphics{chart}\\ % line 35 \caption{Adjusted Relative Risk (RR)}\label{mylabel} % line 36 \end{figure} ``` Log is: ``` Command Line: texify.exe --pdf --tex-option=--synctex=-1 "C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW\test1.tex" Startup Folder: C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW This is pdfTeX, Version 3.1415926-1.40.10 (MiKTeX 2.8) entering extended mode ("C:/Documents and Settings/myself/Application Data/WinEdt Team/WinEdt 6/RW/t est1.tex" LaTeX2e <2009/09/24> Babel <v3.8l> and hyphenation patterns for english, dumylang, nohyphenation, ge rman, ngerman, german-x-2009-06-19, ngerman-x-2009-06-19, french, loaded. (C:\MiKTeX\tex\latex\base\article.cls Document Class: article 2007/10/19 v1.4h Standard LaTeX document class (C:\MiKTeX\tex\latex\base\size12.clo)) (C:\MiKTeX\tex\generic\babel\babel.sty ************************************* * Local config file bblopts.cfg used * (C:\MiKTeX\tex\latex\00miktex\bblopts.cfg) (C:\MiKTeX\tex\generic\babel\english.ldf (C:\MiKTeX\tex\generic\babel\babel.def ))) (C:\MiKTeX\tex\latex\graphics\graphicx.sty (C:\MiKTeX\tex\latex\graphics\keyval.sty) (C:\MiKTeX\tex\latex\graphics\graphics.sty (C:\MiKTeX\tex\latex\graphics\trig.sty) (C:\MiKTeX\tex\latex\00miktex\graphics.cfg) (C:\MiKTeX\tex\latex\pdftex-def\pdftex.def))) (C:\MiKTeX\tex\latex\geometry\geometry.sty (C:\MiKTeX\tex\generic\oberdiek\ifpdf.sty) (C:\MiKTeX\tex\generic\oberdiek\ifvtex.sty) (C:\MiKTeX\tex\latex\geometry\geometry.cfg)) (C:\MiKTeX\tex\latex\base\flafter.sty) (C:\MiKTeX\tex\latex\setspace\setspace.sty Package: `setspace' 6.7 <2000/12/01> ) ("C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW\t est1.aux") (C:\MiKTeX\tex\context\base\supp-pdf.tex [Loading MPS to PDF converter (version 2006.09.02).] ) *geometry* driver: auto-detecting *geometry* detected driver: pdftex [1{C:/MiKTeX/pdftex/config/pdftex.map}] [2] <chart.png, id=15, 362.11884pt x 257.55798pt> <use chart.png> Underfull \hbox (badness 10000) in paragraph at lines 37--38 [3] [4 <C:/Documents and Settings/myself/Application Data/WinEdt Team/WinEdt 6/RW/chart.png (PNG copy)>] ("C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW\t est1.aux") ) (see the transcript file for additional information)<C:/MiKTeX/fonts/type1/publ ic/amsfonts/cm/cmbx12.pfb><C:/MiKTeX/fonts/type1/public/amsfonts/cm/cmr10.pfb>< C:/MiKTeX/fonts/type1/public/amsfonts/cm/cmr12.pfb><C:/MiKTeX/fonts/type1/publi c/amsfonts/cm/cmr17.pfb><C:/MiKTeX/fonts/type1/public/amsfonts/cm/cmr7.pfb><C:/ MiKTeX/fonts/type1/public/amsfonts/cm/cmr8.pfb><C:/MiKTeX/fonts/type1/public/am sfonts/cm/cmti10.pfb> Output written on test1.pdf (4 pages, 100135 bytes). SyncTeX written on test1.synctex Transcript written on test1.log. ``` **Clarification**: The blurriness is visible on-screen when looking at the PDF at 1:1 zoom. I haven't printed it.
https://tex.stackexchange.com/users/564
Included PNG appears blurry in PDF
false
I'm using PNG files without DPI information (at least Irfan View shows blank fields for DPI), on paper they appear as it should, and Foxit blurs them at 100% but they are looking ok at 150% (at that zoom level they appear on screen at the same size as shown in Irfan View). The figures are inserted with `\includegraphics[scale=0.5]{images/fig1}` (the original size is 716x461 pixels)
4
https://tex.stackexchange.com/users/95
1210
845
https://tex.stackexchange.com/questions/1211
6
I am putting marginpars into the text to help the reader find important terms in my text. Now, where am I supposed to put the marginpar so that it aligns with the term? `Let us define \marginpar{Ipsum}\emph{Ipsum}: ...` or `Let us define \emph{Ipsum}\marginpar{Ipsum}: ...` (Bonus: Will putting it after the colon mess anything up?) `Let us define \emph{Ipsum}:\marginpar{Ipsum} ...`
https://tex.stackexchange.com/users/595
Put a marginpar before or after word it is supposed to be aligned to?
true
I've just tried experimenting and although my experiments were perhaps simplistic, I could not detect any difference in the three cases so long as there was no space between the item and the marginpar. My experiment was the following code: ``` \documentclass{article} \newlength\shove \setlength{\shove}{23.57pt} \begin{document} How much is that doggie in the window?\hspace{\shove} The one with the waggly tail? How much is that doggie in the window? I do hope that doggie's for sale! How much is that doggie in the window?\hspace{\shove} The one with the waggly tail?\marginpar{That's ``tail'' not ``tale''} How much is that doggie in the window? I do hope that doggie's for sale! How much is that doggie in the window?\hspace{\shove} The one with the waggly \marginpar{That's ``tail'' not ``tale''}tail? How much is that doggie in the window? I do hope that doggie's for sale! How much is that doggie in the window?\hspace{\shove} The one with the waggly tail\marginpar{That's ``tail'' not ``tale''}? How much is that doggie in the window? I do hope that doggie's for sale! \end{document} ``` By trial-and-error, `\shove` was the maximum space that could be added there without shoving the "tail?" on to the next line. All three looked exactly the same in terms of positioning and spacing. (Of course, there's probably an argument as to where to put it for [semantic](https://tex.stackexchange.com/questions/605/what-is-the-deal-about-these-semantic-vs-syntactic-commands) reasons, but I'll leave that to someone else as I don't know of a hard-and-fast rule to apply in this case so my opinion would be just that: an opinion.)
4
https://tex.stackexchange.com/users/86
1212
846
https://tex.stackexchange.com/questions/1162
50
This is a follow-up to [Included png appears too big in PDF](https://tex.stackexchange.com/questions/1153/included-png-appears-too-big-in-pdf), but it's a separate issue so I'll put it in its own question instead of burying it in comments. The problem: an included PNG, included without scaling, appears blurry in the PDF, as if the PDF has run it through a lossy compression. I have tried multiple times with different values for either `\pdfimageresolution` or `\includegraphics[width=...,height=...]` added to the source below but no luck. Is there any way I can check log compresses the image as it appears to do? And to be thorough, I'm looking at the PDF in Foxit 3.2 at 1:1 zoom. ``` \documentclass[12pt]{article} \usepackage[letterpaper]{geometry} \geometry{top=1.0in, bottom=1.0in, left=1.5in, right=1.0in} \usepackage{graphicx} \begin{figure} \includegraphics{chart}\\ % line 35 \caption{Adjusted Relative Risk (RR)}\label{mylabel} % line 36 \end{figure} ``` Log is: ``` Command Line: texify.exe --pdf --tex-option=--synctex=-1 "C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW\test1.tex" Startup Folder: C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW This is pdfTeX, Version 3.1415926-1.40.10 (MiKTeX 2.8) entering extended mode ("C:/Documents and Settings/myself/Application Data/WinEdt Team/WinEdt 6/RW/t est1.tex" LaTeX2e <2009/09/24> Babel <v3.8l> and hyphenation patterns for english, dumylang, nohyphenation, ge rman, ngerman, german-x-2009-06-19, ngerman-x-2009-06-19, french, loaded. (C:\MiKTeX\tex\latex\base\article.cls Document Class: article 2007/10/19 v1.4h Standard LaTeX document class (C:\MiKTeX\tex\latex\base\size12.clo)) (C:\MiKTeX\tex\generic\babel\babel.sty ************************************* * Local config file bblopts.cfg used * (C:\MiKTeX\tex\latex\00miktex\bblopts.cfg) (C:\MiKTeX\tex\generic\babel\english.ldf (C:\MiKTeX\tex\generic\babel\babel.def ))) (C:\MiKTeX\tex\latex\graphics\graphicx.sty (C:\MiKTeX\tex\latex\graphics\keyval.sty) (C:\MiKTeX\tex\latex\graphics\graphics.sty (C:\MiKTeX\tex\latex\graphics\trig.sty) (C:\MiKTeX\tex\latex\00miktex\graphics.cfg) (C:\MiKTeX\tex\latex\pdftex-def\pdftex.def))) (C:\MiKTeX\tex\latex\geometry\geometry.sty (C:\MiKTeX\tex\generic\oberdiek\ifpdf.sty) (C:\MiKTeX\tex\generic\oberdiek\ifvtex.sty) (C:\MiKTeX\tex\latex\geometry\geometry.cfg)) (C:\MiKTeX\tex\latex\base\flafter.sty) (C:\MiKTeX\tex\latex\setspace\setspace.sty Package: `setspace' 6.7 <2000/12/01> ) ("C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW\t est1.aux") (C:\MiKTeX\tex\context\base\supp-pdf.tex [Loading MPS to PDF converter (version 2006.09.02).] ) *geometry* driver: auto-detecting *geometry* detected driver: pdftex [1{C:/MiKTeX/pdftex/config/pdftex.map}] [2] <chart.png, id=15, 362.11884pt x 257.55798pt> <use chart.png> Underfull \hbox (badness 10000) in paragraph at lines 37--38 [3] [4 <C:/Documents and Settings/myself/Application Data/WinEdt Team/WinEdt 6/RW/chart.png (PNG copy)>] ("C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW\t est1.aux") ) (see the transcript file for additional information)<C:/MiKTeX/fonts/type1/publ ic/amsfonts/cm/cmbx12.pfb><C:/MiKTeX/fonts/type1/public/amsfonts/cm/cmr10.pfb>< C:/MiKTeX/fonts/type1/public/amsfonts/cm/cmr12.pfb><C:/MiKTeX/fonts/type1/publi c/amsfonts/cm/cmr17.pfb><C:/MiKTeX/fonts/type1/public/amsfonts/cm/cmr7.pfb><C:/ MiKTeX/fonts/type1/public/amsfonts/cm/cmr8.pfb><C:/MiKTeX/fonts/type1/public/am sfonts/cm/cmti10.pfb> Output written on test1.pdf (4 pages, 100135 bytes). SyncTeX written on test1.synctex Transcript written on test1.log. ``` **Clarification**: The blurriness is visible on-screen when looking at the PDF at 1:1 zoom. I haven't printed it.
https://tex.stackexchange.com/users/564
Included PNG appears blurry in PDF
false
I had similar problems, but found I could resolve them by increasing the resolution of the generated PDF: `\setlength{\pdfpxdimen}{1in/150} % Define resolution of PDF`
6
https://tex.stackexchange.com/users/595
1213
847
https://tex.stackexchange.com/questions/1214
3
I am trying to get rid of the default "boxedsections" with shadows used in the sciposter class and replace them with either "plainboxedsections" or "plainsections". In the manual three heading options are mentioned, but not how to switch between them.
https://tex.stackexchange.com/users/237
How to change section style using sciposter
true
The documentation indicates that these are class options. So I suggest you try ``` \documentclass[plainsections]{sciposter} ``` or ``` \documentclass[plainboxedsections]{sciposter} ```
3
https://tex.stackexchange.com/users/73
1217
849
https://tex.stackexchange.com/questions/1215
10
I asked [a question](https://tex.stackexchange.com/questions/1203/subfigures-with-memoir/1205#1205) about how to use subfigure with memoir. I got some great tips, but now pdflatex is making all subfigure hyper-refs point to the first couple subfigures. It also gives me this error: ``` destination with the same identifier (name{subfigure.3}) has been already used, duplicate ignored ``` for every subfigure (except the first one at any index, i.e., the first {subfigure.n} gets no error for every n.) I was pointed [to this](https://texfaq.org/FAQ-hyperdupdest), but hyperref is the last package loaded. Has anyone gotten this working? --- Solution: Make sure that ``` \newsubfloat{figure} ``` follows ``` \usepackage{hyperref} ```
https://tex.stackexchange.com/users/512
Is it possible to use hyperref, subfigure, and memoir together?
true
Please provide an example where it is not working? This seems to work for me: ``` \documentclass{memoir} \usepackage{hyperref} \newsubfloat{figure} \begin{document} \begin{figure} \centering \subtop[Sub~a.]{Foo\label{subfig:a}}\qquad \subtop[Sub~b.]{Bar\label{subfig:b}} \caption{First.} \end{figure} \clearpage \begin{figure} \centering \subtop[Sub~c.]{Baz\label{subfig:c}}\qquad \subtop[Sub~d.]{Foobar\label{subfig:d}} \caption{Second.} \end{figure} \clearpage \noindent Main: \ref{subfig:a} Sub: \subcaptionref{subfig:a}\\ Main: \ref{subfig:b} Sub: \subcaptionref{subfig:b}\\ Main: \ref{subfig:c} Sub: \subcaptionref{subfig:c}\\ Main: \ref{subfig:d} Sub: \subcaptionref{subfig:d} \end{document} ``` You can even use the \autoref from hypreref if you like. ``` \documentclass{memoir} \usepackage{hyperref} \newsubfloat{figure} \providecommand*{\subfigureautorefname}{Subfig.} \begin{document} \noindent \autoref{fig:1} on page \pageref{fig:1} contains two subfigures, \autoref{subfig:a} \& \subcaptionref{subfig:b}. \clearpage \begin{figure} \centering \subtop[Sub~a.]{Foo\label{subfig:a}}\qquad \subtop[Sub~b.]{Bar\label{subfig:b}} \caption{First.}\label{fig:1} \end{figure} \end{document} ```
8
https://tex.stackexchange.com/users/565
1218
850
https://tex.stackexchange.com/questions/1204
7
I am tired of writing company reports using MS Word, so I am looking for a way to define a custom template that follows the company branding. Basically what I would need to define is the following: * Enforce font-type and font-size * Custom color for normal text (some sort of blue) and custom color for the section title, sub-title and sub-sub-title (each have different colors) * Standardized title page with watermark, document title, author and date * Standardized last page with watermark, and list of office addresses in a tabular way Could any one help me?
https://tex.stackexchange.com/users/331
How to customize the standard report template
false
KOMA-Script classes like `scrreprt` provide such features and many more: * Any font size is supported, even specified in any TeX unit: a class option might be `fontsize=13pt` or even `fontsize=9bp`, even mm or inch is possible. * Font type, size, shape and color may be specified for the elements, for instance `\setkomafont{section}{\Large\sffamily\bfseries\color{cyan}}` or `\addtokomafont{\pagenumber}{\itshape}`. * standardized title pages are available, including title, author, date and even subtitle, even extra (inner) titles are supported * Documents built on scrreprt are highly customizable, it's easier to use class-built-in features than a lot of extra packages. Instead of `atbegshi` the package `eso-pic` might be used. The current version (2.0b of 2010/06/08) builds on `atbegshi`, not any more on `everyshi`. The mentioned `memoir` class goes a similar way by integrating features in the class that would be otherwise available by extra packages.
7
https://tex.stackexchange.com/users/213
1219
851
https://tex.stackexchange.com/questions/64
151
A lot of people write makefiles that say something like ``` paper.pdf: paper.tex pdflatex paper bibtex paper pdflatex paper pdflatex paper ``` To handle re-running TeX to get new/changed references and so forth. Is there a better way to do this?
https://tex.stackexchange.com/users/60
Tools for automating document compilation
false
Generation of references is handled automatically by the ConTeXt toolchain, so you never have to worry about remembering how many runs you need. The example Makefile would look like this if you used ConTeXt: ``` paper.pdf: paper.tex context paper ```
19
https://tex.stackexchange.com/users/359
1220
852
https://tex.stackexchange.com/questions/940
105
TeX and LaTeX are widely used in Computer Science. What other academic disciplines or professionals use it?
https://tex.stackexchange.com/users/356
What professions use TeX/LaTeX besides CS?
false
At least one art historian uses TeX :) I wrote my Ph.D. in LaTeX and a couple of exhibition catalogues in ConTeXt.
13
https://tex.stackexchange.com/users/359
1221
853
https://tex.stackexchange.com/questions/1215
10
I asked [a question](https://tex.stackexchange.com/questions/1203/subfigures-with-memoir/1205#1205) about how to use subfigure with memoir. I got some great tips, but now pdflatex is making all subfigure hyper-refs point to the first couple subfigures. It also gives me this error: ``` destination with the same identifier (name{subfigure.3}) has been already used, duplicate ignored ``` for every subfigure (except the first one at any index, i.e., the first {subfigure.n} gets no error for every n.) I was pointed [to this](https://texfaq.org/FAQ-hyperdupdest), but hyperref is the last package loaded. Has anyone gotten this working? --- Solution: Make sure that ``` \newsubfloat{figure} ``` follows ``` \usepackage{hyperref} ```
https://tex.stackexchange.com/users/512
Is it possible to use hyperref, subfigure, and memoir together?
false
The option `hypertexnames` might fix it. Specify it when loading the package or in \hypersetup, i.e. ``` \usepackage[hypertexnames=true]{hyperref} ``` or ``` \hypersetup{hypertexnames=true} ``` after loading the package.
0
https://tex.stackexchange.com/users/213
1222
854
https://tex.stackexchange.com/questions/1223
27
Is there a test for the different styles within maths mode? What I *really* want is to be able to save the current style to reinvoke it later on, but a `\if` along the lines of `\ifmmode` would work just as well. In the specific example, I want to measure how big something will be when displayed in maths mode, so I do: ``` \settoheight{\mathheight}{some bit of maths} ``` except that it complains because the `some bit of maths` gets put in a box and measured, and the box doesn't know that it's maths. So instead I put: ``` \settoheight{\mathheight}{\(some bit of maths\)} ``` except that then I get the wrong answer if this is used in displayed maths. So ideally, I want: ``` \ifdisplaystyle \let\currentstyle\displaystyle \else \iftextstyle \let\currentstyle\textstyle ... \fi \fi \settoheight{\mathheight}{\(\currentstyle some bit of maths\)} ``` and then I'll be happy. Is there such a test? --- Okay, so `\mathchoice` is clearly the way to go (thanks Martin!), but its behaviour is a little odd and since I want to use it to define a macro depending on which mode I'm in, this oddity is quite important. Here's the code: ``` \newcommand{\mathtest}{% \gdef\name{a}% \mathchoice{% \name \gdef\name{b}% }{% \name \gdef\name{c}% }{% \name \gdef\name{d}% }{% \name \gdef\name{e}% }% \name} \[ \mathtest \] ``` If `\mathchoice` behaved like `\if`, this ought to print `ab`. But it prints `ae`. *All* the options to `\mathchoice` get processed (which makes me wonder a bit how it works, but that's by-the-by). So, is there an obvious way to make `\mathchoice` behave a little more like `\if`?
https://tex.stackexchange.com/users/86
Is there a test for the different styles inside maths mode?
false
Yes, you have \mathchoice ``` \documentclass{article} \newcommand\mathtest{% \mathchoice {displaystyle} {text style} {scriptstyle} {scriptscriptstyle} } \begin{document} \[ \mathtest x^{\mathtest^{\mathtest}} \] \( \mathtest \) \end{document} ```
7
https://tex.stackexchange.com/users/565
1224
855
https://tex.stackexchange.com/questions/1166
43
A number of related questions have already been asked about this issue: * [align vs equation](https://tex.stackexchange.com/questions/321/align-vs-equation) * [which is preferable to](https://tex.stackexchange.com/questions/503/why-is-preferable-to) * [what to do with this hyperref note on amsmath](https://tex.stackexchange.com/questions/975/what-to-do-with-this-hyperref-note-on-amsmath) * and even [eqnarray vs align](https://tex.stackexchange.com/questions/196/eqnarray-vs-align) But I'm still confused by the conflicting suggestions that have been given so far. So I'm trying again. **Which should be the preferred command to produce a displayed equation in my LaTeX documents?** So far the suggestions indicate that one should use `\[ ... \]`, maybe `\begin{equation*} ... \end{equation*}`, or maybe even the `gather*` or `align*` environments from `amsmath`. And one should definitely **avoid** using either `$$...$$` or the `eqnarray` environment. Now I have to say that, from a language perspective, I have a *strong* preference for the `equation*` environment because it is less cryptic than the `\[ ... \]` notation and it is [semantically](https://tex.stackexchange.com/questions/605/what-is-the-deal-about-these-semantic-vs-syntactic-commands) the most accurate. So, is it fine to use `equation*`? Maybe only after loading `amsmath`? Or should the `equation`/`equation*` environment be redefined to something else so that spacing, package support, or whatever is improved?
https://tex.stackexchange.com/users/169
Which command should I use for displayed equations?
false
full disclosure: i have a built-in bias towards amsmath. although in most cases, `\[`...`\]` is comparable to the equation\* environment, there's one place where it isn't. if you are using an ams document class, a qed marker is automatically placed by the `\end{proof}`. if the proof ends with some other environment -- a display or list -- the qed marker is placed all by itself on the line below. if your proof ends with an unnumbered display, you probably want the qed marker to be placed on the same line as the display. `\qedhere`, placed just before the `\end{...}` environment for the display will move the qed marker up into the scope of the display. but it won't work for `\[...\]`, and it won't work for `\begin{eqnarray}...\end{eqnarray}`. (it will also work for `\end{enumerate}` and `\end{itemize}`, but that wasn't the question here.)
12
https://tex.stackexchange.com/users/579
1225
856
https://tex.stackexchange.com/questions/843
60
Maybe TeX isn't the best for this particular problem, but any teachers out there use a particular class or package to plan lessons? Right now I'm just using a spreadsheet, but I always find myself wishing there was a 'lessonplan.sty' or 'classschedule.sty' file out there somewhere so I could still use the LaTeX for equations, tables, lists etc. A bit of searching yielded a few results, but there doesn't seem to be a consensus. Anyone used any of these: <http://www.ctan.org/tex-archive/macros/latex/contrib/calendar/> <http://www.sultanik.com/LaTeX_calendar_style> <http://tug.ctan.org/tex-archive/macros/latex/contrib/termcal/> Any recommendations from anyone on best way to make calendar-based class schedules and/or lesson plans?
https://tex.stackexchange.com/users/90
LaTeX Classes or Styles for Schedules and/or Calendars?
false
<http://www.diyplanner.com/node/6270> Requires **Python** to generate the calendar data for the selected year. > > I wanted something to look 'modern' 'light' and 'open plan'. > > > Can be easily internationalized to most European languages (e.g. French, German, Spanish, etc.) > > >
14
https://tex.stackexchange.com/users/279
1227
857
https://tex.stackexchange.com/questions/1226
97
Is there a way to make [Latexmk](http://www.phys.psu.edu/~collins/software/latexmk-jcc/ "Latexmk") invoke `makeglossaries` (part of the [glossaries](http://ctan.org/tex-archive/macros/latex/contrib/glossaries/ "glossaries") package)? Specifically I want to use latexmk to compile a LaTeX document that uses the `glossaries` package to produce a glossary. Currently I'm using this rather clumsy sequence of commands: ``` makeglossaries document latexmk -pdf document.tex makeglossaries document latexmk -pdf document.tex ``` The first run of makeglossaries is required to produce files that the `glossaries` package needs, or otherwise causes latexmk to fail, but there's still no data in the (non-existant) .aux file, so that first makeglossaries invocation produces nothing (except for an empty file). So, how to do this using latexmk alone (and let that deal with invoking makeglossaries at the right time)?
https://tex.stackexchange.com/users/313
How to make Latexmk use makeglossaries?
true
You need to write a configuration file that tells latexmk which files are interesting for the glossary and how to handle them. Fortunately, the author provides some [sample rc files](https://www.ctan.org/tex-archive/support/latexmk/example_rcfiles). Putting ``` add_cus_dep('glo', 'gls', 0, 'makeglo2gls'); sub makeglo2gls { system("makeindex -s '$_[0]'.ist -t '$_[0]'.glg -o '$_[0]'.gls '$_[0]'.glo"); } ``` in `~/.latexmkrc` (globally in your home directory) or `./latexmkrc` (locally in your document directory) should do the trick.
65
https://tex.stackexchange.com/users/83
1228
858
https://tex.stackexchange.com/questions/1229
8
(Update: I learned that this kind of open question is not supposed to be asked here at tex.stackexchange.com, so I will refrain from furthering the discussion here and invite contributions instead via the link provided in the next line.) [Overheard today](http://ff.im/oNYyz): > > I believe what is likely to happen is that some alternative language will be developed which is syntactically similar to TeX (since this will make it easier for mathematicians and physicists to transition to it) with less focus on typesetting but far richer semantically, allowing a smoother transition to MathML. > > > A brief Google search revealed that a number of initiatives have been started along these lines, e.g.: * [SALT (Semantically Annotated LaTeX)](http://salt.semanticauthoring.org/) * [Hermes](http://hermes.aei.mpg.de/) * [STeX](http://www.tug.org/texlive/devsrc/Master/texmf-dist/source/latex/stex/) * [SnuggleTeX](http://www2.ph.ed.ac.uk/snuggletex/UpConversionDemo) My question, now, is how to get an overview what the comparative strengths and weaknesses of these (and other) approaches are, what communities and applications drive them, and what else to consider. I would be surprised if there were a simple answer to any of these, so I expect to split this thread up into simpler ones as the discussion develops.
https://tex.stackexchange.com/users/44890
Semantic TeX - where are we heading?
true
I would classify gellmu <http://www.albany.edu/~hammond/gellmu/> as well as possibly the XML layer of plastex in this category as well. First of all, I think we should distinguish two meanings of "semantic" in this discussion. There is the old fashioned sense in which HTML is semantic, i.e. it specifies content rather than how it is to be presented, but there is also the "web3.0" concept of semantic in which you have richer ways of specifying things like the relationships between items of data. Since LaTeX is not even semantic in the first sense, I think it is far more important to discuss that notion of semantic than the more modern one. For me the main interest in these things is to enable mathematical scientists to make use of rich web tools for collaboration, authoring and presentation of mathematically oriented work, e.g. specialist tools for things like the polymath projects. This would indicate that XML or HTML based formats should be the way forward. However, for the foreseeable future, it seems likely that mathematically oriented journals will continue to use LaTeX as their primary submission format. It also seems likely that academics will continue to publish peer reviewed manuscripts as the main way of securing credit for their work. These things may change in the long term, and arguably they should, but that is the reality that we are dealing with right now. For these reasons, any workflow that is likely to catch on must involve a markup language that is similar to LaTeX (since academics have to learn that anyway), must be capable of being converted both to high quality LaTeX and XML/HTML, and must not suffer too badly from conversion from LaTeX back to the chosen authoring format, e.g. this may be needed to make corrections in the peer review process. There are various reasons why LaTeX to HTML converters cannot be expected to behave perfectly. For one thing, LaTeX inherits many typesetting specific constructs from TeX that have no meaning in the HTML world. For another thing, some people are very fond of pointing out that LaTeX is Turing complete, whereas HTML is not. For these reasons, it is useful to identify a semantic core of LaTeX that can be converted to HTML/XML reversibly, i.e. things like \section{XXX} would be fine, but things like \vskip would be out. We might also need to consider modifications of the LaTeX syntax to aid the conversion to XML based formats, e.g. this is done in gellmu, but in such a way that it is easy for LaTeX aficionados to adapt.
9
https://tex.stackexchange.com/users/376
1231
859
https://tex.stackexchange.com/questions/1232
59
What is the difference between `\big[` (or equivalently `\big(`) and `\bigl[`? Is it always necessary to mention `l` (left) and `r` (right)?
https://tex.stackexchange.com/users/371
Difference between \big[ and \bigl[
true
`\bigl` declares an opening math delimiter with less horizontal spacing than the unspecified `\big`. `\bigr` defines a closing math delimiter. Using a `\bigl` and `\bigr` pair you could get the brackets or parentheses closer to the term within. Just compare: ``` \documentclass{article} \begin{document} $\bigl[ \times \bigr]$ $\big[ \times \big]$ \end{document} ``` Output: The definitions in latex.ltx are: ``` \def\bigl{\mathopen\big} \def\bigm{\mathrel\big} \def\bigr{\mathclose\big} ```
57
https://tex.stackexchange.com/users/213
1233
860
https://tex.stackexchange.com/questions/1232
59
What is the difference between `\big[` (or equivalently `\big(`) and `\bigl[`? Is it always necessary to mention `l` (left) and `r` (right)?
https://tex.stackexchange.com/users/371
Difference between \big[ and \bigl[
false
You can see the difference in the following example. The left modifiers `\bigl` etc. are basically `\mathopen{}\big`. You also have to use `\mathopen` if you are using `\left` and `\right` to do automatic scaling to get correct spacing in some cases. ``` \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align} x &= \sin\biggl(\frac12\biggr) \\ % good x &= \sin\mathopen{}\bigg(\frac12\bigg) \\ % good x &= \sin\bigg(\frac12\bigg) \\ % bad x &= \sin\left(\frac12\right) \\ % bad x &= \sin\mathopen{}\left(\frac12\right) % good \end{align} \end{document} ```
25
https://tex.stackexchange.com/users/565
1234
861
https://tex.stackexchange.com/questions/1230
39
(Repost from [Stack Overflow](https://stackoverflow.com/questions/3423881/reference-name-of-description-list-item-in-latex)) I'd like to refer to a description list item by name instead of number. To that effect, I've added labels to each item, but when referencing them I only get the name of the section, not of the list item. How can I change it to show a custom label for each item? ``` \section{Definitions} \begin{description} \item [Vehicle\label{itm:vehicle}] Something \item [Bus\label{itm:bus}] A type of \nameref{itm:vehicle} \item [Car\label{itm:car}] A type of \nameref{itm:vehicle} smaller than a \nameref{itm:bus} \end{description} ``` The result is something like this: > > **1 Definitions** > > > **Vehicle** Something > > **Bus** A type of Definitions > > **Car** A type of Definitions smaller than a Definitions > > > I'd like to have the following: > > **1 Definitions** > > > **Vehicle** Something > > **Bus** A type of Vehicle > > **Car** A type of Vehicle smaller than a Bus > > > An alternative solution would be to use subsections *and display them as a definition list*. Anyone know how to do it? The best answer on Stack Overflow referenced a [\makeatletter](https://stackoverflow.com/questions/2767389/referencing-a-theorem-like-environment-by-its-name/3303192#3303192) hack: ``` \makeatletter \def\namedlabel#1#2{\begingroup \def\@currentlabel{#2}% \label{#1}\endgroup } \makeatother ... \section{Definitions} \begin{description} \item [Vehicle\namedlabel{itm:vehicle}{Vehicle}] Something \item [Bus\namedlabel{itm:bus}{Bus}] A type of \ref{itm:vehicle} \item [Car\namedlabel{itm:car}{Car}] A type of \ref{itm:vehicle} smaller than a \ref{itm:bus} \end{description} ``` It works, with the caveat that the links lead back to the section header, not to the list item. It would be nice to use something native which doesn't break `\ref`.
https://tex.stackexchange.com/users/602
Reference name of description list item in LaTeX
false
Following up on the second suggesiton, assuming you're using hyperref, you could change the definition to: ``` \makeatletter \def\namedlabel#1#2{\begingroup \def\@currentlabel{#2}% \phantomsection\label{#1}\endgroup } \makeatother ``` The phantomsection should anchor backreference links to the item. There might be a way to do this using the enumitem package too, but I'd have to look further into it.
5
https://tex.stackexchange.com/users/411
1235
862
https://tex.stackexchange.com/questions/1223
27
Is there a test for the different styles within maths mode? What I *really* want is to be able to save the current style to reinvoke it later on, but a `\if` along the lines of `\ifmmode` would work just as well. In the specific example, I want to measure how big something will be when displayed in maths mode, so I do: ``` \settoheight{\mathheight}{some bit of maths} ``` except that it complains because the `some bit of maths` gets put in a box and measured, and the box doesn't know that it's maths. So instead I put: ``` \settoheight{\mathheight}{\(some bit of maths\)} ``` except that then I get the wrong answer if this is used in displayed maths. So ideally, I want: ``` \ifdisplaystyle \let\currentstyle\displaystyle \else \iftextstyle \let\currentstyle\textstyle ... \fi \fi \settoheight{\mathheight}{\(\currentstyle some bit of maths\)} ``` and then I'll be happy. Is there such a test? --- Okay, so `\mathchoice` is clearly the way to go (thanks Martin!), but its behaviour is a little odd and since I want to use it to define a macro depending on which mode I'm in, this oddity is quite important. Here's the code: ``` \newcommand{\mathtest}{% \gdef\name{a}% \mathchoice{% \name \gdef\name{b}% }{% \name \gdef\name{c}% }{% \name \gdef\name{d}% }{% \name \gdef\name{e}% }% \name} \[ \mathtest \] ``` If `\mathchoice` behaved like `\if`, this ought to print `ab`. But it prints `ae`. *All* the options to `\mathchoice` get processed (which makes me wonder a bit how it works, but that's by-the-by). So, is there an obvious way to make `\mathchoice` behave a little more like `\if`?
https://tex.stackexchange.com/users/86
Is there a test for the different styles inside maths mode?
false
Try using package mathstyle <http://ctan.org/pkg/mathstyle>. This solution is more along the lines of the original question. ``` \documentclass{article} \usepackage{mathtools} \usepackage{mathstyle} \usepackage{calc} \newlength\mathheight \newcommand*\intheight{% \settototalheight{\mathheight}{$\currentmathstyle\int$} \the\mathheight } \begin{document} \begin{align} \text{displaystyle}&={\displaystyle\text{\intheight}}\\ \text{textstyle}&={\textstyle\text{\intheight}} \\ \text{scriptstyle}&={\scriptstyle\text{\intheight}} \\ \text{scriptscriptstyle}&={\scriptscriptstyle\text{\intheight}} \end{align} \end{document} ```
4
https://tex.stackexchange.com/users/565
1236
863
https://tex.stackexchange.com/questions/1230
39
(Repost from [Stack Overflow](https://stackoverflow.com/questions/3423881/reference-name-of-description-list-item-in-latex)) I'd like to refer to a description list item by name instead of number. To that effect, I've added labels to each item, but when referencing them I only get the name of the section, not of the list item. How can I change it to show a custom label for each item? ``` \section{Definitions} \begin{description} \item [Vehicle\label{itm:vehicle}] Something \item [Bus\label{itm:bus}] A type of \nameref{itm:vehicle} \item [Car\label{itm:car}] A type of \nameref{itm:vehicle} smaller than a \nameref{itm:bus} \end{description} ``` The result is something like this: > > **1 Definitions** > > > **Vehicle** Something > > **Bus** A type of Definitions > > **Car** A type of Definitions smaller than a Definitions > > > I'd like to have the following: > > **1 Definitions** > > > **Vehicle** Something > > **Bus** A type of Vehicle > > **Car** A type of Vehicle smaller than a Bus > > > An alternative solution would be to use subsections *and display them as a definition list*. Anyone know how to do it? The best answer on Stack Overflow referenced a [\makeatletter](https://stackoverflow.com/questions/2767389/referencing-a-theorem-like-environment-by-its-name/3303192#3303192) hack: ``` \makeatletter \def\namedlabel#1#2{\begingroup \def\@currentlabel{#2}% \label{#1}\endgroup } \makeatother ... \section{Definitions} \begin{description} \item [Vehicle\namedlabel{itm:vehicle}{Vehicle}] Something \item [Bus\namedlabel{itm:bus}{Bus}] A type of \ref{itm:vehicle} \item [Car\namedlabel{itm:car}{Car}] A type of \ref{itm:vehicle} smaller than a \ref{itm:bus} \end{description} ``` It works, with the caveat that the links lead back to the section header, not to the list item. It would be nice to use something native which doesn't break `\ref`.
https://tex.stackexchange.com/users/602
Reference name of description list item in LaTeX
false
Here's a version that seems to work. There are, I think, two separate issues with what you are trying to do. One is simply to get the labels to be what you want and not according to some automatic numbering scheme. That's what the SO hack does. The other issue is to ensure that these labels refer to what you think that they are referring to. The SO hack does not address this. The point is that a label is both a label and a marker. In normal TeX, this dual role isn't visible because the marker isn't really used (well, it's used to figure out what the label should contain, but you want to override that). But when using a hyperlink package, such as [hyperref.sty](http://ctan.org/tex-archive/macros/latex/contrib/hyperref/), the marker means something again: it's where the hyperlink goes to. So you need to both change the label and have the marker at the right point. The former is solved by the SO hack, but the latter (as I said) is not. Either you can add the markers in explicitly, or you can subvert something that would put them in automatically. The reason they aren't there is that you are using the `description` environment which doesn't automatically put in the markers. By using a different listing environment, say `enumerate`, which does get the markers put in, we can get the desired behaviour. It's still a "hack", I'm afraid, but not a very big one. The following does it, as far as my testing shows: ``` \documentclass{article} \usepackage{hyperref} \makeatletter \newcommand{\labitem}[2]{% \def\@itemlabel{\textbf{#1}} \item \def\@currentlabel{#1}\label{#2}} \makeatother \begin{document} \begin{enumerate} \labitem{Vehicle}{itm:vehicle} Something \labitem{Bus}{itm:bus} A type of \ref{itm:vehicle} \labitem{Car}{itm:car} A type of \ref{itm:vehicle} smaller than a \ref{itm:bus} \end{enumerate} Let's refer to \ref{itm:vehicle} \ref{itm:bus} and \ref{itm:car} \end{document} ```
12
https://tex.stackexchange.com/users/86
1237
864
https://tex.stackexchange.com/questions/1238
15
I am great fan of pgf and tikz in general to produce great looking figures. But I don't like the amount of time I have to put in to draw a complicated picture, because I have to provide all the coordinates of the points lines etc. Is there any wrapper which makes this simpler? Like in some cases, eg when you have to put text over or around arrows, there are ways to give relative position instead of exact coordinates. Are there any similar ways to draw other shapes with relative coordinates? Is there any external program that can convert figures with lines and shapes into coordinates?
https://tex.stackexchange.com/users/342
Better way to calculate coordinates in Tikz?
false
jpgfdraw is a tool for freehand drawing and exporting to pgf. Perhaps see [this jpgfdraw example](http://texblog.net/latex-archive/maths/jpgfdraw-example/), exported to pgf/tex and used with `\input`. Perhaps you could combine a freehand drawing with additional TikZ drawings.
10
https://tex.stackexchange.com/users/213
1239
865
https://tex.stackexchange.com/questions/1238
15
I am great fan of pgf and tikz in general to produce great looking figures. But I don't like the amount of time I have to put in to draw a complicated picture, because I have to provide all the coordinates of the points lines etc. Is there any wrapper which makes this simpler? Like in some cases, eg when you have to put text over or around arrows, there are ways to give relative position instead of exact coordinates. Are there any similar ways to draw other shapes with relative coordinates? Is there any external program that can convert figures with lines and shapes into coordinates?
https://tex.stackexchange.com/users/342
Better way to calculate coordinates in Tikz?
false
There is a plugin for Inkscape, [inkscape2tikz](http://code.google.com/p/inkscape2tikz/), that allows you to export TikZ code from Inkscape. It's been mentioned a few times already on other questions on this site.
3
https://tex.stackexchange.com/users/125
1240
866
https://tex.stackexchange.com/questions/1238
15
I am great fan of pgf and tikz in general to produce great looking figures. But I don't like the amount of time I have to put in to draw a complicated picture, because I have to provide all the coordinates of the points lines etc. Is there any wrapper which makes this simpler? Like in some cases, eg when you have to put text over or around arrows, there are ways to give relative position instead of exact coordinates. Are there any similar ways to draw other shapes with relative coordinates? Is there any external program that can convert figures with lines and shapes into coordinates?
https://tex.stackexchange.com/users/342
Better way to calculate coordinates in Tikz?
false
I think you need to be more specific in what you want to do. There are numerous ways to make relative coordinates in TikZ. Here are some Examples: ``` \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \fill (1,1) circle (2pt) node[above] (O) {Start}; \draw (O) -- (2,2); % absolute \draw (O) --++ (3,2); % relative \node[left=2cm] at (O) {Left}; % relative \end{tikzpicture} \end{document} ``` Check out <http://www.texample.net/tikz/> for a lot of excellent examples of how to draw with TikZ.
7
https://tex.stackexchange.com/users/565
1241
867
https://tex.stackexchange.com/questions/1238
15
I am great fan of pgf and tikz in general to produce great looking figures. But I don't like the amount of time I have to put in to draw a complicated picture, because I have to provide all the coordinates of the points lines etc. Is there any wrapper which makes this simpler? Like in some cases, eg when you have to put text over or around arrows, there are ways to give relative position instead of exact coordinates. Are there any similar ways to draw other shapes with relative coordinates? Is there any external program that can convert figures with lines and shapes into coordinates?
https://tex.stackexchange.com/users/342
Better way to calculate coordinates in Tikz?
true
--- *Complete LaTeX documents used to generate the figures in this answer are available as a [Gist](http://gist.github.com/512000) on GitHub.* --- One way to solve the "putting text over arrows" question is to use inline nodes and relative positioning: ``` \begin{tikzpicture} \draw[->] (0,0) -- (5,0) node[above]{Hello, world!}; \end{tikzpicture} ``` --- You can also use named nodes and coordinates combined with relative positioning. A `\coordinate` is just like a `\node` without a text area (they may still have shapes). Naming your nodes and coordinates allows you to re-use information about their position without re-typing the locations. Using relative positioning constructs (provided by the TikZ `positioning` library), like `left = 1ex of A`, allows you to position nodes/coordinates relative to other nodes/coordinates without working out the mathematics and geometry in your head. ``` \begin{tikzpicture}[ Name/.style = {font={\bfseries}} ] \coordinate (A) at (0,0); % ^---- A name for the node/coordinate \coordinate (B) at (5,1); \coordinate (C) at (3,4); \draw (A) -- (B) -- (C) -- cycle; \node (A-label) [left=1ex of A, Name] {A}; \node (B-label) [right=1ex of B, Name] {B}; \node (C-label) [above=1ex of C, Name] {C}; \node [above left = 2 em of C] {This is a relatively positioned node!} edge[out=270,in=180,thick,->] (C-label); \end{tikzpicture} ``` See Tutorial 2 "A Petri-Net for Hagen" in the [TikZ manual](http://tug.ctan.org/tex-archive/graphics/pgf/base/doc/generic/pgf/pgfmanual.pdf) for an excellent step-by-step walkthrough of named nodes and relative positioning. I prefer constructing figures using relative positioning as opposed to using a GUI program because I can change the look of the figure by adjusting the locations of a few "base coordinates". In this case, I could draw a completely different triangle by moving the locations of coordinates A, B and C and for most adjustments the rest of the figure would just fall into place. Learning to set up figures like this takes practice but once you get the it down it can save a bunch of time when it comes to fine-tuning the image when compared to a GUI program. --- Finally, as to your question about GUI programs, I would recommend [Inkscape](http://inkscape.org/)- it is a very robust, open source editor for vector graphics that is similar to Adobe Illustrator. There is even a [plugin available](http://code.google.com/p/inkscape2tikz/) that generates TikZ code from Inkscape graphics.
20
https://tex.stackexchange.com/users/17
1243
868
https://tex.stackexchange.com/questions/1242
8
For example: ``` *Image 1* *Image 2* *Image 3* (i) (ii) (iii) Figure n. Multiple images. (i) image at time n. (ii) Image at time n+1. (iii) Image at time n+2 ```
https://tex.stackexchange.com/users/572
How can I have images that are side-by-side and have numbers attached to each one?
false
There are several packages available to achieve that: * `subcaption`, belonging to the very good caption package * `subfig` * `subfigure`, older than subfig and some consider it as obsolete Here's an example using `subcaption`: ``` \documentclass{article} \usepackage{caption} \usepackage{subcaption} \renewcommand\thesubfigure{\roman{subfigure}} \usepackage[demo]{graphicx} \begin{document} \begin{figure} \begin{minipage}[b]{.3\linewidth} \centering% \includegraphics[width=100pt]{test} \subcaption{First image}\label{fig:1a} \end{minipage}% \hfill% \begin{minipage}[b]{.3\linewidth} \centering% \includegraphics[width=100pt]{test} \subcaption{Second image}\label{fig:1b} \end{minipage} \hfill% \begin{minipage}[b]{.3\linewidth} \centering% \includegraphics[width=100pt]{test} \subcaption{Third image}\label{fig:1b} \end{minipage} \caption{Multiple images}\label{fig:1} \end{figure} \end{document} ``` Output:
10
https://tex.stackexchange.com/users/213
1245
869
https://tex.stackexchange.com/questions/1242
8
For example: ``` *Image 1* *Image 2* *Image 3* (i) (ii) (iii) Figure n. Multiple images. (i) image at time n. (ii) Image at time n+1. (iii) Image at time n+2 ```
https://tex.stackexchange.com/users/572
How can I have images that are side-by-side and have numbers attached to each one?
true
I use `subfigure` for this. Here's a [blog post](http://texblog.wordpress.com/2007/08/28/placing-figurestables-side-by-side-subfigure/) that describes its usage. In summary (taken from the post), ``` \begin{figure} \subfigure[Caption of subfigure 1]{ % content of subfigure 1 \label{fig:subfig1} } % repeat subfigure as necessary \label{fig:labelForFullFigure} \caption{Caption of subfigures \subref{fig:subfig1}, \subref{fig:subfig2} and \subref{fig:subfig3}} \end{figure} ``` An alternative would be [`subfig`](ftp://ctan.tug.org/tex-archive/macros/latex/contrib/subfig/subfig.pdf). The documentation on CTAN (linked) shows its usage.
7
https://tex.stackexchange.com/users/125
1246
870
https://tex.stackexchange.com/questions/1230
39
(Repost from [Stack Overflow](https://stackoverflow.com/questions/3423881/reference-name-of-description-list-item-in-latex)) I'd like to refer to a description list item by name instead of number. To that effect, I've added labels to each item, but when referencing them I only get the name of the section, not of the list item. How can I change it to show a custom label for each item? ``` \section{Definitions} \begin{description} \item [Vehicle\label{itm:vehicle}] Something \item [Bus\label{itm:bus}] A type of \nameref{itm:vehicle} \item [Car\label{itm:car}] A type of \nameref{itm:vehicle} smaller than a \nameref{itm:bus} \end{description} ``` The result is something like this: > > **1 Definitions** > > > **Vehicle** Something > > **Bus** A type of Definitions > > **Car** A type of Definitions smaller than a Definitions > > > I'd like to have the following: > > **1 Definitions** > > > **Vehicle** Something > > **Bus** A type of Vehicle > > **Car** A type of Vehicle smaller than a Bus > > > An alternative solution would be to use subsections *and display them as a definition list*. Anyone know how to do it? The best answer on Stack Overflow referenced a [\makeatletter](https://stackoverflow.com/questions/2767389/referencing-a-theorem-like-environment-by-its-name/3303192#3303192) hack: ``` \makeatletter \def\namedlabel#1#2{\begingroup \def\@currentlabel{#2}% \label{#1}\endgroup } \makeatother ... \section{Definitions} \begin{description} \item [Vehicle\namedlabel{itm:vehicle}{Vehicle}] Something \item [Bus\namedlabel{itm:bus}{Bus}] A type of \ref{itm:vehicle} \item [Car\namedlabel{itm:car}{Car}] A type of \ref{itm:vehicle} smaller than a \ref{itm:bus} \end{description} ``` It works, with the caveat that the links lead back to the section header, not to the list item. It would be nice to use something native which doesn't break `\ref`.
https://tex.stackexchange.com/users/602
Reference name of description list item in LaTeX
true
To expand a bit on some of the other answers: here is a modification that does not change the syntax of the description environment: ``` \documentclass{article} \usepackage{hyperref} \usepackage{nameref} \makeatletter \let\orgdescriptionlabel\descriptionlabel \renewcommand*{\descriptionlabel}[1]{% \let\orglabel\label \let\label\@gobble \phantomsection \edef\@currentlabel{#1}% %\edef\@currentlabelname{#1}% \let\label\orglabel \orgdescriptionlabel{#1}% } \makeatother \begin{document} \section{Definitions} \begin{description} \item [Vehicle\label{itm:vehicle}] Something \item [Bus\label{itm:bus}] A type of \ref{itm:vehicle} \item [Car\label{itm:car}] A type of \ref{itm:vehicle} smaller than a \ref{itm:bus} \end{description} The item `\ref{itm:bus}' is listed on page~\pageref{itm:bus} in section~\nameref{itm:bus}. \end{document} ```
35
https://tex.stackexchange.com/users/565
1248
871
https://tex.stackexchange.com/questions/1247
21
I'd like to modify the contents of my headers and footers - e.g., to display the current chapter and/or section title or to change the pagination alignment. How can I do that? I've noticed the packages [`fancyhdr`](http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html) and `scrpage2` (part of the [`KOMA-Script`](http://www.ctan.org/tex-archive/help/Catalogue/entries/koma-script.html)-bundle) - are they interchangeable, or are there situations where I should prefer one package to the other?
https://tex.stackexchange.com/users/510
How to customize headers and footers?
true
* `fancyhdr` is the classical package. The last change has been [Version 4.1 2022-11-09](https://ctan.org/pkg/fancyhdr). * `scrpage2` has been available for years but is also developing currently together with the modern `KOMA-script` classes. Naturally it is better integrated with those classes but it may be used with other classes as well. `fancyhdr` provides a head rule and a foot rule, but `scrpage2` offers head top line, head separation line, foot separation line and foot bottom line. `scrpage2` comes with a sophisticated interface to specify own styles, beginning with a simple `\deftripstyle` taking 9 parameters complemented by an expert interface: `\defpagestyle`, `\newpagestyle`, `\renewpagestyle` and `\providepagestyle`, see documentation. To ease work with different styles `scrpage2` reads and processes a file `scrpage.cfg` where several styles for many projects might be defined. So, I would prefer `scrpage2` if it's available. I'm sure it can replace `fancyhdr`. The latter package might be preferred if the requirements aren't too sophisticated and quick learning is expected. Note: if you use `fancyhdr` and [`geometry`](http://ctan.org/pkg/geometry), [load geometry first](https://tex.stackexchange.com/questions/33874/geometry-fancyhdr-fancyfootc-thepage-is-not-really-centered).
24
https://tex.stackexchange.com/users/213
1250
872
https://tex.stackexchange.com/questions/1251
19
I'm getting married this coming winter, and it's about time to think about wedding invitations. Are their any document classes or packages suitable for this purpose?
https://tex.stackexchange.com/users/52
Are there any packages suited for making wedding invitations?
true
There's [`gcard`](http://ctan.org/pkg/gcard), intended for typesetting greeting cards with front and back cover and inside left and right page. All is arranged on a sheet to be folded. See also [Creating Leaflets and Greeting Cards](http://texcatalogue.ctan.org/bytopic.html#leaflets) in the TeX Catalogue.
14
https://tex.stackexchange.com/users/213
1252
873
https://tex.stackexchange.com/questions/1223
27
Is there a test for the different styles within maths mode? What I *really* want is to be able to save the current style to reinvoke it later on, but a `\if` along the lines of `\ifmmode` would work just as well. In the specific example, I want to measure how big something will be when displayed in maths mode, so I do: ``` \settoheight{\mathheight}{some bit of maths} ``` except that it complains because the `some bit of maths` gets put in a box and measured, and the box doesn't know that it's maths. So instead I put: ``` \settoheight{\mathheight}{\(some bit of maths\)} ``` except that then I get the wrong answer if this is used in displayed maths. So ideally, I want: ``` \ifdisplaystyle \let\currentstyle\displaystyle \else \iftextstyle \let\currentstyle\textstyle ... \fi \fi \settoheight{\mathheight}{\(\currentstyle some bit of maths\)} ``` and then I'll be happy. Is there such a test? --- Okay, so `\mathchoice` is clearly the way to go (thanks Martin!), but its behaviour is a little odd and since I want to use it to define a macro depending on which mode I'm in, this oddity is quite important. Here's the code: ``` \newcommand{\mathtest}{% \gdef\name{a}% \mathchoice{% \name \gdef\name{b}% }{% \name \gdef\name{c}% }{% \name \gdef\name{d}% }{% \name \gdef\name{e}% }% \name} \[ \mathtest \] ``` If `\mathchoice` behaved like `\if`, this ought to print `ab`. But it prints `ae`. *All* the options to `\mathchoice` get processed (which makes me wonder a bit how it works, but that's by-the-by). So, is there an obvious way to make `\mathchoice` behave a little more like `\if`?
https://tex.stackexchange.com/users/86
Is there a test for the different styles inside maths mode?
true
Lets call such a macro mathsettoheight. I'll keep things simple and define only mathsettoheight (and not mathsettowidth and mathsettodepth). IIUC, you want this macro to behave like ``` \mathsettoheight{\dimen}{content} ``` First, lets consider a simplified version of \settoheight ``` \def\settoheight#1#2% {\setbox\@tempboxa\hbox{{#2}}% #1=\ht\@temboxa \setbox\@temboxa\box\voidb@x} ``` The only change that we need to do in \mathsettoheight is to set the box correctly. Instead of ``` \hbox{#2} ``` use ``` \hbox{$\mathpalette{}{#2}$} ``` \mathpalette is a shortcut used for convenience and is usually defined by all macro packages (plain TeX, LaTeX, ConTeXt) as ``` \def\mathpalette#1#2{% \mathchoice {#1\displaystyle{#2}}% {#1\textstyle{#2}}% {#1\scriptstyle{#2}}% {#1\scriptscriptstyle{#2}}} ``` A minor improvement is to use ``` \hbox{$\m@th\mathpalette{}{#2}$} ``` where \m@th sets the math surround to zero (useful if you are interested in the width of the content). And thats it. The complete definition with you example is ``` \documentclass{amsart} \makeatletter \def\mathsettoheight#1#2% {\setbox\@tempboxa\hbox{{#2}}% #1=\ht\@temboxa \setbox\@temboxa\box\voidb@x} \def\mathsettoheight#1#2% {\setbox\@tempboxa\hbox{$\m@th\mathpalette{}{#2}$}% #1=\ht\@tempboxa \setbox\@tempboxa\box\voidb@x} \makeatother % Test case \newlength\mathheight \newcommand*\intheight{% \mathsettoheight{\mathheight}{\int} \the\mathheight } \begin{document} $\intheight$ \begin{align} \text{displaystyle}&={\displaystyle\text{\intheight}}\\ \text{textstyle}&={\textstyle\text{\intheight}} \\ \text{scriptstyle}&={\scriptstyle\text{\intheight}} \\ \text{scriptscriptstyle}&={\scriptscriptstyle\text{\intheight}} \end{align} {\obeylines \text{displaystyle}= $\displaystyle\text{\intheight}$\\ \text{textstyle}=$\textstyle\text{\intheight}$ \\ \text{scriptstyle}=$\scriptstyle\text{\intheight}$ \\ \text{scriptscriptstyle}=$\scriptscriptstyle\text{\intheight}$ \endgraf} \end{document} ```
15
https://tex.stackexchange.com/users/323
1253
874
https://tex.stackexchange.com/questions/1254
7
I suppose this is a simple matter, but I'm still finding my way around where to put things in LaTeX. I would like to right-align (i.e. flush to right) the contents of an article's title page. By default it's centered. My preamble (leaving out other stuff) is basic: ``` \documentclass[12pt,titlepage]{article} \title{My Title} \author{This is me} \date{Aug 2010} ``` I read in the LaTeX wikibook (wonderful resource) that one way to do that is to create a custom title within ``` \begin{titlepage} ... \begin{flushright} % title elements here \end{flushright} \end{titlepage}. ``` But this is a heavy-handed solution and I hope there is a simpler way. Thank you.
https://tex.stackexchange.com/users/564
How to right-align a title (without creating a complete custom title page)?
false
I’m not sure this is really “easier”, but how about something like: ``` \usepackage{titling} \pretitle{\begin{flushright}\LARGE} \posttitle{\par\end{flushright}\vskip 0.5em} \preauthor{\begin{flushright}\large \lineskip 0.5em} \postauthor{\par\end{flushright}} \predate{\begin{flushright}\large} \postdate{\par\end{flushright}} ``` along with the regular \maketitle command? See the [titling package](http://ctan.org/pkg/titling) documentation for more info. (Otherwise you’ll need to switch to a class that has its own mechanism for this, like memoir or KOMA script article.)
14
https://tex.stackexchange.com/users/411
1257
875
https://tex.stackexchange.com/questions/1255
6
[This question](https://tex.stackexchange.com/questions/1254/how-to-right-align-a-title-without-creating-a-complete-custom-title-page) asks how to align titlepage elements to the right. I was trying out a possible an answer to it when to my surprise, my solution *almost* worked. (I was expecting success or abject failure.) The code ``` document\documentclass[notitlepage]{article} \title{\hfill{}Title} \author{\hfill{}Author} \date{\hfill{}Date} \begin{document} \maketitle \end{document} ``` sets the title and date flush right as I'd hoped. However, 'Author' is set centred, as though I'd not put in the `\hfill` at all. This surprised me---I'd have expected my idea to work for all three fields of the title page or none. Why does `\author` behave differently in conjunction with `\hfill` in `\maketitle` than do `\title` and `\date`?
https://tex.stackexchange.com/users/93
Why does \author respond differently to \hfill than do \date and \title in \maketitle?
true
The default \maketitle command puts the author field inside a centered tabular environment, but not the title or date. Don’t ask me why. You can customize the command with the titling package. See [this thread](https://tex.stackexchange.com/questions/1254/how-to-right-align-a-title-without-creating-a-complete-custom-title-page) for info on using it to right-align a title.
8
https://tex.stackexchange.com/users/411
1258
876
https://tex.stackexchange.com/questions/1223
27
Is there a test for the different styles within maths mode? What I *really* want is to be able to save the current style to reinvoke it later on, but a `\if` along the lines of `\ifmmode` would work just as well. In the specific example, I want to measure how big something will be when displayed in maths mode, so I do: ``` \settoheight{\mathheight}{some bit of maths} ``` except that it complains because the `some bit of maths` gets put in a box and measured, and the box doesn't know that it's maths. So instead I put: ``` \settoheight{\mathheight}{\(some bit of maths\)} ``` except that then I get the wrong answer if this is used in displayed maths. So ideally, I want: ``` \ifdisplaystyle \let\currentstyle\displaystyle \else \iftextstyle \let\currentstyle\textstyle ... \fi \fi \settoheight{\mathheight}{\(\currentstyle some bit of maths\)} ``` and then I'll be happy. Is there such a test? --- Okay, so `\mathchoice` is clearly the way to go (thanks Martin!), but its behaviour is a little odd and since I want to use it to define a macro depending on which mode I'm in, this oddity is quite important. Here's the code: ``` \newcommand{\mathtest}{% \gdef\name{a}% \mathchoice{% \name \gdef\name{b}% }{% \name \gdef\name{c}% }{% \name \gdef\name{d}% }{% \name \gdef\name{e}% }% \name} \[ \mathtest \] ``` If `\mathchoice` behaved like `\if`, this ought to print `ab`. But it prints `ae`. *All* the options to `\mathchoice` get processed (which makes me wonder a bit how it works, but that's by-the-by). So, is there an obvious way to make `\mathchoice` behave a little more like `\if`?
https://tex.stackexchange.com/users/86
Is there a test for the different styles inside maths mode?
false
This answer will only apply to LuaTeX and LuaLaTeX, but your question was quite general, so ... The `luatex` engine defines a primitive that allows you to query the current math style. This primitive is called `\mathstyle`, and when the value is queried (after `\ifnum`, for example) it returns a number between -1 (not in math mode), 0 (display style), and 7 (cramped scriptscript style). Luatex also defines four new primitives with `\cramped..` prefix: `\crampeddisplaystyle`, `\crampedtextstyle`, `\crampedscriptstyle`, `\crampedscriptscriptstyle`. These are like their non-prefixed cousins (`\displaystyle` ... `\scriptscriptstyle`) except that they explicitly switch to one of the 'cramped' math styles. Finally, there is the new primitive `\Ustack`, that is to be used as a prefix for `\over..` and `\atop..` constructs (which is what commands like `\frac` and `\binom` eventually expand into), like so ``` \Ustack {a \over b} ``` If you do not do this, `\mathstyle` will return the wrong value in the initial part of `{... \over ...}`, as explained by Aditya. All combined together, these primitives allow code like this: ``` \ifnum\mathstyle=\textstyle \message{normal text style} \else \ifnum\mathstyle=\crampedtextstyle \message{cramped text style} \fi \fi ``` and this: ``` \def\cramped#1% switch the argument to a cramped math style {{\ifcase\mathstyle \crampeddisplaystyle \or \or % 0 -> 1 \crampedtextstyle \or \or % 2 -> 3 \crampedscriptstyle \or \or % 4 -> 5 \crampedscriptscriptstyle \fi % 6 -> 7 #1}} ``` and even allow you to define a version of `\mathchoice` that does not typeset everything four times: ``` \def\mathchoice#1#2#3#4% {{\ifcase\mathstyle #1\or #1\or #2\or #2\or #3\or #2\or #4\or #4\else #2\fi}} ``` All this can currently only be used if your underlying engine is `luatex`, but it is hoped that this extension will eventually become supported by `xetex` as well.
11
https://tex.stackexchange.com/users/89
1261
877
https://tex.stackexchange.com/questions/553
461
I'm getting the impression from reading the answers written by some of the real experts here that there are quite a few little packages that just tweak LaTeX2e's default behaviour a little to make it more sensible here and there. Rather than try to pick these up one by one as I read answers to questions (and thus risk missing them), I thought I'd ask up front what LaTeX2e packages people load by default in (almost) every document. As this is a "big list" question, I'm making it CW. I don't know if there are standard rules across all SE/SO sites for such questions, but on MathOverflow the rule is generally: one thing (in this case, package) per answer. I guess that if a couple of packages really do go together then it would be fine to group them. This is perhaps a little subjective and a little close to the line, so I'll not be offended if it gets closed or voted down! (But *please* explain why in the comments.) Also see our community poll question: [“I have used the following packages / classes”](https://tex.meta.stackexchange.com/a/1574/ "TeX Community Polls")
https://tex.stackexchange.com/users/86
What packages do people load by default in LaTeX?
false
I have a whole slew of commands that that provide a nice short hand for standard idioms of mine. (and which if I ever share tex source would make someone grumpy if i made it a package) So the meta habit is: whatever personal short hands you think would be nice, have them defined at the top of your template file!
0
https://tex.stackexchange.com/users/316
1262
878
https://tex.stackexchange.com/questions/1260
18
I have an ellipse in a TikZ diagram and I would like to indicate a direction using an arrow head, but do not wish to draw the path leading up to the arrow head. I currently have ``` \draw[->] (0,2) arc (90:45:1 and 2); \draw (0,0) ellipse (1 and 2); ``` but I'd like the arc leading up to the arrow to be invisible (so it is not redrawing over the ellipse), so that it's just the head showing. What is the best way to achieve this?
https://tex.stackexchange.com/users/136
Drawing arrow heads without the tails in TikZ?
false
Any easy to type but slightly hackish solution is to use a very small path for the arrow: ``` \begin{tikzpicture} \draw (0,0) ellipse (1 and 2); \draw[->] (0,0) ++ (45:1 and 2) arc (45:44.9:1 and 2); \end{tikzpicture} ``` To get a flexible "clean" solution one can use markings: ``` \usetikzlibrary{decorations.markings} \begin{tikzpicture} \draw (0,0) ellipse (1 and 2); \draw[decoration={markings,mark=at position 1 with {\arrow{>}}},decorate] (0,2) arc (90:45:1 and 2); \end{tikzpicture} ``` The marking can also be directly applied to the ellipse (which is drawn counterclockwise from 0 degrees): ``` \begin{tikzpicture} \draw [decoration={markings,mark=at position 1/8 with {\arrowreversed{>}}},postaction={decorate}] (0,0) ellipse (1 and 2); \end{tikzpicture} ``` See Section 27.6 of the TikZ manual for the general syntax of the `mark` option.
6
https://tex.stackexchange.com/users/83
1263
879
https://tex.stackexchange.com/questions/1244
9
I'm creating a set of documents which are contained in different LaTeX source files and are going to be compiled into different PDF files. Each one can have its own index, generated using the usual `makeindex` procedure. But since this documents cover related topics, I'd like to be able to produce one master index that contains all the terms from all the documents. Obviously the references in the index, instead of just being page numbers, will have to include both the page number and some sort of identifier for the document. Is there a way to do this? Of course, I'm sure I could write a script to post-process the `.idx` files, but I'd prefer to use something existing. If I need to dump `makeindex` and use some alternative, that should be fine.
https://tex.stackexchange.com/users/125
How to produce a combined index from multiple documents?
true
It is possible to do this without any post processing except concatenation of the `.idx` files for the generation of the master index, but it needs a bit of macro juggling. The trick is that in the separate documents, you have to make some low-level changes to the `\index` command so that it includes what makeindex calls 'encapsulation'. You can do this by adding a | symbol followed by a macro name (without preceding backslash). Then you can give the `\jobname` as an argument to that macro name, like so: ``` \documentclass{article} \usepackage{makeidx} \makeindex \let\LATEXindex\index % save old definition to prevent recursion \renewcommand\index[1]{\LATEXindex{#1|docname{\jobname}}} ``` This will create `.idx` entries that look like this: ``` \indexentry{alpha|docname{testdoc}}{1} ``` which, after running `makeindex`, is converted into the following `.ind` entry: ``` \item alpha, \docname{testdoc}{1} ``` Now, back in the separate documents, you have to add a definition for the `\docname` macro, for example like this: ``` \newcommand\docname[2]{#2} ``` After that, the separate documents should compile as before, except for any index entries that already used encapsulation (you will have to fix those manually). Now for the global index creation all you have to do is concatenate all the separate `.idx` files into a single file, run makeindex on the result, and use an input file like this: ``` \documentclass{article} \usepackage{makeidx} \newcommand\docname[2]{#1: #2} \begin{document} \printindex \end{document} ``` Be careful: this document should not contain a `\makeindex` command itself, or at least you should never run `makeindex` for this file, as that will overwrite the combined `.ind` file.
9
https://tex.stackexchange.com/users/89
1265
880
https://tex.stackexchange.com/questions/1260
18
I have an ellipse in a TikZ diagram and I would like to indicate a direction using an arrow head, but do not wish to draw the path leading up to the arrow head. I currently have ``` \draw[->] (0,2) arc (90:45:1 and 2); \draw (0,0) ellipse (1 and 2); ``` but I'd like the arc leading up to the arrow to be invisible (so it is not redrawing over the ellipse), so that it's just the head showing. What is the best way to achieve this?
https://tex.stackexchange.com/users/136
Drawing arrow heads without the tails in TikZ?
true
You can use path decorations: ``` \documentclass{article} \usepackage{tikz} \usetikzlibrary{decorations.markings} \begin{document} \begin{tikzpicture}[decoration={ markings, mark=at position 0.2 with {\arrow{<}}} ] \draw[postaction={decorate}] (0,0) ellipse (1 and 2); \end{tikzpicture} \end{document} ```
11
https://tex.stackexchange.com/users/565
1267
881
https://tex.stackexchange.com/questions/1266
6
Is it possible to define a `verbatim{}` command that I could use instead of the environment? ``` \begin{verbatim} \end{verbatim} ```
https://tex.stackexchange.com/users/617
is it possible to define a verbatim{} command?
false
Why not use `\verb`? ``` \documentclass{article} \begin{document} Foo \verb|\bar| baz \end{document} ```
5
https://tex.stackexchange.com/users/565
1268
882
https://tex.stackexchange.com/questions/1229
8
(Update: I learned that this kind of open question is not supposed to be asked here at tex.stackexchange.com, so I will refrain from furthering the discussion here and invite contributions instead via the link provided in the next line.) [Overheard today](http://ff.im/oNYyz): > > I believe what is likely to happen is that some alternative language will be developed which is syntactically similar to TeX (since this will make it easier for mathematicians and physicists to transition to it) with less focus on typesetting but far richer semantically, allowing a smoother transition to MathML. > > > A brief Google search revealed that a number of initiatives have been started along these lines, e.g.: * [SALT (Semantically Annotated LaTeX)](http://salt.semanticauthoring.org/) * [Hermes](http://hermes.aei.mpg.de/) * [STeX](http://www.tug.org/texlive/devsrc/Master/texmf-dist/source/latex/stex/) * [SnuggleTeX](http://www2.ph.ed.ac.uk/snuggletex/UpConversionDemo) My question, now, is how to get an overview what the comparative strengths and weaknesses of these (and other) approaches are, what communities and applications drive them, and what else to consider. I would be surprised if there were a simple answer to any of these, so I expect to split this thread up into simpler ones as the discussion develops.
https://tex.stackexchange.com/users/44890
Semantic TeX - where are we heading?
false
In the context of this Pete Sefton's [response](http://ptsefton.com/2010/08/07/the-next-wave-in-scholarly-word-processors.htm) to my original post is very interesting as well describing a Java plugin to really make the web properly editable. Slightly different direction again but worth considering.
2
https://tex.stackexchange.com/users/619
1269
883
https://tex.stackexchange.com/questions/1264
33
The ratio of markup to content in a beamer presentation is fairly high relative to a standard LaTeX document. What strategies do you use for speeding up the task of typing and editing beamer presentations?
https://tex.stackexchange.com/users/151
Typing and editing Beamer presentations
true
These are some of the things I do * Have [semantic](https://tex.stackexchange.com/questions/605/what-is-the-deal-about-these-semantic-vs-syntactic-commands) markup for typing equations. It probably depends on your field, or the target audience, but on some of my slides about half of the content is equations. Defining macros that explain the meaning rather than the syntax of my math formulas helps to keep the source readable and often also concise. (And this is not only true for slides but for any kind of document!) * Use the `itemize` and "block environments" for pretty much all the text I need. You don't really need any bloat of markup for these. * Don't abuse overlays. Probably most of the code and "hacks" you find in the sources of a beamer presentation are because of this. I tend to use overlays only sporadically, perhaps twice, definitely not more than five times in the whole presentation. Some advice I once overheard about making slides: "Don't play striptease with your audience." * Code for TikZ figures go outside in their own `picture.tex` which is then `\input`-ed at the appropriate place. * And define macros. For the ocasional times when I need to do some "hack" that will be needed in many places all over the presentation (for example once I wanted to have some particular formulas display with some color and framed by a box) I would define, of course, a macro just once to do the dirty work, and then use the macro everywhere I need in the slides.
20
https://tex.stackexchange.com/users/169
1270
884
https://tex.stackexchange.com/questions/1254
7
I suppose this is a simple matter, but I'm still finding my way around where to put things in LaTeX. I would like to right-align (i.e. flush to right) the contents of an article's title page. By default it's centered. My preamble (leaving out other stuff) is basic: ``` \documentclass[12pt,titlepage]{article} \title{My Title} \author{This is me} \date{Aug 2010} ``` I read in the LaTeX wikibook (wonderful resource) that one way to do that is to create a custom title within ``` \begin{titlepage} ... \begin{flushright} % title elements here \end{flushright} \end{titlepage}. ``` But this is a heavy-handed solution and I hope there is a simpler way. Thank you.
https://tex.stackexchange.com/users/564
How to right-align a title (without creating a complete custom title page)?
true
A dirty solution would be: ``` \begingroup \let\center\flushright \let\endcenter\endflushright \maketitle \endgroup ``` Then it would be right aligned, the author, as it is in a table, not quite. Here you can just define the author like this: `\author{This is me\hspace*{-\tabcolsep}}`. But I personally would use the `titling` package, as frabjous already suggested.
6
https://tex.stackexchange.com/users/353
1271
885
https://tex.stackexchange.com/questions/1266
6
Is it possible to define a `verbatim{}` command that I could use instead of the environment? ``` \begin{verbatim} \end{verbatim} ```
https://tex.stackexchange.com/users/617
is it possible to define a verbatim{} command?
false
If you need further functionality, have a look at the [`fancyvrb`](http://ctan.org/pkg/fancyvrb) package, it provides further environments and commands for flexible handling of verbatim text.
3
https://tex.stackexchange.com/users/213
1272
886
https://tex.stackexchange.com/questions/1273
20
Is it possible to load some package from a .sty file only if some option is selected? (Naive approach `\DeclareOption{something}{\RequirePackage{something}}` doesn't work.)
https://tex.stackexchange.com/users/85
Loading a package conditionally
true
Use `\if...` switches, I do something like ``` \newif\if@loadsomething\@loadsomethingfalse \DeclareOption{something}{\@loadsomethingtrue} ... \ProcessOptions\relax \if@loadsomething \RequirePackage{something} \fi ``` I haven't myself completely figured out how the "options" mechanism works, or why your example doesn't, but I guess it has to do with the precise moment when the options are being executed and the state of TeX's context when that happens.
23
https://tex.stackexchange.com/users/169
1274
887
https://tex.stackexchange.com/questions/1264
33
The ratio of markup to content in a beamer presentation is fairly high relative to a standard LaTeX document. What strategies do you use for speeding up the task of typing and editing beamer presentations?
https://tex.stackexchange.com/users/151
Typing and editing Beamer presentations
false
* Speed up typing using an editor with auto-completion and templates for environments. * Perhaps additionally use a utility like [AutoHotkey](http://www.autohotkey.com/). This is a free and Open Source hotkey utility for Windows. Just define a key combination for + frame environments + itemize environments, perhaps with already some empty items inside + enumerate environments + various block environments, columns, math, ... * Extend the auto-completion of the editor by typical beamer commands and environments, especially long words like `beamerboxesrounded` etc. * If you expect you'll create several similar similar presentations, create a folder or project containing a presentation template containing preamble and dummy frames. * Put settings of your preamble into a file and reuse it. You could "install" that file in your TEXMFHOME directory, available for all your presentations. If you decide to change your style, all previously created presentations could benefit.
5
https://tex.stackexchange.com/users/213
1275
888
https://tex.stackexchange.com/questions/1266
6
Is it possible to define a `verbatim{}` command that I could use instead of the environment? ``` \begin{verbatim} \end{verbatim} ```
https://tex.stackexchange.com/users/617
is it possible to define a verbatim{} command?
false
As Stefan has said, `fancyvrb` is usually the way to go. However, it’s not straightforward to use in an environment since the relevant macro is undocumented1). Here’s a minimal working example: ``` \documentclass{article} \usepackage{fancyvrb} \newenvironment{codeframe}[1] { % First, we tell fancyvrb that we're inside a verbatim environment. \VerbatimEnvironment \textbf{Source code ``#1'':}\\ % Now we start the actual environment: \begin{Verbatim}[frame=single]% } {\end{Verbatim}} \begin{document} \begin{codeframe}{example} this->is(a[source]).code(); \end{codeframe} \end{document} ``` The comment `%` right behind the `\begin{Verbatim}…` is important – otherwise, the compiler will complain with horrible, undecipherable error messages. The same will happen for any other error you make, so be careful. The `\VerbatimEnvironment` command is equally crucial, and undocumented. --- 1) For simple cases, using the (documented) `\DefineVerbatimEnvironment` may be enough, but the above example cannot be written with it.
6
https://tex.stackexchange.com/users/42
1277
889
https://tex.stackexchange.com/questions/1264
33
The ratio of markup to content in a beamer presentation is fairly high relative to a standard LaTeX document. What strategies do you use for speeding up the task of typing and editing beamer presentations?
https://tex.stackexchange.com/users/151
Typing and editing Beamer presentations
false
You've got some good answers already. Here's my 2c. As the question says, the markup to content ratio is way higher is a beamer presentation than a "regular" document, and that cannot be avoided. Attending to the difference is the medium (page vs. screen) makes it inevitable that many choices that are better left to a TeX engine for printed content must be made by the user for the screen. That said, the more markup, the more likely you've got a presentation using bells, whistles, and gongs in place of content. Much use of markup past frames and lists is definitely a smell for me that I need to focus on the content, not on the wizz bang of its display. Having sat through a few (a few, but enough) presentations from the land of Power Point, it seems obvious to be that a glitter or wipe slide transition doesn't stand a chance of hiding the ugly fact that the content is poor. The more "cuteness" on the screen, the harder it is to focus on the content, and, typically, the less content there is to focus upon. So, if you are finding your beamer presentation onerous to code, your audience is likely to find it onerous to sit through. Be minimal and be clear.
9
https://tex.stackexchange.com/users/93
1280
890
https://tex.stackexchange.com/questions/1279
26
I’m a big fan of ampersands (possibly too much …) and I’d like to replace all mentions of “*et al.*” (included in citations) by `\& al.` – both *in the main text* (I use `natbib` citations of the form `[Author1 et al., 1999]`), *and in the actual bibliography*? How can I do that, considering that BibTeX is inserting the words for me, and I have no control over the text? Preferably, I’d like to do this *without* creating my own bibliography style sheet (since I want to make this work regardless of the actual BibTeX style that is used), but if anyone can tell me how I need to edit the style sheet file, that would be fine as well (`makebst` doesn’t seem to offer an option for this …).
https://tex.stackexchange.com/users/42
Replace `et al.` with `\& al.`
false
What type of citation style are you using, i.e. author name and year or numbers? If you are using numbered citations then you only need to make changes to the actual bibliography listing and the following method should work: 1. Wait until the very end once you are sure that you don't need to run BibTeX again, i.e. when there are no further modifications to the .bib file needed and all the citations are in place in the .tex file. 2. Do the usual LaTeX->BibTeX->LaTeX dance one last time just to be sure. 3. Open the .bbl file in an editor and do a search and replace on "et al." Now, next time you run LaTeX your bibliography will have your replacements in it. Be aware that running BibTeX again by accident will overwrite the .bbl file, so you might want to keep a copy of it in another directory just in case. Alternatively, you can just remove the bibliography commands from your .tex file and copy and paste the contents of the .bbl file in its place to have an old fashioned non-BibTeX bibliography. BTW, editing the .bbl file like this can be a good way to correct minor annoyances in the way BibTeX works without writing your own stylesheet, but if you find yourself doing it a lot then it is probably time to bite the bullet and write one. If you are using author and date style citations then I don't know how to change the "et al."s appearing in the main document itself without going in to the style file.
0
https://tex.stackexchange.com/users/376
1283
891
https://tex.stackexchange.com/questions/1282
14
I usually create figures for my articles in Matlab: various plots of numerical and analytical solutions. One thing that I don't like about it is that the font is different in the figure and in the resulting paper. Another thing is that it is a pain to put nicely typeset math into the figure directly. My solution: [psfrag](http://www.ctan.org/tex-archive/help/Catalogue/entries/psfrag.html). `psfrag` allows text in a postscript file to be replaced by LaTeX so I would put a label `AA` (for example) where I want it in the figure, and then in LaTeX write `\psfrag{AA}{$my formula$}`. This isn't such a great solution because it depends on `psfrag` (and journals do not like that), so I use [fragmaster.pl](http://www.ctan.org/tex-archive/support/fragmaster/) which creates the modified pdf and eps files locally from the master file and an auxiliary file with the `\psfrag` commands...I then `\includegraphics` these generated files in my article. This solution is a *little* roundabout, and so I'll repeat my question from the title: > > What is your complete solution for generating nice figures using an external program (for example Matlab)? > > > --- **Added Later:** After several answers were posted I noticed that none specifically addressed the issue of journals. Several times I've had editors come back to me saying something to the effect of "we'd like to publish your paper, please make sure that the figures you give us are in final form and no changes happen to them during typesetting"... If would be so kind (and if you know the answer) please modify your answer to include information relating to how journals like your solution.
https://tex.stackexchange.com/users/117
What do people use for modifying figures?
false
I have two solutions: 1. Some packages, like xfig, allow you to put labels on your figures using LaTeX fonts so it doesn't look too bad. This has the disadvantage that the font size changes when you scale the image, which can mean that you have to do it several times to do it right. 2. Convert the output of your external program into an .eps or .pdf file without any labelling. Then use the picture environment to place the labels on the figure. This looks something like: ``` \begin{figure} \begin{picture}(100,100) \put(0,0){\includegraphics[scale = 0.7]{myfigure.eps}} \put(20,30){My $x$ axis label} \put(50,40){Some other label $E = mc^2$} \end{picture} \caption{The Pope is Catholic} \end{figure} ``` This has the advantage that it is easy to change the labeling, but of course one has to experiment a bit to get the placement right. I've never had any problems with journals objecting to this usage of the picture environment (although some don't want you to use it to actually draw pictures as they prefer to have the figures in separate files). If they do object then you can always just make a small LaTeX document with just the picture in it and convert the output to .eps or .pdf.
1
https://tex.stackexchange.com/users/376
1284
892
https://tex.stackexchange.com/questions/1281
4
Is there a way to find out (from Tex) the page number corresponding to a particular location in the source file? Using a macro in the file at that location is fine. My motivation is that I'd like to (eventually) get a system working for partial compilation for Beamer presentations. Since I typically only change one or two frames between compilations, it's pretty inefficient that the entire document is recompiled every time (modulo tricks like conditional compilation, which help a bit). If I know which pages correspond to each frame, it should be possible to splice together an older compiled version with the new content. EDIT: Sorry, I should have been more specific. I don't want any output in the pdf, rather I want to get it some other way (through a log file probably) so that I can access it from an external program.
https://tex.stackexchange.com/users/490
Mapping source code to page numbers in output
false
This `\label{this}` is on page`~\pageref{this}` (needs multiple compiling).
1
https://tex.stackexchange.com/users/nan
1285
893
https://tex.stackexchange.com/questions/1282
14
I usually create figures for my articles in Matlab: various plots of numerical and analytical solutions. One thing that I don't like about it is that the font is different in the figure and in the resulting paper. Another thing is that it is a pain to put nicely typeset math into the figure directly. My solution: [psfrag](http://www.ctan.org/tex-archive/help/Catalogue/entries/psfrag.html). `psfrag` allows text in a postscript file to be replaced by LaTeX so I would put a label `AA` (for example) where I want it in the figure, and then in LaTeX write `\psfrag{AA}{$my formula$}`. This isn't such a great solution because it depends on `psfrag` (and journals do not like that), so I use [fragmaster.pl](http://www.ctan.org/tex-archive/support/fragmaster/) which creates the modified pdf and eps files locally from the master file and an auxiliary file with the `\psfrag` commands...I then `\includegraphics` these generated files in my article. This solution is a *little* roundabout, and so I'll repeat my question from the title: > > What is your complete solution for generating nice figures using an external program (for example Matlab)? > > > --- **Added Later:** After several answers were posted I noticed that none specifically addressed the issue of journals. Several times I've had editors come back to me saying something to the effect of "we'd like to publish your paper, please make sure that the figures you give us are in final form and no changes happen to them during typesetting"... If would be so kind (and if you know the answer) please modify your answer to include information relating to how journals like your solution.
https://tex.stackexchange.com/users/117
What do people use for modifying figures?
false
Use TikZ ;-) Okay, I know that's dodging the question a bit, but I create essentially all the graphics for my documents in TikZ these days, including simple function plots. Elementary functions can be directly plotted by the `\plot` command in TikZ, and if that doesn't work, TikZ is able to generate a plot using data in an external text file, so you can export the raw numeric data from Matlab and create the plot in TikZ. For more complicated things like 2D shadings and 3D plots, I've done something like exporting to PStricks and manually editing the output to replace the labels generated by the program with LaTeX labels. For programs that don't have a PStricks exporter (which I think might include Matlab), I can usually export my graphics as SVG (or PS) files, import them into Inkscape, and from there export as PStricks - although I've recently discovered that there is a plugin for Inkscape that can export directly to TikZ, which should make things easier. (At least easier to modify the generated LaTeX source)
1
https://tex.stackexchange.com/users/125
1286
894
https://tex.stackexchange.com/questions/1287
11
I'm trying to use LaTeX to typeset a collection of short stories. I need something that lets each chapter have its own author or authors, with the author name(s) listed along with the chapter title, in the table of contents, and possibly also in running heads (I haven't decided yet how fancy I want to make the running heads). I'm not having any luck finding something that does this in CTAN, can anyone recommend anything?
https://tex.stackexchange.com/users/514
Author(s) per chapter - short story collection
true
Possibly (I haven't tried it myself) you can use memoir and `\chapterprecis`: From 6.5.8 of the [memoir manual](http://www.tex.ac.uk/ctan/macros/latex/contrib/memoir/memman.pdf): > > The command `\chapterprecis` prints its > argument both at the point in the > document where it is called, and also > adds it to the .toc file. For example: > > > > ``` > ... > \chapter{}% first chapter > \chapterprecis{Our hero is introduced; family tree; early days.} > ... > > ``` > > ... > > > > ``` > \chapterprecishere{<text>} > \chapterprecistoc{<text>} > > ``` > > The `\chapterprecis` command calls these two > commands to print the `<text>` in the > document (the `\chapterprecishere` > command) and to put it into the ToC > (the `\chapterprecistoc` command). These > can be used individually if required. > > > It also has commands to alter the font and style used for `\chapterprecis`.
6
https://tex.stackexchange.com/users/322
1288
895
https://tex.stackexchange.com/questions/1281
4
Is there a way to find out (from Tex) the page number corresponding to a particular location in the source file? Using a macro in the file at that location is fine. My motivation is that I'd like to (eventually) get a system working for partial compilation for Beamer presentations. Since I typically only change one or two frames between compilations, it's pretty inefficient that the entire document is recompiled every time (modulo tricks like conditional compilation, which help a bit). If I know which pages correspond to each frame, it should be possible to splice together an older compiled version with the new content. EDIT: Sorry, I should have been more specific. I don't want any output in the pdf, rather I want to get it some other way (through a log file probably) so that I can access it from an external program.
https://tex.stackexchange.com/users/490
Mapping source code to page numbers in output
true
Use `\typeout{Some identifier of your choice \thepage}`. This will make the typed out message appear in the console output and the `.log` file.
4
https://tex.stackexchange.com/users/93
1289
896
https://tex.stackexchange.com/questions/1290
35
Most examples I've seen are like this: ``` \begin{tabular}{@{}l r r@{}} ``` that is, with one `@{}` to the left of first column specifier and another `@{}` to the right of the last column specifier. Yet the "Not So Short Guide to LaTex" says this construct suppresses the *leading* space. I'm a bit confused. Which of the following interpretations are correct? * `@{}` suppresses the space on the side of the column specifier where it is placed (i.e. placed to the left of the specifier it suppresses the leading space and, conversely, placed to the right it suppresses the trailing space) * only `@{}` should be placed to the left of the first column and/or to the right of the last column, but not in between. * neither of the above. Unfortunately I'm not at a computer with LaTeX at this very moment so I cannot try it instead of asking. Thanks a lot.
https://tex.stackexchange.com/users/564
Clarification on the use of @{} with table headings
true
`@{}`suppresses the space between columns, that means after the preceding column and before the next. This way it affects also the space before the first column and after the last, if positioned there.
33
https://tex.stackexchange.com/users/213
1292
897
https://tex.stackexchange.com/questions/1291
76
I have the following LaTeX-document: ``` \documentclass[a4paper,11pt]{article} \usepackage[utf8x]{inputenc} \usepackage[ngerman]{babel} \usepackage[T1]{fontenc} \title{Sample} \author{Litb} \begin{document} \maketitle \begin{abstract} This is a report about my praxis phase at the company foo bar which I enjoyed. \end{abstract} \end{document} ``` Much to my frustration, compiling with `pdflatex` creates a document with Bitmap-fonts. The reader's font-list shows that it uses Type3 fonts. If I remove the `fontenc` loading, then I get a PDF using vector-fonts, but I heard that I should keep it, for having native German Umlauts working. Does anyone know how I can get vector fonts with T1, and why it keeps using bitmap fonts if I have that package-load line in it?
https://tex.stackexchange.com/users/580
Why are Bitmap-Fonts used automatically?
true
The standard Computer Modern fonts are in OT1 encoding, so when you request T1 font encoding bitmap fonts are used. Install the package [`cm-super`](http://ctan.org/pkg/cm-super) to get Computer Modern fonts with T1 support. There's no change in your document needed. Just install `cm-super` using the MiKTeX Package Manager or the TeX Live Manager. The package manager will update the font map files for you. Then recompile. * [cm-super MiKTeX package information](http://miktex.org/packages/cm-super) * [Installing with TeX Live](http://tug.org/texlive/pkginstall.html) * [cm-super for download on CTAN](http://ctan.org/pkg/cm-super) * [Debian package](http://packages.debian.org/de/squeeze/cm-super), works on Debian and Ubuntu for example with ``` sudo apt-get install cm-super ``` While this is a solution for fixing the default look, consider using a T1 supporting font, such as Latin Modern, which has been designed as successor to Computer Modern and thus is very similar but intended to be better. For the decision, this may help: * [Latin Modern vs. cm-super](https://tex.stackexchange.com/questions/1390/latin-modern-vs-cm-super) And for trying yourself, just add: ``` \usepackage{lmodern} ```
92
https://tex.stackexchange.com/users/213
1293
898
https://tex.stackexchange.com/questions/1282
14
I usually create figures for my articles in Matlab: various plots of numerical and analytical solutions. One thing that I don't like about it is that the font is different in the figure and in the resulting paper. Another thing is that it is a pain to put nicely typeset math into the figure directly. My solution: [psfrag](http://www.ctan.org/tex-archive/help/Catalogue/entries/psfrag.html). `psfrag` allows text in a postscript file to be replaced by LaTeX so I would put a label `AA` (for example) where I want it in the figure, and then in LaTeX write `\psfrag{AA}{$my formula$}`. This isn't such a great solution because it depends on `psfrag` (and journals do not like that), so I use [fragmaster.pl](http://www.ctan.org/tex-archive/support/fragmaster/) which creates the modified pdf and eps files locally from the master file and an auxiliary file with the `\psfrag` commands...I then `\includegraphics` these generated files in my article. This solution is a *little* roundabout, and so I'll repeat my question from the title: > > What is your complete solution for generating nice figures using an external program (for example Matlab)? > > > --- **Added Later:** After several answers were posted I noticed that none specifically addressed the issue of journals. Several times I've had editors come back to me saying something to the effect of "we'd like to publish your paper, please make sure that the figures you give us are in final form and no changes happen to them during typesetting"... If would be so kind (and if you know the answer) please modify your answer to include information relating to how journals like your solution.
https://tex.stackexchange.com/users/117
What do people use for modifying figures?
false
I use the [`overpic` package](http://www.ctan.org/tex-archive/help/Catalogue/entries/overpic.html), which essentially combines the abilities of the `\includegraphics` command and the `picture` environment. It is used very similarly to the `picture` environment to place arrows, text, math, circles, etc. as if you were drawing a figure manually in LaTeX, but it also accepts an image file as a parameter which it uses as the background on which to place these elements. So what I do is generate my graphics externally (e.g. with Matlab or Mathematica) in such a way that they don't include any labels or text. I then use those images as the background and place LaTeX-generated labels and other features on top of them. One particular advantage of this package is that with the `[grid]` option specified it generates a numbered grid over the background image to help you figure out where to place your elements. Once they're all in the right place, just remove the `[grid]` option.
3
https://tex.stackexchange.com/users/32
1294
899
https://tex.stackexchange.com/questions/1291
76
I have the following LaTeX-document: ``` \documentclass[a4paper,11pt]{article} \usepackage[utf8x]{inputenc} \usepackage[ngerman]{babel} \usepackage[T1]{fontenc} \title{Sample} \author{Litb} \begin{document} \maketitle \begin{abstract} This is a report about my praxis phase at the company foo bar which I enjoyed. \end{abstract} \end{document} ``` Much to my frustration, compiling with `pdflatex` creates a document with Bitmap-fonts. The reader's font-list shows that it uses Type3 fonts. If I remove the `fontenc` loading, then I get a PDF using vector-fonts, but I heard that I should keep it, for having native German Umlauts working. Does anyone know how I can get vector fonts with T1, and why it keeps using bitmap fonts if I have that package-load line in it?
https://tex.stackexchange.com/users/580
Why are Bitmap-Fonts used automatically?
false
The default fonts for T1 are bitmaps, as has been mentioned, and the most straightforward solution is to use cm-super, like Stefan said. Alternatively, you could use the Latin Modern fonts (package lmodern). It is based on Computer Modern and supports a *lot* of languages written in the Latin alphabet.
20
https://tex.stackexchange.com/users/170
1295
900
https://tex.stackexchange.com/questions/1278
6
I've just noticed that (most likely caused by upgrading to opensuse 11.3 with TexLive 2009) whenever I try to \includegraphics{filename.eps} an eps file, I get the error: ``` Unable to load picture or PDF file ``` So documents that built fine now do not build anymore. I use XeLaTeX, and using eps used to work just fine without any special setup (that I can recall). I quickly tried including the epstopdf package and dropping the eps extensions, but I think this is for (pdf)latex only, not xelatex. My xelatex version is: ``` This is XeTeX, Version 3.1415926-2.2-0.9995.2 (TeX Live 2009/openSUSE) ``` I'd like to be able to build my old documents again whilst having to do as little change as possible... I tried using `epstopdf` to convert my eps into pdf and then include the pdf. That works, but I'd prefer not having to convert all my eps and references to them if possible at all. Thanks for any suggestions **Edit:** not working on my Fedora13 system anymore either that uses version ``` 2.2-0.996 (Web2C 7.5.6) ``` Example: ``` \documentclass[a4paper,10pt]{article} \usepackage[utf8x]{inputenc} \usepackage{graphicx} \begin{document} \includegraphics[width=225pt,height=81pt]{magic2.eps} \end{document} ``` or bundled with an eps file [here](http://bschwehn.de/temp/epstest.tar.gz)
https://tex.stackexchange.com/users/322
can't \includegraphics eps files anymore with xelatex (used to work fine)
false
Convert the picture to PDF or PNG and remove the file name extension from the `\includegraphics` command, maybe that will work.
2
https://tex.stackexchange.com/users/215
1296
901
https://tex.stackexchange.com/questions/819
241
I would like to typeset a draft of my document with double linespacing so that my collaborators have space to write in their edits (with a pen). How do I do it?
https://tex.stackexchange.com/users/35
Double line spacing
false
The simplest possible way is probably by using the plain TeX macro `\openup` E.g. if you want double line spacing, add a single line-height to the line spacing (1em) using: ``` \openup 1em ``` (don't use any braces around the argument, the macro takes its argument as if you had written \openup=1em, i.e. an assignment of a dimension).j Following that macro's invocation all lines will have a single line's height extra to separate them, later on you can revert this effect by giving the negative argument: ``` \openup -1em ``` This macro works by increasing (`\advance`) the three parameters (`\lineskip`, `\baselineskip` and `\lineskiplimit`) that govern line spacing by the given amount. It's defined in `plain.tex` if you want to have a look at it.
22
https://tex.stackexchange.com/users/313
1299
902
https://tex.stackexchange.com/questions/1298
5
I read in the documentation of the [booktabs package](http://www.ctan.org/tex-archive/help/Catalogue/entries/booktabs.html) that `\abovetopsep` can be used to add some space between a table and its caption (instead of the lower-level `\vspace{}`). However, the exact placement of that option is not clear (at least to me). Is it standalone? Is it an attribute of toprule? After a few attempts, all failing with "Missing number, treated as zero" it's clear I don't know where to put it. I'm not going to list them as they are obviously incorrect.
https://tex.stackexchange.com/users/564
How to use \abovetopsep (to add space between a table's caption and tabular part)?
true
`\abovetopsep` is a length macro. Use [`\setlength`](http://texblog.net/help/latex/ltx-88.html) to modify it, place that in your preamble. For example: ``` \setlength{\abovetopsep}{1ex} ``` This space would be added above the line made with `\toprule`. If you specify the length in your preamble, no change within a table environment is required. Jut put the caption above, the space by `\abovetopsep` will follow automatically, then comes the toprule. A `\midrule`, also if placed at the top, would ignore this space.
4
https://tex.stackexchange.com/users/213
1300
903
https://tex.stackexchange.com/questions/1282
14
I usually create figures for my articles in Matlab: various plots of numerical and analytical solutions. One thing that I don't like about it is that the font is different in the figure and in the resulting paper. Another thing is that it is a pain to put nicely typeset math into the figure directly. My solution: [psfrag](http://www.ctan.org/tex-archive/help/Catalogue/entries/psfrag.html). `psfrag` allows text in a postscript file to be replaced by LaTeX so I would put a label `AA` (for example) where I want it in the figure, and then in LaTeX write `\psfrag{AA}{$my formula$}`. This isn't such a great solution because it depends on `psfrag` (and journals do not like that), so I use [fragmaster.pl](http://www.ctan.org/tex-archive/support/fragmaster/) which creates the modified pdf and eps files locally from the master file and an auxiliary file with the `\psfrag` commands...I then `\includegraphics` these generated files in my article. This solution is a *little* roundabout, and so I'll repeat my question from the title: > > What is your complete solution for generating nice figures using an external program (for example Matlab)? > > > --- **Added Later:** After several answers were posted I noticed that none specifically addressed the issue of journals. Several times I've had editors come back to me saying something to the effect of "we'd like to publish your paper, please make sure that the figures you give us are in final form and no changes happen to them during typesetting"... If would be so kind (and if you know the answer) please modify your answer to include information relating to how journals like your solution.
https://tex.stackexchange.com/users/117
What do people use for modifying figures?
false
I use [lpic](https://ctan.org/pkg/lpic). It convenient way to put LaTeX on top of included graphics, in particular the text on your pictures have the same style/size as in the main text --- this is a big advantage.
1
https://tex.stackexchange.com/users/630
1301
904
https://tex.stackexchange.com/questions/633
75
I would really love to have a software or tool which provided real time compilation of my LaTeX document (to be able to see the final pdf or dvi document as I type the latex code), especially for when I am drawing pictures using tikZ. So far, I know of two things, but none of them work for me. They are: * **[KtikZ](http://www.hackenberger.at/blog/ktikz-editor-for-the-tikz-language)**: This is only for tikZ, which would be perfect for me, but unfortunately as far as I know it only works with Ubuntu and Debian, and I use Mac OS X (so I have never actually tried it, though I did dig a lot to see whether I would be able to install on my mac and from what I see it is really what I want - I am even considering installing Ubuntu just to use it!). * **[WhizzyTeX](http://cristal.inria.fr/whizzytex/)**: This is a minor mode for Emacs. It was extremely hard to get it to work on the mac (see my quest [here](https://stackoverflow.com/questions/3025890/can-i-install-whizzytex-for-emacs-on-a-mac-is-mac-os-x-a-unix-environment)), and it is not all that fast. The speed is not all that big of a deal for me, but the fact that it does not work with tikZ pictures is (the nodes all collapse in one point so that the words are all one on the top of the other). So my question is: is there a software ideally like KtikZ or another type of editor which provides real-time compilation and that I can use on my mac? I guess if you know of a Windows/Linux option I would also like to know, and the same for a way to set up a script to get the document compiled every 5 seconds or so (I am sure I have seen this written somewhere, but I don't know whether I can do it with a mac or whether it is editor/pdf viewer dependent), but what I really want is a software/tool which would work with a mac. To be clear, I am not after something like LyX, that is, I am not after a WYSIWYG-type thing, but rather something where I can type real LaTeX and see my code, but have at the same time another window showing me the pdf (or dvi) file compiled.
https://tex.stackexchange.com/users/14
Is there any way to get real-time compilation for LaTeX?
false
I can recommend a program similar to Ktikz, [CirKuit](http://kde-apps.org/content/show.php?content=107098), which I've been using successfully for quite a while. It enables you to create not only TikZ pictures, but also circuit diagrams using the Circuit macros.
3
https://tex.stackexchange.com/users/125
1302
905
https://tex.stackexchange.com/questions/1264
33
The ratio of markup to content in a beamer presentation is fairly high relative to a standard LaTeX document. What strategies do you use for speeding up the task of typing and editing beamer presentations?
https://tex.stackexchange.com/users/151
Typing and editing Beamer presentations
false
Emacs Org-Mode makes it possible to write Beamer presentations with almost no LaTeX markup. You make a normal Org outline, then use the Beamer export for Org to create a tex file with the markup you want. Of course, if you want to do more than the basics you'll eventually have to use some LaTeX, but even then Org makes it much easier. Here's an [orgmode/Beamer tutorial](http://orgmode.org/worg/org-tutorials/org-beamer/tutorial.php) and here's another [Org/Beamer tutorial](http://emacs-fu.blogspot.com/2009/10/writing-presentations-with-org-mode-and.html). The above should give a taste of how it works. Reading about Orgmode may make it appear confusing and complicated, but it's one of those things that's much simpler (and amazing) once you start using it. I would suggest checking this out even if you're an Emacs-hater. I don't care much for Emacs, much prefer Vim, but Orgmode really transforms Emacs into a killer application for certain uses. Besides having a great export to Beamer, Orgmode also can export an article-type outline into LaTeX, complete with sections and more, while having virtually no LaTeX markup in your original file. You can choose "Export to LaTeX and view PDF" in a single step. Very slick.
13
https://tex.stackexchange.com/users/631
1303
906
https://tex.stackexchange.com/questions/1291
76
I have the following LaTeX-document: ``` \documentclass[a4paper,11pt]{article} \usepackage[utf8x]{inputenc} \usepackage[ngerman]{babel} \usepackage[T1]{fontenc} \title{Sample} \author{Litb} \begin{document} \maketitle \begin{abstract} This is a report about my praxis phase at the company foo bar which I enjoyed. \end{abstract} \end{document} ``` Much to my frustration, compiling with `pdflatex` creates a document with Bitmap-fonts. The reader's font-list shows that it uses Type3 fonts. If I remove the `fontenc` loading, then I get a PDF using vector-fonts, but I heard that I should keep it, for having native German Umlauts working. Does anyone know how I can get vector fonts with T1, and why it keeps using bitmap fonts if I have that package-load line in it?
https://tex.stackexchange.com/users/580
Why are Bitmap-Fonts used automatically?
false
Use ``` \usepackage[T1]{fontenc} \usepackage{ae,aecompl} ``` Both cm-super and lmodern used look worse than the real type 1 Computer Modern fonts (depending on your PDF viewer, zoom level, etc.). The `ae` package is an ugly kludge, but at least it *looks* ok, and you will get vectors instead of bitmaps. Copy-paste is another story...
3
https://tex.stackexchange.com/users/100
1304
907
https://tex.stackexchange.com/questions/1281
4
Is there a way to find out (from Tex) the page number corresponding to a particular location in the source file? Using a macro in the file at that location is fine. My motivation is that I'd like to (eventually) get a system working for partial compilation for Beamer presentations. Since I typically only change one or two frames between compilations, it's pretty inefficient that the entire document is recompiled every time (modulo tricks like conditional compilation, which help a bit). If I know which pages correspond to each frame, it should be possible to splice together an older compiled version with the new content. EDIT: Sorry, I should have been more specific. I don't want any output in the pdf, rather I want to get it some other way (through a log file probably) so that I can access it from an external program.
https://tex.stackexchange.com/users/490
Mapping source code to page numbers in output
false
There are packages that support that, for the purpose of forward searching: i.e. you click on a source code location in your editor and you’re then taken to the corresponding location in the preview application. Both the editor and the preview application have to support this (but most do). Long story short, forward search uses information in a separate file that is generated during compilation. For example, the [**`pdfsync`**](http://itexmac.sourceforge.net/pdfsync.html) package creates a file called `<name>.pdfsync`. You can use that file to get the information you need. I don’t know the format of that file but it shouldn’t be too hard to figure out, considering that the file format is described on the homepage. An alternative (that seems to supersede `pdfsync`) is the [**`synctex`**](http://mactex-wiki.tug.org/wiki/index.php?title=SyncTeX) tool. It can be used directly from the command line, or activated from within LaTeX (on new distributions) by the command `\synctex=1` (or via the command line switch `synctex=1`). In that case, a file `<name>.synctex.gz` will be generated that contains a similar file as above, albeit gzipped.
3
https://tex.stackexchange.com/users/42
1305
908
https://tex.stackexchange.com/questions/341
385
I want to create posters for my poster presentation on a conference. What tools or LaTeX classes are available for preparing posters ?
https://tex.stackexchange.com/users/183
How to create posters using LaTeX
false
I recently dicovered [`baposter`](http://www.brian-amberg.de/uni/poster/). It is based on pgf so tikz related things will work fine. The macros are fairly easy to understand and Brain (the author) shows quite a lot of examples. All I can say that I recently won the poster price at a conference with a baposter designed poster.
9
https://tex.stackexchange.com/users/632
1306
909
https://tex.stackexchange.com/questions/1278
6
I've just noticed that (most likely caused by upgrading to opensuse 11.3 with TexLive 2009) whenever I try to \includegraphics{filename.eps} an eps file, I get the error: ``` Unable to load picture or PDF file ``` So documents that built fine now do not build anymore. I use XeLaTeX, and using eps used to work just fine without any special setup (that I can recall). I quickly tried including the epstopdf package and dropping the eps extensions, but I think this is for (pdf)latex only, not xelatex. My xelatex version is: ``` This is XeTeX, Version 3.1415926-2.2-0.9995.2 (TeX Live 2009/openSUSE) ``` I'd like to be able to build my old documents again whilst having to do as little change as possible... I tried using `epstopdf` to convert my eps into pdf and then include the pdf. That works, but I'd prefer not having to convert all my eps and references to them if possible at all. Thanks for any suggestions **Edit:** not working on my Fedora13 system anymore either that uses version ``` 2.2-0.996 (Web2C 7.5.6) ``` Example: ``` \documentclass[a4paper,10pt]{article} \usepackage[utf8x]{inputenc} \usepackage{graphicx} \begin{document} \includegraphics[width=225pt,height=81pt]{magic2.eps} \end{document} ``` or bundled with an eps file [here](http://bschwehn.de/temp/epstest.tar.gz)
https://tex.stackexchange.com/users/322
can't \includegraphics eps files anymore with xelatex (used to work fine)
true
I think perhaps the information provided [here](http://osdir.com/ml/debian-bugs-dist/2010-01/msg00752.html) and discussed [here](http://www.latex-community.org/forum/viewtopic.php?f=45&t=8143&start=0&hilit=eps+xelatex) may be relevant to your problem. Basically TeXlive 2009 (at least certain versions) shipped with the wrong version of a file (xetex.def); updating it may help. Or not. Good luck either way.
7
https://tex.stackexchange.com/users/411
1309
910
https://tex.stackexchange.com/questions/1279
26
I’m a big fan of ampersands (possibly too much …) and I’d like to replace all mentions of “*et al.*” (included in citations) by `\& al.` – both *in the main text* (I use `natbib` citations of the form `[Author1 et al., 1999]`), *and in the actual bibliography*? How can I do that, considering that BibTeX is inserting the words for me, and I have no control over the text? Preferably, I’d like to do this *without* creating my own bibliography style sheet (since I want to make this work regardless of the actual BibTeX style that is used), but if anyone can tell me how I need to edit the style sheet file, that would be fine as well (`makebst` doesn’t seem to offer an option for this …).
https://tex.stackexchange.com/users/42
Replace `et al.` with `\& al.`
false
Editing the `.bst` to make this kind of change is easy. Just search through the file and replace all instances of `et al.` with `\& al.` if that is your preference. In a few BSTs it may be entered differently, such as `et~al.` or similar, but this should be easy to figure out by looking in the generated BBL to find whatever form your particular BST is using.
19
https://tex.stackexchange.com/users/627
1310
911
https://tex.stackexchange.com/questions/1307
14
I'm no typography expert, but I heard that the bullets and numbers in itemize/enumerate environments are better placed outside of the main body of text, i.e. in the margin. How can I do that in LaTeX? And a bonus question, how can I do that in ConTeXt? :) **EDIT**: One use is in this thesis: <http://www.duo.uio.no/sok/work.html?WORKID=81971&lang=en> but I did not find any nested list there. Another case is this eBook: <http://designingfortheweb.co.uk/book/part3/part3_chapter13.php>
https://tex.stackexchange.com/users/628
How to put bullets in the margin?
false
you could use the enumitem package to adjust the leftmargin. I have, however, never seem bullets in the margin. ``` \documentclass{article} \usepackage{enumitem} \usepackage[showframe]{geometry} \begin{document} \begin{itemize}[leftmargin=0ex] \item Some text in here \end{itemize} \end{document} ```
6
https://tex.stackexchange.com/users/632
1311
912
https://tex.stackexchange.com/questions/1282
14
I usually create figures for my articles in Matlab: various plots of numerical and analytical solutions. One thing that I don't like about it is that the font is different in the figure and in the resulting paper. Another thing is that it is a pain to put nicely typeset math into the figure directly. My solution: [psfrag](http://www.ctan.org/tex-archive/help/Catalogue/entries/psfrag.html). `psfrag` allows text in a postscript file to be replaced by LaTeX so I would put a label `AA` (for example) where I want it in the figure, and then in LaTeX write `\psfrag{AA}{$my formula$}`. This isn't such a great solution because it depends on `psfrag` (and journals do not like that), so I use [fragmaster.pl](http://www.ctan.org/tex-archive/support/fragmaster/) which creates the modified pdf and eps files locally from the master file and an auxiliary file with the `\psfrag` commands...I then `\includegraphics` these generated files in my article. This solution is a *little* roundabout, and so I'll repeat my question from the title: > > What is your complete solution for generating nice figures using an external program (for example Matlab)? > > > --- **Added Later:** After several answers were posted I noticed that none specifically addressed the issue of journals. Several times I've had editors come back to me saying something to the effect of "we'd like to publish your paper, please make sure that the figures you give us are in final form and no changes happen to them during typesetting"... If would be so kind (and if you know the answer) please modify your answer to include information relating to how journals like your solution.
https://tex.stackexchange.com/users/117
What do people use for modifying figures?
true
One solution is to export your graphics to a LaTeX-friendly format such as TikZ. If you use MATLAB, there is a project that aims to export MATLAB figures to TikZ code: <http://github.com/nicki/matlab2tikz> If you are using [R](http://www.r-project.org), I am the co-author of a graphics device that produces TikZ code- it is available on [CRAN](http://cran.r-project.org/web/packages/tikzDevice/index.html). Development releases may be downloaded from [R-Forge](https://r-forge.r-project.org/R/?group_id=440) and bleeding-edge source code can be found on [GitHub](http://github.com/Sharpie/RTikZDevice). [Inkscape](http://www.inkscape.org) can be used along with [a plugin](http://code.google.com/p/inkscape2tikz/) that exports to TikZ for general graphics conversion tasks. The advantage of exporting graphics to a format like TikZ is that there are no discontinuities in font usage or typesetting since LaTeX handles all the text. In the case of the R graphics device the user is also allowed to use the full range of LaTeX commands and packages to typeset arbitrary mathematical notation. ### Response to Question Update One nice thing about TikZ is that graphics can be *externalized*. This means that the code used to create the graphic is separated and used to compile a stand-alone figure. On subsequent runs the stand alone file is included as an image. Using this system you can leverage the full power of TikZ and then provide your document and a handful of static image files to the Journal minimal changes to your TeX source (basically flipping a switch on or off). See [Automagically externalising pdftricks and TikZ pictures](https://tex.stackexchange.com/questions/216/automagically-externalising-pdftricks-and-tikz-pictures) and [Script to automate externalizing tikz graphics](https://tex.stackexchange.com/questions/1460/script-to-automate-externalizing-tikz-graphics).
7
https://tex.stackexchange.com/users/17
1312
913
https://tex.stackexchange.com/questions/1313
13
I'm working on my resume in LyX and I would like my section headers to look like [this](http://rpi.edu/dept/arc/training/latex/resumes/res2.pdf). What should I write in the preamble to achieve this?
https://tex.stackexchange.com/users/5
Section headers in margins
true
you could use the titlesec package to modify the definition of the \section command. in lyx you can add latex-code manually by going to the document preferences: Document->Settings -> Latex preamble. I marked the part of code you have to put in your document. ``` \documentclass{article} \usepackage[showframe]{geometry} %to lyn preamble from here \usepackage{titlesec} \titleformat{\section}[leftmargin] {\normalfont \sffamily\bfseries\filleft} {}{0pt}{} \titlespacing{\section} {4pc}{1.5ex plus .1ex minus .2ex}{1pc} %to here \begin{document} \section{Objective} \noindent Auditing/Analysis of Operations \section{Education} \noindent B.S. in Management, Rensselaer Polytechnic Institute, Troy, NY, May 1986 Concentrations in Accounting and Management Systems QPA 3.9 in major, 3.7 overall \end{document} ```
9
https://tex.stackexchange.com/users/632
1315
914
https://tex.stackexchange.com/questions/1276
4
In the following example: ``` \documentclass{memoir} \usepackage{cleveref} \newsubfloat{figure} \begin{document} \chapter{Example} \begin{figure} \centering \subtop[apple]{fig 100a\label{fig:100a}}\\ \subtop[orange]{fig 100b\label{fig:100b}} \caption{Can you handle subfigures?} \label{fig:100} \end{figure} \cref{fig:100a} and \namecref{fig:100b}. \Cref{fig:100} \end{document} ``` Both `\cref{fig:100a}` and `\namecref{fig:100b}` produce ?? The versions of packages used are: cleveref.sty 0.17.2 and memoir.cls v3.6.
https://tex.stackexchange.com/users/337
How to make sub figure referencing work in memoir + cleveref?
true
You should contact Toby Cubitt, the author of cleveref. He is very responsive to bug reports and the memoir support of cleveref is very new and little tested. The problem is that memoir redefines `\label` within subfigures, so the cleveref version does not get used... In the meantime, it's not pretty, but this works for your example at least: ``` \documentclass{memoir} \usepackage{cleveref} \crefname{subfigure}{fig.}{figs.} \Crefname{subfigure}{Figure}{Figures} \newsubfloat{figure} \begin{document} \makeatletter \let\old@sf@@memsub@label=\sf@@memsub@label \renewcommand*{\sf@@memsub@label}[1]{% \@bsphack% \old@sf@@memsub@label{#1}% \protected@write\@auxout{}% {\string\newlabel{cref@#1}{{\cref@currentlabel}{\thepage}}}% \@esphack} \makeatother \chapter{Example} \begin{figure} \centering \subtop[apple]{fig 100a\label{fig:100a}}\\ \subtop[orange]{fig 100b\label{fig:100b}} \caption{Can you handle subfigures?} \label{fig:100} \end{figure} \cref{fig:100a} and \namecref{fig:100a}. \Cref{fig:100} \end{document} ```
5
https://tex.stackexchange.com/users/627
1316
915
https://tex.stackexchange.com/questions/1307
14
I'm no typography expert, but I heard that the bullets and numbers in itemize/enumerate environments are better placed outside of the main body of text, i.e. in the margin. How can I do that in LaTeX? And a bonus question, how can I do that in ConTeXt? :) **EDIT**: One use is in this thesis: <http://www.duo.uio.no/sok/work.html?WORKID=81971&lang=en> but I did not find any nested list there. Another case is this eBook: <http://designingfortheweb.co.uk/book/part3/part3_chapter13.php>
https://tex.stackexchange.com/users/628
How to put bullets in the margin?
true
I've never seen placement of the bullets of a list in the margin. The text within a list isn't just body text. So, why line it up with body text. It's a good idea to indent it like you would do with a quotation. Let's think of choosing this style. What about a nested list? In consequence, its items would have to be aligned at the left margin of the parent list, so at the left margin of the document as well. What about enumerated lists? Should the numbers be placed in the margin? To sum up, bulleted list with bullets in margins and items in line with body text seems questionable. Though, it can easily be achieved. With enumitem, better specify a style in the preamble than to each list by an optional argument. This is consistent and allows easy changes. If you later decide to change the list style, you just need to apply the modification once in the preamble for the whole document. Martin's example modified under this point of view: ``` \documentclass{article} \usepackage{enumitem} \setitemize[1]{leftmargin=0ex} \usepackage[showframe]{geometry} \begin{document} \begin{itemize} \item text \end{itemize} \end{document} ```
8
https://tex.stackexchange.com/users/213
1317
916
https://tex.stackexchange.com/questions/1314
5
I use LyX. When I use the "Title" environment under article(hebrew), it uses very big spacings between it and the rest of the document. How do I control the spacing and make it use a compact title so my resume will all fit in one page?
https://tex.stackexchange.com/users/5
Reducing the title spacing
false
when designing your resume, you may not want use all the standard commands. this could become quite tedious. I assume you want to use \title{} for your resume title *g* Have you considered inserting a table without border lines. within a table you can select the fontsize and shape yourself and you should have better control over what is going on. To answer you could redefine the \maketitle command... go to document->settings->latex preamble and copy the marked section in there. for everything with \vskip you could put in another length e.g. \vskip 0.5em instead of \vskip 2em. Also you can alter the font size by e.g. changeing \LARGE to \large \documentclass{article} \title{My resume title} %copy to lynx preamble \makeatletter \def\@maketitle{% \newpage \null \vskip 2em% \begin{center}% \let \footnote \thanks {\LARGE \@title \par}% \vskip 1.5em% {\large \lineskip .5em% \begin{tabular}[t]{c}% \@author \end{tabular}\par}% \vskip 1em% {\large \@date}% \end{center}% \par \vskip 1.5em} \makeatother %up to here \begin{document} \maketitle \end{document}
0
https://tex.stackexchange.com/users/632
1318
917
https://tex.stackexchange.com/questions/1319
976
If you were asked to show examples of beautifully typeset documents in TeX & friends, what would you suggest? Preferably documents available online (I'm aware I could go to a bookstore and find many such documents called 'books'). Extra bonus for documents whose LaTeX source is available. This is not an idle question. Seeing great examples of any craft is both educational and inspiring, let alone explaining why we prefer TeX to Word or other text editors. For instance, I like how Philipp Lehman's [Font Installation Guide](https://texdoc.org/serve/fontinstallationguide/0) looks. I don't know enough LaTeX to realize how much customization was done, but the ToC looks polished. Your nominations, please ...
https://tex.stackexchange.com/users/564
Showcase of beautiful typography done in TeX & friends
false
* The [TeX Showcase](http://www.tug.org/texshowcase/) contains many examples. * The [AAUP SHOWBOOKS site](http://www.tsengbooks.com/) shows Humanities books typeset with TeX * [tufte-latex](http://ctan.org/pkg/tufte-latex) contains two classes and examples dedicated to the Tufte style
86
https://tex.stackexchange.com/users/213
1320
918
https://tex.stackexchange.com/questions/339
920
What editors/IDEs are available for easing the process of writing TeX/LaTeX documents? Please state some useful features like code completion, spell checking, building final DVI or PDF files, etc. --- This question is undergoing a systematic refurbishment, see [Let’s polish the Editors/IDEs question](https://tex.meta.stackexchange.com/questions/3253) on Meta. If you’d like to see another editor feature covered here or to take care of an editor that’s not covered yet, share your ideas in that meta question. --- ### List of editors Links to answers. * [Archimedes](https://tex.stackexchange.com/a/213830) * [Atom](https://tex.stackexchange.com/a/195435) * [Auto Latex Equations for Google Docs](https://tex.stackexchange.com/questions/339/latex-editors-ides/397408#397408) * [Bakoma TeX Word](https://tex.stackexchange.com/a/53406) * [Compositor](https://tex.stackexchange.com/a/384950) * [Emacs with AUCTeX](https://tex.stackexchange.com/a/356) * [Emacs with WhizzyTeX](https://tex.stackexchange.com/a/998) * [gedit with the gedit-LaTeX-plugin](https://tex.stackexchange.com/a/413) * [Geany with GeanyLaTeX](https://tex.stackexchange.com/a/1000) * [gummi](https://tex.stackexchange.com/a/923) * [Inlage](https://tex.stackexchange.com/a/4568) * [IntelliJ IDEA](https://tex.stackexchange.com/a/485125) * [jEdit](https://tex.stackexchange.com/a/281907) * [JOVE](https://tex.stackexchange.com/a/142195) * [Kile](https://tex.stackexchange.com/a/340) * [KTikZ](https://tex.stackexchange.com/a/1321) * [Latexian](https://tex.stackexchange.com/a/6843) * [Latexila](https://tex.stackexchange.com/a/21253) * [LaTeX Base](https://tex.stackexchange.com/a/362080) * [LEd](https://tex.stackexchange.com/a/347) * [LyX](https://tex.stackexchange.com/a/380) * [Notepad++](https://tex.stackexchange.com/a/10220) * [Overleaf](https://tex.stackexchange.com/a/116794) * [Open LaTeX Studio](https://tex.stackexchange.com/a/265836) * [Papeeria](https://tex.stackexchange.com/a/227465) * [QuatraTeX](https://tex.stackexchange.com/a/262949) * [RTextDoc](https://tex.stackexchange.com/a/141039) * [DMelt](https://tex.stackexchange.com/a/157012) * [Scientific Word](https://tex.stackexchange.com/a/26636) * [Scientific Workplace](https://tex.stackexchange.com/a/26634) * [Scribes](https://tex.stackexchange.com/a/99643) * [Scribo](https://tex.stackexchange.com/a/5273) * [Sublime Text with LaTeXTools or LaTeXing Plugin](https://tex.stackexchange.com/a/42552) * [TechWriter](https://tex.stackexchange.com/a/274816) * [TeXifier](https://tex.stackexchange.com/a/111367) * [TeXlipse for Eclipse](https://tex.stackexchange.com/a/386) * [Texmaker](https://tex.stackexchange.com/a/402) * [TeXnicCenter](https://tex.stackexchange.com/a/384) * [TeXnicle](https://tex.stackexchange.com/a/141869) * [Texpen](https://tex.stackexchange.com/a/225515) * [TeXShop](https://tex.stackexchange.com/a/350) * [TeXStudio](https://tex.stackexchange.com/a/5281) * [TextMate](https://tex.stackexchange.com/a/19552) * [TeXworks](https://tex.stackexchange.com/a/411) * [Verbosus](https://tex.stackexchange.com/a/142191) * [Vim with LaTeX-Box](https://tex.stackexchange.com/a/148473) * [Vim with LaTeX-plugin](https://tex.stackexchange.com/a/394) * [Vim with Snipmate plugin and rubber](https://tex.stackexchange.com/a/5370) * [Vim with vimtex](https://tex.stackexchange.com/a/252555) * [Visual Studio Code with LaTeX-Workshop](https://tex.stackexchange.com/a/390058/74942) * [WinEdt](https://tex.stackexchange.com/a/374) * [Winefish](https://tex.stackexchange.com/a/334184) * [WinShell](https://tex.stackexchange.com/a/631)
https://tex.stackexchange.com/users/183
LaTeX Editors/IDEs
false
[KtikZ](http://www.hackenberger.at/blog/ktikz-editor-for-the-tikz-language) --------------------------------------------------------------------------- *Available for:* Linux and Windows Open Source --- I am a big fan of the Linux editor Ktikz. By default Ktikz is meant to be a real-time editor for TikZ pictures. However, one can edit any type of environment just by editing the default template. Moreover, by creating a template consisting only of the text ``` <> ``` one can get real-time compilation of LaTeX documents. I usually restrict my use of Ktikz to editing Beamer presentations or drawing TikZ pictures (or other projects where the visual output needs extra attention or tweaking). For other purposes the real-time compilation can be more of a distraction than it is worth. **For windows users:** install QtikZ (also available in the link). Tested with windows 7 and miktex 2.9, and it works with no problem.
37
https://tex.stackexchange.com/users/520
1321
919
https://tex.stackexchange.com/questions/1319
976
If you were asked to show examples of beautifully typeset documents in TeX & friends, what would you suggest? Preferably documents available online (I'm aware I could go to a bookstore and find many such documents called 'books'). Extra bonus for documents whose LaTeX source is available. This is not an idle question. Seeing great examples of any craft is both educational and inspiring, let alone explaining why we prefer TeX to Word or other text editors. For instance, I like how Philipp Lehman's [Font Installation Guide](https://texdoc.org/serve/fontinstallationguide/0) looks. I don't know enough LaTeX to realize how much customization was done, but the ToC looks polished. Your nominations, please ...
https://tex.stackexchange.com/users/564
Showcase of beautiful typography done in TeX & friends
false
If I can be allowed to plug my own project, my [page for Bertrand Russell's *Introduction to Mathematical Philosophy*](http://people.umass.edu/klement/russell-imp.html) shows off 6 different PDFs for different page sizes, including eBook versions, produced with the same core source file. The source is available too. However, it was also one of my first LaTeX projects and I’m a bit embarassed by some of the messiness in the code. A more recent, and cleaner project (source also available) is [Wittgenstein’s *Tractatus Logico-Philosophicus*](http://people.umass.edu/klement/tlp/) also available in different versions from the same source.
209
https://tex.stackexchange.com/users/411
1324
921
https://tex.stackexchange.com/questions/1308
36
Do you know of any nice looking **invoice** LaTeX template/class. I would like to create a web invoice engine (maybe on top of the scribtex engine) that compiles for me an invoice using the LaTeX engine (pdfLaTeX) and some data filled by a web form. Before to begin the development I'm searching for an elegant or at least nice template for invoices. Do you have any suggestion?
https://tex.stackexchange.com/users/633
Nice looking invoices
true
Take a look at the [`scrlttr2`](http://www.ctan.org/tex-archive/macros/latex/contrib/koma-script/) package. One of the most versatile letter classes. I made an invoice template based on it and it looked great. Sorry I can't post the source here at the moment (needs editing and my machine can't compile it) but I will briefly comment what I did. I configured `scrlttr2` to get a nice looking business-like letter (KOMA-Script has > 160 pages on `scrlttr2`). The invoice is embedded in the body of the letter by using the [`invoice`](http://www.ctan.org/tex-archive/macros/latex/contrib/invoice/) package.
9
https://tex.stackexchange.com/users/337
1326
922
https://tex.stackexchange.com/questions/1313
13
I'm working on my resume in LyX and I would like my section headers to look like [this](http://rpi.edu/dept/arc/training/latex/resumes/res2.pdf). What should I write in the preamble to achieve this?
https://tex.stackexchange.com/users/5
Section headers in margins
false
Have you looked at the [europecv](http://www.ctan.org/tex-archive/help/Catalogue/entries/europecv.html) package? I've been using that to write my own CV. From CTAN: > > The europecv class is an unofficial > LaTeX implementation of the standard > model for curricula vitae (the > “Europass CV”) as recommended by the > European Commission. Although > primarily intended for users in the > European Union, the class is flexible > enough to be used for any kind of > curriculum vitae. > > > The class has localisations for all > the official languages of the EU (plus > Catalan), as well as options > permitting input in UTF-8 and koi8-r. > > > See also [curve](http://www.ctan.org/tex-archive/help/Catalogue/entries/curve.html) > [currvita](http://www.ctan.org/tex-archive/help/Catalogue/entries/currvita.html) > [esieecv](http://www.ctan.org/tex-archive/help/Catalogue/entries/esieecv.html) [vita](http://www.ctan.org/tex-archive/help/Catalogue/entries/vita.html) > > > The author is Nicola Vitacolonna. > > >
3
https://tex.stackexchange.com/users/209
1327
923
https://tex.stackexchange.com/questions/1328
28
What I'm doing: ``` \usepackage{amsmath} \usepackage{amsthm} \usepackage{eucal} \usepackage{amssymb} \usepackage{mathrsfs} % don't know what some of those do, but i think all the math related ones are % there % there are more packages being imported though ``` Then I try: ``` \textbf{w_{n+1}} = \textbf{w_{n}} + e\eta\textbf{x}(n) \\ \textbf{\Delta}\textbf{w} = e\eta\textbf{x} % above doesn't work, complains about missing $ \textbf{$w_{n+1}$} = \textbf{$w_{n}$} + e\eta\textbf{$x$}(n) \\ \textbf{$\Delta$}\textbf{$w$} = e\eta\textbf{$x$} % above compiles, but no bold and no newline ```
https://tex.stackexchange.com/users/572
Bold text and newlines inside equations
true
You could bold an equation with `\boldsymbol`. Use `\align` for multiline equation with alignment. ``` \begin{align} \boldsymbol{w_{n+1}} &= \boldsymbol{w_n} + e\eta\boldsymbol{x}(n) \\ \boldsymbol{\Delta w} &= e\eta\boldsymbol{x} \end{align} ```
37
https://tex.stackexchange.com/users/82
1329
924
https://tex.stackexchange.com/questions/1328
28
What I'm doing: ``` \usepackage{amsmath} \usepackage{amsthm} \usepackage{eucal} \usepackage{amssymb} \usepackage{mathrsfs} % don't know what some of those do, but i think all the math related ones are % there % there are more packages being imported though ``` Then I try: ``` \textbf{w_{n+1}} = \textbf{w_{n}} + e\eta\textbf{x}(n) \\ \textbf{\Delta}\textbf{w} = e\eta\textbf{x} % above doesn't work, complains about missing $ \textbf{$w_{n+1}$} = \textbf{$w_{n}$} + e\eta\textbf{$x$}(n) \\ \textbf{$\Delta$}\textbf{$w$} = e\eta\textbf{$x$} % above compiles, but no bold and no newline ```
https://tex.stackexchange.com/users/572
Bold text and newlines inside equations
false
`\textbf` is for text mode, not math mode. Also, inline math (`$ ... $`) is for use inline, and so does not produce new lines. This is pretty basic math stuff for TeX: perhaps you should read something like *Math Mode* by Herbert Voss (type `texdoc mathmode` at the Terminal/Command Line). I think you would be best using the `align` environment: ``` \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align} \mathbf{w_{n+1}} &= \mathbf{w_{n}} + e\eta\mathbf{x}(n) \\ \mathbf{\Delta w} &= e\eta\mathbf{x} \end{align} \end{document} ```
22
https://tex.stackexchange.com/users/73
1330
925
https://tex.stackexchange.com/questions/1328
28
What I'm doing: ``` \usepackage{amsmath} \usepackage{amsthm} \usepackage{eucal} \usepackage{amssymb} \usepackage{mathrsfs} % don't know what some of those do, but i think all the math related ones are % there % there are more packages being imported though ``` Then I try: ``` \textbf{w_{n+1}} = \textbf{w_{n}} + e\eta\textbf{x}(n) \\ \textbf{\Delta}\textbf{w} = e\eta\textbf{x} % above doesn't work, complains about missing $ \textbf{$w_{n+1}$} = \textbf{$w_{n}$} + e\eta\textbf{$x$}(n) \\ \textbf{$\Delta$}\textbf{$w$} = e\eta\textbf{$x$} % above compiles, but no bold and no newline ```
https://tex.stackexchange.com/users/572
Bold text and newlines inside equations
false
Use `$\mathbf{w_{n+1}}$`. However, if you want bold symbols, you'd have to use `$\pmb{\eta}$`
9
https://tex.stackexchange.com/users/401
1331
926
https://tex.stackexchange.com/questions/1319
976
If you were asked to show examples of beautifully typeset documents in TeX & friends, what would you suggest? Preferably documents available online (I'm aware I could go to a bookstore and find many such documents called 'books'). Extra bonus for documents whose LaTeX source is available. This is not an idle question. Seeing great examples of any craft is both educational and inspiring, let alone explaining why we prefer TeX to Word or other text editors. For instance, I like how Philipp Lehman's [Font Installation Guide](https://texdoc.org/serve/fontinstallationguide/0) looks. I don't know enough LaTeX to realize how much customization was done, but the ToC looks polished. Your nominations, please ...
https://tex.stackexchange.com/users/564
Showcase of beautiful typography done in TeX & friends
false
The thesis of Eivind Uggedal is very nice: [*Social Navigation on the Social Web: Unobtrusive Prototyping of Activity Streams in Established Spaces*](https://www.duo.uio.no/handle/10852/9955) The source is at <http://bitbucket.org/uggedal/thesis/src/>
62
https://tex.stackexchange.com/users/628
1332
927
https://tex.stackexchange.com/questions/1333
9
Where can I find latex templates for project management tasks like work-breakdown structure doc, CPM/PERT diagrams, final project reports etc ? Examples here: [link1](https://docs.google.com/leaf?id=0B0NJuNGnNU9yNWRiNmIxMjctNzBmNi00ZTEzLWJlN2EtMGFkYWRmODZhZjU5&hl=en&authkey=CMzarrgH) [link2](https://docs.google.com/leaf?id=0B0NJuNGnNU9yNjViMjNhZjQtMGVlNi00YWM2LWE2NTEtZTRiYTk1MjQ4NmZj&hl=en&authkey=CL-Uz_oO) [link3](https://docs.google.com/leaf?id=0B0NJuNGnNU9yMzZlNjFhZDItZmZlOC00NTQ0LTkxMDItZmNjYjkxYmQ2NmVm&hl=en&authkey=CL-KmpYC) [link4](https://docs.google.com/leaf?id=0B0NJuNGnNU9yYjY1NDAzNTktOWU3OS00OTAzLTkwNDgtZTk3ODA4ZjA1MDE3&hl=en&authkey=CLKUx6MJ) [link5](https://docs.google.com/leaf?id=0B0NJuNGnNU9yZjE2OWVmZWEtOTUzZi00NzM5LWFkZTYtYTdkMmJlOTI4ZDk0&hl=en&authkey=CPWKvqoG)
https://tex.stackexchange.com/users/637
Latex templates for project management tasks
false
Is [this](http://jldiaz.wikidot.com/en-tikz-example%3agantt) something of interest to you? It uses tikz/pgf.
5
https://tex.stackexchange.com/users/337
1334
928
https://tex.stackexchange.com/questions/1308
36
Do you know of any nice looking **invoice** LaTeX template/class. I would like to create a web invoice engine (maybe on top of the scribtex engine) that compiles for me an invoice using the LaTeX engine (pdfLaTeX) and some data filled by a web form. Before to begin the development I'm searching for an elegant or at least nice template for invoices. Do you have any suggestion?
https://tex.stackexchange.com/users/633
Nice looking invoices
false
I use Context for this, and use Context's layers to set out text on the PDF of my letterhead. This works well. It was, in fact, generating letters and invoices that led to me switching from Latex to Context. If I were to try and do this using Latex, it looks like using Tikz would be the way to go, but the learning curve for doing this kind of thing with Tikz looks higher than that of Context, especially if you know any Metapost already.
3
https://tex.stackexchange.com/users/175
1335
929
https://tex.stackexchange.com/questions/1333
9
Where can I find latex templates for project management tasks like work-breakdown structure doc, CPM/PERT diagrams, final project reports etc ? Examples here: [link1](https://docs.google.com/leaf?id=0B0NJuNGnNU9yNWRiNmIxMjctNzBmNi00ZTEzLWJlN2EtMGFkYWRmODZhZjU5&hl=en&authkey=CMzarrgH) [link2](https://docs.google.com/leaf?id=0B0NJuNGnNU9yNjViMjNhZjQtMGVlNi00YWM2LWE2NTEtZTRiYTk1MjQ4NmZj&hl=en&authkey=CL-Uz_oO) [link3](https://docs.google.com/leaf?id=0B0NJuNGnNU9yMzZlNjFhZDItZmZlOC00NTQ0LTkxMDItZmNjYjkxYmQ2NmVm&hl=en&authkey=CL-KmpYC) [link4](https://docs.google.com/leaf?id=0B0NJuNGnNU9yYjY1NDAzNTktOWU3OS00OTAzLTkwNDgtZTk3ODA4ZjA1MDE3&hl=en&authkey=CLKUx6MJ) [link5](https://docs.google.com/leaf?id=0B0NJuNGnNU9yZjE2OWVmZWEtOTUzZi00NzM5LWFkZTYtYTdkMmJlOTI4ZDk0&hl=en&authkey=CPWKvqoG)
https://tex.stackexchange.com/users/637
Latex templates for project management tasks
false
Recently a package (based on tikz) for [gantt charts](http://www.martin-kumm.de/tex_gantt_package.php) has been published
9
https://tex.stackexchange.com/users/632
1336
930
https://tex.stackexchange.com/questions/1279
26
I’m a big fan of ampersands (possibly too much …) and I’d like to replace all mentions of “*et al.*” (included in citations) by `\& al.` – both *in the main text* (I use `natbib` citations of the form `[Author1 et al., 1999]`), *and in the actual bibliography*? How can I do that, considering that BibTeX is inserting the words for me, and I have no control over the text? Preferably, I’d like to do this *without* creating my own bibliography style sheet (since I want to make this work regardless of the actual BibTeX style that is used), but if anyone can tell me how I need to edit the style sheet file, that would be fine as well (`makebst` doesn’t seem to offer an option for this …).
https://tex.stackexchange.com/users/42
Replace `et al.` with `\& al.`
true
Using the [`biblatex`](http://ctan.org/pkg/biblatex) package, you only need to redefine one bibliography string: ``` \documentclass{article} \usepackage[style=authoryear,maxnames=2]{biblatex} \DefineBibliographyStrings{english}{andothers={\&~al\adddot}} \usepackage{filecontents} \begin{filecontents}{\jobname.bib} @misc{Aut10, author = {Author, A. and Buthor, B. and Cuthor, C.}, year = {2010}, title = {And now for something completely different}, } \end{filecontents} \addbibresource{\jobname.bib} \begin{document} Some text \autocite{Aut10}. \printbibliography \end{document} ```
49
https://tex.stackexchange.com/users/510
1338
931
https://tex.stackexchange.com/questions/1337
2
I am using Fedora 13 and it had TeX Live 2007 by default. I installed `texlive` and then I wanted to use the [`mathspec`](http://www.ctan.org/tex-archive/help/Catalogue/entries/mathspec.html) package which TeX Live 2007 version doesn't seem to have. Can anyone tell me as to how to install the `mathspec` package in Linux.
https://tex.stackexchange.com/users/nan
Using different maths font in LaTeX
true
Are there packages for newer versions of TeX Live for Fedora 13? If so you could upgrade to them (I don't know where to look for Fedora updates). If you can't find suitable upgrades for your system, you can download the package from CTAN. Place the [mathspec.sty file from CTAN](http://www.ctan.org/tex-archive/macros/xetex/latex/mathspec/) into `~/texmf/tex/latex/mathspec`. If that also does not work (maybe `mathspec` needs a newer version of XeTeX than the one shipped with TL2007), you can manually install a new version of [TeX Live](http://tug.org/texlive/quickinstall.html).
1
https://tex.stackexchange.com/users/83
1339
932
https://tex.stackexchange.com/questions/1319
976
If you were asked to show examples of beautifully typeset documents in TeX & friends, what would you suggest? Preferably documents available online (I'm aware I could go to a bookstore and find many such documents called 'books'). Extra bonus for documents whose LaTeX source is available. This is not an idle question. Seeing great examples of any craft is both educational and inspiring, let alone explaining why we prefer TeX to Word or other text editors. For instance, I like how Philipp Lehman's [Font Installation Guide](https://texdoc.org/serve/fontinstallationguide/0) looks. I don't know enough LaTeX to realize how much customization was done, but the ToC looks polished. Your nominations, please ...
https://tex.stackexchange.com/users/564
Showcase of beautiful typography done in TeX & friends
false
[The Latex Font Catalogue](http://www.tug.dk/FontCatalogue/alphfonts.html) is a wonderful resource. ~~For some reason~~ it is missing the [Zapfino](http://en.wikipedia.org/wiki/Zapfino) font (as it is nonfree), which was [packaged by Walter Schmidt](http://www.ctan.org/tex-archive/fonts/metrics/w-a-schmidt/zap.txt).
16
https://tex.stackexchange.com/users/175
1340
933
https://tex.stackexchange.com/questions/1297
10
Like those contributing to the discussion of [Why are Bitmap-Fonts used automatically?](https://tex.stackexchange.com/questions/1291/why-are-bitmap-fonts-used-automatically), I have also found the automatic use of bitmap fonts very annoying as the output is really horrible. My question is: How to configure LaTeX (TeX Live) so that if T1 is used it uses `lmodern` by default and if `lmodern` isn't available don't try to generate bitmap fonts?
https://tex.stackexchange.com/users/337
Configure LaTeX to use lmodern for T1 by default?
true
You can change the font configuration by modifying fonttext.cfg and fontmath.cfg, see *Configuration Options for LaTeX 2e*. You can find this document with ``` texdoc cfgguide ``` Hovever, it is not recommended to change the font setup. Here is a quote from fontdef.dtx: ``` % \section{Customization} % % You are not allowed to change this source file! If you want to % change the default encodings and/or the font shape groups preloaded % you should should create a copy of \texttt{fonttext.ltx} % under the name \texttt{fonttext.cfg} and change this copy. If % \LaTeXe{} finds a file of this name it will use it, otherwise it % uses the standard file which is \texttt{fontdef.ltx}. % % If you don't plan to use Computer Modern much or at all, it might % (!) be a good idea to make your own \texttt{fonttext.cfg}. Look at % the comments below (docstrip module `text') to see what should % should go into such a file. % % To change the math font setup use a copy of \texttt{fontmath.ltx} % under the name \texttt{fontmath.cfg} and change this copy. However, % dealing with this interface is even more a job for an expert than % changing the text font setup --- in short, we don't encourage either. ```
7
https://tex.stackexchange.com/users/565
1341
934
https://tex.stackexchange.com/questions/1342
53
How can I create a tree node with an aligned math equations inside? ``` \begin{align} \end{align} ``` doesn't work ``` \begin{minipage}{100} \begin{align} ... \end{align} \end{minipage} ``` Gives a lot of margin and I don't want to manually tune 100. \nodepart from shapes tikz library seems to be overkill and doesnt do the alignment. Any ideas?
https://tex.stackexchange.com/users/69
Aligned equations inside of TikZ node.
true
You could use an `aligned` environment with inline math inside nodes, their size is automatically calculated. Here's a small example with such a node in a tree: ``` \documentclass{article} \usepackage{tikz} \usepackage{amsmath} \begin{document} \begin{tikzpicture}[every node/.style={rectangle,draw}] \node {Example:} child {node {% $\begin{aligned} a &= bx + c\\ a+b &= d +1 \end{aligned}$}}; \end{tikzpicture} \end{document} ``` Output:
68
https://tex.stackexchange.com/users/213
1343
935
https://tex.stackexchange.com/questions/1345
10
My main TeX template has a whole bunch of commented out packages and options (so that when I need a package, I can just skim my preamble and comment out the right thing, rather than try and remember the exact name of the package). I also have quite a few packages that I load by default, and I'm not sure which of them I really need in any given file. I could go through one by one, commenting them out and seeing what breaks stuff, I suppose, but if it's not slowing stuff down, I might as well not bother... Does having a lot of extra commented out lines slow compilation of tex documents? Does loading packages that aren't used at all slow down compilation?
https://tex.stackexchange.com/users/215
Do commented out options slow down compilation?
true
Commented out lines will slow compilation, but by such a minuscule amount that it is not worth worrying about it. Unnecessary packages will slow down compilation by a meaningful amount and if you are concerned about compilation time it is worth stripping things down to a minimal set of required packages. (This is also a good idea anyway, due to the multiple obscure interactions between packages, there are fewer chances for unpleasant surprises if you only load the ones you need.)
13
https://tex.stackexchange.com/users/627
1346
936