yo'
  • Member for 9 years, 10 months
  • Last seen this week
2 answers
10 votes
1k views
Making an odd shaped table
9 votes

If you are typesetting sort of Cayley table, then I think the approach by Rick de Groot is good. If it's more a text table, you might use the package booktabs to enhance the look your table a little, ...

View answer
3 answers
5 votes
756 views
How do I enforce a font size on a newly-defined symbol while using it in math mode?
9 votes

You can use the command \mathchoice that chooses the correct math size: \newcommand\atoistyle[1]{\mbox{\rotatebox[origin=c]{180}{$#1\iotaup$}}} \newcommand\atoi{\mathchoice {\atoistyle\displaystyle}...

View answer
18 answers
118 votes
72k views
What does the draft mode change?
9 votes

Package: showkeys draft is the default setting Has final option: yes, it disables all package functionality.

View answer
2 answers
9 votes
6k views
\lstinline!Foo! vs \lstinline{Foo}
Accepted answer
9 votes

The reason they exist next to each other is that inside {...}, the LaTeX "special characters" are treated differently, so you cannot use $, because it is a character for math mode. inside !...!, you ...

View answer
4 answers
8 votes
399 views
How to align five equations on three lines, e.g., 2-2-1, with the last equation centered?
8 votes

Well, something like this? And remark: & should be before =, not after it. This will as well automatically use the correct spacing. \begin{gather*} \begin{aligned} a &= b & c &= d ...

View answer
4 answers
8 votes
6k views
How to define mathematical functions by the action on an element?
8 votes

I would go with something simple and, at least for me, quite classical: \documentclass{article} \usepackage{mathtools} \begin{document} \[ f\colon R\times R \to R\times R,\quad v \mapsto f(v) \] or ...

View answer
1 answers
5 votes
249 views
Arranging several items in one or two lines depending on their size
Accepted answer
8 votes

Well, this does what you ask for I think: \documentclass[a4paper,11pt]{article} \usepackage{times} \usepackage[utf8]{inputenc} \usepackage{hyperref} \setcounter{page}{393} \...

View answer
2 answers
4 votes
227 views
Why does the vertical alignment not match the expected behaviour at p columns in tabular env?
Accepted answer
8 votes

The space is there because inside the cell, a paragraph is first started, then it's ended and your itemize starts. You can wrap the code inside minipage to get the desired output: \documentclass{...

View answer
3 answers
14 votes
3k views
How to include a hash of a source file in the final PDF file?
8 votes

This stores the checksum in variable \shasum. All the \string\\\string\\ is needed to get \\\\ into the shell stream. Option --shell-escape is needed of course. The advantage of this solution is that ...

View answer
1 answers
8 votes
205 views
Why is this comment character required for correct rendering?
Accepted answer
8 votes

Well, in general, you are not allowed to have empty lines inside \node ... ; or \coordinate ... ; or \draw ... ; or such. The reason is that empty line isn't just a whitespace that is easily trimmed, ...

View answer
3 answers
23 votes
4k views
Should one cite a LaTeX package in a scientific publication?
8 votes

Short answer. No, you don't need to do that, but you can. A bit longer answer. In general, it might be a good idea to mention in which software you draw your figures, so for instance I tend to cite ...

View answer
3 answers
24 votes
41k views
Always \textrm, never \rm? A counterexample?
8 votes

No, if you want to be sure the item labels are in "\rm style", you should use {\normalfont(i)} Of course, as @egreg pointed out, you might want to use enumitem and redefine the item labels globally,...

View answer
3 answers
8 votes
2k views
Force inline-type superscript for display equations (but display-type subscript)
Accepted answer
8 votes

This should work exactly as desired: \documentclass[a4paper]{article} \usepackage{amssymb,amsmath} \pagestyle{empty} \makeatletter \newcommand*\jjoin{\@ifnextchar_\jj@in\jj@@n} \newcommand*\jj@@n{\...

View answer
1 answers
10 votes
2k views
Show chapter in Table of Contents but do not print its header in text
Accepted answer
8 votes

+1 You got it, \addcontentsline really exists! \cleardoublepage \phantomsection \addcontentsline{toc}{chapter}{My Dummy Chapter Title} Issuing \cleardoublepage is necessary only if you want your non-...

View answer
1 answers
3 votes
2k views
How to set italics and bold shortcuts like *bold* or _italic_
Accepted answer
8 votes

For the underscore, the following works: \documentclass{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{lmodern} \usepackage[ngerman]{babel} \catcode`\_=\active \protected\...

View answer
1 answers
5 votes
107 views
Can I redefine \begin so that it does not complain about undefined environment
Accepted answer
8 votes

Yes, you can: \documentclass{article} \makeatletter \let\xbegin\begin % store original \begin \let\xifundefined\@ifundefined % store original \@ifundefined \def\begin{% % "inactivate" \@...

View answer
5 answers
30 votes
26k views
How do I write $\notin$ backwards?
8 votes

I believe that \rotatebox is more proper than \reflectbox, I suggest this solution: \documentclass{article} \usepackage{rotating} \makeatletter \newcommand\@notni[2]{\mathrel{\rotatebox[y=#1]{180}{$...

View answer
1 answers
6 votes
352 views
Theorem environment numbered according to subsection
8 votes

You can use the built-in feature for theorem numbering: \documentclass{article} \usepackage{amsthm} % not necessary \newtheorem{ex}{Exercise}[subsection] \begin{document} \section{} \subsection{}...

View answer
2 answers
8 votes
2k views
How to type a tall / symbol?
Accepted answer
8 votes

This way: \documentclass{article} \begin{document} \[ \mathit{cl}(V, q) = \biggl(\sum_{r=0}^{\infty} \bigotimes^r V\biggr) \bigg/ \bigl\{v\otimes v = -q(v,v)\bigr\} \] \end{document} Several ...

View answer
6 answers
20 votes
19k views
Text in squared box
8 votes

This should work for you. It does the necessary vertical corrections so that the text is on a baseline (the same vertical level as the surrounding text). You can change the \fboxsep line to get more ...

View answer
4 answers
13 votes
12k views
How to get an exponent hat
8 votes

The following code introcudes \ehat that can be used only in exponents (!). Macro \mathchoice lets you use different code in different level of "exponent". Then we \raisebox the properly-sized hat to ...

View answer
2 answers
6 votes
8k views
Change distance between page number and bottom edge of page
8 votes

Add the following code by the end of your document header (just before \begin{document}). The calc package allows arithmetics with lengths and the \setlength just modifies \footskip to the desired ...

View answer
18 answers
118 votes
72k views
What does the draft mode change?
8 votes

Package: varioref Changes: Turn error messages into warnings. Has final option: yes

View answer
3 answers
15 votes
9k views
lrbox in \newenvironment
8 votes

If you substitute \begin{lrbox}->\lrbox and \end{lrbox}->\endlrbox, it works perfectly. There seem to be some problem with calling \begin{mybox}...\end{mybox}, because every \begin{ENV}...\end{ENV} ...

View answer
3 answers
12 votes
31k views
How do I keep a string of text together without it doing a line break?
8 votes

I use a solution to this problem that cannot be used always. Once I finish my work, I go thru the "almost-final" version of the whole paper and when an inappropriate break appears (inside equation, ...

View answer
2 answers
9 votes
2k views
Why do I need a '\vspace{0pt}` to align a table and a figure along the bottom line when using '\vbox' and '\hbox'?
8 votes

The reason is that the tabular has some depth, i.e. it propagetes under the baseline. If you change it to \begin{tabular}[b]{ l c r } you get what you want, because with the [b] flag, the tabular ...

View answer
3 answers
10 votes
1k views
How to put a non-breaking space in \cite
Accepted answer
8 votes

If it is an isolated thing (i.e. you need to do it once in your document), put \hbox{\cite{ref1, ref2}}

View answer
4 answers
5 votes
414 views
Rubber banding integrands around nested fractions
7 votes

Just get rid of the unnecessarily large fractions and the large integral symbol, and you'll be fine: \documentclass{article} \usepackage{mathtools} \begin{document} \begin{align} \theta_f &= \pi ...

View answer
2 answers
2 votes
17k views
Document working with cite package, but not with natbib package
Accepted answer
7 votes

When you switch from the cite package to the natbib package, it is necessary to delete .aux and .bbl files since they contain the non-natbib information and the package complains about it. Note that ...

View answer
1 answers
14 votes
419 views
Forthcoming LaTeX3 User Manual
7 votes

No, currently, there is no learning manual available for LaTeX3 (L3). The only available sources are: expl3.pdf -- this file covers mostly the philosophy of whatever is done in L3 and, importantly, ...

View answer
1
3 4
5
6 7
20