Am Mittwoch, 28. Oktober 2015 um 11:22:31, schrieb Scott Kostyshak <skost...@lyx.org> > On Mon, Oct 26, 2015 at 10:59:05AM +0000, Guenter Milde wrote: > > On 2015-10-26, Scott Kostyshak wrote: > > > On Sun, Oct 25, 2015 at 11:17:15AM +0100, Georg Baum wrote: > > >> Scott Kostyshak wrote: > > > > >> > -% increase link area for cross-references and autoname them, > > >> > -\AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}} > > >> > -\addto\extrasfrench{% > > >> > - \renewcommand*{\equationautorefname}[1]{}% > > >> > - \renewcommand{\sectionautorefname}{sec.\negthinspace}% > > >> > - \renewcommand{\subsectionautorefname}{sec.\negthinspace}% > > >> > - \renewcommand{\subsubsectionautorefname}{sec.\negthinspace}% > > >> > +\@ifpackageloaded{babel}{ > > >> > + % increase link area for cross-references and autoname them, > > >> > + \AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}} > > >> > + \addto\extrasfrench{% > > >> > + \renewcommand*{\equationautorefname}[1]{}% > > >> > + \renewcommand{\sectionautorefname}{sec.\negthinspace}% > > >> > + \renewcommand{\subsectionautorefname}{sec.\negthinspace}% > > >> > + \renewcommand{\subsubsectionautorefname}{sec.\negthinspace}% > > >> > + } > > >> > } > > > > ... > > > > >> If some features of a document are implemented in a babel specific way > > >> (even if the feature would in theory not need babel), then we should > > >> rather declare that explicitly like in 78c60de9bb IMHO, than to > > >> pretend that polyglossia can be used, but silently change the output. > > > > > Ah this is a good point. Dang it. In this case I think it makes even > > > more sense now to remove the babel-specific preamble code, which there > > > seems to be support for from others as well. > > > > In this case, I would rather not remove the code but change it to be usable > > without babel: > > > > * if there is only one language in the document (or if the autrefname can be > > the same in all used languages), do the (r)definitions directly: > > > > % increase link area for cross-references and autoname them, > > \AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}} > > \renewcommand*{\equationautorefname}[1]{}% > > \renewcommand{\sectionautorefname}{sec.~}% > > \renewcommand{\subsectionautorefname}{sec.~}% > > \renewcommand{\subsubsectionautorefname}{sec.~}% > > > > (or in the \AtBeginDocument, if this works better). > > > > * if there is more than one language and autoreferencenames must be language > > speecific, define them for both, babel and polyglossia. > > > > Proof of concept: > > > > % increase link area for cross-references and autoname them, > > \AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}} > > \renewcommand*{\equationautorefname}[1]{}% > > \@ifpackageloaded{babel}{ > > \addto\extrasfrench{% > > \renewcommand{\sectionautorefname}{sec.~}% > > % ... > > } > > \addto\extrasgerman{% > > \renewcommand{\sectionautorefname}{Abschnitt~}% > > % ... > > } > > } > > \@ifpackageloaded{polyglossia}{ > > \addto\captionsfrench{% > > \renewcommand{\sectionautorefname}{sec.~}% > > % ... > > } > > \addto\captionsgerman{% > > \renewcommand{\sectionautorefname}{Abschnitt~}% > > % ... > > } > > } > > > > (Not tested with polyglossia. The polyglossia manual recommends using > > \gappto from the etoolbox package but says \addto is also available.) > > > > > I would prefer to leave the babel conditional in because of my reason > > > above, until we come to a decision and action on whether the > > > babel-specific code should be removed (e.g. fixing #9817?). That said, I > > > do understand that two wrongs doesn't make a right so let me know if you > > > believe strongly that I should revert. > > > > I believe it would be better to suspend testing the problematic files > > with "non-TeX fonts" until the issues are solved. > > Ideally code changes would not be committed before broken tests are > fixed or the regressions caused by the commits are fixed. That should > all be done in one commit. > > > > Fixing problems in the Manuals found by automatic testing is a good thing. > > Modifying the Manuals "somehow" just to please automatic testing is not. > > I agree. I think that in most cases fixing the manuals to compile to > multiple formats improves the documents and forces us to have clean > preamble code. > > Scott
We should also create a directory containing some uncompilable lyx-files which are supposed to compile in the future due to corrected handling in lyx. How about "development/attic/testdocs"? They would be the first to test with newly fixed lyx. If some of them compile, they can be removed. Kornel
signature.asc
Description: This is a digitally signed message part.