(1) I have this problem with using mathematical symbols in my section
titles, because they don't come out bold in the section header. If I
use boldmath, then they come out bold in the table of contents, which I
don't want for subsections. Is there a way around this that doesn't
involve editing the .toc file?
(2) I have expressions like $<3$ where LaTeX is putting too much space
between the < and 3. Is there an easy way to compress this that
doesn't involve hacking the spacing? (Same with $-3$ where it treats
it like a subtraction sign rather than a minus sign).
Thanks a lot!
> (2) I have expressions like $<3$ where LaTeX is putting too much space
> between the < and 3. Is there an easy way to compress this that
> doesn't involve hacking the spacing? (Same with $-3$ where it treats
> it like a subtraction sign rather than a minus sign).
This has to do with the "mathematical symbol type" of <, -, see for
instance the Latex Companion.
\documentclass{amsart}
\begin{document}
$<3$, $-3$, ${<}3$ $2-3$.
\end{document}
I don't see the problem with $-3$.
--
Maarten Bergvelt
> (1) I have this problem with using mathematical symbols in my section
> titles, because they don't come out bold in the section header. If I
> use boldmath, then they come out bold in the table of contents, which I
> don't want for subsections. Is there a way around this that doesn't
> involve editing the .toc file?
It is easy to achieve this with a KOMA Script class:
\documentclass[chapterprefix]{scrbook}
\addtokomafont{sectioning}{\rmfamily\boldmath}
\begin{document}
\tableofcontents
\chapter{Abc $y=x$}
def
\section{ghi $y=x$}
jkl
\subsection{ghi $y=x$}
jkl
\end{document}
Note that 'chapterprefix' and '\rmfamily' are only used to make scrbook
look similar to the default book.cls (at least at first sight).
Please also note that bold symbols in section headings are always a bit
dangerous since in mathematics bold symbols often have a different
meaning.
cheerio
ralf
my first guess:
{\boldmath\section{$e^{i\pi}+1=0$}}
seems to do the job.
--
Robin Fairbairns, Cambridge
What's the difference between a subtraction sign and a minus sign?
///Peter
I suppose you don't want a mathematical explanation :-)
For TeX, a substraction sign is a BIN(ary symbol) and a minus sign is
an ORD(inary symbol). That makes a difference about spaces around.
Maybe I don't understand the question. Would you know how TeX knows
that "-" is either a substration sign or a minus sign?
Jean-Côme Charpentier
I suspected it might be that...just my ignorance as a non-mathematician.
One performs a function, the other just expresses negativeness.
///Peter
TeX follows the rules in Appendix G of the TeXbook. A minus sign
is initially added to a <math list> as a <math atom> of type Bin.
Then TeX reprocesses that list, converting it to "boxes and glue"
according to those rules.
Rule 5 says: "...if this was the first atom in the [current math]
list, or the most recent previous item was Bin, Op, Rel, Open or
Punct, change the Bin to Ord..."
And rule 6 says: "If the current atom is a Rel or Close or Punct,
and if the most recent previous atom was Bin, change that
previous Bin to Ord."
And finally, between rules 18 and 19 is the comment that if the
last atom in a list is Bin, it is changed to Ord. (Why doesn't
this deserve a number?)
Thus, in math mode, the following minus signs become Ords:
-- first in list: {-x},
-- last in list {x-}
-- preceded by Bin, Op, Rel, Open or Punct:
x+-y, \sum-x, y =-x, (-x), (y,-x)
-- followed by Rel, Close or Punct:
x-=y, (x-), (x-,y)
Between Bin and Ord there is \medmuskip. Between Ord and Ord
there is no space (except maybe italic correction). So the changes
from Bin to Ord cause no spaceto appear between "-" and "x". This
is the typographical convention for a negative x. If it stays a Bin,
that
space appears, which is the convention for subtraction. The actual
font glyph used is the same (though usually different from a hyphen
or an ndash).
Dan
MyMichelle> Hi everyone - I have a couple of LaTeX-related questions,
MyMichelle> and it would be really great if someone could help me out:
MyMichelle> (1) I have this problem with using mathematical symbols in
MyMichelle> my section titles, because they don't come out bold in the
MyMichelle> section header. If I use boldmath, then they come out
MyMichelle> bold in the table of contents, which I don't want for
MyMichelle> subsections. Is there a way around this that doesn't
MyMichelle> involve editing the .toc file?
I use the following:
\makeatletter
\DeclareRobustCommand\bfseries{%
\not@math@alphabet\bfseries\mathbf
\fontseries\bfdefault\selectfont\boldmath}
\makeatother
Greetings,
--
Alberto