Debian Codegraph @

texmf-dist/doc/latex/latex4musicians/params.tex

raw
1 % params.tex -*- LaTeX -*-
2 %
3 % By Guido Gonzato, PhD <guido.gonzato (at) gmail.com>
4 %
5 % Last updated: January 16, 2019
6
7 % ----- DEBUG
8 % \overfullrule=5pt
9 % \widowpenalty=10000
10 % \clubpenalty=10000
11
12 % default typewriter font
13 \renewcommand{\ttdefault}{txtt}
14
15 \definecolor{shadecolor}{rgb}{0.85,0.85,1}
16 \definecolor{pdfbg}{rgb}{0.95,0.95,0.95}
17
18 % ----- DEFINITIONS
19
20 \newcommand{\version}{1.0.1} % VERSION
21
22 \newcommand{\copyleft}{\reflectbox{\textcopyright}}
23 \newcommand{\bl}{\textbackslash}
24 \newcommand{\qs}{\textquotesingle}
25
26 % ----- NEW COMMANDS AND ENVIRONMENTS
27
28 \newcommand{\qnote}
29 {\raisebox{\depth}{\scalebox{-1}[-1]{\quarternote}}}
30
31 \newcommand{\reg}
32 {\textsuperscript{\textregistered}}
33
34 \newcommand{\entry}[2]
35 {{\small \textsf{#1/#2}}}
36
37 \newcommand{\pkg}[1]
38 {\href{https://ctan.org/pkg/#1}{\texttt{#1}}}
39
40 \newcommand{\ltx}[1]
41 {\texttt{\bl{}#1}}
42
43 \newcommand{\app}[1]
44 {\texttt{#1}}
45
46 \newcommand{\pkgname}[1]
47 {\textsc{#1}}
48
49 \newcommand{\key}[1]
50 {\textbf{#1}}
51
52 \newcommand{\menu}[1]
53 {\textsf{#1}}
54
55 \newcommand{\file}[1]
56 {\texttt{#1}}
57
58 \newcommand{\env}[1]
59 {\texttt{#1}}
60
61 \newcommand{\field}[1]
62 {\texttt{#1}}
63
64 \newcommand{\cmd}[1]
65 {\texttt{#1}}
66
67 \newcommand{\icmd}[1]
68 {\textit{\texttt{#1}\/}}
69
70 \newcommand{\metacmd}[1]
71 {\texttt{\%\%#1}}
72
73 \newcommand{\parm}[1]
74 {\textit{$\langle$#1$\rangle$}}
75
76 \newcommand{\optparm}[1]
77 {\textit{[#1]}}
78
79 \newcommand{\car}[1]
80 {\texttt{#1}}
81
82 \newcommand{\notes}[1]
83 {\texttt{#1}}
84
85 \newcommand{\graph}[1]
86 {\textsc{#1}}
87
88 \newcommand{\noteseparator}
89 {
90 \begin{center}
91 \twonotes~\twonotes~\twonotes~\twonotes~\twonotes~\twonotes~\twonotes
92 \end{center}
93 }
94
95 \newenvironment{margins}[2]
96 { % begin def
97 \begin{list}{}
98 {
99 \setlength{\leftmargin}{#1}
100 \setlength{\rightmargin}{#2}
101 } \item
102 } % end def
103 {\end{list}}
104
105 \newenvironment{source}
106 { % beg def
107 \medskip
108 \small
109 \begin{margins}{-0.3cm}{-0.3cm}
110 \begin{spacing}{0.9}
111 \begin{tcolorbox}[breakable,boxrule=0.2pt,%
112 left=0pt,right=0pt,colback=green!7!white,arc=2pt]
113 \begin{alltt}
114 }
115 { % end def
116 \end{alltt}
117 \end{tcolorbox}
118 \vspace{-1.5em}
119 \end{spacing}
120 \end{margins}
121 }
122
123 \newenvironment{screen}
124 { % beg def
125 \medskip
126 \small
127 \begin{margins}{-0.3cm}{-0.3cm}
128 \begin{spacing}{0.9}
129 \tcbset{beforeafter skip=0pt}
130 \begin{tcolorbox}[breakable,boxrule=0.2pt,%
131 left=0pt,right=0pt,colback=white,arc=0pt]
132 \begin{alltt}
133 }
134 { % end def
135 \end{alltt}
136 \end{tcolorbox}
137 \end{spacing}
138 \end{margins}
139 }
140
141 \newlength{\tmplength}
142
143 \newcommand{\score}[1]
144 {
145 \setlength{\tmplength}{\parindent}
146 \setlength{\parindent}{0pt}
147 \begin{margins}{-0.3cm}{-0.3cm}
148 \colorbox{pdfbg}{\includegraphics[width=\linewidth]{#1.pdf}}
149 \end{margins}
150 \setlength{\parindent}{\tmplength}
151 }
152
153 \newcommand{\scoreshort}[1]
154 {
155 \setlength{\tmplength}{\parindent}
156 \setlength{\parindent}{0pt}
157 \begin{center}
158 \colorbox{pdfbg}{\includegraphics{#1.pdf}}
159 \end{center}
160 \setlength{\parindent}{\tmplength}
161 }
162
163 \newcommand{\scorepage}[1]
164 {
165 \includegraphics[width=\linewidth]{#1.pdf}
166 }
167
168 % ----- End of file params.tex