Browse Source

Add draft \genotype macro

develop
Damien Goutte-Gattat 8 years ago
parent
commit
eba466484c
1 changed files with 27 additions and 0 deletions
  1. +27
    -0
      flygenet.dtx

+ 27
- 0
flygenet.dtx View File

@ -120,5 +120,32 @@ has been generated for details.
\ProvidesPackage{flygenet}[2013/07/14 v0.1 Fly genetics notation]
% \end{macrocode}
%
% \begin{macrocode}
\def\fly@printchromosome#1/#2\end{%
\def\fly@argii{#2}%
\ifx\fly@argii\empty\mathit{#1}\else\frac{\mathit{#1}}{\mathit{#2}}\fi}
\def\fly@parsechromosome#1;#2\end{%
\fly@printchromosome#1\end%
\def\fly@argii{#2}%
\ifx\fly@argii\empty\else; \fly@parsechromosome#2\end\fi}
\mathchardef\mhyphen="2D
\mathchardef\mcolon="3A
\def\fly@endgenotype#1{%
\fly@parsechromosome#1;\end%
\catcode`\ =10\relax%
\catcode`\-=12\relax%
\catcode`\:=12\relax}
\begingroup
\catcode`\ =\active
\catcode`\-=\active
\catcode`\:=\active
\gdef\genotype{%
\catcode`\ =\active\let =\ %
\catcode`\-=\active\let-=\mhyphen%
\catcode`\:=\active\let:=\mcolon%
\fly@endgenotype}
\endgroup
% \end{macrocode}
%
% \Finale
\endinput

Loading…
Cancel
Save