Skip to content

Commit

Permalink
Correct problem with arrows appearing for promoters and inhibitors (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoo092 authored Jan 12, 2020
1 parent 4719a05 commit b926564
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
20 changes: 15 additions & 5 deletions cpsystems.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@
%<*driver>
\ProvidesFile{cpsystems.dtx}
%</driver>
%<package>\NeedsTeXFormat{LaTeX2e}[2017/01/01]
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{cpsystems}
%<*package>
[2020/01/04 v0.13 Package to aid in typesetting cP systems
[2020/01/12 v0.13.1 Package to aid in typesetting cP systems
rulesets, following Nicolescu's standard style]
%</package>
%
%<*driver>
\documentclass{ltxdoc}
\usepackage{cpsystems}[2020/01/04 v0.13]
\usepackage{cpsystems}[2020/01/12 v0.13.1]
\usepackage{fancyvrb}
\usepackage[hidelinks]{hyperref}
\EnableCrossrefs
Expand All @@ -64,6 +64,7 @@
%</driver>
% \fi
%
% \changes{0.13.1}{2020/01/12}{Fix problem with arrows appearing in the \texttt{cppromoter} and \texttt{cpinhibitor} results.}
% \changes{0.13}{2020/01/04}{Added in the commands for \texttt{cprulenonum}, \texttt{changerulenum} and \texttt{resetrulenum}. Modified the four major pre-existing rule typesetting macros all to use an internal macro, reducing duplication of code. Also corrected a handful of typos in the document.}
% \changes{0.12}{2019/12/31}{Completed documentation for first DTX format attempt}
% \changes{0.11}{2019/12/27}{Converted to DTX file}
Expand Down Expand Up @@ -536,7 +537,7 @@
% For specifying promoters as part of a rule.
% \begin{macrocode}
\newcommand{\cppromoter}[1]{
\cpsystems@basecprule{}{}{}{}{~ \hspace{0.5cm} ~ | ~ #1}{}
\cpsystems@cpprominhi{|}{#1}
}
% \end{macrocode}
% \end{macro}
Expand All @@ -546,7 +547,7 @@
% For specifying inhibitors as part of a rule.
% \begin{macrocode}
\newcommand{\cpinhibitor}[1]{
\cpsystems@basecprule{}{}{}{}{~ \hspace{0.5cm} ~ \neg ~ #1}{}
\cpsystems@cpprominhi{\neg}{#1}
}
% \end{macrocode}
% \end{macro}
Expand Down Expand Up @@ -639,6 +640,15 @@
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\cpsystems@cpprominhi}
% For writing out promoters and inhibitors in a |cpruleset| environment.
% \begin{macrocode}
\newcommand{\cpsystems@cpprominhi}[2]{
\trim@spaces@noexp{& & & & ~ \hspace{0.5cm} ~ #1 ~ #2 & \\}
}
% \end{macrocode}
% \end{macro}
%
% \section{Possible improvements}
% A handful of possible improvements have been thought of already, though in most cases it is entirely unclear how to achieve them at this point. They include:
Expand Down
Binary file modified cpsystems.pdf
Binary file not shown.
11 changes: 7 additions & 4 deletions cpsystems.sty
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
\NeedsTeXFormat{LaTeX2e}[2017/01/01]
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{cpsystems}
[2020/01/04 v0.13 Package to aid in typesetting cP systems
[2020/01/12 v0.13.1 Package to aid in typesetting cP systems
rulesets, following Nicolescu's standard style]

\RequirePackage{array}
Expand All @@ -46,10 +46,10 @@ rulesets, following Nicolescu's standard style]
\cpsystems@basecprule{#1}{#2}{#3}{#4}{#5}{}
}
\newcommand{\cppromoter}[1]{
\cpsystems@basecprule{}{}{}{}{~ \hspace{0.5cm} ~ | ~ #1}{}
\cpsystems@cpprominhi{|}{#1}
}
\newcommand{\cpinhibitor}[1]{
\cpsystems@basecprule{}{}{}{}{~ \hspace{0.5cm} ~ \neg ~ #1}{}
\cpsystems@cpprominhi{\neg}{#1}
}
\newcommand{\cpsend}[2]{
\trim@spaces@noexp{\{#1\}!_{#2}}
Expand All @@ -76,6 +76,9 @@ rulesets, following Nicolescu's standard style]
\trim@spaces@noexp{#1 & #2 & \rightarrow_{#3} & #4 & #5
& #6\\}
}
\newcommand{\cpsystems@cpprominhi}[2]{
\trim@spaces@noexp{& & & & ~ \hspace{0.5cm} ~ #1 ~ #2 & \\}
}
\endinput
%%
%% End of file `cpsystems.sty'.

0 comments on commit b926564

Please sign in to comment.