\NeedsTeXFormat{LaTeX2e} \ProvidesPackage{morse_symbols}[2026/10/27 Left-to-right Morse symbols] \RequirePackage{tikz} \newcommand{\MorseColors}[1]{\left(\begin{smallmatrix}#1\end{smallmatrix}\right)} % Labels sit at the strand endpoints. Arguments are upper/lower input, % followed by upper/lower output when both boundaries are present. \newcommand{\MorseCup}[2]{\mathord{% \tikz[baseline=-.5ex,x=1ex,y=1ex,line width=.5pt,line cap=round]{% \draw (0,1) .. controls (-1.2,1) and (-1.2,-1) .. (0,-1); \node[anchor=west,inner sep=0pt] at (.25,1) {$\scriptstyle #1$}; \node[anchor=west,inner sep=0pt] at (.25,-1) {$\scriptstyle #2$};}}} \newcommand{\MorseCap}[2]{\mathord{% \tikz[baseline=-.5ex,x=1ex,y=1ex,line width=.5pt,line cap=round]{% \draw (0,1) .. controls (1.2,1) and (1.2,-1) .. (0,-1); \node[anchor=east,inner sep=0pt] at (-.25,1) {$\scriptstyle #1$}; \node[anchor=east,inner sep=0pt] at (-.25,-1) {$\scriptstyle #2$};}}} \newcommand{\MorseOver}[4]{\mathord{% \tikz[baseline=-.5ex,x=1ex,y=1ex,line width=.5pt,line cap=round]{% \draw (-1,1)--(1,-1); \draw (-1,-1)--(-.23,-.23) (.23,.23)--(1,1); \node[anchor=east,inner sep=0pt] at (-1.25,1) {$\scriptstyle #1$}; \node[anchor=east,inner sep=0pt] at (-1.25,-1) {$\scriptstyle #2$}; \node[anchor=west,inner sep=0pt] at (1.25,1) {$\scriptstyle #3$}; \node[anchor=west,inner sep=0pt] at (1.25,-1) {$\scriptstyle #4$};}}} \newcommand{\MorseUnder}[4]{\mathord{% \tikz[baseline=-.5ex,x=1ex,y=1ex,line width=.5pt,line cap=round]{% \draw (-1,-1)--(1,1); \draw (-1,1)--(-.23,.23) (.23,-.23)--(1,-1); \node[anchor=east,inner sep=0pt] at (-1.25,1) {$\scriptstyle #1$}; \node[anchor=east,inner sep=0pt] at (-1.25,-1) {$\scriptstyle #2$}; \node[anchor=west,inner sep=0pt] at (1.25,1) {$\scriptstyle #3$}; \node[anchor=west,inner sep=0pt] at (1.25,-1) {$\scriptstyle #4$};}}} % Compact run entries, one boxed row per non-unit color run. \newcommand{\MorseColorBoxes}[1]{\begingroup \setlength{\arraycolsep}{2pt}\renewcommand{\arraystretch}{.85}% \vcenter{\hbox{$\begin{array}{|>{\scriptstyle}c|}\hline #1\\\hline\end{array}$}}\endgroup}