2

I am trying to have bold font in a subsection*{} with using \mintinline.

Is there anyway to accomplish that?

Here is the example:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{minted}
\begin{document}

\subsection*{\mintinline{python}{compare_cpu_and_memory():}} This function deals with the comparison of the solver memory usage and solver CPU time of both framework generated models.

\end{document}

I want to make compare_cpu_and_memory(): bold.

3

The text is already bold, but the default font does not have bold typewriter letters, so one cannot see it. With another font:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{minted}

\usepackage[T1]{fontenc}
\usepackage[scaled=0.85]{beramono}

\begin{document}

\subsection*{\mintinline{python}{compare_cpu_and_memory():}} This function deals with the comparison of the solver memory usage and solver CPU time of both framework generated models.

\end{document}

enter image description here

  • a question is this beramono changes only the subsections or all of the text font? – oakca Apr 11 at 8:58
  • @oakca it changes all typewriter font, not the text font. – user185511 Apr 11 at 8:59
  • what you mean by all typewriter? btw I ll accept it in some mins.. – oakca Apr 11 at 9:00
  • @oakca typewriter font is the font used for code in which each letter is the same width as the others – user185511 Apr 11 at 9:01
  • If I understand correct it will change all of the mintinline s and minted parts :) – oakca Apr 11 at 9:01

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.