summaryrefslogtreecommitdiff
path: root/tex/latex/kinote/kinote-frames.sty
blob: ed46b0b51300658708dedc25c7caa601d585eb98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
\usepackage{kinote-color}
\usepackage{mdframed}
\mdfdefinestyle{kinotemdframe}{
  backgroundcolor=lightgraycolor,
  linecolor=rulecolor,
  linewidth=1.5pt,
  leftline=true,
  rightline=false,
  topline=false,
  bottomline=false,
  innertopmargin=5pt,
  innerbottommargin=3pt,
  innerrightmargin=3pt,
  innerleftmargin=5pt,
  skipabove=1em,
  skipbelow=1em
}

\@ifpackageloaded{minted}{
  %\usemintedstyle{arduino}
  %\usemintedstyle{algol_nu}
  %\usemintedstyle{trac}
  \setminted{
    baselinestretch=0.9,
    breaklines=true,
    %linenos=true
  }
  \surroundwithmdframed[style=kinotemdframe]{minted}
  \usepackage{scrbase}
  \newcaptionname{spanish}{\listingscaption}{Listado}
}{
  \surroundwithmdframed[style=kinotemdframe]{Shaded}
  \surroundwithmdframed[style=kinotemdframe]{verbatim}
}

\colorlet{darknoteshade}{kinoteRed!60}
\colorlet{noteshade}{darknoteshade!10}

\mdfdefinestyle{quoteframe}{
  style=kinotemdframe,
  backgroundcolor=quoteshade,
  linecolor=darkquoteshade,
}

\renewenvironment{quote}{%
  \begin{mdframed}[style=quoteframe]%
}
{%
  \end{mdframed}%
}

\mdfdefinestyle{noteframe}{
  style=quoteframe,
  backgroundcolor=noteshade,
  linecolor=darknoteshade
}
\newenvironment{note}{%
  \begin{mdframed}[style=noteframe]%
}
{%
  \end{mdframed}%
}

\newcommand{\DUadmonitionnote}[1]{%
  \def\FrameCommand{%
    %\hspace{1pt}%
    {\color{darknoteshade}\vrule width 2pt}%
    {\color{noteshade}\vrule width 10pt}%
    \colorbox{noteshade}%
  }%
  \MakeFramed{\advance\hsize-\width\FrameRestore}%
  \noindent\hspace{-4.55pt}% disable indenting first paragraph
  \begin{adjustwidth}{}{7pt}%
  %\vspace{2pt}\vspace{2pt}%
  #1%
  \vspace{2pt}\vspace{2pt}%
  \end{adjustwidth}\endMakeFramed%
}