Debian Codegraph @

texmf-dist/doc/latex/ximera/src/interactives/video.dtx

raw
1 % \subsubsection{Video}
2 % \DescribeMacro{\youtube}{Youtube command. Requires id.}
3 % \begin{macrocode}
4 %<*classXimera>
5 \newcommand{\youtube}[1]{YouTube link: \url{https://www.youtube.com/watch?v=#1}}
6 %</classXimera>
7 % \end{macrocode}
8 % \begin{macrocode}
9 %<*htXimera>
10 \renewcommand{\youtube}[1]{\ifvmode \IgnorePar\fi \EndP\HCode{<div class="video youtube-player" data-youtube="#1">_</div>}}
11 %</htXimera>
12 % \end{macrocode}
13 % Video commands are also emitted, slightly differently, when placed
14 % at top-level in a xourse file.
15 % \begin{macrocode}
16 %<*htXourse>
17 \renewcommand\youtube[1]{%
18 \ifvmode \IgnorePar\fi \EndP\HCode{<a class="youtube" href="https://www.youtube.com/watch?v=#1">#1</a>}\IgnoreIndent%
19 }
20 %</htXourse>
21 % \end{macrocode}