2

The framerule option should set the thickness of the frame separators for the minted environments.

Consider this MWE:

\documentclass[corpo=11pt,twoside,tipotesi=magistrale,greek]{toptesi}

\usepackage{geometry}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{listings}
\usepackage[newfloat]{minted}
\usemintedstyle{bw}
\setminted{
    linenos,
    breaklines,
    breakanywhere,
    frame=lines,
    framesep=4mm,
    framerule=1pt
}
\AtBeginEnvironment{minted}{%
\renewcommand{\fcolorbox}[4][]{#4}}

\newenvironment{code}{}{}

\usepackage{float}
\usepackage{adjustbox}


\begin{document}

\begin{code}
    \begin{minted}{python}
class ExceptionHandler:
    ...
    \end{minted}
\end{code}

\end{document}

One can clearly see that the lines are more than 1pt thick

enter image description here

5
  • One point is 0.35mm (1/72in), so that seems about right. The default thickness for framerule is 0.4pt, if you put that value (or leave out the option entirely, since it is the default) then you get a thinner line.
    – Marijn
    Nov 5, 2021 at 9:08
  • Maybe is not minted fault but if you put 0.4pt or 0.1pt the line doesn't change Nov 5, 2021 at 11:07
  • 1
    For me it does change, with the code \begin{code} \begin{minted}[framerule=1pt]{python} class ExceptionHandler: ... \end{minted} \end{code} \begin{code} \begin{minted}[framerule=0.4pt]{python} class ExceptionHandler: ... \end{minted} \end{code} I get i.stack.imgur.com/NvyHf.png where the second block has a smaller framerule than the first.
    – Marijn
    Nov 5, 2021 at 11:34
  • Do the comparation between 0.1pt and 0.4pt Nov 5, 2021 at 14:31
  • At some point the line becomes so thin and the difference between the point values so small that pdf viewers cannot show the changes anymore. Do you think 0.4 is too much and you want the line to be even more thin? Or is your question just out of curiosity (which is also fine of course)?
    – Marijn
    Nov 5, 2021 at 14:53

1 Answer 1

1

The rule is exactly 1pt thick. I show here how to test it.

\documentclass[corpo=11pt,twoside,tipotesi=magistrale,greek]{toptesi}
\usepackage[T1]{fontenc}
\usepackage{geometry}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{listings}
\usepackage[newfloat]{minted}
\usemintedstyle{bw}
\setminted{
    linenos,
    breaklines,
    breakanywhere,
    frame=lines,
    framesep=4mm,
    framerule=1pt
}
\AtBeginEnvironment{minted}{\renewcommand{\fcolorbox}[4][]{#4}}

\newenvironment{code}{}{}

\usepackage{float}
\usepackage{adjustbox}


\begin{document}

\hrule height 1pt

\begin{code}
    \begin{minted}{python}
class ExceptionHandler:
    ...
    \end{minted}
\end{code}

% now let's test it for 0.4pt

\hrule height 0.4pt

\setminted{framerule=0.4pt}

\begin{code}
    \begin{minted}{python}
class ExceptionHandler:
    ...
    \end{minted}
\end{code}

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .