[petsc-dev] Manual figures are messed up
Stefano Zampini
stefano.zampini at gmail.com
Thu Oct 8 09:54:59 CDT 2015
What about the patch in attachment?
2015-10-08 1:54 GMT+03:00 Barry Smith <bsmith at mcs.anl.gov>:
>
> > On Sep 30, 2015, at 7:46 AM, Stefano Zampini <stefano.zampini at gmail.com>
> wrote:
> >
> > I just noticed that Figures 19 and 20 in the manual (current release and
> master) are messed up. The htmlmap process seems not to work properly.
>
> The tool /bin/maint/mapnameslatex.py is what looks through the tokens in
> the .tex files and replaces PETSc functions etc with an href. Unfortunately
> it is simple minded. It should turn off replacement when it detects a
> \begin{verbatim} and turn it back on when it hits the \end{verbatim} here
> is the entire engine
>
> while 1:
> token = lex.token() # Get a token
> if not token: break # No more tokens
> if token.type == 'NEWLINE':
> print text
> text = ''
> else:
> # \href cannot be used in many places in Latex
> if token.value in
> ['\\href{','\\findex{','\\sindex{','\\subsection{','\\chapter{','\\section{','\\caption{','\\trl{']:
> bracket = bracket + 1;
> if bracket == 0:
> value = token.value
> if mappedstring.has_key(value):
> mvalue = mappedstring[value].replace('_','\\_')
> value = '\\href{'+'
> http://www.mcs.anl.gov/petsc/petsc-'+version+'/docs/'+mappedlink[value]+'}{'+mvalue+'
> }\\findex{'+value+'}'
> else:
> value = token.value
> if token.value[0] == '}' and bracket:
> bracket = bracket - 1;
> text = text+value
>
> You want to take a crack at fixing it? Because I don't really feel like it
> :-(
>
> Barry
>
>
>
> >
> > --
> > Stefano
>
>
--
Stefano
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20151008/9f57d4b9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch_manual
Type: application/octet-stream
Size: 2242 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20151008/9f57d4b9/attachment.obj>
More information about the petsc-dev
mailing list