2
\documentclass[a4paper,12pt]{article}

\usepackage{amsmath}

\usepackage[T1]{fontenc}
\usepackage[math]{iwona} %nice font
\renewcommand{\mathsterling}{\textrm{\textsterling}}


\usepackage{hyperref}
\begin{document}

\section{EAL \& SEN}
A \& B

\end{document}

Bookmarks works fine. But not in the document. How can I keep the ampersand in the same format as in the bookmark?

enter image description here

Thanks.

  • 3
    The font used to display the bookmarks is controlled by the PDF viewer, not anything to do with LaTeX. So it is nearly impossible to guarantee the ampersand in the document looks the same as it does in the bookmarks. – Paul Gessler Apr 07 '16 at 22:59
  • @PaulGessler I really hope there is a way to keep the ampersand as I have used this font for many articles, and I want to keep it consistent. Never thought about this problem before and it looks like a nice font! – Chen Stats Yu Apr 08 '16 at 08:08

2 Answers2

5

Document

The font iwona does not contain an alternative for the ampersand. Therefore, a different font is needed for this symbol, when the more common form is preferred. The following example uses the ampersand from the CM Bright fonts (also package cm-super should be installed). Two alternatives are in the comments.

\documentclass[a4paper,12pt]{article}

\usepackage{amsmath}

\usepackage[T1]{fontenc}
\usepackage[math]{iwona} %nice font
\renewcommand{\mathsterling}{\textrm{\textsterling}}

\makeatletter
\DeclareRobustCommand*{\&}{%
  \nfss@text{%
    %\fontfamily{lmss}%
    %\fontfamily{LinuxBiolinumT-TLF}%
    \fontfamily{cmbr}%
    \selectfont
    \symbol{`\&}%
  }%
}
\makeatother

\usepackage{hyperref}
\begin{document}

\section{EAL \& SEN}
A \& B
\end{document}

Result

Bookmarks

The font in the bookmarks cannot be changed, because the bookmarks in the PDF file are simple text strings without font information (except that bold or italic could be specified for a whole bookmark title string). The fonts are chosen by the PDF viewer, see the comment of Paul Gessler.

Heiko Oberdiek
  • 271,626
  • This works, although not in section titles (on my end). Is there a way to circumvent this problem? (using \fontfamily{cmr}\selectfont \itshape in a document typesetted in Libertine). – Mogu Jun 14 '21 at 14:33
  • @Mogu Since the example of the answer uses a section title that works, make a new question with a full, but minimal example that shows the problem. – Heiko Oberdiek Jun 15 '21 at 19:32
  • Hi, I did just that : https://tex.stackexchange.com/questions/601443/cmr-italic-ampersand-in-libertine-environment – Mogu Jun 15 '21 at 21:33
0

You can try the following:

\documentclass[border=5]{standalone}
\usepackage[T1]{fontenc}
\usepackage{librecaslon}
\begin{document}
{\fontfamily{cmr}\selectfont{\itshape\&}\par}{\itshape\&}
\end{document}

Extracted from the link: https://texblog.org/2014/06/17/typographic-ligatures-or-the-history-of-ampersand/

WwP
  • 1