Re: Sanitize backreferences in hyperref

2008-10-13 Thread Uwe Stöhr
> i think the code is still wrong: > > if both \pdf_pagebackref true & \pdf_backref true are set then you put two > different \pdf_backref into lyx file. I also fixed this case now. thanks and regards Uwe

Re: Sanitize backreferences in hyperref

2008-10-13 Thread Pavel Sanda
Uwe Stöhr wrote: > We cannot do it correctly, but at least that it looks the same in the > output and this is a must have. i have said from the very begining we have different views :) > > i commited the current version and will review lyx2lyx part you commit > later. > > I've put it in. I test

Re: Sanitize backreferences in hyperref

2008-10-13 Thread Uwe Stöhr
>> The opposite direction also >> works, as then nothing is done, > > which is the culprit of the problem. normal user won't note that info > disapeared into preamble and will look inot document settings. he will > even try to switch hyperref again > and i just imagine what will happen then... Th

Re: Sanitize backreferences in hyperref

2008-10-13 Thread Pavel Sanda
Uwe Stöhr wrote: > I don't agree. The conversion of LyX 1.6 to 1.5 works correct, you can test > it e.g. by using our doc umentation file. >The opposite direction also > works, as then nothing is done, which is the culprit of the problem. normal user won't note that info disapeared into pream

Re: Sanitize backreferences in hyperref

2008-10-13 Thread Uwe Stöhr
> the conversion 1.5 -> 1.6 doesn't work wrt hyperref and it will be almost > impossible to get it right, which was one of the three reasons i objected the > whole idea of 1.6 -> 1.5 conversion. any user of 1.6 pdfsupport who will exchange > docs between 1.6 and 1.5 is bound to encounter strange

Re: Sanitize backreferences in hyperref

2008-10-12 Thread Pavel Sanda
Uwe Stöhr wrote: > > Is it possible to convert between pageref and pagebackref? > > It is, this is the third issue. Simply deleting information in lyx2lyx is > not an option. I changed it now so that pagebackref is converted to > backref=page, otherwise this would be a dataloss. > > > to me hyper

Re: Sanitize backreferences in hyperref

2008-10-12 Thread Pavel Sanda
Uwe Stöhr wrote: > - the option "backref" is the same as "backref=section" so we shouldn't > provide an "On" option as this only leads to confusion if this is true we can simplify it even more, because this line become useless > + string tmp = backref == "true" ? "" : "=" + backref; > Attac

Re: Sanitize backreferences in hyperref

2008-10-12 Thread Uwe Stöhr
There are 3 issues in your patch: According to ftp://ftp.fu-berlin.de/tex/CTAN/macros/latex/contrib/hyperref/backref.pdf - the option is "page", not "pages" (my fault) - the option "backref" is the same as "backref=section" so we shouldn't provide an "On" option as this only leads to confusion

Re: Sanitize backreferences in hyperref

2008-10-12 Thread Pavel Sanda
Richard Heck wrote: > Pavel Sanda wrote: >> +def revert_backref_options(document): >> +' Remove pageref additional options ' >> +i = find_token(document.header, "\\pdf_pageref", 0) >> +if i != -1: >> +del document.header[i] >> + >> + >> +def convert_backref_options(document): >>

Re: Sanitize backreferences in hyperref

2008-10-12 Thread rgheck
Pavel Sanda wrote: +def revert_backref_options(document): +' Remove pageref additional options ' +i = find_token(document.header, "\\pdf_pageref", 0) +if i != -1: +del document.header[i] + + +def convert_backref_options(document): +' We have lost pagebackref option in favo