LaTeX package for fly genetics.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

158 lines
4.2 KiB

% \iffalse
%
% Copyright (C) 2013 Damien Goutte-Gattat
%
% This work may be distributed and/or modified under the conditions of the
% LaTeX Project Public License, either version 1.3 of the license or (at
% your option) any later version. The latest version if this license is in:
%
% http://www.latex-project.org/lppl.txt
%
% and version 1.3 or later is part of all distributions of LaTeX version
% 2003/12/01 or later.
%
% This work has the LPPL maintenance status "maintained".
%
% The Current Maintainer of this work is Damien Goutte-Gattat
% <d.goutte-gattat@iecb.u-bordeaux.fr>.
%
% This work consists of the file flygenet.dtx, and all files generated
% from it.
%
%<*batchfile>
\begingroup
\input docstrip
\keepsilent
\askforoverwritefalse
\preamble
Copyright (C) 2013 Damien Goutte-Gattat
This file is part of a work distributed under the conditins of the
LaTeX Project Public License. See the source file from which this file
has been generated for details.
\endpreamble
\generate{
\file{flygenet.sty}{\from{flygenet.dtx}{package}}
}
\endgroup
%</batchfile>
%
%<*driver>
\ProvidesFile{flygenet.dtx}[2013/07/14 v0.1 Fly genetics notation]
\documentclass[a4paper]{ltxdoc}
\usepackage{hyperref}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
\begin{document}
\DocInput{flygenet.dtx}
\end{document}
%</driver>
% \fi
%
% \CheckSum{0}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
% Digits \0\1\2\3\4\5\6\7\8\9
% Exclamation \! Double quote \" Hash (number) \#
% Dollar \$ Percent \% Ampersand \&
% Acute accent \' Left paren \( Right paren \)
% Asterisk \* Plus \+ Comma \,
% Minus \- Point \. Solidus \/
% Colon \: Semicolon \; Less than \<
% Equals \= Greater than \> Question mark \?
% Commercial at \@ Left bracket \[ Backslash \\
% Right bracket \] Circumflex \^ Underscore \_
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
% \DoNotIndex{\DeclareOption,\def}
% \DoNotIndex{\NeedsTeXFormat}
% \DoNotIndex{\ProcessOptions,\ProvidesClass}
% \DoNotIndex{\RequirePackage}
%
% \changes{0.1}{2013/07/14}{Initial version.}
%
% \GetFileInfo{flygenet.dtx}
%
% \title{^^A
% The \textsf{flygenet} package\thanks{^^A
% This file has version number \fileversion, last revised \filedate.}}
% \author{^^A
% Damien Goutte-Gattat\thanks{^^A
% Institut Europ\'een de Chimie et Biologie,
% 2 rue Robert Escarpit, 33607 Pessac, France}\\
% \texttt{d.goutte-gattat@iecb.u-bordeaux.fr}}
% \date{\filedate}
%
% \maketitle
%
% \abstract{The abstract}
%
% \tableofcontents
%
% \section{Introduction}
% The introduction.
%
%
% ^^A Inserts the LPPL text.
% \providecommand{\LPPLsection}{\section}
% \providecommand{\LPPLsubsection}{\subsection}
% \MakePercentComment\input{lppl-1-3c}\MakePercentIgnore
%
%
% \StopEventually{\PrintChanges\PrintIndex}
%
%
% \section{The code}
%
% \subsection{Initialization code}
% We start by identifying the package.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[2003/12/01]
\ProvidesPackage{flygenet}[2013/07/14 v0.1 Fly genetics notation]
% \end{macrocode}
%
% \begin{macrocode}
\RequirePackage{wasysym}
\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
\def\female{\venus\;\genotype}
\def\male{\mars\;\genotype}
\def\virgin{\mercury\;\genotype}
\def\females{\venus\venus\;\genotype}
\def\males{\mars\mars\;\genotype}
\def\virgins{\mercury\mercury\;\genotype}
% \end{macrocode}
%
% \Finale
\endinput