# Trying to change a predefined value in a package

I am trying to use the dnaseq package (documentation here: http://mirrors.linsrv.net/tex-archive/macros/latex/contrib/dnaseq/dnaseq.pdf)

Basically, it takes whatever you put between "\DNA!" and "!", organizes it in blocks of customizable length, and displays the text with a numbering on the left, starting from 1.

This package is useful for displaying easy-to-read DNA sequences, but for any reason, I would like it to start numbering from a negative number (actually my starting reference is in the middle of my sequence).

So I have to redefine the starting number to something negative. I'm not new to latex but I never tried to customize packages, this is why I request some help to :

-localize in code the variable to change (I think it's \@tempcntb=0)

-write a command to redefine this variable from my preamble (something like \def, not used to its syntax)

This package is relatively simple so I hope somebody will help me out.

Thank you anyway !

-

Please when asking question always provide a "MWE" complete document and say what the expected output should be, that makes it a lot easier to answer/test questions. this is an untested answer..

dnaseq defines

\def\DNA#1{%
\def\@DNA@end{#1}\bgroup\ttfamily\DNAc@lcline
\edef\htst{\the\dimen@}%
\def\struty{\rule[-.5pt]{\z@}{\htst}}%
%% dnabase per line counter
\count@=0
%% block counter
\@tempcnta=0
%% total dnabase counter
\@tempcntb=0
\fboxrule=0pt \fboxsep=0pt
\noindent\phantom{\DNAreserve}\llap 1\
\@DNA
}


\makeatletter
\def\DNA#1#2{%
\def\@DNA@end{#2}\bgroup\ttfamily\DNAc@lcline
\edef\htst{\the\dimen@}%
\def\struty{\rule[-.5pt]{\z@}{\htst}}%
%% dnabase per line counter
\count@=0
%% block counter
\@tempcnta=0
%% total dnabase counter
\@tempcntb=#1
\fboxrule=0pt \fboxsep=0pt
\noindent\phantom{\DNAreserve}\llap{\the\@tempcntb}\

and use as ... \DNA{25}!....! with the counter being initialised from 25 rather than 0.
I'd put #1 instead of \the\@tempcntb as the argument of \llap; but unfortunately this doesn't work when the sequence has to be broken into more lines. –  egreg Jul 16 '12 at 12:12
I only noticed the literal 1 in the original after I put it in the answer so \the\@tempcntb was just a quick fix. But do you mean neither works? –  David Carlisle Jul 16 '12 at 12:17