\input regression-test.tex \DocumentMetadata{} \documentclass{ltx-talk} \usepackage{osglecture-modes} \usepackage{graphicx} % Jeder ltx-talk-Befehl mit <...>-Angabe wertet sie ueber denselben Decoder % aus, den osglecture-modes umhuellt. Der Test sichert zweierlei ab: % 1. Der Decoder entscheidet einen portablen Modus genauso wie den % entsprechenden nativen (slides wie projector, longform wie handout), % auch in Verbindung mit Overlay-Angaben. % 2. Jeder dieser Befehle nimmt eine portable Modusangabe fehlerfrei an. \ExplSyntaxOn \tl_new:N \l__test_portable_tl \tl_new:N \l__test_native_tl \cs_new_protected:Npn \__test_verdict:nN #1#2 { \__talk_if_overlay:nTF {#1} { \tl_set:Nn #2 { overlay=yes } } { \tl_set:Nn #2 { overlay=no } } % \__talk_if_mode:n gibt es erst ab ltx-talk 0.6.9. \cs_if_exist:NT \__talk_if_mode:nTF { \__talk_if_mode:nTF {#1} { \tl_put_right:Nn #2 { ,~mode=yes } } { \tl_put_right:Nn #2 { ,~mode=no } } } } \NewDocumentCommand \PARITY { m m } { \__test_verdict:nN {#1} \l__test_portable_tl \__test_verdict:nN {#2} \l__test_native_tl \tl_if_eq:NNTF \l__test_portable_tl \l__test_native_tl { \TYPE { parity~<#1>~/~<#2>:~passed } } { \TYPE { parity~<#1>~/~<#2>:~FAILED~ (\l__test_portable_tl\c_space_tl vs.~\l__test_native_tl) } } } \ExplSyntaxOff \newcommand\ALLPARITY{% \PARITY{slides}{projector}\PARITY{longform}{handout}% \PARITY{slides:1}{projector:1}\PARITY{slides:2}{projector:2}% \PARITY{slides:0}{projector:0}% \PARITY{longform:1}{handout:1}\PARITY{longform:0}{handout:0}% \PARITY{slides|longform}{projector|handout}% \PARITY{slides:0|longform}{projector:0|handout}% \PARITY{2-|longform}{2-|handout}% } \begin{document} \START \TYPE{--- decoder parity outside a frame} \ALLPARITY \TYPE{--- commands outside a frame} \mode{\TYPE{mode: run}} \mode{\TYPE{mode: MUST NOT RUN}} \section{S}\TYPE{section: counter=\arabic{section}} \section{S}\TYPE{section: counter=\arabic{section}} \subsection{S}\TYPE{subsection: counter=\arabic{subsection}} \subsubsection{S} \begin{frame} \TYPE{frame: MUST NOT RUN} \end{frame} \begin{frame}[label=keep] % Satzwarnungen der Platzhalterinhalte gehoeren nicht zur Aussage. \hbadness=10000 \vbadness=10000 \TYPE{--- decoder parity inside a frame} \ALLPARITY \TYPE{--- commands inside a frame} \frametitle{Wrong}\frametitle{Right} \framesubtitle{Wrong} \only{\TYPE{only: run}} \only{\TYPE{only: MUST NOT RUN}} \begin{onlyenv}o\end{onlyenv} \begin{onlyenv}o\end{onlyenv} \alt{\TYPE{alt: FIRST, WRONG}}{\TYPE{alt: second}} \alt{\TYPE{alt: first}}{\TYPE{alt: SECOND, WRONG}} \temporal{\TYPE{temporal: before}} {\TYPE{temporal: DURING, WRONG}} {\TYPE{temporal: AFTER, WRONG}} \uncover{u}\visible{v}\invisible{i} \onslide o \onslide \alert{a}\begin{alertenv}a\end{alertenv} \action{x}\begin{actionenv}x\end{actionenv} \begin{itemize}\item one \item two\end{itemize} \begin{block}{B}b\end{block} \begin{columns} \begin{column}{.4\textwidth}c\end{column} \end{columns} \footnote{f} \includegraphics[width=1cm]{example-image} \textcolor{red}{r}\color{red} \label{lbl} \end{frame} \reuseframe{keep} \appendix \TYPE{--- done} \END \end{document}