Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
On 05/04/2011 3:49 PM, Georg Baum wrote: Richard Heck wrote: I meant not to be proposing it for 2.0.0, precisely for the reason you mention, but I think it would be OK for a later release in the 2.0.x series. Of course, that is up to Pavel: whether he'll accept a patch that adds a BufferParam to control this as yet non-existent feature. (It's been done before.) I vote against that. What happens if a user loads a file created by 2.0.1 (with activated local prettyref translations) with 2.0.0? 2.0.0 could either refuse to load such files (bad), or it could load them, but produce different output (bad as well, since the file format bump should avoid exactly that). Please don't get me wrong: I agree completely about the usefulness of local refstyle translations, but IMO they are not a must-have for the 2.0.x series. Prettyref translations have been broken forever. You improved the situation for some languages with your refstyle support, so 2.0 already has an advantage already. It would be nice to have more, but at some point in time it must be decided that a release is finished, and this will always include some bugs that are still open. Georg +1 no showstopper here refstyle supprt already adds a nice feature and makes compilable documents :) -- Julien
Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
Richard Heck wrote: >>> I meant not to be proposing it for 2.0.0, precisely for the reason you >>> mention, but I think it would be OK for a later release in the 2.0.x >>> series. Of course, that is up to Pavel: whether he'll accept a patch >>> that adds a BufferParam to control this as yet non-existent feature. >>> (It's been done before.) >> I vote against that. What happens if a user loads a file created by 2.0.1 >> (with activated local prettyref translations) with 2.0.0? 2.0.0 could >> either >> refuse to load such files (bad), or it could load them, but produce >> different output (bad as well, since the file format bump should avoid >> exactly that). >> > That's a good enough reason for me. ok, let it sleep for 2.1 then. pavel
Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
On 04/05/2011 03:49 PM, Georg Baum wrote: Richard Heck wrote: I meant not to be proposing it for 2.0.0, precisely for the reason you mention, but I think it would be OK for a later release in the 2.0.x series. Of course, that is up to Pavel: whether he'll accept a patch that adds a BufferParam to control this as yet non-existent feature. (It's been done before.) I vote against that. What happens if a user loads a file created by 2.0.1 (with activated local prettyref translations) with 2.0.0? 2.0.0 could either refuse to load such files (bad), or it could load them, but produce different output (bad as well, since the file format bump should avoid exactly that). That's a good enough reason for me. Richard
Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
Richard Heck wrote: > I meant not to be proposing it for 2.0.0, precisely for the reason you > mention, but I think it would be OK for a later release in the 2.0.x > series. Of course, that is up to Pavel: whether he'll accept a patch > that adds a BufferParam to control this as yet non-existent feature. > (It's been done before.) I vote against that. What happens if a user loads a file created by 2.0.1 (with activated local prettyref translations) with 2.0.0? 2.0.0 could either refuse to load such files (bad), or it could load them, but produce different output (bad as well, since the file format bump should avoid exactly that). Please don't get me wrong: I agree completely about the usefulness of local refstyle translations, but IMO they are not a must-have for the 2.0.x series. Prettyref translations have been broken forever. You improved the situation for some languages with your refstyle support, so 2.0 already has an advantage already. It would be nice to have more, but at some point in time it must be decided that a release is finished, and this will always include some bugs that are still open. Georg
Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
Julien Rioux wrote: > The file layouttranslations has a simple syntax, is easily customizable, > and will live in the user directory. I was quite excited by this > feature. I am surprised that it's not used fully. Don't expect too much. The file is less than two weeks old :-) > There is an opportunity here to centralize all output-related > translations into one file and have our translations consistent > everywhere (not only thinking about different latex versions here, but > also about LyXHTML output and so on). This could indeed be done in the future (2.1 and later). Georg
Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
Julien Rioux wrote: > Thanks for clarifying. I am still confused by a bit, though. For > example, why are the strings "Figure" and "List of Figures" in the file > layouttranslations? > > under translation fr there is: > "List of Figures" "Liste des figures" > > but in the generated pdf I have "Table des figures" (probably that's > what babel generates) They are in there because po/lyx_pot.py is not clever enough. It needs to add them for nonstandard floats, e.g. "Tableau" and "List of Tableaux", but does not skip the builtin floats. If you can give me a complete list of builtin floats known by babel I can fix that. I know that "Figure" and "Table" are builtin, but do other builtin floats exist? Georg
Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
On 05/04/2011 3:11 AM, Jürgen Spitzmüller wrote: Julien Rioux wrote: Thanks for clarifying. I am still confused by a bit, though. For example, why are the strings "Figure" and "List of Figures" in the file layouttranslations? They shouldn't (but they are not used anyway). Then I am not sure why we discuss these translations on this and the users lists. Seems like waste of time for everyone if we don't use the translations. under translation fr there is: "List of Figures" "Liste des figures" but in the generated pdf I have "Table des figures" (probably that's what babel generates) And this is correct. The babel translations can be considered "canonical" (since they are widely used). Jürgen The file layouttranslations has a simple syntax, is easily customizable, and will live in the user directory. I was quite excited by this feature. I am surprised that it's not used fully. There is an opportunity here to centralize all output-related translations into one file and have our translations consistent everywhere (not only thinking about different latex versions here, but also about LyXHTML output and so on). -- Julien
Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
On Saturday 02 April 2011 22:45:28 Philippe Charpentier wrote: > The translation of the prefix with refstyle is done by refstyle.cfg. On > my system (Fedora 14) there is no support for french in the installed > version. FWIW there are a repositories for Fedora 14 (and others) for texlive-2010 and also for texlive-2011dev: For texlive-2010: http://jnovy.fedorapeople.org/texlive/2010/packages.f14/texlive- release.noarch.rpm For texlive-2011dev: http://jnovy.fedorapeople.org/texlive/packages.fc14/texlive-f14- release-2010-1.fc14.noarch.rpm -- José Abílio
Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
Julien Rioux wrote: > Thanks for clarifying. I am still confused by a bit, though. For > example, why are the strings "Figure" and "List of Figures" in the file > layouttranslations? They shouldn't (but they are not used anyway). > under translation fr there is: > "List of Figures" "Liste des figures" > > but in the generated pdf I have "Table des figures" (probably that's > what babel generates) And this is correct. The babel translations can be considered "canonical" (since they are widely used). Jürgen
Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
On 04/04/2011 06:07 PM, Pavel Sanda wrote: Richard Heck wrote: On 04/04/2011 02:33 PM, Georg Baum wrote: Richard Heck wrote: The point of moving to refstyle was that it does provide translation support, not that we would provide all the translations. Still, I understand the desire to do this kind of thing, and there is a correct way we can do it. And also contribute to refstyle at the same time. The refstyle package allows the use of a custom configuration file instead of refstyle.cfg. What we could do is produce our own configuration file and allow users the choice to use it. This would presumably be a per-document setting. I'm not sure if we can get this working perfectly by 2.0, but we could still get the setting into the file format, even without UI, right away, so we could at least get it working by 2.0.1, say. Please don't put this in 2.0. 2.0 is far too late already, and no release will be perfect anyway. I meant not to be proposing it for 2.0.0, precisely for the reason you mention, but I think it would be OK for a later release in the 2.0.x series. Of course, that is up to Pavel: whether he'll accept a patch that adds a BufferParam to control this as yet non-existent feature. (It's been done before.) technically the bump of file format is still possible, but i'm not sure we go the proper way. the layouttranslation won't be part of latex while this thing should go to upstream. no hard opinions though. I think the bump is worthwhile. Here's how I see things. (i) Ideally, refstyle.cfg should support all languages, or at least all the ones we support. (ii) In fact, it doesn't, and more importantly there can be situations where users are collaborating who have different versions of refstyle or have installed different customized versions of refstyle.cfg. (iii) Contradicting my earlier remarks, this actually suggests that the right way to handle this "locally" is, at the user's request, to write appropriate refstyle configuration commands to the document preamble. If we had a bundled format and could include our local refstyle.cfg in it, then that would (perhaps) be different, but even that is not clear. That is not to say we should not send patches for refstyle.dtx (as Julien correctly points out), only to say that we might want to give our users an alternative, since it shouldn't be that hard to do so. (iv) None of this should be done for 2.0.0, but it would be unfortunate if it had to wait for 2.1.0, as we are not talking about a major change, and I think some of us are motivated to get it done. That's why the format bump makes sense. Richard
Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
On 04/04/2011 6:20 PM, Pavel Sanda wrote: Julien Rioux wrote: i asked about the "part" thing becuase it works perfectly here (TL 2008). pavel Strange. Did you do something to install a refstyle.cfg which supports French? maybe i dont understand the issue. i was talking about "Part" environment when document lang is set to cz (no prettyref stuff in use). pavel The trouble is when you reference a label to a Part, and the reference style is "Formatted reference". So in French I would have expected: "Voir Partie 1" -- Julien <>
Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
On 04/04/2011 2:33 PM, Georg Baum wrote: >> We are freezing the strings for the 2.0 cycle (for a good reason it >> seems). Refstyle will keep moving, unless we ship our own version with >> LyX. Is that the plan? >> > I think these are different issues. As far as I understand, the > layoutranslations file is used for two sorts of purposes: (i) Providing > translations for some layout information inside LyX; (ii) providing the > data used to translate theorem-related stuff in the LaTeX output. We do > (ii) because there is no translation support for this sort of thing in > LaTeX. layouttranslations is only used for (ii). (i) uses the standard translation mechanism since years. Thanks for clarifying. I am still confused by a bit, though. For example, why are the strings "Figure" and "List of Figures" in the file layouttranslations? under translation fr there is: "List of Figures" "Liste des figures" but in the generated pdf I have "Table des figures" (probably that's what babel generates) -- Julien
Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
Julien Rioux wrote: >> i asked about the "part" thing becuase it works perfectly here (TL 2008). >> pavel >> > > Strange. Did you do something to install a refstyle.cfg which supports > French? maybe i dont understand the issue. i was talking about "Part" environment when document lang is set to cz (no prettyref stuff in use). pavel
Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
On 04/04/2011 11:40 AM, Richard Heck wrote: I think these are different issues. As far as I understand, the layoutranslations file is used for two sorts of purposes: (i) Providing translations for some layout information inside LyX; (ii) providing the data used to translate theorem-related stuff in the LaTeX output. We do (ii) because there is no translation support for this sort of thing in LaTeX. The point of moving to refstyle was that it does provide translation support, not that we would provide all the translations. Still, I understand the desire to do this kind of thing, and there is a correct way we can do it. And also contribute to refstyle at the same time. The refstyle package allows the use of a custom configuration file instead of refstyle.cfg. What we could do is produce our own configuration file and allow users the choice to use it. This would presumably be a per-document setting. I'm not sure if we can get this working perfectly by 2.0, but we could still get the setting into the file format, even without UI, right away, so we could at least get it working by 2.0.1, say. It should be fairly easy to write a python script to take the info in layouttranslations and then produce a customized version of refstyle.cfg, based on the latest version thereof. Once we had that, of course, we could diff it and send a patch to Danie Els, who has been very responsive in the past to our requests and would presumably be happy to have lots of translations. So that's what I'd suggest we do. Richard I'm fine with that. To anyone taking on this task: Note that a patch for refstyle.dtx would be more useful to him. refstyle.cfg is automatically generated. -- Julien
Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
On 04/04/2011 2:54 PM, Pavel Sanda wrote: Julien Rioux wrote: On 04/04/2011 8:19 AM, Pavel Sanda wrote: Julien Rioux wrote: oups, you're right :) I tried this and Part is not translated to Partie in output. I first though that there is still some translation work left to be done, since for example with german I correctly get Teil. But actually using Czech as document language (which is indicated as fully translated here: http://www.lyx.org/I18n-trunk ) I also get the untranslated Part in output. This seems like a bug. Thanks for pointing it out. by output you mean .pdf or UI appearance? (UI might be not working unless your locales are not correctly installed for czech, ie until you are able to run the whole UI in cz.) pavel I mean in the pdf. It seems I have an old (texlive 2009) version of refstyle.sty which does not support French. Still, we do have all the machinery to translate these strings by ourselves, I am not sure that we i asked about the "part" thing becuase it works perfectly here (TL 2008). pavel Strange. Did you do something to install a refstyle.cfg which supports French? -- Julien
Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
Richard Heck wrote: > On 04/04/2011 02:33 PM, Georg Baum wrote: >> Richard Heck wrote: >>> The point of moving to refstyle was that it does provide >>> translation support, not that we would provide all the translations. >>> Still, I understand the desire to do this kind of thing, and there is a >>> correct way we can do it. And also contribute to refstyle at the same >>> time. >>> >>> The refstyle package allows the use of a custom configuration file >>> instead of refstyle.cfg. What we could do is produce our own >>> configuration file and allow users the choice to use it. This would >>> presumably be a per-document setting. I'm not sure if we can get this >>> working perfectly by 2.0, but we could still get the setting into the >>> file format, even without UI, right away, so we could at least get it >>> working by 2.0.1, say. >> Please don't put this in 2.0. 2.0 is far too late already, and no release >> will be perfect anyway. >> > I meant not to be proposing it for 2.0.0, precisely for the reason you > mention, but I think it would be OK for a later release in the 2.0.x > series. Of course, that is up to Pavel: whether he'll accept a patch that > adds a BufferParam to control this as yet non-existent feature. (It's been > done before.) technically the bump of file format is still possible, but i'm not sure we go the proper way. the layouttranslation won't be part of latex while this thing should go to upstream. no hard opinions though. pavel
Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
On 04/04/2011 02:33 PM, Georg Baum wrote: Richard Heck wrote: The point of moving to refstyle was that it does provide translation support, not that we would provide all the translations. Still, I understand the desire to do this kind of thing, and there is a correct way we can do it. And also contribute to refstyle at the same time. The refstyle package allows the use of a custom configuration file instead of refstyle.cfg. What we could do is produce our own configuration file and allow users the choice to use it. This would presumably be a per-document setting. I'm not sure if we can get this working perfectly by 2.0, but we could still get the setting into the file format, even without UI, right away, so we could at least get it working by 2.0.1, say. Please don't put this in 2.0. 2.0 is far too late already, and no release will be perfect anyway. I meant not to be proposing it for 2.0.0, precisely for the reason you mention, but I think it would be OK for a later release in the 2.0.x series. Of course, that is up to Pavel: whether he'll accept a patch that adds a BufferParam to control this as yet non-existent feature. (It's been done before.) It should be fairly easy to write a python script to take the info in layouttranslations and then produce a customized version of refstyle.cfg, based on the latest version thereof. Once we had that, of course, we could diff it and send a patch to Danie Els, who has been very responsive in the past to our requests and would presumably be happy to have lots of translations. So that's what I'd suggest we do. I don't think that the strings needed for referencing are in layouttranslations already. lyx_pot.py extracts only those strings that are used in LaTeXFeatures::getTClassI18nPreamble(). I suggest to modify lyx_pot.py to create a refstyle.cfg, and send that to Danie Els. For LyX 2.1 it can be decided whether refstyle translations are mature enough, or whether a local refstyle.cfg (maybe created on the fly from layouttranslations in the temp dir) should be offered. You're right, I'm sure. Not everything will be in there. But such things should be somewhere accessible Richard
Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
Julien Rioux wrote: > On 04/04/2011 8:19 AM, Pavel Sanda wrote: >> Julien Rioux wrote: >>> oups, you're right :) I tried this and Part is not translated to Partie >>> in >>> output. I first though that there is still some translation work left to >>> be >>> done, since for example with german I correctly get Teil. But actually >>> using Czech as document language (which is indicated as fully translated >>> here: http://www.lyx.org/I18n-trunk ) I also get the untranslated Part in >>> output. This seems like a bug. Thanks for pointing it out. >> >> by output you mean .pdf or UI appearance? (UI might be not working unless >> your locales are not correctly installed for czech, ie until you are able >> to run the whole UI in cz.) >> >> pavel >> > > I mean in the pdf. It seems I have an old (texlive 2009) version of > refstyle.sty which does not support French. Still, we do have all the > machinery to translate these strings by ourselves, I am not sure that we i asked about the "part" thing becuase it works perfectly here (TL 2008). pavel
Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
Richard Heck wrote: > On 04/04/2011 10:47 AM, Julien Rioux wrote: > >> But but but... why all the strings in the new file layouttranslations? Because these are for packages (mostly theorems) that do not provide any translation support at all. If a package provides translation support it should be used. If translations are updated the package author can decide whether he wants to add some compatibility setting, so that the output of old documents is preserved, or whether he treats a missing translation as a bug that simply gets fixed in a later release. >> Why bother if we are to rely on latex packages to provide their own >> translations? Although I originally entered bug 2295 I was not aware that the solution relies on a package with incomplete translations. If I had known this when I worked on the theorem tranlations I would have thought about refstyle as well. >> We have more supported languages in layouttranslations >> than what is available in refstyle. Even for supported languages (say, >> French in later versions of refstyle), can we be sure that our >> translations and those of refstyle will be consistent? (e.g., Table vs >> Tableau) Of course not. Therefore the package translations should be used if possible. >> We are freezing the strings for the 2.0 cycle (for a good reason it >> seems). Refstyle will keep moving, unless we ship our own version with >> LyX. Is that the plan? >> > I think these are different issues. As far as I understand, the > layoutranslations file is used for two sorts of purposes: (i) Providing > translations for some layout information inside LyX; (ii) providing the > data used to translate theorem-related stuff in the LaTeX output. We do > (ii) because there is no translation support for this sort of thing in > LaTeX. layouttranslations is only used for (ii). (i) uses the standard translation mechanism since years. > The point of moving to refstyle was that it does provide > translation support, not that we would provide all the translations. > Still, I understand the desire to do this kind of thing, and there is a > correct way we can do it. And also contribute to refstyle at the same > time. > > The refstyle package allows the use of a custom configuration file > instead of refstyle.cfg. What we could do is produce our own > configuration file and allow users the choice to use it. This would > presumably be a per-document setting. I'm not sure if we can get this > working perfectly by 2.0, but we could still get the setting into the > file format, even without UI, right away, so we could at least get it > working by 2.0.1, say. Please don't put this in 2.0. 2.0 is far too late already, and no release will be perfect anyway. > It should be fairly easy to write a python script to take the info in > layouttranslations and then produce a customized version of > refstyle.cfg, based on the latest version thereof. Once we had that, of > course, we could diff it and send a patch to Danie Els, who has been > very responsive in the past to our requests and would presumably be > happy to have lots of translations. So that's what I'd suggest we do. I don't think that the strings needed for referencing are in layouttranslations already. lyx_pot.py extracts only those strings that are used in LaTeXFeatures::getTClassI18nPreamble(). I suggest to modify lyx_pot.py to create a refstyle.cfg, and send that to Danie Els. For LyX 2.1 it can be decided whether refstyle translations are mature enough, or whether a local refstyle.cfg (maybe created on the fly from layouttranslations in the temp dir) should be offered. Georg
Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
On 04/04/2011 10:47 AM, Julien Rioux wrote: On 04/04/2011 10:39 AM, Richard Heck wrote: On 04/04/2011 10:26 AM, Julien Rioux wrote: On 04/04/2011 8:19 AM, Pavel Sanda wrote: Julien Rioux wrote: oups, you're right :) I tried this and Part is not translated to Partie in output. I first though that there is still some translation work left to be done, since for example with german I correctly get Teil. But actually using Czech as document language (which is indicated as fully translated here: http://www.lyx.org/I18n-trunk ) I also get the untranslated Part in output. This seems like a bug. Thanks for pointing it out. by output you mean .pdf or UI appearance? (UI might be not working unless your locales are not correctly installed for czech, ie until you are able to run the whole UI in cz.) pavel I mean in the pdf. It seems I have an old (texlive 2009) version of refstyle.sty which does not support French. Still, we do have all the machinery to translate these strings by ourselves, I am not sure that we want to rely on refstyle.sty For an example file see my comment to http://www.lyx.org/trac/ticket/2295 I think our general policy with such things has been to send bug fixes or enhancements to the package authors rather than to try to handle things locally. It makes more sense in the long run. Richard But but but... why all the strings in the new file layouttranslations? Why bother if we are to rely on latex packages to provide their own translations? We have more supported languages in layouttranslations than what is available in refstyle. Even for supported languages (say, French in later versions of refstyle), can we be sure that our translations and those of refstyle will be consistent? (e.g., Table vs Tableau) We are freezing the strings for the 2.0 cycle (for a good reason it seems). Refstyle will keep moving, unless we ship our own version with LyX. Is that the plan? I think these are different issues. As far as I understand, the layoutranslations file is used for two sorts of purposes: (i) Providing translations for some layout information inside LyX; (ii) providing the data used to translate theorem-related stuff in the LaTeX output. We do (ii) because there is no translation support for this sort of thing in LaTeX. The point of moving to refstyle was that it does provide translation support, not that we would provide all the translations. Still, I understand the desire to do this kind of thing, and there is a correct way we can do it. And also contribute to refstyle at the same time. The refstyle package allows the use of a custom configuration file instead of refstyle.cfg. What we could do is produce our own configuration file and allow users the choice to use it. This would presumably be a per-document setting. I'm not sure if we can get this working perfectly by 2.0, but we could still get the setting into the file format, even without UI, right away, so we could at least get it working by 2.0.1, say. It should be fairly easy to write a python script to take the info in layouttranslations and then produce a customized version of refstyle.cfg, based on the latest version thereof. Once we had that, of course, we could diff it and send a patch to Danie Els, who has been very responsive in the past to our requests and would presumably be happy to have lots of translations. So that's what I'd suggest we do. Richard
Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
On 04/04/2011 10:39 AM, Richard Heck wrote: On 04/04/2011 10:26 AM, Julien Rioux wrote: On 04/04/2011 8:19 AM, Pavel Sanda wrote: Julien Rioux wrote: oups, you're right :) I tried this and Part is not translated to Partie in output. I first though that there is still some translation work left to be done, since for example with german I correctly get Teil. But actually using Czech as document language (which is indicated as fully translated here: http://www.lyx.org/I18n-trunk ) I also get the untranslated Part in output. This seems like a bug. Thanks for pointing it out. by output you mean .pdf or UI appearance? (UI might be not working unless your locales are not correctly installed for czech, ie until you are able to run the whole UI in cz.) pavel I mean in the pdf. It seems I have an old (texlive 2009) version of refstyle.sty which does not support French. Still, we do have all the machinery to translate these strings by ourselves, I am not sure that we want to rely on refstyle.sty For an example file see my comment to http://www.lyx.org/trac/ticket/2295 I think our general policy with such things has been to send bug fixes or enhancements to the package authors rather than to try to handle things locally. It makes more sense in the long run. Richard But but but... why all the strings in the new file layouttranslations? Why bother if we are to rely on latex packages to provide their own translations? We have more supported languages in layouttranslations than what is available in refstyle. Even for supported languages (say, French in later versions of refstyle), can we be sure that our translations and those of refstyle will be consistent? (e.g., Table vs Tableau) We are freezing the strings for the 2.0 cycle (for a good reason it seems). Refstyle will keep moving, unless we ship our own version with LyX. Is that the plan? Regards, Julien
Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
On 04/04/2011 10:26 AM, Julien Rioux wrote: On 04/04/2011 8:19 AM, Pavel Sanda wrote: Julien Rioux wrote: oups, you're right :) I tried this and Part is not translated to Partie in output. I first though that there is still some translation work left to be done, since for example with german I correctly get Teil. But actually using Czech as document language (which is indicated as fully translated here: http://www.lyx.org/I18n-trunk ) I also get the untranslated Part in output. This seems like a bug. Thanks for pointing it out. by output you mean .pdf or UI appearance? (UI might be not working unless your locales are not correctly installed for czech, ie until you are able to run the whole UI in cz.) pavel I mean in the pdf. It seems I have an old (texlive 2009) version of refstyle.sty which does not support French. Still, we do have all the machinery to translate these strings by ourselves, I am not sure that we want to rely on refstyle.sty For an example file see my comment to http://www.lyx.org/trac/ticket/2295 I think our general policy with such things has been to send bug fixes or enhancements to the package authors rather than to try to handle things locally. It makes more sense in the long run. Richard
Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
On 04/04/2011 8:19 AM, Pavel Sanda wrote: Julien Rioux wrote: oups, you're right :) I tried this and Part is not translated to Partie in output. I first though that there is still some translation work left to be done, since for example with german I correctly get Teil. But actually using Czech as document language (which is indicated as fully translated here: http://www.lyx.org/I18n-trunk ) I also get the untranslated Part in output. This seems like a bug. Thanks for pointing it out. by output you mean .pdf or UI appearance? (UI might be not working unless your locales are not correctly installed for czech, ie until you are able to run the whole UI in cz.) pavel I mean in the pdf. It seems I have an old (texlive 2009) version of refstyle.sty which does not support French. Still, we do have all the machinery to translate these strings by ourselves, I am not sure that we want to rely on refstyle.sty For an example file see my comment to http://www.lyx.org/trac/ticket/2295 -- Julien
Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
Julien Rioux wrote: > oups, you're right :) I tried this and Part is not translated to Partie in > output. I first though that there is still some translation work left to be > done, since for example with german I correctly get Teil. But actually > using Czech as document language (which is indicated as fully translated > here: http://www.lyx.org/I18n-trunk ) I also get the untranslated Part in > output. This seems like a bug. Thanks for pointing it out. by output you mean .pdf or UI appearance? (UI might be not working unless your locales are not correctly installed for czech, ie until you are able to run the whole UI in cz.) pavel
Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
On 02/04/2011 12:50 PM, Philippe Charpentier wrote: I agree with you except for the last point: I don't know why, but, even with standard lyx layouts, with refstyle the translations of the prefix is not done on my system thus "refstyle + Formated Ref + French" does not work out of the box. oups, you're right :) I tried this and Part is not translated to Partie in output. I first though that there is still some translation work left to be done, since for example with german I correctly get Teil. But actually using Czech as document language (which is indicated as fully translated here: http://www.lyx.org/I18n-trunk ) I also get the untranslated Part in output. This seems like a bug. Thanks for pointing it out. -- Julien
Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
On 02/04/2011 4:31 AM, Philippe Charpentier wrote: Le 01/04/2011 19:32, Philippe Charpentier a écrit : On 01/04/2011 12:36:34 Julien Rioux wrote: refstyle is activated in Document Settings, on the first page. OK (I did not see it...) This shows that documents produced by previous versions of LyX *and a nonstandard prettyref.sty* cannot be correctly compiled by LyX 2.0. and breaks ascending compatibility The great goal, of course, is to have all previous documents translated to the latest version of LyX and produces the same output. So, for one, documents which were already using prettyref will keep on using prettyref. New documents can use refstyle, which means that also french documents can use formatted references. The move to refstyle was in part because refstyle allows ":" in labels>even in french document. Could you please check if that indeed works for you? (it does here) If it works we can worry about how to convert your document to using refstyle, and perhaps even do this automatically with some added code in the lyx2lyx converter, although this depends on how many different modified versions of prettyref.sty are out there. Regards, Julien Of course refstyle works well (except for some translations) on my system. But to get the output given by prettyref using refstyle the document has to be modified: all the definitions \newref has to be redefine using the definitions \newrefformat... (including those which are in prettyref.sty) for example: \newrefformat{sec}{Section \ref{#1}} (which is defined in prettyref.sty) has to be define for refstyle by: \newref{sec}{% name = Section~, refcmd = {\ref{#1}}} (which is not the default in refstyle) Certainly this is easy to do automatically with documents produced by old lyx versions. But, people which was using prettyref with previous lyx version (and writing in french) will be obliged to use refstyle and the output will be really different than the one given by prettyref (without speaking of the automatic translations of the prefix with refstyle...) and then they will be obliged to learn refstyle and to modify the preamble of the document... PhC Dear Philippe, I think you do agree that standard prettyref.sty doesn't work with French documents. Also, prettyref.sty does not offer any translation except for English. Therefore french users of previous versions of LyX could not use the "Formatted Ref" fonctionality without using both a) a *modified* version of prettyref.sty b) preamble code for the translations We can deal with (b) by morphing prettyref syntax to refstyle. I was pretty sure there was some lyx2lyx code for that, but I am not so sure anymore (Richard would know for sure). You have a valid point about the default prettyref declarations that lie in prettyref.sty itself, but I think Richard has addressed that by shipping a refstyle.cfg file which mirror the style of prettyref. But for (a), I can't even start to imagine how many different ways you could modify prettyref.sty to work with french. I could change the prefix separator from ":" to "|", "-", "_", "`", "=", "}{", what have you I think you propose that "|" should be considered a prefix separator, but what if I already had both ":" and "|" in one of my label e.g. "fig:1|2|3" I don't see a good way to deal with it and would be happy to hear your suggestions. Certainly you had to learn to use the preamble already, at least because of (b). So I also don't see this as a valid point. The new refstyle support makes "Formatted Ref" and French documents work together out of the box. -- Julien
Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
Le 01/04/2011 19:32, Philippe Charpentier a écrit : >On 01/04/2011 12:36:34 Julien Rioux wrote: >refstyle is activated in Document Settings, on the first page. OK (I did not see it...) >This shows that documents produced by previous versions of LyX *and a nonstandard prettyref.sty* cannot be correctly compiled >by LyX 2.0. and breaks ascending compatibility >The great goal, of course, is to have all previous documents translated to the latest version of LyX and produces the same output. >So, for one, documents which were already using prettyref will keep on using prettyref. New documents can use refstyle, which >means that also french documents can use formatted references. The move to refstyle was in part because refstyle allows ":" in >labels >even in french document. Could you please check if that indeed works for you? (it does here) If it works we can worry >about how to convert your document to using refstyle, and perhaps even do this automatically with some added code in the >lyx2lyx converter, although this depends on how many different modified versions of prettyref.sty are out there. >Regards, >Julien Of course refstyle works well (except for some translations) on my system. But to get the output given by prettyref using refstyle the document has to be modified: all the definitions \newref has to be redefine using the definitions \newrefformat... (including those which are in prettyref.sty) for example: \newrefformat{sec}{Section \ref{#1}} (which is defined in prettyref.sty) has to be define for refstyle by: \newref{sec}{% name = Section~, refcmd = {\ref{#1}}} (which is not the default in refstyle) Certainly this is easy to do automatically with documents produced by old lyx versions. But, people which was using prettyref with previous lyx version (and writing in french) will be obliged to use refstyle and the output will be really different than the one given by prettyref (without speaking of the automatic translations of the prefix with refstyle...) and then they will be obliged to learn refstyle and to modify the preamble of the document... PhC
Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
On 01/04/2011 1:32 PM, Philippe Charpentier wrote: I don't really understand: creating a new document with lyx-2.0, if I define a label as "prefix:label" and refer to it using a "formatted reference", then lyx traduce it by \prettyref{prefix}{label} and here I get "prefix:label" -> \prettyref{prefix:label} "prefix|label" -> \ref{prefix|label} the first variant will not compile in french the package prettyref.sty is loaded (and this produce always an error on my system because I modify the prettyref package, the original one producing an error with the french language). If the label uses a different separator (or none) then the translation is \ref{the-label} and prettyref.sty is not loaded. I don't see any refstyle here. refstyle is activated in Document Settings, on the first page. But this won't buy you something new unless you drop the nonstandard prefix separator: "prefix:label" -> \prefixref{label} "prefix|label" -> \ref{prefix|label} This show that some documents produced by previous versions of lyx cannot be correctly compiled with lyx-2.0.0. This shows that documents produced by previous versions of LyX *and a nonstandard prettyref.sty* cannot be correctly compiled by LyX 2.0. But since prettyref.sty is simply unusable in french, modified versions of it are probably somewhat common. Now if refstyle becomes the default, how lyx will handle the documents written with previous versions? Moreover, most of my french documents don't use any standard latex class neither the amsthm package which may be a problem with refstyle... PhC The great goal, of course, is to have all previous documents translated to the latest version of LyX and produces the same output. So, for one, documents which were already using prettyref will keep on using prettyref. New documents can use refstyle, which means that also french documents can use formatted references. The move to refstyle was in part because refstyle allows ":" in labels even in french document. Could you please check if that indeed works for you? (it does here) If it works we can worry about how to convert your document to using refstyle, and perhaps even do this automatically with some added code in the lyx2lyx converter, although this depends on how many different modified versions of prettyref.sty are out there. Regards, Julien
Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
Le 01/04/2011 16:13, Richard Heck a écrit : > On 04/01/2011 07:02 AM, Charpentier Philippe wrote: >> Le 08.03.2011 20:16, Richard Heck a écrit : >>> On 03/08/2011 11:47 AM, Charpentier Philippe wrote: Le 08.03.2011 14:56, Richard Heck a écrit : > On 03/08/2011 02:34 AM, Philippe Charpentier wrote: >> Hi >> the following bug is present in the revision 37872: if I choose >> "formated ref" for a cross reference, the package prettyref is >> loaded in >> the LaTeX preamble but the reference is traduced by \ref{...} >> instead of >> \prettyref{...}. >> > I've just tried this with latest trunk, and I do not see this > problem. Is the label itself in the form "prefix:label"? If not, > then, we do just output \ref, so the thing will compile. > > Richard > No: with the french language and babel loaded, the form "prefix:label" will not compile on my system. As I said in a very old discussion, the only way to compile on all systems, is to modify prettyref.sty (replacing ":" by "|") and to use "prefix|label". This was possible with all previous versions of lyx and that is what I did in my french documents. Thus they will not compile correctly with lyx-2.0 if nothing is changed. >>> Ahh, OK, then I guess we should check for the | separator, too. I'll >>> do that shortly. >>> >>> That said, wasn't the introduction of refstyle supposed to be the >>> solution? >>> >>> >> Hi, >> as I saw in lyx-devel that you are close to the final 2.0.0 release, >> I tested yesterday the svn version and I did not see any change about >> this problem. May be I missed something? If not, lyx-2.0.0 is not >> compatible with the previous versions. >> > Let me ask that last question again: Are you able to set formatted > references by using refstyle instead of prettyref? I had thought that > this would allow the use of ":" as separator. If not, then I > understand what the bug is. If so, then using refstyle (the new > default) is the solution to this problem. > > Richard > I don't really understand: creating a new document with lyx-2.0, if I define a label as "prefix:label" and refer to it using a "formatted reference", then lyx traduce it by \prettyref{prefix}{label} and the package prettyref.sty is loaded (and this produce always an error on my system because I modify the prettyref package, the original one producing an error with the french language). If the label uses a different separator (or none) then the translation is \ref{the-label} and prettyref.sty is not loaded. I don't see any refstyle here. This show that some documents produced by previous versions of lyx cannot be correctly compiled with lyx-2.0.0. Now if refstyle becomes the default, how lyx will handle the documents written with previous versions? Moreover, most of my french documents don't use any standard latex class neither the amsthm package which may be a problem with refstyle... PhC
Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
On 04/01/2011 07:02 AM, Charpentier Philippe wrote: Le 08.03.2011 20:16, Richard Heck a écrit : On 03/08/2011 11:47 AM, Charpentier Philippe wrote: Le 08.03.2011 14:56, Richard Heck a écrit : On 03/08/2011 02:34 AM, Philippe Charpentier wrote: Hi the following bug is present in the revision 37872: if I choose "formated ref" for a cross reference, the package prettyref is loaded in the LaTeX preamble but the reference is traduced by \ref{...} instead of \prettyref{...}. I've just tried this with latest trunk, and I do not see this problem. Is the label itself in the form "prefix:label"? If not, then, we do just output \ref, so the thing will compile. Richard No: with the french language and babel loaded, the form "prefix:label" will not compile on my system. As I said in a very old discussion, the only way to compile on all systems, is to modify prettyref.sty (replacing ":" by "|") and to use "prefix|label". This was possible with all previous versions of lyx and that is what I did in my french documents. Thus they will not compile correctly with lyx-2.0 if nothing is changed. Ahh, OK, then I guess we should check for the | separator, too. I'll do that shortly. That said, wasn't the introduction of refstyle supposed to be the solution? Hi, as I saw in lyx-devel that you are close to the final 2.0.0 release, I tested yesterday the svn version and I did not see any change about this problem. May be I missed something? If not, lyx-2.0.0 is not compatible with the previous versions. Let me ask that last question again: Are you able to set formatted references by using refstyle instead of prettyref? I had thought that this would allow the use of ":" as separator. If not, then I understand what the bug is. If so, then using refstyle (the new default) is the solution to this problem. Richard
Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
Le 08.03.2011 20:16, Richard Heck a écrit : On 03/08/2011 11:47 AM, Charpentier Philippe wrote: Le 08.03.2011 14:56, Richard Heck a écrit : On 03/08/2011 02:34 AM, Philippe Charpentier wrote: Hi the following bug is present in the revision 37872: if I choose "formated ref" for a cross reference, the package prettyref is loaded in the LaTeX preamble but the reference is traduced by \ref{...} instead of \prettyref{...}. I've just tried this with latest trunk, and I do not see this problem. Is the label itself in the form "prefix:label"? If not, then, we do just output \ref, so the thing will compile. Richard No: with the french language and babel loaded, the form "prefix:label" will not compile on my system. As I said in a very old discussion, the only way to compile on all systems, is to modify prettyref.sty (replacing ":" by "|") and to use "prefix|label". This was possible with all previous versions of lyx and that is what I did in my french documents. Thus they will not compile correctly with lyx-2.0 if nothing is changed. Ahh, OK, then I guess we should check for the | separator, too. I'll do that shortly. That said, wasn't the introduction of refstyle supposed to be the solution? Richard PhC Hi, as I saw in lyx-devel that you are close to the final 2.0.0 release, I tested yesterday the svn version and I did not see any change about this problem. May be I missed something? If not, lyx-2.0.0 is not compatible with the previous versions. PhC
Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
On 03/09/2011 12:45 PM, Tommaso Cucinotta wrote: Il 08/03/2011 17:47, Charpentier Philippe ha scritto: Le 08.03.2011 14:56, Richard Heck a écrit : On 03/08/2011 02:34 AM, Philippe Charpentier wrote: Hi the following bug is present in the revision 37872: if I choose "formated ref" for a cross reference, the package prettyref is loaded in the LaTeX preamble but the reference is traduced by \ref{...} instead of \prettyref{...}. No: with the french language and babel loaded, the form "prefix:label" will not compile on my system. As I said in a very old discussion, the only way to compile on all systems, is to modify prettyref.sty (replacing ":" by "|") and to use "prefix|label". This was possible with all previous versions of lyx and that is what I did in my french documents. Thus they will not compile correctly with lyx-2.0 if nothing is changed. Just thinking aloud: again, this prettyref stuff that depends on user-specified prefixes doesn't really seem to me the right way to go . . . and this pointed out issue about the French language seems to confirm that prettyref may not be completely mature . . . so, that must be one of the reasons why refstyle is the default in the current trunk, but prettyref can still be used if one wants ? Yes. We kept prettyref because lots of people have used and customized it in older documents. I'm really not sure what to do here. We do NOT want to output uncompilable documents, and if prettyref does not see a : splitter (in its unmodified form), then it will choke. I understand why some people have modified prettyref themselves to deal with various problems, but how far can we go towards accommodating that? Richard
Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
Il 08/03/2011 17:47, Charpentier Philippe ha scritto: Le 08.03.2011 14:56, Richard Heck a écrit : On 03/08/2011 02:34 AM, Philippe Charpentier wrote: Hi the following bug is present in the revision 37872: if I choose "formated ref" for a cross reference, the package prettyref is loaded in the LaTeX preamble but the reference is traduced by \ref{...} instead of \prettyref{...}. No: with the french language and babel loaded, the form "prefix:label" will not compile on my system. As I said in a very old discussion, the only way to compile on all systems, is to modify prettyref.sty (replacing ":" by "|") and to use "prefix|label". This was possible with all previous versions of lyx and that is what I did in my french documents. Thus they will not compile correctly with lyx-2.0 if nothing is changed. Just thinking aloud: again, this prettyref stuff that depends on user-specified prefixes doesn't really seem to me the right way to go . . . and this pointed out issue about the French language seems to confirm that prettyref may not be completely mature . . . so, that must be one of the reasons why refstyle is the default in the current trunk, but prettyref can still be used if one wants ? T.
Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
On 03/08/2011 11:47 AM, Charpentier Philippe wrote: Le 08.03.2011 14:56, Richard Heck a écrit : On 03/08/2011 02:34 AM, Philippe Charpentier wrote: Hi the following bug is present in the revision 37872: if I choose "formated ref" for a cross reference, the package prettyref is loaded in the LaTeX preamble but the reference is traduced by \ref{...} instead of \prettyref{...}. I've just tried this with latest trunk, and I do not see this problem. Is the label itself in the form "prefix:label"? If not, then, we do just output \ref, so the thing will compile. Richard No: with the french language and babel loaded, the form "prefix:label" will not compile on my system. As I said in a very old discussion, the only way to compile on all systems, is to modify prettyref.sty (replacing ":" by "|") and to use "prefix|label". This was possible with all previous versions of lyx and that is what I did in my french documents. Thus they will not compile correctly with lyx-2.0 if nothing is changed. Ahh, OK, then I guess we should check for the | separator, too. I'll do that shortly. That said, wasn't the introduction of refstyle supposed to be the solution? Richard PhC
Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
Le 08.03.2011 14:56, Richard Heck a écrit : On 03/08/2011 02:34 AM, Philippe Charpentier wrote: Hi the following bug is present in the revision 37872: if I choose "formated ref" for a cross reference, the package prettyref is loaded in the LaTeX preamble but the reference is traduced by \ref{...} instead of \prettyref{...}. I've just tried this with latest trunk, and I do not see this problem. Is the label itself in the form "prefix:label"? If not, then, we do just output \ref, so the thing will compile. Richard No: with the french language and babel loaded, the form "prefix:label" will not compile on my system. As I said in a very old discussion, the only way to compile on all systems, is to modify prettyref.sty (replacing ":" by "|") and to use "prefix|label". This was possible with all previous versions of lyx and that is what I did in my french documents. Thus they will not compile correctly with lyx-2.0 if nothing is changed. PhC
Re: Bug with prettyref in lyx-2.0-rc1 (rev 37872)
On 03/08/2011 02:34 AM, Philippe Charpentier wrote: Hi the following bug is present in the revision 37872: if I choose "formated ref" for a cross reference, the package prettyref is loaded in the LaTeX preamble but the reference is traduced by \ref{...} instead of \prettyref{...}. I've just tried this with latest trunk, and I do not see this problem. Is the label itself in the form "prefix:label"? If not, then, we do just output \ref, so the thing will compile. Richard
Bug with prettyref in lyx-2.0-rc1 (rev 37872)
Hi the following bug is present in the revision 37872: if I choose "formated ref" for a cross reference, the package prettyref is loaded in the LaTeX preamble but the reference is traduced by \ref{...} instead of \prettyref{...}. Philippe Charpentier