5

I'm having small trouble with "pi" in section name \section{ $\pi$ } in LaTeX. I need to bold \pi but I do not know how to do it. I was try to use

$\mbox{\boldmath${\pi}$}$,

$\mbox{\mathbf{\pi}}$,

$\mathbf{\pi}$,

$\bm{\pi}$

but it doesn't work. How "pi" look like now What I want to achieve First image show how it look now, seccond show what I want to achieve.

  • Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user31729 Nov 23 '14 at 11:16
  • $\boldsymbol{\pi}$ was not in your list of trials – user31729 Nov 23 '14 at 11:20
2

Unless using a special font, the macro\boldsymbol from amsbsy package should do.

(Beware, that math typesetting will make the bookmarks weird if used unless \texorpdfstring with appropiate workaround is applied)

\documentclass{article}

\usepackage{amsbsy}
\usepackage[unicode]{hyperref}

\begin{document}


\section{Not bold $\pi$}

\section{Bold $\boldsymbol{\pi}$}

\section{Bold \texorpdfstring{$\boldsymbol{\pi}$}{\textpi}}


\end{document}

enter image description here

| improve this answer | |
4

Two versions, one without hyperref, one with it.

No hyperref

\documentclass{article}

\begin{document}

\section{\protect\boldmath Bold $\pi$}

\end{document}

With hyperref

\documentclass{article}
\usepackage[unicode]{hyperref}

\begin{document}

\section{\protect\boldmath Bold \texorpdfstring{$\pi$}{\textpi}}

\end{document}

enter image description here

| improve this answer | |
  • How does the \texorpdfstring{}{} command works? What does \textpi in the second argument does? – GiuTeX Apr 2 '18 at 14:20
  • 1
    @opisthofulax \texorpdfstring{1}{2} uses 1 for normal typesetting, but will use 2 for setting the bookmark text; \textpi will print a Greek pi. – egreg Apr 2 '18 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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