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