3

I would like to know whether there is a simple way to have slanted and non-italic lower case letters (especially in bold and/or blackboard bold style) in math mode, while still using some basic/default settings.

This is stemming from a practical need: I would like to have a special graphical rendering for n-tuples, such as objects of ℝn, in order to have them visually distinguished from ordinary vectors, for which I'm using italic bold. As far as I know, variable quantities should be written in slanted style, hence the "slanted" part (and btw, there's the rub!, writing non-slanted (roman) bold lower case letters is quite unproblematic, even for me). I have also noticed that uppercase \boldsymbol (and \bm from the bm package, and \vb* from the physics package) are already non italic, but this may be too big a constraint to me, and I'd rather avoid resorting to capitalizing each n-tuple, hence the "lowercase" part.

Since I'm quite new to Latex, I'm using some very basic settings, and would like to stick to them, in particular to Computer Modern as math font, and just add the capability of writing slanted non-italic (bold/bb) fonts within equations.

As an extrema ratio, I would resort to \text, but I guess it's better not to do this (eg for spacing, accents, etc.).

I have thoroughly looked for an answer; this one provides almost everything I need, the only issue with it being that slanted fonts from cmbxsl10 look significantly smaller than ordinary ones.

4

If you want the bold version slanted

\documentclass{article}
\usepackage{amsmath}
\DeclareSymbolFont{slant}{OT1}{\familydefault}{m}{sl}
\SetSymbolFont{slant}{bold}{OT1}{\familydefault}{bx}{sl}
\DeclareSymbolFontAlphabet{\mathsl}{slant}
\begin{document}
\[
fgh\mathsl{fgh}_{fgh\mathsl{fgh}}
\]
\[
\boldsymbol{f}\boldsymbol{\mathsl{f}}
\]
\end{document}

enter image description here

If you want the bold version unslanted

\documentclass{article}
\usepackage{amsmath}
\DeclareSymbolFont{slant}{OT1}{\familydefault}{m}{sl}
\SetSymbolFont{slant}{bold}{OT1}{\familydefault}{b}{sl}
\DeclareSymbolFontAlphabet{\mathsl}{slant}
\begin{document}
\[
fgh\mathsl{fgh}_{fgh\mathsl{fgh}}
\]
\[
\boldsymbol{f}\boldsymbol{\mathsl{f}}
\]
\end{document}

enter image description here

3

An alternative to Steven’s answer:

% My standard header for TeX.SX answers:
\documentclass[a4paper]{article} % To avoid confusion, let us explicitly 
                                 % declare the paper format.

\usepackage[T1]{fontenc}         % Not always necessary, but recommended.
% End of standard header.  What follows pertains to the problem at hand.

\usepackage{amsmath,amsfonts} % compatibility test

\DeclareMathAlphabet{\mathsl}  {T1}{cmr}{m} {sl}
\SetMathAlphabet{\mathsl}{bold}{T1}{cmr}{bx}{sl}



\begin{document}

Normal: \( \mathsl{ad}-\mathsl{bc} \).

{\bfseries\boldmath Boldfaced: \( \mathsl{ad}-\mathsl{bc} \).}

\end{document}
  • Thanks a lot. Both your answer and Steven B. Segletes's completely solve my problem. By no means I'm qualified to say whether one is better than the other; the only reason why I accepted the other answer is because it was posted before than yours; please believe me, I'm very grateful to both of you, and would have picked both answers if possible. – atlantropa Feb 15 at 13:52
  • I'd not forget \bm – egreg Feb 15 at 14:44

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.