Skip to content

replace_special.py duplicating some input to output #86

@oksanatk

Description

@oksanatk

Currently the equation AS.IRV.P1 in AS.2.tex is adding the first 4 lines of comments into a different part of the equation an extra time. Shown below:

\begin{equation}\label{eq:AS.IRV.P1}
%\note{This follows from \eqref{eq:AL.xx}--\eqref{eq:AL.xx} by setting $f(t) = p(t), g(t) =
%\frac{q(t)}{p'(t) (p(t) - p(a))^{(\lambda/\mu)-1}}$, using Cauchy's integral
%formula for the residue, and integrating by parts. See also
%\citet{Cicuta:1975:RFA}.}
b_s
= \frac{1}{\mu}
\Residue_{t=a}\left[\frac{q(t)}{(p(t) - p(a))^{(\lambda+s)/\mu}}\right]
%\note{This follows from \eqref{eq:AL.xx}--\eqref{eq:AL.xx} by setting $f(t) = p(t), g(t) =
%\frac{q(t)}{p'(t) (p(t) - p(a))^{(\lambda/\mu)-1}}$, using Cauchy's integral
%formula for the residue, and integrating by parts. See also
%\citet{Cicuta:1975:RFA}.}
%  \constraint{$s = 0,1,2,\dots$.}
\end{equation}

It really shouldn't have the 4 comments that appear before the constraint, and I believe source of this error is in the function remove_special in the file replace_special.py. replace_special.py calls on math_function.py for helper functions, although I don't believe they are the source of the problem right now. I recommend looking at the different spots in the remove_special function where the for loop appends the necessary lines to an empty list (this list is the function's output, which at the end of the loop should be all of the math mode when the special characters e, i , and \pl changed). There is most likely 2 or more spots where the program is appending the same line to the list, causing that line to appear more than once in the output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions