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/605
24
I keep hearing people on this site talking about "semantic" vs "syntactic" commands and that the "semantic" ones are somehow better. I don't really get what they are talking about, could you explain and give some examples that show the difference. Should I care about this at all?
https://tex.stackexchange.com/users/169
What is the deal about these semantic vs syntactic commands?
true
Suppose, [purely for the sake of argument](http://www.lulu.com/product/paperback/the-open-laboratory-2009/6404707), that one were typesetting a book which had frequent occasion to reference publications by name --- *Science,* the *New York Times* and so forth. In a WYSYWYG editor, one would highlight the name of the journal and click the *I* button. With syntactic markup, like plain ol' HTML, one would wrap the journal name in codes indicating that it is to be italicized: `<i>Science</i>`. With semantic markup, by contrast, one could define a command which says, "This text is the title of a publication, and is to be handled in such-and-such a manner". Then, if one wished to change the style of the document, one could tweak the code defining that command, and the change would be reflected throughout, without having to modify each instance manually (and run the risk of missing something). This has the added advantage that one can build extra features into the command. Instead of expanding out as "put this text in italics", the "publication name" command could do something more elaborate: "put this text in italics, and add the appropriate entry to the book's index". That way, a reader who wanted to find all the places where the book references a *New Yorker* article or an item in the *IEEE Transactions on Love Poetry* could just flip to the back and look up the pages. The LaTeX implementation of that idea would look something like this, using the [`makeidx` package](http://en.wikibooks.org/wiki/LaTeX/Indexing) to implement the indexing: ``` \newcommand{\journal}[1]{\emph{#1}\index{#1@\emph{#1}}} ``` Having defined the `\journal` command in this way, we could type `\journal{Science}`, and LaTeX would handle both the visual formatting and the auxiliary function of indexing for us. **Edit to add**: Yes, this can easily become overkill. But it's fun!
29
https://tex.stackexchange.com/users/112
621
422
https://tex.stackexchange.com/questions/579
50
How to create tagged PDF such that they will be: 1. good enough for PDF/UA 2. "reflowable" on smaller screens and ebook readers Any syntax & any engine are of interest, but I'm most interested in using LaTeX with [Xe|pdf]latex engines.
https://tex.stackexchange.com/users/137
How can tagged PDFs be created that support Universal Accessibility and reflowing?
true
Ross Moore talked about tagged pdf at TUG 2010: <http://river-valley.zeeba.tv/tex-mathml-for-tagged-pdf-the-next-frontier-in-mathematical-typesetting/> He mentioned that he uses an "extension" of pdfTeX, but I don't know the details. There would certainly need to be a lot of work done to transform the structure of a LaTeX document into a form that a re-flowable PDF viewer could take advantage of.
34
https://tex.stackexchange.com/users/179
622
423
https://tex.stackexchange.com/questions/591
126
In `\documentclass{article}`, the `\maketitle` command results in a lot of wasted vertical space. Is there any way for me to remove it? In other words, I'd like the author to appear directly below the title, and the date directly below the author.
https://tex.stackexchange.com/users/68
Removing vertical space inside \maketitle
false
The [`titling`](https://ctan.org/pkg/titling?lang=en) package gives you customisable hooks for re-styling the look of `\maketitle`. For example `\posttitle` is a command to define the ‘closing material’ to the title block. Its default with this package is ``` \posttitle{\par\end{center}\vskip 0.5em} ``` So to tighten up the space a bit you might write instead: ``` \posttitle{\par\end{center}} ``` Furthermore, ``` \setlength{\droptitle}{-10pt} ``` will raise the whole title up by 10pt (say), to give more space for content beneath the title.
76
https://tex.stackexchange.com/users/179
623
424
https://tex.stackexchange.com/questions/624
12
Inspired by a part of [this question](https://tex.stackexchange.com/questions/615/where-can-i-find-a-datasheet-document-class-or-a-tutorial-on-how-to-create-one), this seemed like an interesting question to ask. Advocates of LaTeX often say that you can see the difference in typesetting quality when you look at a document prepared with LaTeX and compare it to something prepared in, say, MS Word. I certainly don't dispute this; I can often tell, but it's hard to put my finger on exactly why. So what are these differences? What are the distinctive features that make a document look like it was prepared in LaTeX, rather than some other system? In other words, if I have a PDF file and I would like to make an educated guess as to whether it was created in LaTeX or not, what should I be looking for? (ignoring any PDF metadata that identifies the creator) I have my own ideas about this but I'll refrain from self-answering, at least for now, to see what other people may suggest.
https://tex.stackexchange.com/users/125
How can I recognize documents prepared in (La)TeX?
false
One almost-giveaway is the usage of [Computer Modern](http://en.wikipedia.org/wiki/Computer_Modern), the font Knuth designed for TeX. (Though I've had friends ask me how to use Computer Modern in non-TeX programs and many people also change the fonts in (Xe|La)?TeX to be different from the default.)
5
https://tex.stackexchange.com/users/9
625
425
https://tex.stackexchange.com/questions/624
12
Inspired by a part of [this question](https://tex.stackexchange.com/questions/615/where-can-i-find-a-datasheet-document-class-or-a-tutorial-on-how-to-create-one), this seemed like an interesting question to ask. Advocates of LaTeX often say that you can see the difference in typesetting quality when you look at a document prepared with LaTeX and compare it to something prepared in, say, MS Word. I certainly don't dispute this; I can often tell, but it's hard to put my finger on exactly why. So what are these differences? What are the distinctive features that make a document look like it was prepared in LaTeX, rather than some other system? In other words, if I have a PDF file and I would like to make an educated guess as to whether it was created in LaTeX or not, what should I be looking for? (ignoring any PDF metadata that identifies the creator) I have my own ideas about this but I'll refrain from self-answering, at least for now, to see what other people may suggest.
https://tex.stackexchange.com/users/125
How can I recognize documents prepared in (La)TeX?
true
The default style of section headings are often present in LaTeX documents and rarely found in documents produced by systems outside of the TeX family. Wider margins and a sane number of characters per line are features of most TeX'ed documents and many documents with these features have been TeX'ed. Those first two can be overridden by a TeX user. The following two, much less so. Proper ligatures (e.g. the way that the crossbars on "f"s will touch some following letters) are symptomatic of TeX. My number one sign is relatively few hyphenations and much better looking line justification. You can make a TeX document have a line with bad justification, but it takes effort or bad luck. I've yet to be able to make a word processor have good justification.
21
https://tex.stackexchange.com/users/93
626
426
https://tex.stackexchange.com/questions/624
12
Inspired by a part of [this question](https://tex.stackexchange.com/questions/615/where-can-i-find-a-datasheet-document-class-or-a-tutorial-on-how-to-create-one), this seemed like an interesting question to ask. Advocates of LaTeX often say that you can see the difference in typesetting quality when you look at a document prepared with LaTeX and compare it to something prepared in, say, MS Word. I certainly don't dispute this; I can often tell, but it's hard to put my finger on exactly why. So what are these differences? What are the distinctive features that make a document look like it was prepared in LaTeX, rather than some other system? In other words, if I have a PDF file and I would like to make an educated guess as to whether it was created in LaTeX or not, what should I be looking for? (ignoring any PDF metadata that identifies the creator) I have my own ideas about this but I'll refrain from self-answering, at least for now, to see what other people may suggest.
https://tex.stackexchange.com/users/125
How can I recognize documents prepared in (La)TeX?
false
The first things I look for are Computer Modern fonts and proper ligatures. If the document contains mathematical formulae, the spacing and arrangement of the symbols within looks quite different than the output of, say, Microsoft Equation Editor.
14
https://tex.stackexchange.com/users/112
627
427
https://tex.stackexchange.com/questions/628
21
I've heard (and read) about the new amsrefs system for citations. Is there a good explanation of the pros/cons of amsrefs vis-a-vis bibtex ?
https://tex.stackexchange.com/users/103
When should I use amsrefs instead of regular bibtex ?
true
I don't think that amsrefs is new, exactly, although updates to it appear to be reasonably recent. I haven't heard of many people using it. The much more recent biblatex package is probably a better way to go — it has a lot of momentum and supports, well, everything you would ever want to do with bibliographies. Some more information can be found in the TeX FAQ: <http://texfaq.org/FAQ-biblatex>
14
https://tex.stackexchange.com/users/179
629
428
https://tex.stackexchange.com/questions/624
12
Inspired by a part of [this question](https://tex.stackexchange.com/questions/615/where-can-i-find-a-datasheet-document-class-or-a-tutorial-on-how-to-create-one), this seemed like an interesting question to ask. Advocates of LaTeX often say that you can see the difference in typesetting quality when you look at a document prepared with LaTeX and compare it to something prepared in, say, MS Word. I certainly don't dispute this; I can often tell, but it's hard to put my finger on exactly why. So what are these differences? What are the distinctive features that make a document look like it was prepared in LaTeX, rather than some other system? In other words, if I have a PDF file and I would like to make an educated guess as to whether it was created in LaTeX or not, what should I be looking for? (ignoring any PDF metadata that identifies the creator) I have my own ideas about this but I'll refrain from self-answering, at least for now, to see what other people may suggest.
https://tex.stackexchange.com/users/125
How can I recognize documents prepared in (La)TeX?
false
There are two things that always stand out for me, even on a printed page where I can't check what fonts were used (although it's fairly easy to identify CM fonts by sight, at least compared with Arial, Times, etc.). One is the quality of math, as described by Blake. The other, that makes me use TeX for even mathless writing, is the fact that nothing I've seen so far is able to make the inter-word spacing of fully justified text look anywhere near as clean as TeX does it (and for most documents I don't like the look of ragged right text).
6
https://tex.stackexchange.com/users/32
630
429
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
[WinShell](http://www.winshell.de/) ----------------------------------- *Available For:* Windows FreeWare --- > > WinShell is a free multilingual integrated development environment (IDE) for LaTeX and TeX. The program includes a text editor, syntax highlighting, project management, spell checking, a table wizard, BibTeX support, Unicode support, different toolbars and user configuration options. It is not a LaTeX system; an additional LaTeX package is required. > > > Click image to enlarge
21
https://tex.stackexchange.com/users/95
631
430
https://tex.stackexchange.com/questions/632
11
I want to show prefix notation in my document, somewhat like this: ``` + (x 5 3) (- 6 4) ``` However, I want to enter it in maths mode, but maths mode removes all the spaces, so I get ``` +(x53)(-64) ``` Which has rather a different meaning. Obviously I could add spaces explicitly, but ``` $+\;(\times\;5\;3)\;(-\;6\;4) $ ``` is not exactly readable in the source. Any better ways of doing this?
https://tex.stackexchange.com/users/147
Using prefix notation
true
What you want to write is something very similar to [s-expressions](http://en.wikipedia.org/wiki/S-expression). I was thinking some package might already be there to help you write these, but couldn't find anything after some googling. Anyway, the following TeX macro seems to do the work ``` \documentclass{article} \makeatletter \def\sx@stop{\relax}\def\sx@open{(}\def\sx@close{)} \def\sx@scan#1{% \def\sx@arg{#1}% save the current token \ifx\sx@arg\sx@stop % is it the end of the list? \let\sx@next\relax \else \ifx\sx@arg\sx@close\else\sx@space\fi % add space unless token is ")" {\sx@arg}% % write the token \ifx\sx@arg\sx@open \let\sx@space\relax % kill next space if token is "(" \else \let\sx@space\; \fi \let\sx@next\sx@scan % scan next token \fi\sx@next } \newcommand{\sexp}[1]{\let\sx@space\relax\sx@scan#1\relax} \makeatother \begin{document} $\sexp{+ (\times 5 3) (- 6 4 {7 8})}$ \end{document} ``` Note that you can also group elements, like `{7 8}` to momentarily switch off the effect of the command (i.e. it shows as "78" in the output). You might also need this if some symbol in the expression is a complicated macro that takes arguments or whatever, just enclose the whole thing in a single `{group}`.
7
https://tex.stackexchange.com/users/169
634
431
https://tex.stackexchange.com/questions/632
11
I want to show prefix notation in my document, somewhat like this: ``` + (x 5 3) (- 6 4) ``` However, I want to enter it in maths mode, but maths mode removes all the spaces, so I get ``` +(x53)(-64) ``` Which has rather a different meaning. Obviously I could add spaces explicitly, but ``` $+\;(\times\;5\;3)\;(-\;6\;4) $ ``` is not exactly readable in the source. Any better ways of doing this?
https://tex.stackexchange.com/users/147
Using prefix notation
false
I would just define a macro `\newcommand{\prefix}[3]{#1\;#2\;#3}`, and then use it like this: ``` $\prefix{+}{(\prefix{\times}{5}{3})}{(\prefix{-}{6}{4})}$ ``` Is it readable enough is a personal preference.
2
https://tex.stackexchange.com/users/nan
635
432
https://tex.stackexchange.com/questions/611
24
Context: I'm working on my thesis, and the formatting requirements are pretty godawful. In addition to the version I submit to the grad school, I would like to also create a properly formatted version for everyone else. In particular, my document begins: ``` \documentclass[twoside]{book} ``` Is it possible to later countermand the *twoside* option?
https://tex.stackexchange.com/users/27
Setting class options after \documentclass
false
This is quite similar to a problem that I encounter with just about every article: I get it looking just how I like it, and then the journal says something stupid like "Only documents in our own *in house* style will be accepted." The problem is that they provide a class file which (they say) must be used, and which (helpfully!) defines a load of commands, which do nothing for the style and only get in the way. In the past, I'd have to edit each document each time I submitted to a journal (and for some articles, that's a lot, sadly!). Plus there were the various preprint servers that also required different options. Having switched to keeping my articles in a version control system has actually made me *less* willing to accept this as I want the changes between versions to be substantial rather than just "changed all definitions from `\newcommand` to `\renewcommand` to override definitions from journal *X*". So what I've developed is a *meta* class file which sets up a load of stuff and then calls the *real* class file. So at the head of my document I have: ``` \documentclass[% a4paper,% journalX,% %draft,% %hopf,% %journalY,% %arxiv,% %article,% %amsart,% defaults,% ]% {myclass} ``` There, you can see that I submitted it to a journal 'X' and that it was probably previously submitted to journal 'Y'. There are presumably some changes made in draft mode. It happened to be a paper in algebraic topology, so a copy when to the *hopf* archive, which I've found has some font issues. Plus there are some defaults getting set. The 'a4paper' option (as with any other unknown option) gets passed on to the eventually-selected class file. Each time I choose a new journal, I have to integrate its class file into this meta class, but that only needs doing once rather than once-per-article. One *major* saving on this is with organising the title page. All the title information is entered in the same way for all journals, the meta class file sorts it out into the right format for the specific journal (this is actually the major headache when integrating a new journal class file into my system - I could tell you some horror stories!). The system gets even better when it comes to my lectures. I use beamer now for my lectures and make the slides available to the students. But I don't want them printing out the full set of slides, so I make the handout version available. Plus, to make it easier to maintain a consistent style and cut-and-paste stuff between lectures, I keep all the lectures in *one* file. When I run LaTeX on it, I want to be able to select: a particular lecture and a particular format (beamer, trans, handout). I do that by putting in to my meta class file a test that looks at the jobname for these details. Then I make suitable symlinks to the main file: ``` ln -s lectures.tex lecture.handout.2010-08-23.tex pdflatex lecture.handout.2010-08-23.tex ``` produces the handout version of the lecture (to be) given on 23rd August 2010. This solution is, I'm sure, overkill in your situation! However, as I've said, your situation is only the tip of an iceberg. --- **Update 2012-04-11:** Every now and then I get asked about this class file. I've put a page about it on my website which is at: <https://github.com/loopspace/myclass>. A copy of the file is available there. Please note that: 1) this was written for my use with no expectation that anyone else would ever see it, let alone use it; 2) it was written a long time before this site came into existence - I would probably do it very differently now! (I'd get egreg to write it via a sequence of craftily sculpted questions.)
11
https://tex.stackexchange.com/users/86
636
433
https://tex.stackexchange.com/questions/595
617
To make Latin-letter variables bold I can use e.g. `\mathbf{a}`, but while putting Greek letters or symbols such as `\nabla` inside `\mathbf` doesn't cause any errors or warnings, it also doesn't do anything else. **What is the best way to make bold math symbols, in particular Greek letters and `\nabla`?**
https://tex.stackexchange.com/users/32
How can I get bold math symbols?
false
Another possibility is [`\boldmath`](http://texblog.net/help/latex/boldmath.html), though I would prefer `\boldsymbol` of [`amsmath`](http://ctan.org/pkg/amsmath) as well. `\unboldmath` switches back to the normal math font.
49
https://tex.stackexchange.com/users/213
638
434
https://tex.stackexchange.com/questions/332
13
There's a couple of things I want to be able to do that are quite similar and basically involve keeping back a macro expansion until the last minute. Possibly the simplest example is that I have a family of macros that expand out to variations of "object in X", but sometimes I override the default. So whilst `\cobj` expands to "object in C", `\sobj` expands to "set" and `\gobj` expands to "group". Where this causes trouble is when I want to talk about *an* object. Generically, I should type "an \cobj" but in the specific cases I may need to change to "a \sobj". The difficulty is that one reason for using these macros is so that I can change my mind as to which ones get special names and which don't. But it (partially) defeats the purpose if I have to go back through rewriting all the 'an's as 'a's. So what I'd like to do is define a macro '\a' which checks the next character for a vowel and produces 'an' or 'a' appropriately (modulo the odd special case!). The difficulty with this is that it isn't followed by a character, it's followed by a macro. So I need to expand that macro to find out what character is the eventual first one. If it were a simple macro, say `\def\cobj{object in C}` then I could just do `\def\a{\noexpand\@a}` and `\def\@a{\@ifnextchar{a}{an}{\@ifnextchar{e}{an}...}`, but `\cobj` is quite a complicated macro and there's several levels to be expanded before one actually gets to the final characters. In particular, `\cobj` takes an optional argument. So what I'd like is to be able to expand `\a` at the last possible minute. Sort of like `\noexpand`, but that only does a noexpand for one hop rather than 'end - 1' hops. Anyone have any ideas as to how best to proceed? To give an indication of the level of answer that would be acceptable, I know about `\expandafter` and I'm not afraid to use it! --- **Edit:** Here's another example that is a little more complicated. In a similar situation to the above, I have `\dcat` for "the category D". On a few rare occasions, I want to "eat" the "the", so I want a `\nothe` command that I can put beforehand: `\nothe\dcat` which eats the first word following it. It's simple enough to write a command that gobbles the next word in the *input stream*, but I want the next word in the *output* to disappear.
https://tex.stackexchange.com/users/86
Is there a '\ReallyDontExpandUntilTheLastMinute' command?
false
I'm accepting Juan's second answer, but I think I'll add a twist of my own (which Juan couldn't have suggested because he doesn't know about the internals of the macros that I'm defining!). The macros that I'm defining *already* have variants that deal with capitals and plurals so it's no problem to add a new variant that correctly handles the article. The problem, as I indicated in my comment to Juan, is that the capitals and plurals are handled by suffixes but the article should be handled by prefixes and prefixes are already special. In more detail, buried in the expansion of `\dobj` is something like '\my@lower{O}bject\my@singular{}{s} in D'. `\dobj` itself expands with `\my@lower` equivalent to `\MakeLowercase` and `\my@singular` just giving its first argument. `\dobjs` changes the behaviour of `\my@singular`, whilst `\dobju` changes that of `\my@lower`. So I could easily throw in a new switch, say `\my@article`, which chose between "a" or "the" as appropriate and because it gets thrown in to the definition, I specify whether or not it is "a" or "an". My only problem is what to bind it to. In the above scheme, the obvious choice is `\dobja`, but that looks horrible! But I can't use `\adobj` because that conflicts with the fact that `\dobj` is really the simplest one of these that I have and the current record for most complicated is `\KGvCGvTtobj` [1]. So prefixes already have meaning and I don't want to overload them. So what I'll try is to mix both my original plan and this solution. I'll write `\a \dobj` as I originally intended, but the `\a` *won't* eat the `\dobj`, rather it will set a flag telling the `\dobj` command to select the 'a/an' part of the `\dobj` command. (except, of course, I can't use `\a` as that's already taken; boo-hoo) [1] A monoid, with respect to the *Tall-Wraith* monoidal structure, in the category of co-V^*-algebra objects in the category of complete V^* objects, where the '^\*' indicates that everything is graded; just in case you were wondering.
2
https://tex.stackexchange.com/users/86
640
435
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
[Latexmk](http://ctan.tug.org/tex-archive/support/latexmk/) has an option that will compile your document every time you save it. It requires Perl. There is also some very useful information in this [Stackoverflow question](https://stackoverflow.com/questions/738755/dont-make-me-manually-abort-a-latex-compile-when-theres-an-error) about how to work with latexmk when you document has errors (which can happen a lot with TikZ).
38
https://tex.stackexchange.com/users/185
641
436
https://tex.stackexchange.com/questions/365
20
I usually use LyX to prepare lecture notes, course summaries, etc. The reason I use LyX and not LaTex directly is twofold - 1. I usually need to type in real time - summing a lecture. I think for this I'd still need LyX. 2. I write all these documents in Hebrew, and it seems to me that writing Hebrew documents with LaTeX will be a real pain (different direction of text, etc.). So I'm looking to solve #2 - have you ever used LaTeX for a right-to-left language effectively? What IDEs support this? What do you do when you need to write a document in such a language?
https://tex.stackexchange.com/users/5
IDE / Best known method for writing Hebrew documents with LaTeX
false
I don't write in Hebrew, but I do use Lyx! The wiki has instructions on how to set it up for Hebrew at [lyx.org/Windows/Hebrew](http://wiki.lyx.org/Windows/Hebrew). The URL says it's for Windows, but a quick check on my Mac shows that it works on other operating systems as well. The link also shows how to set up a shortcut to switch back and forth between one language setting and another, so you should be able to do this in your lecture and go smoothly between English and Hebrew (if you need that).
4
https://tex.stackexchange.com/users/186
642
437
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
[TeXlipse](http://texlipse.sourceforge.net/) automatically compiles the document on save and I usually have the PDF open (in *Preview* on Mac OS X or in *evince* on Ubuntu 10.04, which both automatically show the updated PDF if it is changed).
1
https://tex.stackexchange.com/users/30
643
438
https://tex.stackexchange.com/questions/644
17
I am looking for all the tips and what should be considered specifically for the layout of professionally looking books.
https://tex.stackexchange.com/users/63
Is there anywhere a tutorial of how to publish a book with LaTeX?
true
The [`memoir`](http://www.ctan.org/tex-archive/macros/latex/contrib/memoir/) package, more specifically its documentation, is written as an introduction to professional layouts. It contains a lot of examples of different styles of books and how to obtain them. It can be a good start :).
25
https://tex.stackexchange.com/users/210
645
439
https://tex.stackexchange.com/questions/639
4
I was trying out Will Robertson's answer to [this question](https://tex.stackexchange.com/questions/335/can-i-change-the-font-and-colour-of-a-letter-permanently) and couldn't get it to compile correctly. Chasing through the log output, it seems that an *old* version of a package is getting loaded instead of a *new* one. In slightly more detail, the package I was trying to test ([`unicode-math`](https://www.ctan.org/pkg/unicode-math)) said that it needed the most up-to-date versions of a couple of packages (the crucial one here seems to be [`fontspec`](https://www.ctan.org/pkg/fontspec)). So, I downloaded them and put them in to my *user* `texmf` tree. However, when I compile the test file, the system one is loaded. This is despite the fact that the requesting file specifies a version later than that provided for by the system version, **and** the fact that when I do > > kpsewhich `fontspec.sty` > > > then *my* version is returned. MWE: TeX Live 2009 (TeX Live 2010 has the right versions of the packages, but 2009 is what comes with my distribution) with `unicode-math`, `fontspec`, [`expl3`](https://www.ctan.org/pkg/expl3), and `xpackages` from CTAN (as per the page on `unicode-math`). `test.tex`: ``` \documentclass{article} \usepackage{unicode-math} \begin{document} \end{document} ``` both ``` xelatex test.tex lualatex test.tex ``` complain. The complaint appears later when loading some fonts, but given that the wrong `fontspec` package is loaded, I'm guessing that the error lies there rather than when TeX actually complains. To confirm locations: ``` tmp% kpsewhich fontspec.sty /home/astacey/texmf/tex/latex/bzr/unmodified/fontspec/fontspec.sty ``` But the output from TeX (slightly condensed): ``` tmp% xelatex test.tex This is XeTeX, Version 3.1415926-2.2-0.9995.2 (TeX Live 2009/Debian) restricted \write18 enabled. entering extended mode (./test.tex ... (/home/astacey/texmf/tex/latex/bzr/unmodified/unicode-math/unicode-math.sty ... (/home/astacey/texmf/tex/latex/bzr/unmodified/xpackages/xparse.sty) (/home/astacey/texmf/tex/latex/bzr/unmodified/xpackages/l3keys2e.sty) (/usr/share/texmf-texlive/tex/xelatex/fontspec/fontspec.sty ... ``` Note that *some* packages are getting pulled from my local `texmf` tree, it's just this one that isn't.
https://tex.stackexchange.com/users/86
Why is the wrong version of a package being loaded?
false
This is somewhat LaTeX distribution dependent, but as it happens, I am also using a version of TeXLive. (2007, as I've let a few upgrades to my distro go by.) It isn't enough for package files to be in your local or user texmf-tree. You must also, as it were, register them with TeXLive. From a command prompt, run `texhash`. (On ubuntu, I seem to recall that this requires root privileges, so `sudo texhash` would be what you need.) *Provided* TeXLive is aware that your user texmf-tree exists, running this command should cause it to scan that tree, amongst other places, and become aware of what packages it can find there. If this doesn't work, then TeXLive needs to be made aware of your user texmf-tree. (How to set that up is, I think, a separate question.) Or, you could run `sudo texhash path_to_user_texmf`. But, since you say that some packages in your user tree do get invoked, this is an issue that you've already got sorted, it would seem.
2
https://tex.stackexchange.com/users/93
646
440
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?
true
On a Mac, you can of course just open up a terminal, `cd` to the directory where you keep the TeX file, and issue ``` while true; do sleep 5; latex -halt-on-error filename.tex; done ``` and have the DVI file open in a viewer that watches for (and reloads on) changes. The one-liner runs `latex` continuously with 5 second break between runs (the `-halt-on-error` options prevents the incantation from getting stuck if you saved a file with errors). You can also swap in `pdflatex` instead. This solves half of your problem. The other half has to be dealt with by your editor of choice. You need to set it up to automatically save the file every x seconds, and how to do that depends on the editor at hand. --- Now, that one-liner I gave above is quite ugly and resource wasting, since it makes no sense to re-compile if no changes are made (*Edit: See [this comment below](https://tex.stackexchange.com/questions/633/is-there-any-way-to-get-real-time-compilation-for-latex/647#comment167668_647) for a much better way to avoid this problem*). So you can do something like ``` while true; do sleep 2; if [ filename.tex -nt filename.log ]; then latex -halt-on-error filename.tex; fi; done ``` which watches for changes to the TeX file (signaled by the fact that `filename.tex` is more recently modified than `filename.log`) and compile when necessary (with a possible two seconds delay). --- Short of a WYSIWYG, I am not quite sure how you can achieve full real-time solution. Compiling the code takes usually a short amount of time (1 or 2 seconds, or more if the file is large). So if you are looking for a solution that calls the LaTeX compiler, it probably shouldn't try to do it more often than once every 5 or 10 seconds. So you won't be able to immediately see what you typed in the DVI window. Also, if the editor autosaves the file in a spot where you are halfway typing a command, then the source won't compile. With LaTeX I feel that the better idea is "compile-on-saves", where the human initiates the saving of the file (as compared to "automatically saving and compiling in the background). For that, modern editors can generally support hot-keys where saving and compiling is mapped to one keystroke. In `vim` I map `F2` to compile and `F4` to call XDVI.
32
https://tex.stackexchange.com/users/119
647
441
https://tex.stackexchange.com/questions/639
4
I was trying out Will Robertson's answer to [this question](https://tex.stackexchange.com/questions/335/can-i-change-the-font-and-colour-of-a-letter-permanently) and couldn't get it to compile correctly. Chasing through the log output, it seems that an *old* version of a package is getting loaded instead of a *new* one. In slightly more detail, the package I was trying to test ([`unicode-math`](https://www.ctan.org/pkg/unicode-math)) said that it needed the most up-to-date versions of a couple of packages (the crucial one here seems to be [`fontspec`](https://www.ctan.org/pkg/fontspec)). So, I downloaded them and put them in to my *user* `texmf` tree. However, when I compile the test file, the system one is loaded. This is despite the fact that the requesting file specifies a version later than that provided for by the system version, **and** the fact that when I do > > kpsewhich `fontspec.sty` > > > then *my* version is returned. MWE: TeX Live 2009 (TeX Live 2010 has the right versions of the packages, but 2009 is what comes with my distribution) with `unicode-math`, `fontspec`, [`expl3`](https://www.ctan.org/pkg/expl3), and `xpackages` from CTAN (as per the page on `unicode-math`). `test.tex`: ``` \documentclass{article} \usepackage{unicode-math} \begin{document} \end{document} ``` both ``` xelatex test.tex lualatex test.tex ``` complain. The complaint appears later when loading some fonts, but given that the wrong `fontspec` package is loaded, I'm guessing that the error lies there rather than when TeX actually complains. To confirm locations: ``` tmp% kpsewhich fontspec.sty /home/astacey/texmf/tex/latex/bzr/unmodified/fontspec/fontspec.sty ``` But the output from TeX (slightly condensed): ``` tmp% xelatex test.tex This is XeTeX, Version 3.1415926-2.2-0.9995.2 (TeX Live 2009/Debian) restricted \write18 enabled. entering extended mode (./test.tex ... (/home/astacey/texmf/tex/latex/bzr/unmodified/unicode-math/unicode-math.sty ... (/home/astacey/texmf/tex/latex/bzr/unmodified/xpackages/xparse.sty) (/home/astacey/texmf/tex/latex/bzr/unmodified/xpackages/l3keys2e.sty) (/usr/share/texmf-texlive/tex/xelatex/fontspec/fontspec.sty ... ``` Note that *some* packages are getting pulled from my local `texmf` tree, it's just this one that isn't.
https://tex.stackexchange.com/users/86
Why is the wrong version of a package being loaded?
false
This is weird... if kpsewhich is returning the correct path for fontspec, I can't imagine why it's not being loaded. Perhaps try moving the old version of the package completely out of the texmf tree so only the new one is present? TL2010 will be available soon (it's already available [here](http://tug.org/texlive/pretest.html) now but it's in the process of being burnt to DVD for official release), hopefully mitigating this problem.
0
https://tex.stackexchange.com/users/179
648
442
https://tex.stackexchange.com/questions/650
17
I'm using `flyspell` mode, but unfortunatly I have to `M-x flyspell-mode` in each AUCTeX buffer. Somehow `(add-hook 'LaTeX-mode-hook 'flyspell-mode)` doesn't work for me. What is the correct `flyspell`-hook in AUCTeX?
https://tex.stackexchange.com/users/137
How to turn on flyspell mode with AUCTeX?
true
Try `(add-hook 'LaTeX-mode-hook '(flyspell-mode t))` This will force flyspell-mode to turn on, instead of toggling it.
13
https://tex.stackexchange.com/users/16
651
443
https://tex.stackexchange.com/questions/652
12
When trying to compile a LaTeX document in Ubuntu 10.04 with `xelatex` I get the following error message: ``` This is XeTeX, Version 3.1415926-2.2-0.9995.2 (TeX Live 2009/Debian) restricted \write18 enabled. entering extended mode (./test.tex LaTeX2e <2009/09/24> Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh yphenation, ngerman, german, german-x-2009-06-19, ngerman-x-2009-06-19, loaded. (/usr/share/texmf-texlive/tex/latex/base/article.cls Document Class: article 2007/10/19 v1.4h Standard LaTeX document class (/usr/share/texmf-texlive/tex/latex/base/size10.clo)) (/usr/share/texmf-texlive/tex/xelatex/fontspec/fontspec.sty (/usr/share/texmf-texlive/tex/generic/ifxetex/ifxetex.sty) (/usr/share/texmf-texlive/tex/latex/tools/calc.sty) (/usr/share/texmf-texlive/tex/latex/xkeyval/xkeyval.sty (/usr/share/texmf-texlive/tex/generic/xkeyval/xkeyval.tex (/usr/share/texmf-texlive/tex/generic/xkeyval/keyval.tex))) (/usr/share/texmf-texlive/tex/latex/base/fontenc.sty (/usr/share/texmf-texlive/tex/xelatex/euenc/eu1enc.def) (/usr/share/texmf-texlive/tex/xelatex/euenc/eu1lmr.fd)kpathsea: Invalid fontname `[lmroman10-regular]', contains '[' ! Font EU1/lmr/m/n/10=[lmroman10-regular]:mapping=tex-text at 10.0pt not loadab le: Metric (TFM) file or installed font not found. <to be read again> relax l.100 \fontencoding\encodingdefault\selectfont ``` What is wrong?
https://tex.stackexchange.com/users/83
XeTeX not working on Ubuntu 10.04?
true
This is a bug in Ubuntu 10.04's textlive-xetex package: It does not depend on the `lmodern` package (see the [Lauchpad bug report](https://bugs.launchpad.net/ubuntu/+source/texlive-base/+bug/556071)). To fix the problem just install the `lmodern` package, e.g. via ``` sudo apt-get install lmodern ``` (This also effects Debian Lenny: <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=576599>)
20
https://tex.stackexchange.com/users/83
653
444
https://tex.stackexchange.com/questions/639
4
I was trying out Will Robertson's answer to [this question](https://tex.stackexchange.com/questions/335/can-i-change-the-font-and-colour-of-a-letter-permanently) and couldn't get it to compile correctly. Chasing through the log output, it seems that an *old* version of a package is getting loaded instead of a *new* one. In slightly more detail, the package I was trying to test ([`unicode-math`](https://www.ctan.org/pkg/unicode-math)) said that it needed the most up-to-date versions of a couple of packages (the crucial one here seems to be [`fontspec`](https://www.ctan.org/pkg/fontspec)). So, I downloaded them and put them in to my *user* `texmf` tree. However, when I compile the test file, the system one is loaded. This is despite the fact that the requesting file specifies a version later than that provided for by the system version, **and** the fact that when I do > > kpsewhich `fontspec.sty` > > > then *my* version is returned. MWE: TeX Live 2009 (TeX Live 2010 has the right versions of the packages, but 2009 is what comes with my distribution) with `unicode-math`, `fontspec`, [`expl3`](https://www.ctan.org/pkg/expl3), and `xpackages` from CTAN (as per the page on `unicode-math`). `test.tex`: ``` \documentclass{article} \usepackage{unicode-math} \begin{document} \end{document} ``` both ``` xelatex test.tex lualatex test.tex ``` complain. The complaint appears later when loading some fonts, but given that the wrong `fontspec` package is loaded, I'm guessing that the error lies there rather than when TeX actually complains. To confirm locations: ``` tmp% kpsewhich fontspec.sty /home/astacey/texmf/tex/latex/bzr/unmodified/fontspec/fontspec.sty ``` But the output from TeX (slightly condensed): ``` tmp% xelatex test.tex This is XeTeX, Version 3.1415926-2.2-0.9995.2 (TeX Live 2009/Debian) restricted \write18 enabled. entering extended mode (./test.tex ... (/home/astacey/texmf/tex/latex/bzr/unmodified/unicode-math/unicode-math.sty ... (/home/astacey/texmf/tex/latex/bzr/unmodified/xpackages/xparse.sty) (/home/astacey/texmf/tex/latex/bzr/unmodified/xpackages/l3keys2e.sty) (/usr/share/texmf-texlive/tex/xelatex/fontspec/fontspec.sty ... ``` Note that *some* packages are getting pulled from my local `texmf` tree, it's just this one that isn't.
https://tex.stackexchange.com/users/86
Why is the wrong version of a package being loaded?
true
Turned out that the answer to this one was that the different programs pass different options to the kpathsea engine about where to look for their packages. Since I was calling `xelatex`, packages in places like `texmf/tex/xelatex` were preferred over packages elsewhere in the `texmf` tree. When I ran `kpsewhich` on the command-line, it didn't know that I intended using `xelatex` so just looked everywhere. Moving the fontspec package to a directory under `~/texmf/tex/xelatex` fixed that problem. I see also that `kpsewhich` can be given the option '-engine X' to make its search engine-specific. (Note: this program-specific behaviour seems to override the selection-by-date mechanism that Caramdir mentions in the comment to the question. Also, that didn't solve everything as I'm now getting issues with font generation; I'm currently downloading TL2010 to see if that fixes everything in one fell swoop.)
5
https://tex.stackexchange.com/users/86
654
445
https://tex.stackexchange.com/questions/649
46
The [`amsmath`](https://www.ctan.org/pkg/amsmath) package redefines the `\dots` command so that it "guesses" the correct height of the dots with respect to its context. For example ``` $x, \dots, y$ ``` will produce three lowered dots, aligned with the commas. While ``` $x \to \dots \to y$ ``` uses centered dots that align with the arrows. However, if I define my own macros, `amsmath` can no longer guess and it always uses the lowered dots. For example ``` \newcommand{\myto}{\to} $x \myto \dots \myto y$ ``` uses the wrong dots. How can I tell `amsmath` that I want centered and not lowered dots? Btw., I know about `\cdots` but what I want is `\dots` to still be able to guess the correct ones automatically.
https://tex.stackexchange.com/users/169
How do magic \dots work in amsmath?
false
OK, so since I asked the [debugging](https://tex.stackexchange.com/questions/538/how-to-best-debug-latex) question, I ventured out and tried to debug! Using just `\show` didn't work, producing the following in the log file: ``` > \dots=macro: ->\protect \dots . l.7 \show\dots ``` so I googled for the show command and found [this](http://texfaq.org/FAQ-ltxcmds) page and so I did the following ``` \def\pshow#1{{\let\protect\show #1}} \begin{equation*} a \pshow{\dots} b=0; \end{equation*} ``` which resulted in: ``` > \dots =\long macro: ->\ifmmode \@xp \mdots@ \else \@xp \textellipsis \fi . \dots ->\protect \dots ``` Looking deeper to examine `\mdots@` is possible (using `\makeatletter` and `\makeatother`) but is quite horrific: ``` > \mdots@=macro: ->\FN@ \mdots@@ . l.11 \show\mdots@ ``` where ``` > \FN@=macro: ->\futurelet \@let@token . ``` and ``` > \mdots@@=macro: ->\gdef \thedots@ {\dotso@ }\ifx \@let@token \boldsymbol \gdef \thedots@ \boldsymbol {\boldsymboldots@ }\else \ifx ,\@let@token \gdef \thedots@ {\dotsc }\else \ifx \not \@let@token \gdef \thedots@ {\dotsb@ }\else \keybin@ \ifgtest@ \gdef \thedots@ {\dotsb@ }\else \xdef \meaning@ {\meaning \@let@token ..........}\xdef \meaning@@ {\meaning@ }\@xp \math@ \meaning@ \math@ \ifgtest@ \@xp \mathch@ \meaning@ \mathch@ \ifgtest@ \@xp \getmathch@ \meaning@ \getmathch@ \fi \else \@xp \macro@ \meaning@@ \macro@ \ifgtest@ \@xp \not@ \meaning@ \not@ \ifgtest@ \gdef \thedots@ {\dotsb@ }\else \@xp \DOTS@ \meaning@ \DOTS@ \ifgtest@ \ifcase number \DOTSCASE@ \gdef \thedots@ {\dotsb@ }\or \gdef \thedots@ {\dotsi }\else \fi \else \@xp \math@ \meaning@ \math@ \ifgtest@ \@xp \mathbin@ \meaning@ \mathbin@ \ifgtest@ \gdef \thedots@ {\dotsb@ }\else \@xp \mathrel@ \meaning@ \mathrel@ \ifgtest@ \gdef \thedots@ {\dotsb@ }\fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \thedots@ . ``` At this point, I give up....anyone care to continue this dissection?
5
https://tex.stackexchange.com/users/117
657
446
https://tex.stackexchange.com/questions/655
375
Inspired by a [question about `\let` and `\def`](https://tex.stackexchange.com/questions/258/what-is-the-difference-between-let-and-def "What is the difference between \let and \def?"), I have some that essentially all boil down to asking **What are the differences between `\def` and `\newcommand`?** In particular, I wonder 1. Is it possible to have parameters passed to `\def`ed commands, both optional and required? 2. Is there a `\redef` command equivalent to `\renewcommand`? 3. I have only ever used `\newcommand` -- is there any reason I should change that habit? but I welcome comments on anything else I may not have thought of in this list!
https://tex.stackexchange.com/users/32
What is the difference between \def and \newcommand?
true
`\def` is a TeX primitive, `\newcommand` is a LaTeX overlay on top of `\def`. The most obvious benefits of `\newcommand` over `\def` are: 1. `\newcommand` checks whether or not the command already exists 2. `\newcommand` allows you to define an optional argument In general, anything that `\newcommand` does can be done by `\def`, but it usually involves a little trickery and unless you want something that `\newcommand` can't do, there's no point in reinventing the wheel. In answer to your particular points: 1. Yes and No. A command defined using `\def` has to know exactly what its options are, and how they will be presented to it. However, a TeX command can be a bit clever and examine things *other* than its arguments. The way that optional commands are handled is to look at the next character in the stream and if it is `[` then one version of the command is called, whereas if it isn't then another is called. So if you're prepared to do some hackery, then optional arguments are possible via `\def`, but it isn't half so easy as `\newcommand`. 2. No. Since `\def` doesn't check for a command already being defined, you can redefine stuff simply using `\def` again. To get the checking, you need to use the `\@ifundefined` command (note the ampersat (`@`) sign!). 3. No! There's probably lots more to be said on the differences, but that's enough from me.
273
https://tex.stackexchange.com/users/86
658
447
https://tex.stackexchange.com/questions/649
46
The [`amsmath`](https://www.ctan.org/pkg/amsmath) package redefines the `\dots` command so that it "guesses" the correct height of the dots with respect to its context. For example ``` $x, \dots, y$ ``` will produce three lowered dots, aligned with the commas. While ``` $x \to \dots \to y$ ``` uses centered dots that align with the arrows. However, if I define my own macros, `amsmath` can no longer guess and it always uses the lowered dots. For example ``` \newcommand{\myto}{\to} $x \myto \dots \myto y$ ``` uses the wrong dots. How can I tell `amsmath` that I want centered and not lowered dots? Btw., I know about `\cdots` but what I want is `\dots` to still be able to guess the correct ones automatically.
https://tex.stackexchange.com/users/169
How do magic \dots work in amsmath?
false
This doesn't do what you're asking for, but in best semantic fashion, amsmath also defines > > * `\dotsc` for “dots with commas” > * `\dotsb` for “dots with binary operators/relations” > * `\dotsm` for “multiplication dots” > * `\dotsi` for “dots with integrals” > * `\dotso` for “other dots” (none of the above) > > > (Quoted from [the Short Math Guide for LaTeX, page 15](http://mirrors.ctan.org/info/short-math-guide/short-math-guide.pdf#page=15).) Each of these specifies the height. I didn't find the behavior of \dots you described documented. Can you point out where it is?
10
https://tex.stackexchange.com/users/206
659
448
https://tex.stackexchange.com/questions/649
46
The [`amsmath`](https://www.ctan.org/pkg/amsmath) package redefines the `\dots` command so that it "guesses" the correct height of the dots with respect to its context. For example ``` $x, \dots, y$ ``` will produce three lowered dots, aligned with the commas. While ``` $x \to \dots \to y$ ``` uses centered dots that align with the arrows. However, if I define my own macros, `amsmath` can no longer guess and it always uses the lowered dots. For example ``` \newcommand{\myto}{\to} $x \myto \dots \myto y$ ``` uses the wrong dots. How can I tell `amsmath` that I want centered and not lowered dots? Btw., I know about `\cdots` but what I want is `\dots` to still be able to guess the correct ones automatically.
https://tex.stackexchange.com/users/169
How do magic \dots work in amsmath?
true
Looking at `amsmath.sty`, I see lots of lines like: ``` \gdef\coprod{\DOTSB\coprod@\slimits@} ``` I would guess that the `\DOTSB` controls what kind of dots go before (or after?) this symbol. Doing ``` \show\mapsto ``` shows that that has the magic `\DOTSB`. So if defining your own macro, I would experiment with adding `\DOTSB`, `\DOTSI`, `\DOTSX` (those appear to be the options) before or after them. (Please report back on what happens!). I would guess that `\dots` "knows" about certain commands, but has to be told about any extra. `\to` seems to come in under the "known" commands, but, for example, it has to be told about `\mapsto`: ``` > \mapsto=\long macro: ->\DOTSB \mapstochar \rightarrow . l.3 \show\mapsto ```
25
https://tex.stackexchange.com/users/86
660
449
https://tex.stackexchange.com/questions/656
19
I'm using LaTeX and like to create an acknowledgement section using the `report` class such that is looks like the abstract and comes after it.
https://tex.stackexchange.com/users/137
How to create acknowledgements in the report class?
false
``` \section*{Acknowledgements} Thanks Mum. ```
37
https://tex.stackexchange.com/users/179
661
450
https://tex.stackexchange.com/questions/655
375
Inspired by a [question about `\let` and `\def`](https://tex.stackexchange.com/questions/258/what-is-the-difference-between-let-and-def "What is the difference between \let and \def?"), I have some that essentially all boil down to asking **What are the differences between `\def` and `\newcommand`?** In particular, I wonder 1. Is it possible to have parameters passed to `\def`ed commands, both optional and required? 2. Is there a `\redef` command equivalent to `\renewcommand`? 3. I have only ever used `\newcommand` -- is there any reason I should change that habit? but I welcome comments on anything else I may not have thought of in this list!
https://tex.stackexchange.com/users/32
What is the difference between \def and \newcommand?
false
Adding to [Andrew's](#658) already good response, the one thing that `\def` can do that `\newcommand` cannot is define commands that take delimiters other than braces. For example, if you want to be able to write `\foo<hello>` and have the ‘hello’ interpreted as an argument, you can write ``` \def\foo<#1>{...something with #1...} ``` You can also have commands that read input up to the *next* brace, such as ``` \def\foobar#1#{\framebox[#1]} \foobar 47pt {hello} ``` --- For a combination of the extensibility of `\def` with the ease-of-use of `\newcommand`, check out David Kastrup's `suffix` package. Very handy when you want to define custom markup for your document. Also look at the LaTeX3 package `xparse` which takes a more structured and generalised look at how `\newcommand` should work.
130
https://tex.stackexchange.com/users/179
662
451
https://tex.stackexchange.com/questions/268
151
When trying to write an e-mail address, there are always problems with the @ sign. Solutions I've seen suggested are using some verbatim environment (more difficult in footnotes) and using a math-mode @. What is *the* correct way to do this?
https://tex.stackexchange.com/users/135
What's the best way to write e-mail addresses?
false
Just to add to Willie's good answer, in terms of the formatting (as the OP seems to be getting at) there isn't a "correct" way. Use `\textsf` or `\texttt` or whatever looks good for your particular document and use case and font choice. Also try the `randtext` package to attempt to obfuscate the email address inside the PDF to make it less susceptible to spammers (but note that — I think — it doesn't play nice with hyperref's `\href`). If you want to "special-case" the @ sign without adding markup to your text, you could write something like this: ``` \documentclass{article} \usepackage{color,hyperref} \catcode`\_=11\relax \newcommand\email[1]{\_email #1\q_nil} \def\_email#1@#2\q_nil{% \href{mailto:#1@#2}{{\emailfont #1\emailampersat #2}} } \newcommand\emailfont{\sffamily} \newcommand\emailampersat{{\color{red}\small@}} \catcode`\_=8\relax \begin{document} \email{foobar@gmail.com} \end{document} ``` where you get the proper hyperlinking of the email address and you can customise the look of the email by changing `\emailfont` and the look of the ampersat (or arrobase, or @) by changing `\emailampersat`.
27
https://tex.stackexchange.com/users/179
663
452
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
[TexShop](http://www.uoregon.edu/~koch/texshop/) (also available through MacPorts) does a save on compile. It has a preview window so you can see your compiled document as you go.
4
https://tex.stackexchange.com/users/19
665
453
https://tex.stackexchange.com/questions/667
32
I use `\usepackage{url}` and `\url{…}` to typeset URLs, but the typewriter font stands out a little too much. How can I have the URLs typeset in a different font?
https://tex.stackexchange.com/users/35
Typeset URL in a non-typewriter font
true
According to the [README](http://www.utexas.edu/ogs/etd/LaTeX/Style.files/url.sty.readme.txt), > > you can switch the style of printing > using `\urlstyle{tt}`, where `tt` can > be any defined style. The pre-defined > styles are `tt`, `rm`, `sf`, and > `same`, all of which produce the same > linebreaks but use different fonts—the > first three select a specific font and > the ‘same’ style uses the current text > font. > > > You can also define your own font: ``` \makeatletter \def\url@foostyle{% \@ifundefined{selectfont}{\def\UrlFont{\sf}}{\def\UrlFont{\small\ttfamily}}} \makeatother %% Now actually use the newly defined style. \urlstyle{foo} ``` (The last example is from <http://www.kronto.org/thesis/tips/url-formatting.html>.)
38
https://tex.stackexchange.com/users/35
668
454
https://tex.stackexchange.com/questions/669
45
I know that I can put `\usepackage{times}` in the preamble in order to use the Times font instead of Computer Modern for my document. But this only affects the text; the math is still typeset using Computer Modern. How can I make Latex use Times also for the math?
https://tex.stackexchange.com/users/35
How do I make my document use the Times font, both for the text and the math?
false
Put ``` \usepackage[bigsym]{mathptm} ``` in your preamble. This makes LaTeX use the Times and Symbol fonts for math, except for large symbols (summation, integration, etc.) which look funny in the Postscript Symbol font.
0
https://tex.stackexchange.com/users/35
670
455
https://tex.stackexchange.com/questions/671
153
Mathematical operators, such as function names, should be set in roman type, not italics. Latex already has commands for some operators, including `\max`, `\min`, and `\log`. How can I define additional such commands?
https://tex.stackexchange.com/users/35
Define additional math operators to be typeset in roman
false
Define the command \newoperator as follows: ``` \providecommand{\newoperator}[3]{% \newcommand*{#1}{\mathop{#2}#3}} ``` Here is an example that defines \FD as an operator: ``` \newoperator{\FD}{\mathrm{FD}}{\nolimits} ```
5
https://tex.stackexchange.com/users/35
672
456
https://tex.stackexchange.com/questions/669
45
I know that I can put `\usepackage{times}` in the preamble in order to use the Times font instead of Computer Modern for my document. But this only affects the text; the math is still typeset using Computer Modern. How can I make Latex use Times also for the math?
https://tex.stackexchange.com/users/35
How do I make my document use the Times font, both for the text and the math?
true
Probably the most common solution at present using free fonts is `mathptmx` ``` \usepackage{mathptmx} ``` This package supersedes `times` and `mathptm`. The commercial `mathtime` is available in a 'lite' version in a free (cost) package, but you need to pay for the full version. See <http://www.pctex.com/mtpro2.html> As noted in the [answer by mafp](https://tex.stackexchange.com/a/95348), the newer `newtx` bundle is now available and addresses issues present in `mathptmx`.
40
https://tex.stackexchange.com/users/73
673
457
https://tex.stackexchange.com/questions/671
153
Mathematical operators, such as function names, should be set in roman type, not italics. Latex already has commands for some operators, including `\max`, `\min`, and `\log`. How can I define additional such commands?
https://tex.stackexchange.com/users/35
Define additional math operators to be typeset in roman
false
Alternatively, if you are using any of the packages from the AMS (`amsart.cls` or `amsmath.sty`) then there is a command `\DeclareMathOperator` which does what it says on the tin! For example, ``` \DeclareMathOperator{\Det}{Det} ``` I think that it can handle variants, but I don't recall off the top of my head.
38
https://tex.stackexchange.com/users/86
675
458
https://tex.stackexchange.com/questions/671
153
Mathematical operators, such as function names, should be set in roman type, not italics. Latex already has commands for some operators, including `\max`, `\min`, and `\log`. How can I define additional such commands?
https://tex.stackexchange.com/users/35
Define additional math operators to be typeset in roman
true
`\DeclareMathOperator{\foo}{foo}` and `\DeclareMathOperator*{\hocolim}{hocolim}` for sub- and superscripts in the limits position. This requires ``` \usepackage{amsmath} ``` which is recommended for math documents anyway. Minimal example: ``` \documentclass{article} \usepackage{amsmath} \DeclareMathOperator{\foo}{foo} \DeclareMathOperator*{\hocolim}{hocolim} \begin{document} Example of $\foo(x)$ and $\foo x$. Example of $\hocolim_{x\in X} f(x)$ and displayed \begin{equation*} \hocolim_{x\in X} f(x) \end{equation*} \end{document} ```
157
https://tex.stackexchange.com/users/85
676
459
https://tex.stackexchange.com/questions/664
454
As a native English speaker, I've mostly been allowed the luxury of pretending that ASCII is enough, and have been able to treat font encodings as not my problem. I've seen lots of advice that I ought to include `\usepackage[T1]{fontenc}` in my preamble. (See, for instance, p. 337 of [The LaTeX Companion](http://books.google.com/books?id=ngwZAQAAIAAJ&q=The+LaTeX+Companion&dq=The+LaTeX+Companion&hl=en&ei=kAtTTOCBPdD_nQfsjL2RBA&sa=X&oi=book_result&ct=result&resnum=1&ved=0CCUQ6AEwAA).) What isn't really adequately explained is why I ought to do so. So, if I am writing in English and have to make only occasional use of things like `G\"odel`, what does following the advice really get me?
https://tex.stackexchange.com/users/93
Why should I use \usepackage[T1]{fontenc}?
true
Note that this is *font* encoding (determines what kind of font is used), not *input* encoding. The default font encoding (OT1) of TeX is 7-bit and uses fonts that have 128 glyphs, and so do not include the accented characters as individual glyphs. So a letter ö is made by adding an accent to the existing 'o' glyph. The T1 font encoding is an 8-bit encoding and uses fonts that have 256 glyphs. So an 'ö' is an actual single glyph in the font. Many of the older fonts have had T1 variants devised for them as well, and many newer fonts are available only in T1. I think "Computer Modern" was originally OT1, and "Latin Modern" is T1. (Look at [OT1 font encoding](https://web.archive.org/web/20211025142237/http://www.micropress-inc.com/fonts/encoding/ot1.htm) and [T1 font encoding](https://web.archive.org/web/20211201101310/http://www.micropress-inc.com/fonts/encoding/t1.htm).) If you don't use `\usepackage[T1]{fontenc}`, * Words containing accented characters [cannot be automatically hyphenated](https://tex.stackexchange.com/questions/725/why-words-with-accented-characters-cant-be-automatic-hyphenated-with-the-default), * You cannot properly copy-and-paste such words from the output (DVI/PS/PDF), * Characters like the pipe sign, less than and greater sign [give unexpected results in text](http://texblog.net/latex-archive/fonts/symbols/).
453
https://tex.stackexchange.com/users/48
677
460
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
Usually I write German texts. We have new and old rules for spelling. The package [hyphsubst](http://www.ctan.org/tex-archive/help/Catalogue/entries/hyphsubst.html) provides some new hyphenation pattern. That's why I load it in addition to `babel`: ``` \RequirePackage[ngerman=ngerman-x-latest]{hyphsubst} ```
13
https://tex.stackexchange.com/users/201
678
461
https://tex.stackexchange.com/questions/674
98
I am submitting a paper to a conference that has a limit of 10 pages. I have edited and edited the text, but the paper still fills 11 pages, and I am reluctant to remove anything. What tricks can I use to make the paper fit in 10 pages? I know about `\vspace{-1mm}`, but are other and better tricks? How can I squeeze a little bit between lines, around the elements produced by \maketitle, around headlines, etc. in a way that is consistent and does not look too ugly? Is it possible to reduce the font size from 11 points to, say, 10.9? (This should be community wiki, but I don't have enough rep yet.)
https://tex.stackexchange.com/users/35
Squeezing scientific paper to fit within page limits
false
You can reduce the base font size in the document class statement ``` \documentclass[10pt,other options]{article} ``` which will make everything smaller. Your choices for that base font size are limited, though; I think it may only allow 10pt, 11pt, and 12pt. There are also various packages to change font sizes; have a look at [`relsize`](http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=relsize) and [`anyfontsize`](http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=anyfontsize), for example. Another option would be to reduce the margin size by using a package like [`vmargin`](http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=vmargin).
0
https://tex.stackexchange.com/users/125
679
462
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
For mathematical texts I instead use `amsmath` & Co. One very useful package is `onlyamsmath`. I load it as ``` \usepackage[all,warning]{onlyamsmath} ``` So it looks for `$$..$$`, `eqnarray` and produces a warning if some of them are used. If you left out `warning`, it will result in an error and compile will stop. This package is normally very useful if you edit a text with many authors.
21
https://tex.stackexchange.com/users/201
680
463
https://tex.stackexchange.com/questions/674
98
I am submitting a paper to a conference that has a limit of 10 pages. I have edited and edited the text, but the paper still fills 11 pages, and I am reluctant to remove anything. What tricks can I use to make the paper fit in 10 pages? I know about `\vspace{-1mm}`, but are other and better tricks? How can I squeeze a little bit between lines, around the elements produced by \maketitle, around headlines, etc. in a way that is consistent and does not look too ugly? Is it possible to reduce the font size from 11 points to, say, 10.9? (This should be community wiki, but I don't have enough rep yet.)
https://tex.stackexchange.com/users/35
Squeezing scientific paper to fit within page limits
false
Check out this page on [Squeezing Space in LaTeX](http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/squeeze.html), it contains many useful tips ranging from using standard stuff like `\linespread{0.9}` to using packages that allow more customization like [paralist](http://www.ctan.org/tex-archive/macros/latex/contrib/paralist/) or [caption](http://www.ctan.org/tex-archive/macros/latex/contrib/caption/).
19
https://tex.stackexchange.com/users/30
681
464
https://tex.stackexchange.com/questions/674
98
I am submitting a paper to a conference that has a limit of 10 pages. I have edited and edited the text, but the paper still fills 11 pages, and I am reluctant to remove anything. What tricks can I use to make the paper fit in 10 pages? I know about `\vspace{-1mm}`, but are other and better tricks? How can I squeeze a little bit between lines, around the elements produced by \maketitle, around headlines, etc. in a way that is consistent and does not look too ugly? Is it possible to reduce the font size from 11 points to, say, 10.9? (This should be community wiki, but I don't have enough rep yet.)
https://tex.stackexchange.com/users/35
Squeezing scientific paper to fit within page limits
false
Keep in mind that by doing this you will be doing one or more of the following: annoying the reviewers, making your paper less readable, shooting yourself in the foot. I've been know to play these tricks when I need to reduce it by a line or two, but 10% is pushing the limits. Its even worse if its a grant proposal. It may just be rejected out of hand, with no recourse. Part of being a good researcher is knowing how to write concisely, and knowing what can be left out.
87
https://tex.stackexchange.com/users/16
683
465
https://tex.stackexchange.com/questions/682
9
When I do an list (or list-type) in beamer with the automatic pausing between each item, then there seems to be something wrong with the pauses afterwards. If I put in a `\pause` afterwards then I get a double pause, but if I leave it out then I get no pause. Here's an example: ``` \documentclass{beamer} \begin{document} \begin{frame} \begin{itemize}[<+->] \item On the first slide \end{itemize} \pause On the first or third slide \end{frame} \end{document} ``` With the `\pause`, I get three pages. Without, I get only one. I want two. Another example (added in edit) of similarly annoying behaviour is in trying to pause *within* an item: ``` \documentclass{beamer} \begin{document} \begin{frame} On the first slide \pause \begin{itemize}[<+->] \item On the second slide. \pause Should be on the third slide, actually on the fourth \item On the fourth slide \end{itemize} \end{frame} \end{document} ``` What's going on? More importantly, how do I stop it doing that? It's really annoying! (Added in edit): In response to Michael Underwood's answer: the `\pause` command is so useful and so intuitive that I'd really like to use it. I know that for complicated stuff, I need to use more refined commands, but this doesn't *feel* complicated. It seems that as soon as I use an automatic list (which is itself a useful shortcut to a more complicated command) then I have to abandon using the `\pause` command. Why can't I use both? I'm using beamer version 3.07 from TeXLive 2008. I'm quite happy to upgrade if it will get rid of the problem.
https://tex.stackexchange.com/users/86
How do I get the right number of pauses after a list in beamer?
false
Without the `\pause` command, "On the first or third slide" has no specification for when to appear, which means it always appears. With the `\pause` command, it uncovers the list items one at a time until they are all uncovered, and then pauses again, which is why you have the repeat slide (since nothing changes between uncovering the last item and pausing). The solution is to specify when you want the items after the list to appear. One method of accomplishing this is to surround it with an `\uncover` command: ``` \documentclass{beamer} \begin{document} \begin{frame} \begin{itemize}[<+->] \item On the first slide \end{itemize} \uncover<+->{ On the second slide } \end{frame} \end{document} ``` Edit ---- In response to your edit, here's another way to solve your problem. You are using `\pause` in combination with the list option `[<+->]`, which adds its own pauses and so results in double pauses sometimes. If you really prefer to not give up `\pause`, then you can fix your example's behaviour by using it exclusively: ``` \documentclass{beamer} \begin{document} \begin{frame} On the first slide \pause \begin{itemize} \item On the second slide. \pause On the third slide \pause\item On the fourth slide \end{itemize} \end{frame} \end{document} ``` This also works in your first example: ``` \documentclass{beamer} \begin{document} \begin{frame} \begin{itemize} \item On the first slide \pause\item On the second slide \end{itemize} \pause On the third slide \end{frame} \end{document} ``` The potential down side of this approach is that `\pause` stops *everything* after it on the current frame from appearing until the pause has passed, even if you specify that it should appear earlier. For example, ``` \documentclass{beamer} \begin{document} \begin{frame} Here are important points: \begin{itemize} \item Point on Slide 1 \pause\item Point on Slide 2 \pause\item Point on Slide 3 \end{itemize} \uncover<1-3>{ I want to emphasize this on every slide:\\ Always remember these points!\\ (But it only appears on the third slide) } \end{frame} \end{document} ``` On the other hand, with less code you can achieve this effect simply: ``` \documentclass{beamer} \begin{document} \begin{frame} Here are important points: \begin{itemize}[<+->] \item Point on Slide 1 \item Point on Slide 2 \item Point on Slide 3 \end{itemize} Always remember these points! \end{frame} \end{document} ```
5
https://tex.stackexchange.com/users/32
684
466
https://tex.stackexchange.com/questions/528
161
What are some good **tutorials** on writing custom styles (classes) that clearly explain commands used and some of the features that TeX has to offer in the way of styles?
https://tex.stackexchange.com/users/142
Style/class tutorials
false
[Flynn (2006)](http://www.tug.org/pracjourn/2006-4/flynn/) and [clsguide](http://www.latex-project.org/guides/clsguide.pdf)?
19
https://tex.stackexchange.com/users/100
685
467
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 save my documents in an SVN repository. The [svn](https://www.ctan.org/pkg/svn) package helps to extract some informations out of the version control system. The document has somewhere a hint what revision number and what date it is. For this you have to set svn keywords and declare in your LaTeX document what you need: ``` \SVN $LastChangedRevision$ \SVN $LastChangedDate$ ``` Wihtin the document you can refer to that information with `\SVNLastChangedRevision` and `\SVNDate`.
17
https://tex.stackexchange.com/users/201
687
468
https://tex.stackexchange.com/questions/686
196
When creating presentations in [`beamer`](https://www.ctan.org/pkg/beamer), those little symbols that you can click on and will take you to different parts of your presentation are automatically included on your slides. I don't like that, but decided not to try and change it for now. The problem is that when I gave my presentation to my supervisor to revise, the first thing he did was cross the symbols out in red, meaning: take this out! What should I do? Is there an easy command to get rid of those symbols or do I have to change the theme of my presentation to get rid of the symbols?
https://tex.stackexchange.com/users/14
How to get rid of navigation symbols in beamer?
false
It can be done with one quick command! Just put ``` \setbeamertemplate{navigation symbols}{} ``` before your `\begin{document}` to clear the navigation symbols.
135
https://tex.stackexchange.com/users/32
688
469
https://tex.stackexchange.com/questions/689
34
I have seen presentations in Power Point which contain a timer. Can this be done in Beamer using a simple command, or maybe a package? If not a timer, is it possible to at least get a clock on your slides?
https://tex.stackexchange.com/users/14
Is there a way to add a timer to a Beamer presentation?
true
See the [tdclock](http://www.ctan.org/tex-archive/macros/latex/contrib/tdclock) package, for which there is a [demo beamer tex file](http://mirror.ctan.org/macros/latex/contrib/tdclock/tdclock-beamer-example.tex) and [resulting pdf](http://mirror.ctan.org/macros/latex/contrib/tdclock/tdclock-beamer-example.pdf) (works only with Adobe Reader, I think).
22
https://tex.stackexchange.com/users/73
691
470
https://tex.stackexchange.com/questions/686
196
When creating presentations in [`beamer`](https://www.ctan.org/pkg/beamer), those little symbols that you can click on and will take you to different parts of your presentation are automatically included on your slides. I don't like that, but decided not to try and change it for now. The problem is that when I gave my presentation to my supervisor to revise, the first thing he did was cross the symbols out in red, meaning: take this out! What should I do? Is there an easy command to get rid of those symbols or do I have to change the theme of my presentation to get rid of the symbols?
https://tex.stackexchange.com/users/14
How to get rid of navigation symbols in beamer?
true
In addition to Michael's way, there is the slightly different ``` \beamertemplatenavigationsymbolsempty ``` that I've been using in my preambles.
183
https://tex.stackexchange.com/users/93
692
471
https://tex.stackexchange.com/questions/674
98
I am submitting a paper to a conference that has a limit of 10 pages. I have edited and edited the text, but the paper still fills 11 pages, and I am reluctant to remove anything. What tricks can I use to make the paper fit in 10 pages? I know about `\vspace{-1mm}`, but are other and better tricks? How can I squeeze a little bit between lines, around the elements produced by \maketitle, around headlines, etc. in a way that is consistent and does not look too ugly? Is it possible to reduce the font size from 11 points to, say, 10.9? (This should be community wiki, but I don't have enough rep yet.)
https://tex.stackexchange.com/users/35
Squeezing scientific paper to fit within page limits
false
You might want to consider using a document class that is more space-efficient than `article`. I have fairly often used `amsart` – I think it looks reasonably good, and it doesn't waste as much space as `article`.
11
https://tex.stackexchange.com/users/100
693
472
https://tex.stackexchange.com/questions/674
98
I am submitting a paper to a conference that has a limit of 10 pages. I have edited and edited the text, but the paper still fills 11 pages, and I am reluctant to remove anything. What tricks can I use to make the paper fit in 10 pages? I know about `\vspace{-1mm}`, but are other and better tricks? How can I squeeze a little bit between lines, around the elements produced by \maketitle, around headlines, etc. in a way that is consistent and does not look too ugly? Is it possible to reduce the font size from 11 points to, say, 10.9? (This should be community wiki, but I don't have enough rep yet.)
https://tex.stackexchange.com/users/35
Squeezing scientific paper to fit within page limits
false
For 'squeezing' material of any kind, the [savetrees](https://www.ctan.org/pkg/savetrees) package is often a good place to start. It has a number of levels of squeezing, but even if you don't use the package you can pick up some tips from there. (I'm also agree with the other answers about worrying about the wisdom of looking for this much of a squeeze.)
16
https://tex.stackexchange.com/users/73
694
473
https://tex.stackexchange.com/questions/674
98
I am submitting a paper to a conference that has a limit of 10 pages. I have edited and edited the text, but the paper still fills 11 pages, and I am reluctant to remove anything. What tricks can I use to make the paper fit in 10 pages? I know about `\vspace{-1mm}`, but are other and better tricks? How can I squeeze a little bit between lines, around the elements produced by \maketitle, around headlines, etc. in a way that is consistent and does not look too ugly? Is it possible to reduce the font size from 11 points to, say, 10.9? (This should be community wiki, but I don't have enough rep yet.)
https://tex.stackexchange.com/users/35
Squeezing scientific paper to fit within page limits
false
In the `article` class, I think the output of `\maketitle` is both ugly and wastes too much space in a short document. If you don't want to use another document class, a simple solution is to design your own replacement of `\maketitle`. If you don't want to worry about creating your own `\maketitle` macro, you can simply omit commands such as `\title` and `\maketitle` and hard-code the title by using, e.g., `center` environment, appropriate font selection commands, and `\vspace`.
7
https://tex.stackexchange.com/users/100
695
474
https://tex.stackexchange.com/questions/109
7
I wanted to try the latest version of LuaTeX, so I downloaded the [official precompiled binaries](http://www.luatex.org/download.html) but these raw binaries are useless without a `luatex.fmt`. How can this file be created?
https://tex.stackexchange.com/users/97
How to create luatex.fmt
true
I'm assuming you have TeX Live installed, so will have the file 'luatex.ini'. You need that (*i.e.* copy to where you are going to generate your format file), as it specifies how to build the format. You should then be able to do ``` luatex -ini luatex.ini ``` to build the format file.
4
https://tex.stackexchange.com/users/73
696
475
https://tex.stackexchange.com/questions/656
19
I'm using LaTeX and like to create an acknowledgement section using the `report` class such that is looks like the abstract and comes after it.
https://tex.stackexchange.com/users/137
How to create acknowledgements in the report class?
true
I went with: ``` \begin{abstract} This is cool paper about vuvuzelas. \end{abstract} \renewcommand{\abstractname}{Acknowledgements} \begin{abstract} Thanks Mum! \end{abstract} ``` This way both look similar and good.
43
https://tex.stackexchange.com/users/137
697
476
https://tex.stackexchange.com/questions/628
21
I've heard (and read) about the new amsrefs system for citations. Is there a good explanation of the pros/cons of amsrefs vis-a-vis bibtex ?
https://tex.stackexchange.com/users/103
When should I use amsrefs instead of regular bibtex ?
false
One problem with bib-tex is the need for lots of extra {} to get the formatting of titles correct. I find this, personally, to be quite frustrating, and amsrefs is much nicer in this regard.
1
https://tex.stackexchange.com/users/200
699
477
https://tex.stackexchange.com/questions/698
50
I have been trying to encourage my students to use TeX in writing up homework, especially in early math major courses, like intro to proofs, where the typesetting is not too arduous. I have had very limited success with students taking it up. Does anyone else encourage/require assignments to be typeset? What strategies have worked best for you?
https://tex.stackexchange.com/users/200
How to encourage TeX as a homework medium
false
All of my reports were typeset in LaTeX in university. Only once I've tried to typeset math homework using LaTeX and it was a pain. It was much quicker to write up the answers on paper than to do context switching between typing up LaTeX, thinking & waiting/viewing the results. One way would be to have an interactive web2.0 website to submit LaTeX typeset answer with automatic rendering. Gradually making the students love LaTeX syntax. I've started out with LaTeX with a small "LaTeXiT" app on macos which would render equations into pngs and allow me to drag and drop them. Later on you can introduce ready-made templates for question answers. (this is from student perspective what might have made me take up latex earlier on.) And be nice and release your document. All of my professors refuse to give me latex sources citing that sources are *theirs*. Make these sources licensed under creative commons and put them on something like <http://docs.latexlab.org/> to allow students "fix" lecture notes =)
12
https://tex.stackexchange.com/users/137
700
478
https://tex.stackexchange.com/questions/689
34
I have seen presentations in Power Point which contain a timer. Can this be done in Beamer using a simple command, or maybe a package? If not a timer, is it possible to at least get a clock on your slides?
https://tex.stackexchange.com/users/14
Is there a way to add a timer to a Beamer presentation?
false
To get a nice "presenter display" (dual monitor support, clock and timer, displaying the following slide, etc.), I have used the following solution: * Use [PDF to Keynote](http://www.cs.hmc.edu/~oneill/freesoftware/pdftokeynote.html) to convert the output of Beamer into Keynote format. * Then simply use Keynote to give the presentation. Works very well in practice; quick and easy. Of course this approach requires Mac OS X.
5
https://tex.stackexchange.com/users/100
701
479
https://tex.stackexchange.com/questions/674
98
I am submitting a paper to a conference that has a limit of 10 pages. I have edited and edited the text, but the paper still fills 11 pages, and I am reluctant to remove anything. What tricks can I use to make the paper fit in 10 pages? I know about `\vspace{-1mm}`, but are other and better tricks? How can I squeeze a little bit between lines, around the elements produced by \maketitle, around headlines, etc. in a way that is consistent and does not look too ugly? Is it possible to reduce the font size from 11 points to, say, 10.9? (This should be community wiki, but I don't have enough rep yet.)
https://tex.stackexchange.com/users/35
Squeezing scientific paper to fit within page limits
false
When I'm reviewing conference papers, I don't mind limited margin/font/spacing abuse to get the paper under the limit; my favorite is to make the font size in the references smaller, or eliminate blank lines from the references. However, such abuse which affects the readability of the paper in any meaningful way would earn an immediate rejection recommendation from me, and a 9% reduction (if you really do have a full page to go) really is quite a lot to expect from this. And for the camera-ready copy, such tactics are totally unacceptable if they're noticeable at all. Really, the only correct answer is "edit it more". Having been there numerous times, I am 100% sure you can edit the paper down another page. Perhaps you could say which conference you are submitting to. If it's an ACM conference, I might be able to give more advice.
4
https://tex.stackexchange.com/users/27
703
480
https://tex.stackexchange.com/questions/674
98
I am submitting a paper to a conference that has a limit of 10 pages. I have edited and edited the text, but the paper still fills 11 pages, and I am reluctant to remove anything. What tricks can I use to make the paper fit in 10 pages? I know about `\vspace{-1mm}`, but are other and better tricks? How can I squeeze a little bit between lines, around the elements produced by \maketitle, around headlines, etc. in a way that is consistent and does not look too ugly? Is it possible to reduce the font size from 11 points to, say, 10.9? (This should be community wiki, but I don't have enough rep yet.)
https://tex.stackexchange.com/users/35
Squeezing scientific paper to fit within page limits
false
I generally don't like to fiddle with fonts, margin or spacing because it can look very ugly, many journals and conferences explicitly ask you not to do this, and it just feels kind of cheating. Having said that, I *do* have a cheat which I usually apply when I need to squeeze a few extra lines in the paper (specially if I just have little time before the deadline): Go looking for paragraphs that end with a few words (maybe up to three or four) on its last line, and try to edit those paragraphs first. See if you can somehow reword things or cut some adjective here or there so that you can kill those maybe three words and get a whole extra line for your paper! Some other more obvious tricks: if you have displayed formulas, consider if you can have them inlined with the text instead, and if you have figures consider scaling them down a bit.
29
https://tex.stackexchange.com/users/169
704
481
https://tex.stackexchange.com/questions/705
7
When I am working on a big document, I find the srcltx package to be extremely useful. However, I also really like the hyperref package. Is it possible to use both? In particular, is there a way to use ForwardDVI and inverse search with PDFLaTeX?
https://tex.stackexchange.com/users/200
Is there a "ForwardPDF" tool available?
true
If using pdflatex you should switch to using the SyncTeX patch (included in pdfTeX 3.1415926-1.40.8 and later), which is generally enabled with the flag `-synctex=1` (TeX live 2010 and MiKTeX 2.8/2.9, at least). Not all PDF viewers support it yet though. You can see it working in TexWorks IDE.
12
https://tex.stackexchange.com/users/185
706
482
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 use [`url`](http://ctan.org/pkg/url) to typeset urls.
45
https://tex.stackexchange.com/users/36
707
483
https://tex.stackexchange.com/questions/698
50
I have been trying to encourage my students to use TeX in writing up homework, especially in early math major courses, like intro to proofs, where the typesetting is not too arduous. I have had very limited success with students taking it up. Does anyone else encourage/require assignments to be typeset? What strategies have worked best for you?
https://tex.stackexchange.com/users/200
How to encourage TeX as a homework medium
false
I tried this in my real analysis class this past spring with limited success. I required my students to type at least one of their solutions using LaTeX for the first several homework assignments and then bumped it up to two solutions later in the semester. A few students fell in love and were turning in their entire homework set in LaTeX by the third week while others conveniently ignored the requirement most weeks and then turned in several LaTeXed problems every few weeks to make up for their lack. Since they were all required to turn in a LaTeXed paper for the end-of-semester project, they knew they had to learn it at some point. To get them started, I had them install TeXnicCenter and did a 10-minute introduction to LaTeX during the first week of class. I also posted a .tex file with comments on my website for them and posted the homework assignment each week as a .tex file so that they could just fill in their solutions without worrying about document setup. Since each of my students had a college-issued laptop, if they were having problems that seemed machine-specific, they could just bring the laptop to me and we could troubleshoot together. I also started having them submit their .tex files so that I could see what their code looked like and comment on it. I am very interested in how other people approach this (I think you're correct that starting in an intro to proofs class or an early class is the best way to go) since I think I only convinced about half my students to really learn LaTeX and see it as the only way to type mathematics. It doesn't help that they were all given extra credit in calculus for typing their homework in Word. Here's a [document](http://campus.houghton.edu/webs/employees/RYates/LaTeXStartUp.pdf) that I wrote for this coming semester in hopes of encouraging my students to use TeX. I'm going to give them templates for their first few homework assignments as well.
10
https://tex.stackexchange.com/users/61
708
484
https://tex.stackexchange.com/questions/265
180
How can I make text that is larger than the size of the output of `{\Huge ...}`? I would like to be able to make text arbitrarily large (even if that is done by some suboptimal scaling routine).
https://tex.stackexchange.com/users/136
Fonts larger than \Huge?
false
The `\resizebox` command (from `graphicx` package) is convenient if you want to produce, e.g., a title that fills the entire page width: ``` \resizebox{\linewidth}{!}{\itshape Foo!} ```
50
https://tex.stackexchange.com/users/100
709
485
https://tex.stackexchange.com/questions/705
7
When I am working on a big document, I find the srcltx package to be extremely useful. However, I also really like the hyperref package. Is it possible to use both? In particular, is there a way to use ForwardDVI and inverse search with PDFLaTeX?
https://tex.stackexchange.com/users/200
Is there a "ForwardPDF" tool available?
false
[SumatraPDF](http://blog.kowalczyk.info/software/sumatrapdf/index.html) allows forward and inverse searching, but is Windows only. It works seamlessly with MikTeX 2.8 and WinEdt 6.0. I haven't tried it with TeXLive or other windows editors.
6
https://tex.stackexchange.com/users/143
710
486
https://tex.stackexchange.com/questions/674
98
I am submitting a paper to a conference that has a limit of 10 pages. I have edited and edited the text, but the paper still fills 11 pages, and I am reluctant to remove anything. What tricks can I use to make the paper fit in 10 pages? I know about `\vspace{-1mm}`, but are other and better tricks? How can I squeeze a little bit between lines, around the elements produced by \maketitle, around headlines, etc. in a way that is consistent and does not look too ugly? Is it possible to reduce the font size from 11 points to, say, 10.9? (This should be community wiki, but I don't have enough rep yet.)
https://tex.stackexchange.com/users/35
Squeezing scientific paper to fit within page limits
false
I described several tools for this at [my blog](http://robjhyndman.com/researchtips/squeezing-space-with-latex/) a few months ago. Update: I have copied and pasted my post below. Make your text block as big as possible. The simplest way to do that is using the geometry package: ``` \usepackage[text={16cm,24cm}]{geometry} ``` Use a compact font such as Times Roman: ``` \usepackage{mathptmx} ``` Remove the spacing between paragraphs and have a small paragraph indentation ``` \setlength{\parskip}{0cm} \setlength{\parindent}{1em} ``` Remove space around section headings. ``` \usepackage[compact]{titlesec} \titlespacing{\section}{0pt}{2ex}{1ex} \titlespacing{\subsection}{0pt}{1ex}{0ex} \titlespacing{\subsubsection}{0pt}{0.5ex}{0ex} ``` Beware of enumerated and itemized lists. Instead, replace them with compact lists. ``` \usepackage{paralist} \begin{compactitem} \item ... \end{compactitem} \begin{compactenum} \item ... \end{compactenum} ``` If you are allowed, switching to double column can save heaps of space. ``` \usepackage{multicols} \begin{multicols}{2} ... \end{multicols} ``` If the rules say 12pt, you can usu ally get away with 11.5pt with out anyone noticing: ``` \begin{document}\fontsize{11.5}{14}\rm ``` When you get desperate, you can squeeze the inter-line spacing using ``` \linespread{0.9} ```
13
https://tex.stackexchange.com/users/143
711
487
https://tex.stackexchange.com/questions/492
12
The current guides online and in texdoc that I could find did not deal with the problem I have. 1. How to generate font metrics for system installed TrueType and OpenType fonts? 2. How to generate font maps? What is a difference between font maps for regular T1, TrueType and OpenType fonts? 3. Where to place those things and what "databases" do I need to update to make latex and friends "see" those fonts? 4. How to generate raster fonts for TrueType and OpenType fonts and how to install them? The current documentation I could find didn't answer quickly and straight to the point about it. I don't want "programmers" guide to fonts. I want "user's and packaging" guide to fonts. Please point to existing resource or provided references to pages / section from texdoc. **EDIT** Dead-end or not deadend, in the end of the day I need to generate PDF/A documents with embedded metadata. The PDF/A metadata is only possible with pdfTeX engine and pdf-x package. And I want embedded custom ttf fonts in those PDF/A documents.
https://tex.stackexchange.com/users/137
Where to find nitty-gritty details about TeX and friends' font handling systems?
true
I think one of the issues here is that font installation is *very* complicated, and so there is only really a 'programmers' solution. (That is to say there is no simple answer, so you have to be prepared to learn a lot of low-level stuff to get it to work.) One of the clearest descriptions, at least for Type 1 fonts, is [written by Lehmann](http://mirror.ctan.org/info/Type1fonts/fontinstallationguide/fontinstallationguide.pdf). Other than that, I'm afraid you have to read the [`fontinst` stuff](http://tug.org/applications/fontinst/), but from your question I guess you already have and found it to be wanting.
4
https://tex.stackexchange.com/users/73
712
488
https://tex.stackexchange.com/questions/713
4
I'm trying to write `HMX_Y`, and because someone out there (mr. or ms. TeX) thinks this is a math notation, I have to use verbatim function to convince him (or her) otherwise. So far I've been using `examplep` package and the command `\Q{HMX_Y}`. However I would like the text to be in the same style and font as the rest of the document (and not in typewriter style). Any tips how to do this? This is the line where I'm trying to set the fonts to normal (as `examplep` documentation suggests) but I must be doing something wrong (as it's not working). ``` \usepackage[Q=yes, url=yes, source-verbatimfont=normalfont]{examplep} ``` Any help much appreciated.
https://tex.stackexchange.com/users/72
help me write verbatim
false
See <https://texfaq.org/FAQ-underscore> Short summary: in textmode you can use `\textunderscore` to get the underscore, but you should make sure to set your [font encoding to `T1`](https://tex.stackexchange.com/questions/664/why-should-i-use-usepackaget1fontenc) because the default encoding does not have the underscore character. You can also use the `underscore` package [here](http://www.cs.trinity.edu/Other_Attractions/tex-doc/help/Catalogue/entries/underscore.html) to simplify typing.
4
https://tex.stackexchange.com/users/119
715
489
https://tex.stackexchange.com/questions/265
180
How can I make text that is larger than the size of the output of `{\Huge ...}`? I would like to be able to make text arbitrarily large (even if that is done by some suboptimal scaling routine).
https://tex.stackexchange.com/users/136
Fonts larger than \Huge?
false
If you use Type 1 fonts (e.g., package `mathptmx` or `mathpazo`), you can simply use the `\fontsize` command with large point sizes: ``` {\fontsize{50}{60}\selectfont Foo!} ``` (The first parameter (50) is font size. The second parameter (60) is line spacing. An appropriate line spacing depends on the font. Something like 1.2 times font size is commonly used with CM fonts. But it does not really matter if you are typesetting just one line of text.)
89
https://tex.stackexchange.com/users/100
716
490
https://tex.stackexchange.com/questions/698
50
I have been trying to encourage my students to use TeX in writing up homework, especially in early math major courses, like intro to proofs, where the typesetting is not too arduous. I have had very limited success with students taking it up. Does anyone else encourage/require assignments to be typeset? What strategies have worked best for you?
https://tex.stackexchange.com/users/200
How to encourage TeX as a homework medium
false
Here's one idea: you could create a one-page cheat sheet listing some basic LaTeX commands, including the notation that will come up in the class. You could send them the source and make compiling it an assignment.
0
https://tex.stackexchange.com/users/52
717
491
https://tex.stackexchange.com/questions/713
4
I'm trying to write `HMX_Y`, and because someone out there (mr. or ms. TeX) thinks this is a math notation, I have to use verbatim function to convince him (or her) otherwise. So far I've been using `examplep` package and the command `\Q{HMX_Y}`. However I would like the text to be in the same style and font as the rest of the document (and not in typewriter style). Any tips how to do this? This is the line where I'm trying to set the fonts to normal (as `examplep` documentation suggests) but I must be doing something wrong (as it's not working). ``` \usepackage[Q=yes, url=yes, source-verbatimfont=normalfont]{examplep} ``` Any help much appreciated.
https://tex.stackexchange.com/users/72
help me write verbatim
false
Reading the documentation of the `examplep` package it seems that the option you actually need is ``` pverb-verbatimfont=normalfont ``` however, it doesn't work. The package complains that `normalfont` is not a valid option. Furthermore, even hacking into `\pexa@@verbatimfont` and redefining it to `\normalfont` doesn't work either, because (as Willie Wong pointed out) the default font encoding doesn't have an underscore character there! Indeed, `underscore` is the package you're looking for, but you might want to consider submitting a bug report to the author of `examplep` nevertheless.
3
https://tex.stackexchange.com/users/169
718
492
https://tex.stackexchange.com/questions/713
4
I'm trying to write `HMX_Y`, and because someone out there (mr. or ms. TeX) thinks this is a math notation, I have to use verbatim function to convince him (or her) otherwise. So far I've been using `examplep` package and the command `\Q{HMX_Y}`. However I would like the text to be in the same style and font as the rest of the document (and not in typewriter style). Any tips how to do this? This is the line where I'm trying to set the fonts to normal (as `examplep` documentation suggests) but I must be doing something wrong (as it's not working). ``` \usepackage[Q=yes, url=yes, source-verbatimfont=normalfont]{examplep} ``` Any help much appreciated.
https://tex.stackexchange.com/users/72
help me write verbatim
true
Of course, you can also just type `HMX\_Y` when you're in text mode to get the underscore (which is even shorter than `\Q{HMX_Y}`!) Probably you already knew that, and your question was about how *not* to type the `\` before the underscore, but I still wanted to point out the most simple solution.
9
https://tex.stackexchange.com/users/169
719
493
https://tex.stackexchange.com/questions/720
28
The [STIX Fonts Project](http://www.stixfonts.org/) would provide consistent fonts for some things that are currently missing in LaTeX (e.g. lowercase `\mathcal` and `\mathbb`). The website says LaTeX support "will follow in 2011". Until then is there some way to already use the fonts? Maybe using `xelatex` instead of `pdflatex`?
https://tex.stackexchange.com/users/83
Is it already possible to use the STIX fonts?
false
Try the xits package: * [Announcement by Khaled Hosny](http://typophile.com/node/71171), * [CTAN](http://ctan.org/pkg/xits), * The [XITS font project](http://github.com/khaledhosny/xits-math/) on github.
20
https://tex.stackexchange.com/users/213
721
494
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
In addition to many packages already listed here, I always include `mathtools`. It provides implementations of `\mathclap` (and similar commands) as well as nice extensible arrow.
69
https://tex.stackexchange.com/users/83
722
495
https://tex.stackexchange.com/questions/723
27
I know that it can be done with graphics packages like `TikZ`, but it seems to be a bit of an overkill. And for those *not* already familiar with the `TikZ` system, learning it can be a bit of a barrier. So my question is > > Assuming the advanced graphics capabilities are not necessary, and I just need a bare-bones flow chart (which should be implementable just using the `picture` environment), is there a LaTeX package for simply making a flow chart? > > >
https://tex.stackexchange.com/users/119
How to typeset flowcharts in LaTeX?
false
I've never used it, but there seems to be the [`flow`](http://www.ctan.org/tex-archive/support/flow/) [program](http://www.ctan.org/tex-archive/support/flow/) which produces a flowchart for the picture environment.
4
https://tex.stackexchange.com/users/83
724
496
https://tex.stackexchange.com/questions/723
27
I know that it can be done with graphics packages like `TikZ`, but it seems to be a bit of an overkill. And for those *not* already familiar with the `TikZ` system, learning it can be a bit of a barrier. So my question is > > Assuming the advanced graphics capabilities are not necessary, and I just need a bare-bones flow chart (which should be implementable just using the `picture` environment), is there a LaTeX package for simply making a flow chart? > > >
https://tex.stackexchange.com/users/119
How to typeset flowcharts in LaTeX?
true
Pstricks with pst-matrix ======================== This will require you to atleast be tiny-bit familiar with pstricks. You layout nodes in a pstmatrix and connect them up. More info and examples here <http://tug.org/PSTricks/main.cgi?file=pst-node/psmatrix/psmatrix#flowchart> TikZ ==== IMHO it is easier and better than previous one. Since you can design a few node styles (1-3 lines) and then possition nodes relative to each other (above, right, below, north east, etc) and connect them up with cool arrows in one go (A -- B -- C -- D) with an appropriate style the arrows will be automagic. You can use the TikZ matrix library for a more rigid control of node positioning. See `texdoc tikz` for the excellent tutorial on how to do simple -> advanced flowchart and a simple example [here](http://www.texample.net/tikz/examples/simple-flow-chart). Dia === You can use Dia ([website](http://projects.gnome.org/dia/) and [windows installer](http://dia-installer.de/index_en.html)) for a point-and-click solution. It has a few different TeX exporters (pstricks, metapost and pgf/tikz) Graphviz ======== You can use powerful graphviz / dot language to generate auto-layout for diagrams. This works very well for both small and large datasets. Although you have much less control in "alligning" nodes. The website is [here](http://www.graphviz.org/). There are a few solutions to "integrate" dot diagrams with LaTeX. See [this](http://mark.aufflick.com/blog/2007/03/25/embedding-graphviz-in-latex-documents), [here](http://www.fauskes.net/code/dot2tex/) and finally [this](http://www.graphviz.org/Resources.php). Other ===== Like with any graphics you can create a flowchart in inkscape/OO.o etc and just do `\includegraphics` in your document. If you fancy that. Very depends on your needs. ps. /me is a TikZ fan =)
29
https://tex.stackexchange.com/users/137
726
497
https://tex.stackexchange.com/questions/727
21
I would like to somehow use LaTeX to automatically number constants. ### Some background As a mathematician, in my daily work there are a lot of throw-away constants which are not extremely important in the discourse. So I will sometimes write inequalities like ``` \[ f(x) \leq c_1 g(x) \leq c_2 (g'(x) + h(x)^2 -3) \leq c_3 \int h(x)^2 \] ``` Since the constants themselves tend not to be important, to conserve alphabets, I call them all 'c' with a subscript. Now, it is a bit of a hassle to 1. keep track manually which numbers I've used up to a given point in the paper, especially if I am working on a large document 2. renumber the constants if I modified an argument. Say if I remove the middle inequality from the example above, for aesthetic purposes it'd much better to have `\[ f(x) \leq c_1 g(x) \leq c_2 \int h(x)^2 \]` instead of `c_3` in the last term. But then I'd have to go back through the document to renumber *all* the constants. Now sometimes I can solve the problem using the convention that 'c' with no subscripts stands for a constant that can change from line to line. But often that is not feasible (suppose I do need to refer to individual of those constants and verify that they are indeed 'constant' enough for my purpose). ### What I'd like Now I am aware of the `newcounter` command to define a new counter. I even know how to use it to automatically increment the counter. So I can define a command that prints `c_\thecounter` and increments the counter so I get a running list of constants. So that solves half the problem. The other half of the problem that I don't know how to deal with is how to *refer* to a constant defined previously. Naively using `label` and `ref`, of course, doesn't work. (I actually don't quite understand the inner workings of those two commands; so an explanation of why they don't work will also be helpful.) As an illustration of what I'd like, it'd be great to have a pair of commands `\newconstant` and `\oldconstant` which can be used like this ``` % Create some new constants \[ f(x) \leq \newconstant g(X) \leq \newconstant h(x) \] % Create a new constant with a label \[ m \geq \newconstant[cnst:m] m' \] % Refer to an already defined constant The constant $\oldconstant{cnst:m}$ defined above is actually 1. ``` Which will display something like ``` f(x) <= c_1 g(x) <= c_2 h(x) m >= c_3 m' The constant c_3 defined above is actually 1 ``` What I know how to do is to define, say ``` \newcounter{cnstcnt} \newcommand{\newconstant}{\ensuremath{c_\thecnstcnt}\addtocounter{cnstcnt}{1}} ``` and this will print the running list. > > Is there already a package that does this? If not is there a way to get the behaviour I described? (Especially the ability to refer back to a previous constant.) > > >
https://tex.stackexchange.com/users/119
Automatically numbering constants
true
Using `\refstepcounter` instead of `\addtocounter{...}{1}` will make `\ref` work: ``` \newcounter{cnstcnt} \newcommand{\newconstant}{% \refstepcounter{cnstcnt}% \ensuremath{c_\thecnstcnt}} \newcommand{\oldconstant}[1]{\ensuremath{c_{\ref{#1}}}} \begin{document} \newconstant\label{first} \oldconstant{first} \end{document} ```
22
https://tex.stackexchange.com/users/85
728
498
https://tex.stackexchange.com/questions/725
22
I was reading the first **[answer](https://tex.stackexchange.com/questions/664/why-should-i-use-usepackaget1fontenc/677#677)** to this question: **[Why should I use \usepackage[T1]{fontenc}?](https://tex.stackexchange.com/questions/664/why-should-i-use-usepackaget1fontenc)** > > [...] the default font encoding (OT1) of TeX > is 7-bit and uses fonts that have 128 > glyphs, and so do not include the > accented characters as individual > glyphs. So a letter ö is made by > adding an accent to the existing 'o' > glyph. This means, among other things, > that **words containing accented > characters cannot be automatically > hyphenated**. > > > I can't see what is the relationship between the fact that a character like 'ö' has to be made from two different glyphs (the 'o' glyph and the accent glyph), and automatic hyphenation.
https://tex.stackexchange.com/users/165
Why words with accented characters can't be automatic hyphenated with the default OT1 enconding?
false
I might not be correct, but hyphenation patterns are per-language. If you are typing up in English your hyphenation patterns will be for English language. These patters do not include accented characters since, English doesn't have those characters. So if you really want to hyphenate a word with accented character you need to tell babel to change to that language for one word, and change it back to English afterwords. This will also mean that you will have to typeset the accented character the way that particular language prefers it. Also if you really care about it there are many languages based on the Latin alphabet and if you start mixing for example English and Latvian words you can get the wrong hyphenation in the other language.
3
https://tex.stackexchange.com/users/137
729
499
https://tex.stackexchange.com/questions/603
9
How can I write equations in [*Trebuchet MS*](http://en.wikipedia.org/wiki/Trebuchet_MS)? Ideally, I'd like to have the following results: * All symbols that are available in Trebuchet MS are written in Trebuchet MS. That includes, e.g., Latin and Greek letters and basic math symbols such as plus, minus, parentheses, commas, etc. * Symbols that are not available in Trebuchet MS are taken from a font that looks sufficiently good when mixed with Trebuchet MS. I'd like to use LaTeXiT to typeset equations that I would use in presentation slides that use the Trebuchet MS. I have tried several solutions, but none of them are completely satisfactory. **Solution 1:** I tried XeLaTeX and the following preamble: ``` \usepackage{mathspec} \usepackage{xunicode} \usepackage{xltxtra} \setallmainfonts{Trebuchet MS} ``` Latin and Greek letters look exactly as I'd like them to look. However, all symbols look completely out of place. **Solution 2:** Next I tried to use some kind of "close replacement": ``` \usepackage{arevmath} ``` At least *all* math symbols are now in a sans-serif font. However, Arev Math is too far from Trebuchet MS to fool anyone. **Solution 3:** Finally, I combined solutions 1 and 2. I didn't even know if this is going to compile: ``` \usepackage{arevmath} \usepackage{mathspec} \usepackage{xunicode} \usepackage{xltxtra} \setallmainfonts{Trebuchet MS} ``` The result was surprisingly good. I think this could actually fool a casual reader. All Latin and Greek letters are taken from Trebuchet MS, and all other symbols are from arevmath. Everything is in sans serif, and the "thickness" of symbols looks correct. However, it's still fairly easy to tell the difference between an equation that is typeset with these settings and the same equation that is typeset entirely in Trebuchet MS. Commonly used symbols such as `{}`, `()` and `,` look different; `+` is too large, etc. If I place an equation typeset in Latex next to an equation that is typeset by simply writing a piece of text in Trebuchet MS, there are some eye-catching differences. **Question:** Is it possible to do something better than solution 3? I think I'm missing something obvious; for example, I'd assume that it should be fairly easy to typeset basic math symbols such as `,` and `+` in Trebuchet MS? This time I'm not really interested in finding a "correct" solution; all that matters is that the output "looks good". **EDIT:** Following Wojtek Myszka's advice, I tried something like this (with XeLaTeX): ``` \usepackage{arevmath} \usepackage{mathspec} \usepackage{xunicode} \usepackage{xltxtra} \setallmainfonts{Trebuchet MS} \makeatletter \DeclareSymbolFont{my}{EU1}{\zf@family}{m}{n} \makeatother \DeclareMathSymbol{!}{\mathclose}{my}{"21} \DeclareMathSymbol{+}{\mathbin}{my}{"2B} \DeclareMathSymbol{:}{\mathrel}{my}{"3A} \DeclareMathSymbol{=}{\mathrel}{my}{"3D} \DeclareMathSymbol{?}{\mathclose}{my}{"3F} \DeclareMathSymbol{,}{\mathpunct}{my}{44} \DeclareMathSymbol{.}{\mathord}{my}{46} ``` Looks better, but how do I handle the delimiters (`()`, `[`], `{}`) correctly?
https://tex.stackexchange.com/users/100
Math in Trebuchet MS
false
Based on the free math font survey `texdoc free-math-font-survey` and their sources from [here](http://www.ctan.org/tex-archive/info/Free_Math_Font_Survey/en/source/). This was done via loading a "math font" package. That is a packaged font which is encapsulated and tuned to be used for math. e.g. `\usepackage{mathpazo}` So either that font needs additional packaging, or you can browse these other fonts in the survey and pick the one you like best. From the chart included in that survey it looks like the author manages to mix a few math fonts to cover all symbols. Study that source and see if you can come up with better combination of packages.
0
https://tex.stackexchange.com/users/137
731
501
https://tex.stackexchange.com/questions/720
28
The [STIX Fonts Project](http://www.stixfonts.org/) would provide consistent fonts for some things that are currently missing in LaTeX (e.g. lowercase `\mathcal` and `\mathbb`). The website says LaTeX support "will follow in 2011". Until then is there some way to already use the fonts? Maybe using `xelatex` instead of `pdflatex`?
https://tex.stackexchange.com/users/83
Is it already possible to use the STIX fonts?
false
**Update**: [TeX Live 2010](http://tug.org/texlive) (and newer) includes all the prerequisites. So instead of manually installing all the necessary packages, you can just install that. For XeTeX, the fonts (currently) need to reside in the system font directory for easy access, so you might have to copy the [XITS otf files](http://www.ctan.org/tex-archive/fonts/xits/) to `~/.fonts` (or something similar). --- Since it might help other people too, I'll post how I got the XTIS fonts to work. This was my first time installing TeX packages by hand, so if I did anything in a non-standard or incorrect way please correct me. (I made this post community wiki, so you can edit it.) My system is Ubuntu 10.04 with TeXLive 2009 installed from the Ubuntu repositories. However something similar should also work on other operating systems (again, this is CW, so please add any instructions). I will install everything for use with XeTeX. There might be some changes for LuaTeX. In the following, replace ~/texmf by the output of ``` $ kpsewhich --var-value TEXMFHOME ``` or ``` $ kpsewhich --var-value TEXMFLOCAL ``` First we will install current versions of some prerequisite packages. ``` $ mkdir ~/texmf $ cd ~/texmf $ wget http://mirror.ctan.org/install/macros/latex/contrib/fontspec.tds.zip $ unzip fontspec.tds.zip $ mkdir tex/xelatex $ mv tex/latex/fontspec/ tex/xelatex/ ``` The last two lines are necessary, because otherwise `xelatex` will select the old version already installed on the system, see [Andrew's solution to his question](https://tex.stackexchange.com/questions/639/why-is-the-wrong-version-of-a-package-being-loaded/654#654). ``` $ cd ~/tmp ``` (or whichever temporary directory you like) ``` $ wget http://mirror.ctan.org/macros/latex/contrib/expl3.zip $ unzip expl3.zip $ cd expl3 $ tex l3.ins $ mkdir ~/texmf/tex/latex/expl3 $ cp *.sty ~/texmf/tex/latex/expl3 $ cd .. $ wget http://mirror.ctan.org/macros/latex/contrib/xpackages.zip $ unzip xpackages.zip $ cd xpackages/ $ tex xbase.ins $ tex l3keys2e.ins $ mkdir ~/texmf/tex/latex/xpackages $ cp *.sty ~/texmf/tex/latex/xpackages/ ``` Next we will install `unicode-math` from it's git repository. Alternatively you can download it from CTAN. ``` $ cd .. $ git clone "http://github.com/wspr/unicode-math.git" $ cd unicode-math/ $ tex unicode-math.dtx $ mkdir ~/texmf/tex/latex/unicode-math $ cp unicode-math.sty unicode-math-table.tex ~/texmf/tex/latex/unicode-math/ ``` And now finally the XITS fonts. Instead of the git repository you can download them from <http://github.com/khaledhosny/xits-math/downloads>. ``` $ cd .. $ git clone git://github.com/khaledhosny/xits-math.git $ cd xits-math/ ``` Now install the `.otf` files. I did this with Nautilus (the Gnome file manager), but I think you can just copy them to the `~/.fonts` directory. It only remains to tell TeX about the new packages: ``` $ sudo texhash ``` To test if everything went right, compile something like ``` \documentclass{article} \usepackage{unicode-math} \setmainfont{XITS} \setmathfont{XITS Math} \begin{document} $\mathcal A = α²$ \end{document} ``` with `xelatex`.
13
https://tex.stackexchange.com/users/83
733
502
https://tex.stackexchange.com/questions/698
50
I have been trying to encourage my students to use TeX in writing up homework, especially in early math major courses, like intro to proofs, where the typesetting is not too arduous. I have had very limited success with students taking it up. Does anyone else encourage/require assignments to be typeset? What strategies have worked best for you?
https://tex.stackexchange.com/users/200
How to encourage TeX as a homework medium
false
As a Mathematics/Engineering student approaching the end of my undergraduate career, I can say that typesetting my Homework was a pain until I had a nice refined template to use. Based on my experiences, I would suggest the following: * Provide your students with a LaTeX template that they can use as a starting point for their homework. Something that has nice features like a "Problem" environment that auto-increments question numbers and has support for sub-problems (parts, a, b, c, etc). Bonus points for nice headers/footers that show the student's name, current problem and "Continued on next page" if the answer is long. Providing a nice template eases the learning curve and can really sell some people on the elegance of TeX. * Absolutely, positively, provide the TeX sources to any assignment or notes page you hand out. One of the most pointless, time-consuming activities I have been forced to undertake is copying problem statements out of a PDF, pasting them into my homework document, and then regenerating all the mathematical typesetting and enumeration markup that did not copy cleanly or at all. Bonus points for using the homework template you developed to provide questions- then there is no copying and pasting, students just have to fill in the answer.
45
https://tex.stackexchange.com/users/17
734
503
https://tex.stackexchange.com/questions/162
55
Are there newsgroups, forums, FAQs, and other sites that provide quality information on TeX, LaTeX and friends? Are all of these in English, or is there one in "my language of choice"?
https://tex.stackexchange.com/users/87
What are other good resources on-line for information about TeX, LaTeX and friends?
false
There are also options on usenet: the newsgroups comp.text.tex, fr.comp.text.tex (French), de.comp.text.tex (German) are also places where questions can be asked. Moreover, announcements about new and updated packages are also sent there.
3
https://tex.stackexchange.com/users/87
737
504
https://tex.stackexchange.com/questions/736
223
What's the difference? I know that `\pagebreak` can take an optional argument that specifies how much a page break is desired, but is there any difference if the optional argument is not used?
https://tex.stackexchange.com/users/9
\pagebreak vs \newpage
false
`\pagebreak` tries to make the page the same height as other pages if it's possible (by stretching intervals between paragraphs etc) and `\newpage` just fills the page with empty space.
24
https://tex.stackexchange.com/users/85
738
505
https://tex.stackexchange.com/questions/736
223
What's the difference? I know that `\pagebreak` can take an optional argument that specifies how much a page break is desired, but is there any difference if the optional argument is not used?
https://tex.stackexchange.com/users/9
\pagebreak vs \newpage
false
`\newpage` forces a new page at the point at which it occurs. `\pagebreak` without options forces a new page at the end of the line in which it occurs.
18
https://tex.stackexchange.com/users/93
739
506
https://tex.stackexchange.com/questions/736
223
What's the difference? I know that `\pagebreak` can take an optional argument that specifies how much a page break is desired, but is there any difference if the optional argument is not used?
https://tex.stackexchange.com/users/9
\pagebreak vs \newpage
true
Both commands start a new page. If the optional argument is not used, `\pagebreak` will start a new page and the paragraphs of the old page will be spread out so that the old page will not look like the end of a chapter. With `\newpage`, on the other hand, the old page will have the blank space at the bottom, because the paragraphs will stick together as if the chapter had ended there. [This](https://web.archive.org/web/20100622022829/http://help-csli.stanford.edu/tex/latex-pagebreaks.shtml) link will be useful, and the [answer to a duplicate question](https://tex.stackexchange.com/questions/9852/what-is-the-difference-between-page-break-and-new-page/9855#9855) (that was migrated from SO to this site later) gives the following example:
250
https://tex.stackexchange.com/users/14
740
507
https://tex.stackexchange.com/questions/741
66
The first few pages of my document (introductory material) should be numbered using roman numerals. Starting with a specific chapter, the remaining pages should be numbered arabic, starting from one (`1`) again. *How can i achieve this? Are there any pitfalls i need to look after?*
https://tex.stackexchange.com/users/142
How to have roman numerals at the beginning of the document?
true
If you are using the `book` class, start your document with `\frontmatter`. This changes the numbering to roman numerals. Then mark the main part of with `\mainmatter`. There are also `\appendix` (which changes the chapter numbering to uppercase letters) and `\backmatter`.
62
https://tex.stackexchange.com/users/83
742
508
https://tex.stackexchange.com/questions/528
161
What are some good **tutorials** on writing custom styles (classes) that clearly explain commands used and some of the features that TeX has to offer in the way of styles?
https://tex.stackexchange.com/users/142
Style/class tutorials
false
The *LaTeX Companion*[1] has a chapter on writing package/class files. EDIT: The table of content is [available online](https://www.latex-project.org/help/books/bookpart_tlc2-ch0.pdf). The relevant chapter is Appendix A and in particular Section A.4. The style of the chapter is pretty much the same as the style of the rest of the book ([Chapter 3 is available online](https://www.latex-project.org/help/books/bookpart_tlc2-ch3.pdf)) with all needed commands explained in some details and with lots of examples (and counterexamples). [1] F. Mittelbach and M. Goossens, The LaTeX Companion. Addison-Wesley 2004
34
https://tex.stackexchange.com/users/83
743
509
https://tex.stackexchange.com/questions/725
22
I was reading the first **[answer](https://tex.stackexchange.com/questions/664/why-should-i-use-usepackaget1fontenc/677#677)** to this question: **[Why should I use \usepackage[T1]{fontenc}?](https://tex.stackexchange.com/questions/664/why-should-i-use-usepackaget1fontenc)** > > [...] the default font encoding (OT1) of TeX > is 7-bit and uses fonts that have 128 > glyphs, and so do not include the > accented characters as individual > glyphs. So a letter ö is made by > adding an accent to the existing 'o' > glyph. This means, among other things, > that **words containing accented > characters cannot be automatically > hyphenated**. > > > I can't see what is the relationship between the fact that a character like 'ö' has to be made from two different glyphs (the 'o' glyph and the accent glyph), and automatic hyphenation.
https://tex.stackexchange.com/users/165
Why words with accented characters can't be automatic hyphenated with the default OT1 enconding?
true
[FAQ 1](https://texfaq.org/FAQ-hyphenaccents): "TeX’s algorithm for hyphenation gives up when it encounters an \accent command". [FAQ 2](https://texfaq.org/FAQ-hyphen): "The candidates for hyphenation must be sequences of letters (or other single characters that TeX may be persuaded to think of as letters) — things such as TeX’s \accent primitive interrupt hyphenation."
16
https://tex.stackexchange.com/users/100
745
510
https://tex.stackexchange.com/questions/162
55
Are there newsgroups, forums, FAQs, and other sites that provide quality information on TeX, LaTeX and friends? Are all of these in English, or is there one in "my language of choice"?
https://tex.stackexchange.com/users/87
What are other good resources on-line for information about TeX, LaTeX and friends?
false
The `#latex` IRC channel on freenode.net has some extremely knowledgeable people on it.
6
https://tex.stackexchange.com/users/185
746
511
https://tex.stackexchange.com/questions/162
55
Are there newsgroups, forums, FAQs, and other sites that provide quality information on TeX, LaTeX and friends? Are all of these in English, or is there one in "my language of choice"?
https://tex.stackexchange.com/users/87
What are other good resources on-line for information about TeX, LaTeX and friends?
false
For drawing figures using TikZ [texample](http://www.texample.net) is a great resource for examples, complete with code.
11
https://tex.stackexchange.com/users/17
747
512
https://tex.stackexchange.com/questions/702
20
Is there a way to add vertical space, but only if that much vertical space has not already been added? In other words, to say "put a minimum of *X* points of space here, and if some other command has already put in *X* or more points, do nothing"? For example, I have a command which creates a blank line and then begins a paragraph, but it puts in too much space when used after a section heading, since the section heading already puts in its own space.
https://tex.stackexchange.com/users/27
Adding a "minimum" vertical space
true
Sounds like [\addvspace](http://tug.org/texlive/Contents/live/texmf-dist/doc/latex/latex2e-help-texinfo/latex2e.html#g_t_005caddvspace) is the command that you are looking for. Simply use `\addvspace` instead of `\vspace` and you will get the *maximum* of the lengths instead of the *sum* of the lengths whenever you have multiple consecutive spaces. If you are using the `titlesec` package to define your section headings, also have a look at the package option `largestsep`.
25
https://tex.stackexchange.com/users/100
749
513
https://tex.stackexchange.com/questions/750
10
I'm compiling a document with the essentially the following bib entry: ``` @misc{name, title = {Title of Web Page}, howpublished = {\url{http://somethinghere.com}} } ``` It compiles fine, but a period gets placed at the end of the url. Is there a way to avoid this? Thanks.
https://tex.stackexchange.com/users/217
url in Bibliography without period at the end
false
The period is being introduced by your bibliography style. Is the url by any chance the last element of the item's bibliography as rendered? Most, if not all, bibliography styles end entries with a period. I don't know of any bib styles in circulation which don't. You might try using the [custom-bib package](http://www.ctan.org/tex-archive/help/Catalogue/entries/custom-bib.html) to define your own bibliographic style to avoid this. Just run `latex makebst`---if the package is correctly installed, this will give you a text-based interface in which you can define your style by answering a series of questions.
5
https://tex.stackexchange.com/users/93
751
514
https://tex.stackexchange.com/questions/698
50
I have been trying to encourage my students to use TeX in writing up homework, especially in early math major courses, like intro to proofs, where the typesetting is not too arduous. I have had very limited success with students taking it up. Does anyone else encourage/require assignments to be typeset? What strategies have worked best for you?
https://tex.stackexchange.com/users/200
How to encourage TeX as a homework medium
false
I get reasonably good results with the following strategy: 1. Include the following line in my syllabus: "Nicely typeset solutions will be awarded a modicum of extra credit." 2. Distribute .tex source for nicely typeset but obviously fake solutions for my first homework. 3. Award a modicum of extra credit for nicely typeset solutions.
18
https://tex.stackexchange.com/users/105
752
515
https://tex.stackexchange.com/questions/297
52
Sometimes I want to describe portions of an equation using `\underbrace` and `\overbrace` in such a way that the portions are not completely distinct, for example: ``` /-------\ x = A + B + C + D + E \-------/ \---/ ``` > > What is the best way to do this? > > >
https://tex.stackexchange.com/users/32
How can I get an underbrace and an overbrace to partially overlap in an equation?
false
Check out "LaTeX Mathmode" by Herbert Voß. The manual can be found on CTAN ([PDF](http://tug.ctan.org/obsolete/info/math/voss/mathmode/Mathmode.pdf)). Skip down to section 63.2 "Overlapping braces". He also gives examples of other tricks you may want to pull using braces.
6
https://tex.stackexchange.com/users/17
753
516
https://tex.stackexchange.com/questions/674
98
I am submitting a paper to a conference that has a limit of 10 pages. I have edited and edited the text, but the paper still fills 11 pages, and I am reluctant to remove anything. What tricks can I use to make the paper fit in 10 pages? I know about `\vspace{-1mm}`, but are other and better tricks? How can I squeeze a little bit between lines, around the elements produced by \maketitle, around headlines, etc. in a way that is consistent and does not look too ugly? Is it possible to reduce the font size from 11 points to, say, 10.9? (This should be community wiki, but I don't have enough rep yet.)
https://tex.stackexchange.com/users/35
Squeezing scientific paper to fit within page limits
false
Under the constraints that you should not change any of the specifications that the committee lays out, the following work well, and can save you upto a page or more in a 10-11 page document. * Use Times Roman (`\usepackage{times}`) (read the comments for why not) * Use a compact bibliography style like abbrv instead of the defaults * Preface the bibliography with a `\small` * Tables of results can often be typeset one size smaller without any visual impairment. In fact they often look better that way, because they stand out from the text in any case. Using `\small` as above does the trick. * As mentioned above, try to find and reword paragraphs that have dangling last lines with 2-3 words in them. This can make a bigger difference than you think. * Use the package `wrapfig` to wrap figures around text, rather than having them set off and wasting space around them. This is very effective for small illustrative figures - not such a good idea for figures of results though. * Conference style files (ACM, can you hear me?) often waste a lot of space around subheaders like `\subsection` and `\subsubsection`. Often, you can get around this by replacing organizational elements by `\paragraph*`. While this might kill the numbering, it is often reasonable, and saves a lot of space. **Update**: Another trick I forgot to mention is using the [microtype](https://www.ctan.org/pkg/microtype) package. It's very effective at doing subtle shrinkage that undetectable to a non-font expert.
48
https://tex.stackexchange.com/users/103
755
517
https://tex.stackexchange.com/questions/222
19
There are at least two use cases where one might want to list items in a bibliography under separate subsections with different numbering conventions. * a CV, where you'd like to list journal papers, conference papers, workshop papers, etc under different categories (often needed in academic settings); * an annotated bibliography, where you might need different sections for different topics being covered. What I'd like is a method that allows me to specify names of subsections, and for an added bonus, different numbering conventions for each subsection, and then will list `\cite`s in different sections as per my wishes.
https://tex.stackexchange.com/users/103
How do I break up a bibliography into separately numbered sections?
false
A handy package that I use is `splitbib`. It allows all of the above, and gives customized section titles and numbering schemes for different parts of the bibliography. It's pretty easy to use - all you have to do is specify a list of bibtex cites for each subsection, as well as a name for the section, and optionally a prefix to use when numbering the references in each section.
2
https://tex.stackexchange.com/users/103
756
518
https://tex.stackexchange.com/questions/222
19
There are at least two use cases where one might want to list items in a bibliography under separate subsections with different numbering conventions. * a CV, where you'd like to list journal papers, conference papers, workshop papers, etc under different categories (often needed in academic settings); * an annotated bibliography, where you might need different sections for different topics being covered. What I'd like is a method that allows me to specify names of subsections, and for an added bonus, different numbering conventions for each subsection, and then will list `\cite`s in different sections as per my wishes.
https://tex.stackexchange.com/users/103
How do I break up a bibliography into separately numbered sections?
false
The other answers will all succeed, but I'd go with [biblatex](http://tug.ctan.org/pkg/biblatex). It was a number of features for bibliography subdivision, for example by keyword, and if designed from the start for flexibility.
4
https://tex.stackexchange.com/users/73
758
519
https://tex.stackexchange.com/questions/759
30
Is there in LaTeX a symbol or a macro for the average integral with a horizontal slash? I know about `\strokedint`, but I'd prefer the dash to be horizontal.
https://tex.stackexchange.com/users/214
Average integral symbol
false
I found a solution [here](https://planetmath.org/LaTeXSymbolForCauchyPrincipalValue). You can use the following instructions, which must be included on the preamble. ``` \def\Xint#1{\mathchoice {\XXint\displaystyle\textstyle{#1}}% {\XXint\textstyle\scriptstyle{#1}}% {\XXint\scriptstyle\scriptscriptstyle{#1}}% {\XXint\scriptscriptstyle\scriptscriptstyle{#1}}% \!\int} \def\XXint#1#2#3{{\setbox0=\hbox{$#1{#2#3}{\int}$ } \vcenter{\hbox{$#2#3$ }}\kern-.6\wd0}} \def\ddashint{\Xint=} \def\dashint{\Xint-} ``` The commands to execute those macros are `\dashint` and `\ddashint` for single dash and double dash, respectively. **EDIT**: I tested the code given in the page, and the dash was a bit to the left of the integral, so I changed it slightly, substituting the .5 from the line `\vcenter{\hbox{$#2#3$ }}\kern-.5\wd0}}` with a .6 . It worked for me, if it doesn't exactly do it for you, experiment with the .5 to find exactly where you want the dash to be, adding (subtracting) from the number to place it more to the right (left).
14
https://tex.stackexchange.com/users/14
760
520
https://tex.stackexchange.com/questions/732
10
I just installed a pretest version of TeXLive 2010 and tried compiling some files as a test. None of my XeLaTeX files compile because apparently the command `\newfontinstance` (which was defined in `fontspec`, if I remember correctly) no longer exists. Reading the documentation (`texdoc fonstspec`) I see that this is indeed the case and that there are now other commands such as `\fontspec`, `\newfontfamily`, ... Question -------- What is the minimal change I have to do to my XeLaTeX documents to get them to compile? Is is simply a question of changing `\newfontinstance` to `\newfontfamily`? Added ----- It seems that making the above change works (insofar as the document compiles and looks alright), but I'd like confirmation that I'm doing the right thing. Thanks!
https://tex.stackexchange.com/users/18
Whatever happened to \newfontinstance?
true
This was a somewhat inadvertent change in fontspec v2, but as far I know you're the first person to notice :-) You are correct that \newfontfamily is the replacement to use -- it is exactly the same command with a more sensible/accurate name. You can write ``` \let\newfontinstance=\newfontfamily ``` in fontspec.cfg if you would like to fix this for all of your legacy documents. Sorry for any inconvenience.
13
https://tex.stackexchange.com/users/179
761
521
https://tex.stackexchange.com/questions/762
2
When I have TikZ images or I include `.png` graphics, I need to use PDFLaTeX instead of plain `vanilla` LaTeX. (That is, I need to use PDFLaTeX all the time, rather than just when I want to produce the final PDF). Sometimes I forget that my current document (or one `\include`d in it) contains one of these things. The compilation using latex doesn't work. The errors I get out when this happens don't seem to be meaningful: they don't just say > > No such file `image.eps` > > > or > > LaTeX can't work TikZ > > > or the like. Is there anyway I can make these kinds of errors more transparent? I've often spent ages fiddling with insignificant other bits of code, because I haven't realised it's the image that is messing up the compilation. [`beamer`](https://www.ctan.org/pkg/beamer) also sometimes messes up in LaTeX, but I normally spot that one.
https://tex.stackexchange.com/users/215
Meaningful error messages when using LaTeX instead of PDFLaTeX
true
You can use the `ifpdf` package to test at the beginning of your document whether you're running with pdflatex and, if not, make latex crash with a more meaningful error message.
10
https://tex.stackexchange.com/users/169
763
522