I am trying to replicate the code used in this answer
And I am having trouble understanding the following code.
\documentclass{article}
\usepackage{xcolor}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{lipsum}
% Principal MPD frame type
\mdfdefinestyle{mpdframe}{
frametitlebackgroundcolor =black!15,
frametitlerule =true,
roundcorner =10pt,
middlelinewidth =1pt,
innermargin =0.5cm,
outermargin =0.5cm,
innerleftmargin =0.5cm,
innerrightmargin =0.5cm,
innertopmargin =\topskip,
innerbottommargin =\topskip,
}
% Studies
\mdfdefinestyle{studies}{%
style=mpdframe,
frametitle={Studies},
}
\newmdenv[style=studies]{studies}
\begin{document}
\begin{studies}
\lipsum[1]
\end{studies}
\end{document}
Firstly, what does innertopmargin=topskip means
And secondly, why the framemethod has to be tikz instead?
The answerer said that the tikz is used but where?
mdframedcan draw frames with Latex commands (e.g.,\rule), or with TikZ, or withPSTricks. You choose, and it loads the required packages. For the margins,Figure 2: adjustable lengths of mdframedin the manual (texdoc mdframed) illustrates them. – Cicada Nov 13 '20 at 07:51\topskipMinimum distance between the top of the page body and the baseline of the first line of text." - from the manual (texdoc latex2e). – Cicada Nov 13 '20 at 07:58