0

I want to use mdframed package and I was watching some examples from a template by Marion Lachaise & François Févotte from LaTeX templates

But I found this: (in the tikz part)

\mdfdefinestyle{file}{
    innertopmargin=1.6\baselineskip,
    innerbottommargin=0.8\baselineskip,
    topline=false, bottomline=false,
    leftline=false, rightline=false,
    leftmargin=2cm,
    rightmargin=2cm,
    singleextra={%
        \draw[fill=black!10!white](P)++(0,-1.2em)rectangle(P-|O);
        \node[anchor=north west]
        at(P-|O){\ttfamily\mdfilename};
        %
        \def\l{3em}
        \draw(O-|P)++(-\l,0)--++(\l,\l)--(P)--(P-|O)--(O)--cycle;
        \draw(O-|P)++(-\l,0)--++(0,\l)--++(\l,0);
    },
    nobreak,
}

And I don't know what P and O nodes are. I tried searching on the documentation and here in TeX.SX and I only found out that everyone writes a line like this: (in the tikz part)

\path let \p1=(P), \p2=(O) in (\x2,\y1) coordinate (Q);

but I haven't found what P, O, \p1, \p2 are. So can anyone tell me what they are and how to use them?

10
  • Documentation? You sure it isn't mentioned in mdframed documentation? Would be weird if it's the case...
    – user202729
    Commented Jan 7, 2022 at 1:23
  • Also try to include a [example]. Could be something defined in the template somewhere above too
    – user202729
    Commented Jan 7, 2022 at 1:23
  • I tried in the documentation searching \p1, but the only times it appears is in the examples and even searched in the .mdf that is loaded when the framemethod=tikz is used md-frame-1.mdf
    – AmadoC
    Commented Jan 7, 2022 at 1:39
  • No, the p1/p2 is a TeX thing, see manual (4.1.3 the circle around A) P and O I can't find however, but try just drawing their location to see where they are.
    – user202729
    Commented Jan 7, 2022 at 2:50
  • 1
    this should clarify your doubt -- tex.stackexchange.com/a/588315/197451
    – js bibra
    Commented Jan 7, 2022 at 4:20

0

You must log in to answer this question.

Browse other questions tagged .