Am 30.12.2009 03:44, schrieb chrism: > On Dec 29, 9:32 am, Guenter Milde <[email protected]> wrote: >> On 2009-12-27, chrism wrote: >> > FYI, I just made a rough cut at changing the latex writer to: >> > - Add LaTeX references and labels (\pageref and \label). >> > - Generate references after section header instead of before to make >> > hyperlink jumping more correct.
I looked at your branch and it looks okay; I think it can be simplified a bit by using hyperref's "autoref" command family. The writer also probably doesn't need to put \hypertargets at locations where a \label would suffice. >> Did you have a look of the current upstream version (Docutils' latex >> writer) where this is already fixed? >> (cf.http://docutils.sourceforge.net/HISTORY.html) > > No. To be honest, I was not really even aware there *was* an > upstream. > >> > - Include pageref (pp. XXX) in internal reference renderings. >> > - Include URL in external href renderings (e.g.http://pocoo.org). >> > This is mostly for the benefit of output intended for printing. >> > I did the work in an bitbucket fork here: >> >> For the benefit of both Docutils and Sphinx users, I'd prefer more >> Docutils/Sphinx unification instead of additional forking. > > Now that you tell me there is, if I do a diff between sphinx/writers/ > latex.py > and docutils/writers/newlatex2e/__init__.py, I see that there are > piles > of differences. Is this module really "the upstream"? The upstream is more probably latex2e/__init__.py. (I don't know about the status of newlatex2e; I think it is abandoned for now?) When the Sphinx latex writer was written, it was bound very tightly to the old Python docs' .cls and .sty, which is why I didn't base it on the docutils one from the start. I then copied quite a lot of stuff over. A reunion would make me very happy too, but it's a lot of tedious work... cheers, Georg
signature.asc
Description: OpenPGP digital signature
