[patch] fix broken documents in lib/doc
Due to a lyx2lyx bug we have broken documents in lib/doc. See http://bugzilla.lyx.org/show_bug.cgi?id=2027 for details. This patch repairs the documents, but does not fix the original lyx2lyx bug. OK to apply? GeorgIndex: lib/doc/ChangeLog === RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/doc/ChangeLog,v retrieving revision 1.33 diff -u -p -r1.33 ChangeLog --- lib/doc/ChangeLog 8 Sep 2005 09:20:12 - 1.33 +++ lib/doc/ChangeLog 16 Sep 2005 13:54:21 - @@ -1,3 +1,7 @@ +2005-09-16 Georg Baum <[EMAIL PROTECTED]> + + * various files: repair invalid syntax, probably caused by a lyx2lyx bug + 2005-09-08 Angus Leeming <[EMAIL PROTECTED]> * UserGuide.lyx: correct grammar describing invocation of the Index: lib/doc/TOC.lyx === RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/doc/TOC.lyx,v retrieving revision 1.3 diff -u -p -r1.3 TOC.lyx --- lib/doc/TOC.lyx 18 Jul 2005 09:41:48 - 1.3 +++ lib/doc/TOC.lyx 16 Sep 2005 13:54:21 - @@ -3654,8 +3654,6 @@ Standard math bindings Other Accelerators \end_layout -\end_deeper -\end_deeper \end_body \end_document Index: lib/doc/cs_TOC.lyx === RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/doc/cs_TOC.lyx,v retrieving revision 1.2 diff -u -p -r1.2 cs_TOC.lyx --- lib/doc/cs_TOC.lyx 18 Jul 2005 09:41:50 - 1.2 +++ lib/doc/cs_TOC.lyx 16 Sep 2005 13:54:22 - @@ -3589,7 +3589,7 @@ The simple LyX Server Protocol \end_layout \end_deeper \begin_layout Description -8 \start_of_appendix +8 Bindings \end_layout @@ -3691,10 +3691,6 @@ Standard math bindings \begin_layout Description 8.3.5 Other Accelerators -\end_layout -\end_deeper -\end_deeper - \end_layout \end_body Index: lib/doc/da_TOC.lyx === RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/doc/da_TOC.lyx,v retrieving revision 1.2 diff -u -p -r1.2 da_TOC.lyx --- lib/doc/da_TOC.lyx 18 Jul 2005 09:41:50 - 1.2 +++ lib/doc/da_TOC.lyx 16 Sep 2005 13:54:22 - @@ -3575,7 +3575,7 @@ The simple LyX Server Protocol \end_layout \end_deeper \begin_layout Description -8 \start_of_appendix +8 Bindings \end_layout @@ -3677,10 +3677,6 @@ Standard math bindings \begin_layout Description 8.3.5 Other Accelerators -\end_layout -\end_deeper -\end_deeper - \end_layout \end_body Index: lib/doc/de_TOC.lyx === RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/doc/de_TOC.lyx,v retrieving revision 1.2 diff -u -p -r1.2 de_TOC.lyx --- lib/doc/de_TOC.lyx 18 Jul 2005 09:41:53 - 1.2 +++ lib/doc/de_TOC.lyx 16 Sep 2005 13:54:22 - @@ -5064,7 +5064,7 @@ Die Zukunft der externen Einfügung \end_layout \end_deeper \begin_layout Description -8 \start_of_appendix +8 Tastaturkürzel \end_layout @@ -5167,10 +5167,6 @@ Standard-Definitionen im Mathematikmodus \begin_layout Description 8.3.5 Sonstige Tastaturkürzel -\end_layout -\end_deeper -\end_deeper - \end_layout \end_body Index: lib/doc/de_UserGuide.lyx === RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/doc/de_UserGuide.lyx,v retrieving revision 1.4 diff -u -p -r1.4 de_UserGuide.lyx --- lib/doc/de_UserGuide.lyx 18 Jul 2005 09:41:53 - 1.4 +++ lib/doc/de_UserGuide.lyx 16 Sep 2005 13:54:25 - @@ -10653,8 +10653,6 @@ Umschalt+Alt\InsetSpace ~ \end_layout \begin_deeper -\end_layout - \begin_deeper \begin_layout Standard Index: lib/doc/es_TOC.lyx === RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/doc/es_TOC.lyx,v retrieving revision 1.2 diff -u -p -r1.2 es_TOC.lyx --- lib/doc/es_TOC.lyx 18 Jul 2005 09:41:55 - 1.2 +++ lib/doc/es_TOC.lyx 16 Sep 2005 13:54:25 - @@ -3563,7 +3563,7 @@ The simple LyX Server Protocol \end_layout \end_deeper \begin_layout Description -8 \start_of_appendix +8 Bindings \end_layout @@ -3665,10 +3665,6 @@ Standard math bindings \begin_layout Description 8.3.5 Other Accelerators -\end_layout -\end_deeper -\end_deeper - \end_layout \end_body Index: lib/doc/eu_TOC.lyx === RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/doc/eu_TOC.lyx,v retrieving revision 1.2 diff -u -p -r1.2 eu_TOC.lyx --- lib/doc/eu_TOC.lyx 18 Jul 2005 09:41:57 - 1.2 +++ lib/doc/eu_TOC.lyx 16 Sep 2005 13:54:25 - @@ -3436,7 +3436,7 @@ LYX zerbitzariaren protokoloa \end_layout \end_deeper \begin_layout Description -8 \start_of_appendix +8 Lasterbideak \end_layout @@ -3544,10 +3544,6 @@ A.3.4 Matematikako lasterbide estandarra \begin_layout Description 8.3.5 Beste azeleratzaileak -\end_layout -\end_deeper -\end_deeper - \end_layout \end_body Index: lib/doc/fr_TOC.lyx
Re: [patch] fix broken documents in lib/doc
On Tuesday 20 September 2005 14:15, Georg Baum wrote: > > > Why? I am not opposing it, I am simply surprised why we need it. > > Some people (including me) like to build outside the source tree... That is fair, I will take a look into it and I will try to see what can be done. > Georg -- José Abílio
Re: [patch] fix broken documents in lib/doc
Am Dienstag, 20. September 2005 19:37 schrieb Jose' Matos: > That is fair, I will take a look into it and I will try to see what can be > done. I already did it - patch follows later after some testing. Georg
Re: [patch] fix broken documents in lib/doc
On Tuesday 20 September 2005 19:16, Georg Baum wrote: > Am Dienstag, 20. September 2005 19:37 schrieb Jose' Matos: > > That is fair, I will take a look into it and I will try to see what > > can be > > > done. > > I already did it - patch follows later after some testing. Passing as destination dir as argument is enough to fix this, right? > Georg -- José Abílio
Re: [patch] fix broken documents in lib/doc
Jose' Matos wrote: > Passing as destination dir as argument is enough to fix this, right? No, it was a bit more. The attached patch should fix bug 2027 and does the following: - fix wrong syntax in de_Userguide and it_Userguide - change the build system so that the TOC files are generated automatically when doing a 'make dist'. They can also be generated by hand with 'make TOCs'. - include untranslated documents in TOC files - make TOC file generation work with srcdir != builddir. python is now required if building from CVS, because I included Makefile.depend in Makefile.am. Python is not needed if building from the tarball, because 'make dist' creates the TOC files and makes sure that Makefile.depend is up to date. If really needed I could also play with dist-hook and not require python for CVS builds, but I'd like to avoid that. If you want to try it out you should delete lib/doc/*TOC.lyx. Comments? GeorgIndex: lib/doc/ChangeLog === RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/doc/ChangeLog,v retrieving revision 1.34 diff -u -p -r1.34 ChangeLog --- lib/doc/ChangeLog 19 Sep 2005 09:52:49 - 1.34 +++ lib/doc/ChangeLog 21 Sep 2005 13:38:54 - @@ -1,3 +1,13 @@ +2005-09-21 Georg Baum <[EMAIL PROTECTED]> + + * de_UserGuide.lyx, it_UserGuide.lyx: repair invalid syntax, maybe + caused by a lyx2lyx bug + * Makefile.am: generate TOC files automatically + * Makefile.am: rework TOC generation rules to work with srcdir != builddir + * depend.py: make it work with srcdir != builddir + * depend.py: adjust generated TOCs rule to Makefile.am changes + * doc_toc.py: make it work with srcdir != builddir + 2005-09-19 Jürgen Spitzmüller <[EMAIL PROTECTED]> * UserGuide.lyx: document new space inset, correct some Index: lib/doc/Makefile.am === RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/doc/Makefile.am,v retrieving revision 1.6 diff -u -p -r1.6 Makefile.am --- lib/doc/Makefile.am 17 Oct 2004 19:12:32 - 1.6 +++ lib/doc/Makefile.am 21 Sep 2005 13:45:10 - @@ -1,31 +1,26 @@ include $(top_srcdir)/config/common.am -DISTCLEANFILES += LyXConfig.lyx LaTeXConfig.lyx Makefile.depend +DISTCLEANFILES += LyXConfig.lyx LaTeXConfig.lyx $(DEPENDFILE) $(TOCs) -EXTRA_DIST = depend.py doc_toc.py LyXConfig.lyx.in README.Documentation $(docfiles) +EXTRA_DIST = depend.py doc_toc.py LyXConfig.lyx.in README.Documentation $(DEPENDFILE) $(docfiles) -docfiles = \ - cs_TOC.lyx \ +docfiles = $(TOCs) \ cs_Tutorial.lyx \ Customization.lyx \ da_Intro.lyx \ - da_TOC.lyx \ de_Customization.lyx \ de_Extended.lyx \ de_FAQ.lyx \ de_Intro.lyx \ - de_TOC.lyx \ de_Tutorial.lyx \ de_UserGuide.lyx \ DocStyle.lyx \ es_Intro.lyx \ - es_TOC.lyx \ es_Tutorial.lyx \ eu_Customization.lyx \ eu_Extended.lyx \ eu_FAQ.lyx \ eu_Intro.lyx \ - eu_TOC.lyx \ eu_Tutorial.lyx \ eu_UserGuide.lyx \ Extended.lyx \ @@ -34,50 +29,36 @@ docfiles = \ fr_Extended.lyx \ fr_FAQ.lyx \ fr_Intro.lyx \ - fr_TOC.lyx \ fr_Tutorial.lyx \ fr_UserGuide.lyx \ he_Intro.lyx \ - he_TOC.lyx \ he_Tutorial.lyx \ hu_Intro.lyx \ - hu_TOC.lyx \ Intro.lyx \ it_Customization.lyx \ it_Intro.lyx \ - it_TOC.lyx \ it_Tutorial.lyx \ it_UserGuide.lyx \ LaTeXConfig.lyx.in \ nl_Intro.lyx \ - nl_TOC.lyx \ nl_Tutorial.lyx \ no_Intro.lyx \ - no_TOC.lyx \ pl_Extended.lyx \ pl_Intro.lyx \ - pl_TOC.lyx \ pl_Tutorial.lyx \ pt_Intro.lyx \ - pt_TOC.lyx \ pt_Tutorial.lyx \ Reference.lyx \ ro_Intro.lyx \ - ro_TOC.lyx \ ru_FAQ.lyx \ ru_Intro.lyx \ - ru_TOC.lyx \ ru_Tutorial.lyx \ - sk_TOC.lyx \ sk_Tutorial.lyx \ sk_UserGuide.lyx \ sl_Intro.lyx \ - sl_TOC.lyx \ sl_Tutorial.lyx \ sv_Intro.lyx \ - sv_TOC.lyx \ sv_Tutorial.lyx \ - TOC.lyx \ Tutorial.lyx \ UserGuide.lyx \ escher-lsd.eps \ @@ -89,16 +70,17 @@ doc_DATA = \ $(docfiles) \ LaTeXConfig.lyx -# TODO can we instead just #include the DEPENDFILE in this Makefile? -# problem with this is that the DEPENDFILE that's included won't be the updated -# one. JMarc should know how to handle this. - DEPENDFILE = Makefile.depend +include $(DEPENDFILE) + +TOCs : $(TOCs) + @echo Made TOCs succesfully. -TOCs : depend - make -f $(DEPENDFILE) TOCs +# Force regeneration of $(DEPENDFILE) when Makefile.am changes because +# new doc files might have been added +$(DEPENDFILE): Makefile.am depend: - python depend.py > $(DEPENDFILE) + python $(srcdir)/depend.py > $(DEPENDFILE) .PHONY: depend Index: lib/doc/de_UserGuide.lyx === RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/doc/de_UserGuide.lyx,v retrieving revision 1.4 diff -u -p -r1.4 de_UserGuide.lyx --- lib/doc/de_UserGuide.lyx 18 Jul 2005 09:41:53 - 1.4 +++ lib/doc/de_UserGuide.lyx 21 Sep 2005 13:38:57 - @@ -10653,8 +10653,6 @@ Umschalt+Alt\InsetSpace ~ \end_layout \begin_deeper -\end_la
Re: [patch] fix broken documents in lib/doc
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> python is now required if building from CVS, because I included Georg> Makefile.depend in Makefile.am. What happens at the beginning when Makefile.depend does not exist? How do you bootstrap? Shouldn't we distribute this file in CVS? JMarc
Re: [patch] fix broken documents in lib/doc
On Wednesday 21 September 2005 14:54, Georg Baum wrote: > > Comments? I need this patch to run doc_toc.py with several documents. Haven't you noticed it? Index: LyX.py === RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/lyx2lyx/LyX.py,v retrieving revision 1.24 diff -u -p -r1.24 LyX.py --- LyX.py 19 Sep 2005 11:31:26 - 1.24 +++ LyX.py 21 Sep 2005 14:10:24 - @@ -284,7 +284,7 @@ class LyX_Base: " Set the value of the header parameter." i = find_token(self.header, '\\' + param, 0) if i == -1: -self.warning(3, 'Parameter not found in the header: %s' % param) +self.warning('Parameter not found in the header: %s' % param, 3) return self.header[i] = '\\%s %s' % (param, str(value)) @@ -375,7 +375,7 @@ class LyX_Base: steps.append(step[0]) else: mode = "revert" -relation_format = format_relation +relation_format = format_relation[:] relation_format.reverse() last_step = None The first fixes a wrong order of arguments, the second fix is the one important here. Since in python we have assignment by reference, as I was reversing format_relation everytime we called the file.convert > Georg -- José Abílio
Re: [patch] fix broken documents in lib/doc
Jean-Marc Lasgouttes wrote: > What happens at the beginning when Makefile.depend does not exist? GNU make issues a warning that it does not exist and creates it. > How > do you bootstrap? Shouldn't we distribute this file in CVS? I don't know if the behaviour of GNU make is standard. If not we should probably distribute it. Georg
Re: [patch] fix broken documents in lib/doc
Jose' Matos wrote: > I need this patch to run doc_toc.py with several documents. Haven't you > noticed it? No. What does happen without the patch? Georg
Re: [patch] fix broken documents in lib/doc
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: | > "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: | | Georg> python is now required if building from CVS, because I included | Georg> Makefile.depend in Makefile.am. | | What happens at the beginning when Makefile.depend does not exist? How | do you bootstrap? Shouldn't we distribute this file in CVS? Hmm... I don't think we want this Makefile.depend thingie at all. -- Lgb
Re: [patch] fix broken documents in lib/doc
> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: Lars> Hmm... I don't think we want this Makefile.depend thingie at Lars> all. So, how would you do that? Is there some way to reuse automake's dependency tracking code?
Re: [patch] fix broken documents in lib/doc
On Wednesday 21 September 2005 15:24, Georg Baum wrote: > Jose' Matos wrote: > > I need this patch to run doc_toc.py with several documents. Haven't you > > noticed it? > > No. What does happen without the patch? It does not work. :-) Because the table that holds the relation is reversed, each time File.chain is called... > Georg -- José Abílio
Re: [patch] fix broken documents in lib/doc
[EMAIL PROTECTED] (Lars Gullik Bjønnes) writes: | Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: | | | > "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: | | | | Georg> python is now required if building from CVS, because I included | | Georg> Makefile.depend in Makefile.am. | | | | What happens at the beginning when Makefile.depend does not exist? How | | do you bootstrap? Shouldn't we distribute this file in CVS? | | Hmm... I don't think we want this Makefile.depend thingie at all. I forgot that we already had this... -- Lgb
Re: [patch] fix broken documents in lib/doc
On Wednesday 21 September 2005 14:54, Georg Baum wrote: > Jose' Matos wrote: > > Passing as destination dir as argument is enough to fix this, right? > > No, it was a bit more. > The attached patch should fix bug 2027 and does the following: > - fix wrong syntax in de_Userguide and it_Userguide Are those the bugs that you have fixed recently in lyx2lyx? > If you want to try it out you should delete lib/doc/*TOC.lyx. > > Comments? For me it is OK. :-) > Georg -- José Abílio
Re: [patch] fix broken documents in lib/doc
Jose' Matos wrote: > On Wednesday 21 September 2005 14:54, Georg Baum wrote: >> Jose' Matos wrote: >> > Passing as destination dir as argument is enough to fix this, right? >> >> No, it was a bit more. >> The attached patch should fix bug 2027 and does the following: >> - fix wrong syntax in de_Userguide and it_Userguide > > Are those the bugs that you have fixed recently in lyx2lyx? No. I still don't know where they came from, but redoing the conversion with current lyx2lyx should show. >> If you want to try it out you should delete lib/doc/*TOC.lyx. >> >> Comments? > > For me it is OK. :-) Here is an updated patch. It fixes the problem that the TOC files were not automatically generated for the distribution. The Makefile now works both for srcdir=builddir and srcdir!=builddir. I plan to do the following: - remove *TOC.lyx from CVS - add Makefile.depend to CVS (not needed for GNU make, but might be needed for other flavours of make) - apply the patch Is this OK? GeorgIndex: lib/doc/ChangeLog === RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/doc/ChangeLog,v retrieving revision 1.35 diff -u -p -r1.35 ChangeLog --- lib/doc/ChangeLog 28 Sep 2005 09:40:47 - 1.35 +++ lib/doc/ChangeLog 28 Sep 2005 13:25:51 - @@ -1,3 +1,13 @@ +2005-09-28 Georg Baum <[EMAIL PROTECTED]> + + * de_UserGuide.lyx, it_UserGuide.lyx: repair invalid syntax, maybe + caused by a lyx2lyx bug + * Makefile.am: generate TOC files automatically + * Makefile.am: rework TOC generation rules to work with srcdir != builddir + * depend.py: make it work with srcdir != builddir + * depend.py: adjust generated TOCs rule to Makefile.am changes + * doc_toc.py: make it work with srcdir != builddir + 2005-09-28 Jürgen Spitzmüller <[EMAIL PROTECTED]> * UserGuide.lyx: Index: lib/doc/Makefile.am === RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/doc/Makefile.am,v retrieving revision 1.6 diff -u -p -r1.6 Makefile.am --- lib/doc/Makefile.am 17 Oct 2004 19:12:32 - 1.6 +++ lib/doc/Makefile.am 28 Sep 2005 13:25:52 - @@ -1,31 +1,26 @@ include $(top_srcdir)/config/common.am -DISTCLEANFILES += LyXConfig.lyx LaTeXConfig.lyx Makefile.depend +DISTCLEANFILES += LyXConfig.lyx LaTeXConfig.lyx $(TOCs) -EXTRA_DIST = depend.py doc_toc.py LyXConfig.lyx.in README.Documentation $(docfiles) +EXTRA_DIST = depend.py doc_toc.py LyXConfig.lyx.in README.Documentation $(DEPENDFILE) $(docfiles) -docfiles = \ - cs_TOC.lyx \ +docfiles = $(TOCs) \ cs_Tutorial.lyx \ Customization.lyx \ da_Intro.lyx \ - da_TOC.lyx \ de_Customization.lyx \ de_Extended.lyx \ de_FAQ.lyx \ de_Intro.lyx \ - de_TOC.lyx \ de_Tutorial.lyx \ de_UserGuide.lyx \ DocStyle.lyx \ es_Intro.lyx \ - es_TOC.lyx \ es_Tutorial.lyx \ eu_Customization.lyx \ eu_Extended.lyx \ eu_FAQ.lyx \ eu_Intro.lyx \ - eu_TOC.lyx \ eu_Tutorial.lyx \ eu_UserGuide.lyx \ Extended.lyx \ @@ -34,50 +29,36 @@ docfiles = \ fr_Extended.lyx \ fr_FAQ.lyx \ fr_Intro.lyx \ - fr_TOC.lyx \ fr_Tutorial.lyx \ fr_UserGuide.lyx \ he_Intro.lyx \ - he_TOC.lyx \ he_Tutorial.lyx \ hu_Intro.lyx \ - hu_TOC.lyx \ Intro.lyx \ it_Customization.lyx \ it_Intro.lyx \ - it_TOC.lyx \ it_Tutorial.lyx \ it_UserGuide.lyx \ LaTeXConfig.lyx.in \ nl_Intro.lyx \ - nl_TOC.lyx \ nl_Tutorial.lyx \ no_Intro.lyx \ - no_TOC.lyx \ pl_Extended.lyx \ pl_Intro.lyx \ - pl_TOC.lyx \ pl_Tutorial.lyx \ pt_Intro.lyx \ - pt_TOC.lyx \ pt_Tutorial.lyx \ Reference.lyx \ ro_Intro.lyx \ - ro_TOC.lyx \ ru_FAQ.lyx \ ru_Intro.lyx \ - ru_TOC.lyx \ ru_Tutorial.lyx \ - sk_TOC.lyx \ sk_Tutorial.lyx \ sk_UserGuide.lyx \ sl_Intro.lyx \ - sl_TOC.lyx \ sl_Tutorial.lyx \ sv_Intro.lyx \ - sv_TOC.lyx \ sv_Tutorial.lyx \ - TOC.lyx \ Tutorial.lyx \ UserGuide.lyx \ escher-lsd.eps \ @@ -89,16 +70,18 @@ doc_DATA = \ $(docfiles) \ LaTeXConfig.lyx -# TODO can we instead just #include the DEPENDFILE in this Makefile? -# problem with this is that the DEPENDFILE that's included won't be the updated -# one. JMarc should know how to handle this. - DEPENDFILE = Makefile.depend +include $(DEPENDFILE) + +TOCs : $(DEPENDFILE) $(TOCs) + @echo Made TOCs succesfully. -TOCs : depend - make -f $(DEPENDFILE) TOCs +# Force regeneration of $(DEPENDFILE) when Makefile.am changes because +# new doc files might have been added +$(DEPENDFILE): Makefile.am + python $(srcdir)/depend.py > $(DEPENDFILE) -depend: - python depend.py > $(DEPENDFILE) +# Force generation of the TOC files for 'make dist' +distdir: TOCs -.PHONY: depend +.PHONY: TOCs Index: lib/doc/de_UserGuide.lyx === RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/doc/de_UserGuide.lyx,v retrieving revision 1.4 diff -u -p -r1.4 de_UserGuide.lyx --- lib/doc/de_UserGuide.lyx 18 Jul 2005 09:41:53 - 1.4 +++ lib/doc/de_UserGuide.lyx
Re: [patch] fix broken documents in lib/doc
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> Here is an updated patch. It fixes the problem that the TOC Georg> files were not automatically generated for the distribution. Georg> The Makefile now works both for srcdir=builddir and Georg> srcdir!=builddir. Georg> I plan to do the following: Georg> - remove *TOC.lyx from CVS - add Makefile.depend to CVS (not Georg> needed for GNU make, but might be needed for other flavours of Georg> make) - apply the patch Georg> Is this OK? Yes. JMarc
Re: [patch] fix broken documents in lib/doc
Jean-Marc Lasgouttes wrote: >> "Georg" == Georg Baum >> <[EMAIL PROTECTED]> >> writes: > > Georg> - remove *TOC.lyx from CVS - add Makefile.depend to CVS (not > Georg> needed for GNU make, but might be needed for other flavours of > Georg> make) - apply the patch > > Georg> Is this OK? > > Yes. Ok, it is in. I forgot however to include the fix from Jose', and it turned out that my testing was fooled by still existing TOc files, and we have a problem with srcdir == bulddir now. Both issues are fixed with the attached patch, which is going in right now. GeorgIndex: lib/doc/ChangeLog === RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/doc/ChangeLog,v retrieving revision 1.36 diff -u -p -r1.36 ChangeLog --- lib/doc/ChangeLog 28 Sep 2005 13:47:02 - 1.36 +++ lib/doc/ChangeLog 28 Sep 2005 14:20:48 - @@ -1,5 +1,9 @@ 2005-09-28 Georg Baum <[EMAIL PROTECTED]> + * doc_toc.py: make it work again with builddir == srcdir + +2005-09-28 Georg Baum <[EMAIL PROTECTED]> + * de_UserGuide.lyx, it_UserGuide.lyx: repair invalid syntax, maybe caused by a lyx2lyx bug * Makefile.am: generate TOC files automatically Index: lib/doc/doc_toc.py === RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/doc/doc_toc.py,v retrieving revision 1.3 diff -u -p -r1.3 doc_toc.py --- lib/doc/doc_toc.py 28 Sep 2005 13:47:03 - 1.3 +++ lib/doc/doc_toc.py 28 Sep 2005 14:24:17 - @@ -25,7 +25,11 @@ import sys import os -sys.path.insert(0, os.path.dirname(sys.argv[0]) + "/../lyx2lyx") +srcdir = os.path.dirname(sys.argv[0]) +if srcdir == '': +srcdir = '.' +sys.path.insert(0, srcdir + "/../lyx2lyx") + import parser_tools import LyX import depend @@ -104,8 +108,6 @@ def main(argv): # fallback if lang not in info: lang = 'en' - -srcdir = os.path.dirname(sys.argv[0]) # Determine existing translated documents for that language. toc_general = [] Index: lib/lyx2lyx/ChangeLog === RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/lyx2lyx/ChangeLog,v retrieving revision 1.101 diff -u -p -r1.101 ChangeLog --- lib/lyx2lyx/ChangeLog 28 Sep 2005 09:40:48 - 1.101 +++ lib/lyx2lyx/ChangeLog 28 Sep 2005 14:20:55 - @@ -1,3 +1,7 @@ +2005-09-28 José Matos <[EMAIL PROTECTED]> + + * LyX.py: fix relation_format reversion + 2005-09-28 Jürgen Spitzmüller <[EMAIL PROTECTED]> * LyX.py: enlarge range to current format (244). Index: lib/lyx2lyx/LyX.py === RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/lyx2lyx/LyX.py,v retrieving revision 1.25 diff -u -p -r1.25 LyX.py --- lib/lyx2lyx/LyX.py 28 Sep 2005 09:40:48 - 1.25 +++ lib/lyx2lyx/LyX.py 28 Sep 2005 14:20:55 - @@ -284,7 +300,7 @@ class LyX_Base: " Set the value of the header parameter." i = find_token(self.header, '\\' + param, 0) if i == -1: -self.warning(3, 'Parameter not found in the header: %s' % param) +self.warning('Parameter not found in the header: %s' % param, 3) return self.header[i] = '\\%s %s' % (param, str(value)) @@ -375,7 +391,7 @@ class LyX_Base: steps.append(step[0]) else: mode = "revert" -relation_format = format_relation +relation_format = format_relation[:] relation_format.reverse() last_step = None
Re: [patch] fix broken documents in lib/doc
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> Due to a lyx2lyx bug we have broken documents in lib/doc. See Georg> http://bugzilla.lyx.org/show_bug.cgi?id=2027 for details. This Georg> patch repairs the documents, but does not fix the original Georg> lyx2lyx bug. Georg> OK to apply? No, these files are generated by the 'make TOCs' makefile target. This in turn uses a pair of python scripts to do the work. Unfortunately, these scripts do not work when building outside of the main source tree. Nevertheless, the bug you are looking for is in lib/doc/doc_toc.py. JMarc
Re: [patch] fix broken documents in lib/doc
Jean-Marc Lasgouttes wrote: >> "Georg" == Georg Baum >> <[EMAIL PROTECTED]> >> writes: > > Georg> Due to a lyx2lyx bug we have broken documents in lib/doc. See > Georg> http://bugzilla.lyx.org/show_bug.cgi?id=2027 for details. This > Georg> patch repairs the documents, but does not fix the original > Georg> lyx2lyx bug. > > Georg> OK to apply? > > No, these files are generated by the 'make TOCs' makefile target. This > in turn uses a pair of python scripts to do the work. Unfortunately, > these scripts do not work when building outside of the main source > tree. Is that the reason why are they in cvs despite they can be autogenerated? > Nevertheless, the bug you are looking for is in lib/doc/doc_toc.py. I don't think so. The current TOC files were not generated by doc_toc.py, but mass converted with lyx2lyx by Jose' 8 weeks ago: http://www.lyx.org/cgi-bin/viewcvs.cgi/lyx-devel/lib/doc/ I tried to recreate da_TOC.lyx with ./doc_toc.py da but the created file is much smaller than the current one (it does not contain the untranslated english sections). Something seems to be wrong here. What about de_Userguide and it_Userguide? They are not autogenerated. Can I apply that part of the patch? Georg
Re: [patch] fix broken documents in lib/doc
Am Freitag, 16. September 2005 16:31 schrieb Jean-Marc Lasgouttes: > Nevertheless, the bug you are looking for is in lib/doc/doc_toc.py. Yes, doc_toc.py does not include the english versions of the documents that are not yet translated, but there are also two bugs in lyx2lyx. This patch fixes them, can it go in? Georg diff -p -r -U 3 -X excl.tmp lyx-1.4-clean/lib/lyx2lyx/ChangeLog lyx-1.4-cvs/lib/lyx2lyx/ChangeLog --- lyx-1.4-clean/lib/lyx2lyx/ChangeLog 2005-09-10 13:02:46.0 +0200 +++ lyx-1.4-cvs/lib/lyx2lyx/ChangeLog 2005-09-18 10:10:17.0 +0200 @@ -1,3 +1,8 @@ +2005-09-18 Georg Baum <[EMAIL PROTECTED]> + + * LyX.py (LyX_Base): fix paragraph parameter check + * LyX.py (NewFile): remove paperpackage from header + 2005-09-09 José Matos <[EMAIL PROTECTED]> * lyx_1_1_6fix3.py (update_tabular): fix vertical alignment convertion. diff -p -r -U 3 -X excl.tmp lyx-1.4-clean/lib/lyx2lyx/LyX.py lyx-1.4-cvs/lib/lyx2lyx/LyX.py --- lyx-1.4-clean/lib/lyx2lyx/LyX.py 2005-08-19 10:47:40.0 +0200 +++ lyx-1.4-cvs/lib/lyx2lyx/LyX.py 2005-09-18 10:06:04.0 +0200 @@ -420,7 +436,7 @@ class LyX_Base: k = i + 1 # skip paragraph parameters -while not string.strip(self.body[k]) and string.split(self.body[k])[0] in allowed_parameters: +while not string.strip(self.body[k]) or string.split(self.body[k])[0] in allowed_parameters: k = k +1 while k < j: @@ -471,7 +489,6 @@ class NewFile(LyX_Base): "\\graphics default", "\\paperfontsize default", "\\papersize default", -"\\paperpackage none", "\\use_geometry false", "\\use_amsmath 1", "\\cite_engine basic",
Re: [patch] fix broken documents in lib/doc
Georg Baum wrote: >> Nevertheless, the bug you are looking for is in lib/doc/doc_toc.py. > Yes, doc_toc.py does not include the english versions of the documents > that are not yet translated, but there are also two bugs in lyx2lyx. > This patch fixes them, can it go in? I understand that string.strip(foo) is deprecated in favour of foo.strip(). Ditto with string.split(foo). http://docs.python.org/lib/node110.html José, why do we continue to use the deprecated versions? Support for ancient Pythons? -- Angus
Re: [patch] fix broken documents in lib/doc
On Sunday 18 September 2005 10:18, Angus Leeming wrote: > > I understand that string.strip(foo) is deprecated in favour of foo.strip(). > Ditto with string.split(foo). > > http://docs.python.org/lib/node110.html > > José, why do we continue to use the deprecated versions? Support for > ancient Pythons? A little history from someone who lived it. ;-) Red Hat Linux 7.3 was the latest Linux distribution to still ship with python 1.5.2. This can be explained due to their policy of not changing a core component during any x.y for any fixed x. This procedure was changed later, as you probably know. RH Linux 7.3 was released in May of 2002, when we started developping 1.4 (May 2003) it was still a reasonable goal to include support for python 1.5.2 has lot of places did not updated from 7.3 due to the development changes in the next releases 8 and 9.0 Since the development of lyx 1.4 took so long probably some of this arguments are no longer true, yet due to our inertia we keep our original goals. For me that is a burden, the absence of the extended operators in python (+=, -=, ... op=) makes the code dull, the fact that string were made a first class type only in python 2.0 does not help either. If you are proposing to drop this requirement you have my full support. :-) Even without taking with George I can assure you his support. ;-) -- José Abílio
Re: [patch] fix broken documents in lib/doc
> For me that is a burden, the absence of the extended operators in python > (+=, -=, ... op=) makes the code dull, the fact that string were made a first > class type only in python 2.0 does not help either. What? += and string class is not in 1.5.2? I use it a lot in configure.py. > If you are proposing to drop this requirement you have my full support. :-) > Even without taking with George I can assure you his support. ;-) I guess we would better support python >= 2.0. Bo
Re: [patch] fix broken documents in lib/doc
On Sunday 18 September 2005 19:55, Bo Peng wrote: > > For me that is a burden, the absence of the extended operators in > > python (+=, -=, ... op=) makes the code dull, the fact that string were > > made a first class type only in python 2.0 does not help either. > > What? += and string class is not in 1.5.2? Yep, that is right. > I use it a lot in configure.py. I know that is why I have sparked the discussion here. I find your work extremely interesting, and I think that it is a good argument to change the present requirements. > > If you are proposing to drop this requirement you have my full support. > > :-) Even without taking with George I can assure you his support. ;-) > > I guess we would better support python >= 2.0. I would go for 2.2, for several reasons, that I can discuss later. That is a reasonable dependence. Just to put things into perspective Red Hat Linux 8.0 (I mixed the dot in the other message :-) already ships with python 2.2, and it was released in October of 2002. If I am not mistaken even the previous stable version of Debian supports it. ;-) > Bo -- José Abílio
Re: [patch] fix broken documents in lib/doc
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> Am Freitag, 16. September 2005 16:31 schrieb Jean-Marc Georg> Lasgouttes: >> Nevertheless, the bug you are looking for is in lib/doc/doc_toc.py. Georg> Yes, doc_toc.py does not include the english versions of the Georg> documents that are not yet translated, but there are also two Georg> bugs in lyx2lyx. I stand corrected. Georg> This patch fixes them, can it go in? I think it can. JMarc
Re: [patch] fix broken documents in lib/doc
Jean-Marc Lasgouttes wrote: > Georg> This patch fixes them, can it go in? > > I think it can. It is in now. What shall we do with the original patch? I did some further research and found out that the *_TOC.lyx documents in the repository are not generated by doc_toc.py. doc_toc.py puts the sections in enumerate environments so that they are numbered automatically, but the *_TOC.lyx documents contain hardwired numbers in description environments. Which of the following options do you like? 1. Apply the original patch 2. Run doc_toc.py and check in the created documents 3. ditto, but change doc_toc.py to inlude the untranslated docs 4. Remove the TOC docs from the repository and create them at build time Georg
Re: [patch] fix broken documents in lib/doc
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> Jean-Marc Lasgouttes wrote: This patch fixes them, can it go Georg> in? >> I think it can. Georg> It is in now. What shall we do with the original patch? I did Georg> some further research and found out that the *_TOC.lyx Georg> documents in the repository are not generated by doc_toc.py. Georg> doc_toc.py puts the sections in enumerate environments so that Georg> they are numbered automatically, but the *_TOC.lyx documents Georg> contain hardwired numbers in description environments. Which of Georg> the following options do you like? Georg> 1. Apply the original patch 2. Run doc_toc.py and check in the Georg> created documents 3. ditto, but change doc_toc.py to inlude the Georg> untranslated docs 4. Remove the TOC docs from the repository Georg> and create them at build time Jose'? We need your help here. doc_toc.py is your baby, after all. JMarc
Re: [patch] fix broken documents in lib/doc
On Monday 19 September 2005 12:51, Georg Baum wrote: > What shall we do with the original patch? I did some further research and > found out that the *_TOC.lyx documents in the repository are not generated > by doc_toc.py. As I told bellow this was done to avoid a run time dependency on python. This is an issue that is less relevant as some of the more recent threads show. ;-) > doc_toc.py puts the sections in enumerate environments so > that they are numbered automatically, but the *_TOC.lyx documents contain > hardwired numbers in description environments. This was the behaviour of the old perl script. Would you like doc_toc.py to work that way? This also means the we have run doc_toc to generate other ??_TOC.lyx files. That could explain the error you saw. This does not means that lyx2lyx is at fault here. I have seen this before. > Which of the following options do you like? > > 1. Apply the original patch > 2. Run doc_toc.py and check in the created documents This was the initial purpose of doc_toc, to be run before a release. > 3. ditto, but change doc_toc.py to inlude the untranslated docs I don't like this, but it can done easily. > 4. Remove the TOC docs from the repository and create them at build time This option implies that you have to use python for installation. Certainly I don't mind. ;-) > Georg -- José Abílio
Re: [patch] fix broken documents in lib/doc
> "Jose'" == Jose' Matos <[EMAIL PROTECTED]> writes: >> 4. Remove the TOC docs from the repository and create them at build >> time Jose'> This option implies that you have to use python for Jose'> installation. Certainly I don't mind. ;-) or 5. Remove the TOC docs from the repository and create them at "make dist" time This would avoid python for installation. JMarc
Re: [patch] fix broken documents in lib/doc
Jose' Matos wrote: > On Monday 19 September 2005 12:51, Georg Baum wrote: >> What shall we do with the original patch? I did some further research and >> found out that the *_TOC.lyx documents in the repository are not >> generated by doc_toc.py. > > As I told bellow this was done to avoid a run time dependency on python. > This is an issue that is less relevant as some of the more recent threads > show. ;-) I am not so sure. I have no problems to declare a build dependency on python, but opinions vary. >> doc_toc.py puts the sections in enumerate environments so >> that they are numbered automatically, but the *_TOC.lyx documents contain >> hardwired numbers in description environments. > > This was the behaviour of the old perl script. Would you like doc_toc.py > to > work that way? No. I simply noticed the difference. Georg
Re: [patch] fix broken documents in lib/doc
On Tuesday 20 September 2005 12:52, Jean-Marc Lasgouttes wrote: > 5. Remove the TOC docs from the repository and create them at "make dist" > time > > This would avoid python for installation. Now, it is your choice. :-) At least for 1.4 that is probably a good thing to do. > JMarc -- José Abílio
Re: [patch] fix broken documents in lib/doc
Jean-Marc Lasgouttes wrote: > 5. Remove the TOC docs from the repository and create them at "make dist" > time > > This would avoid python for installation. This is the best solution IMO if the premise is to have no python build dependency. I'll prepare a patch. Georg
Re: [patch] fix broken documents in lib/doc
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> Jean-Marc Lasgouttes wrote: >> 5. Remove the TOC docs from the repository and create them at "make >> dist" time >> >> This would avoid python for installation. Georg> This is the best solution IMO if the premise is to have no Georg> python build dependency. I'll prepare a patch. Thanks. It would be nice to make it work when building outside of the source tree, but I guess this is optional. JMarc
Re: [patch] fix broken documents in lib/doc
On Tuesday 20 September 2005 14:01, Jean-Marc Lasgouttes wrote: > Thanks. It would be nice to make it work when building outside of the > source tree, but I guess this is optional. Why? I am not opposing it, I am simply surprised why we need it. > JMarc -- José Abílio
Re: [patch] fix broken documents in lib/doc
Jose' Matos wrote: > On Tuesday 20 September 2005 14:01, Jean-Marc Lasgouttes wrote: >> Thanks. It would be nice to make it work when building outside of the >> source tree, but I guess this is optional. > > Why? I am not opposing it, I am simply surprised why we need it. Some people (including me) like to build outside the source tree... Georg