Edited
I want to make the name written in mathematical mode match the style title of the section.
The first lines of my code are
\documentclass[pdftex,12pt,twoside,a4paper]{report}
\usepackage[utf8]{inputenc}
\usepackage{float}
\usepackage{lmodern}
\usepackage{amssymb,amsmath,amsthm}
My document has chapters and sections that appear text and formulas together. If I use
\section{Properties of $Ti_3SiC_2$}
the result is
in the text and
in the index.
To try to correct the difference between font styles in both places, the line of code that I used is:
\subsection[Properties of \texorpdfstring{$\mathrm{ZrB_2+SiC}$}{TEXT}]{Properties of \texorpdfstring{$\mathbf{ZrB_2+SiC}$}{TEXT}}
and the result in the index is
And in the title of the section is
It may seem that the styles match, but no. That is, in both cases the letters of Properties and ZrB_2 look different. Does somebody know anything about this? Now is it better understood?
Pd: I do not want the title of the text and the index to have the same style format. What I intend is that the format of the title with the mathematical expression, and the index with the mathematical expression, be the same.








\tableofcontentsby "index" ? You have specified\mathrmin one case and\mathbfin the other so naturally they use different fonts? – David Carlisle Jun 22 '19 at 16:35mhchempackage that is dedicated to typesetting chemical formulae. – leandriis Jun 22 '19 at 17:23mhchemas follows: `\documentclass[12pt]{report} \usepackage{mhchem} \usepackage[hidelinks]{hyperref}\begin{document} \tableofcontents \section{Properties of \ce{Ti_3SiC_2}} \section{Properties of \ce{ZrB_2 + SiC}} \end{document}` This is the output
– leandriis Jun 22 '19 at 19:45Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): removing\mhchem@cee' on input line 96.andPackage hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): removingsubscript' on input line 96.– Valveroz Jun 24 '19 at 08:40