Re: Windows installer for LyX 2.0.4
Am 05.07.2012 06:48, schrieb Liviu Andronic: What about spaces in path names of files? I was quite surprised that LyX couldn't handle that on Windows, That is not true. LyX can handle them of course. Spaces in paths even exists in Windows' default installation folders. If you find a case where LyX fails, please report it as bug. regards Uwe
Conclusion - New Windows installer for LyX 2.0.4
Am 28.06.2012 11:23, schrieb Vincent van Ravesteijn: The reason why I don't accept this installer now is that: - the installer installs LyX in a folder called: LyX 2.0.4 instead of LyX20 as the current official installer does. I really don't see a single reason to change this behaviour; We discusses that properly and now name the proposed folder LyX 2.0. - this means that you have to manually uninstall the previous version each time; - this also means that you have to manually uninstall the previous version _before_ installing the new version; - you forced this upon the user by disallowing to install LyX when a version of LyX is already installed; These 3 issues were not correct as one can install different LyX versions side by side. No uninstalling was necessary. However, due to the new naming scheme, users will now install over existing ones by default. So they are is fixed too. - this prevents the user from installing a new version even if it does not have rights to uninstall the previous one; Now he can. I also fixed the bug that the same LyX version could first be installed as admin and afterwards again without admin permissions. - you still insist on installing the LyX shortcut in a subfolder in the start menu. Your reply that this was much easier if you want to manually reorder the start menu, but this is totally non-sense; I provided a sscreenshot showing that almost all programs setup its own folder in the start menu. The new LyX installer there now also links our website and Wiki. Having the Wiki linked is helpful and I see that almost all other programs also link their website and help. (Personally, I often use these links when I look for help.) But however, other commented that they find it useful to have folder there. So this might be a matter of taste but is no reason to block the installer. - you fiercely protest against an option to not install all exotic MikTeX packages, but you do think it is ok to prompt a message box to the user forcing him to choose whether to update MikTeX. I explained why prompting to update MiKTeX is important. The main work is not to provide the installer but to help users getting a working installation. I have had many cases where users suffered from bugs that have already been fixed on CTAN. An update will not harm and if you don't like that you can say NO at the prompt. Concerning the automatic package installation I have made clear why this is very, very important and others commenters in this thread had the same experience. Compared to the current installer you will need the same time to install. So there is no advantage nor regression. We cannot do much to improve the situation as we cannot know what packages a user will need and which ones not. But this (on some machines) long package installation is only necessary once. For all further LyX installations you will only have to install a few packages or even no one. So this issue is not different from the current installer so that there is no reason to block the new one. So I think the new installer can now become the official one. This installer provides the same features as the current one but has some new features. More important is that we start to begin providing an installer that is under maintenance. For example the current installer for LyX 2.0.4 on our FTP-serer is not under maintenance for at least half a year so that people are for example are suffering from bugs in ImageMagick fixed last December (http://www.lyx.org/trac/ticket/8233). I have now provided the new installer version LyX-204-3 here: http://sourceforge.net/projects/lyxwininstaller/ Richard, can you please put it on ftp.lyx.org Can anybody please tell me to whom I can send the new dependency package? I found the current one at https://sourceforge.net/projects/lyx/files/Win_installers/Dependencies/ but cannot upload it there as I am not registered as developer of this project. Can anybody please add me? thanks and regards Uwe
Re: Where are the Spanish updates fo 2.0.4
Am 07.07.2012 18:59, schrieb Ignacio García: Dear developers, I'm confused! 9/06 I sent the es.po file (to po-updates) 9/06 I sent five Spanish manuals (to Uwe stöhr) 11/06 I resent es.po, the manuals and two examples CV (to Richard Heck) Where is all this? Is neither in http://www.lyx.org/trac/browser/lyxgit, or in new release 2.0.4 or 'What's new in LyX 2.0.4' announce... What could it happen? I wrote you on 10th June that I will be away 2 weeks and that Richard would kindly commit. So either he did not receive your mails or accidentally forgot to commit them. We apologize for that. Would you please re-send the es.po and the examples and doc files to po-updates (you can also CC me)? i will commit them immediately. Sorry and regards Uwe
RE: Conclusion - New Windows installer for LyX 2.0.4
From: lyx-devel@lists.lyx.org [lyx-devel@lists.lyx.org] on behalf of Uwe Stöhr [uwesto...@web.de] Sent: Sunday, July 08, 2012 11:55 AM I have now provided the new installer version LyX-204-3 here: http://sourceforge.net/projects/lyxwininstaller/ The download link on the sourceforge front page hasn't been changed to 204-3 yet. Scott
Re: Where are the Spanish updates fo 2.0.4
On 07/08/2012 12:01 PM, Uwe Stöhr wrote: Am 07.07.2012 18:59, schrieb Ignacio GarcÃa: Dear developers, I'm confused! 9/06 I sent the es.po file (to po-updates) 9/06 I sent five Spanish manuals (to Uwe stöhr) 11/06 I resent es.po, the manuals and two examples CV (to Richard Heck) Where is all this? Is neither in http://www.lyx.org/trac/browser/lyxgit, or in new release 2.0.4 or 'What's new in LyX 2.0.4' announce... What could it happen? I wrote you on 10th June that I will be away 2 weeks and that Richard would kindly commit. So either he did not receive your mails or accidentally forgot to commit them. We apologize for that. Would you please re-send the es.po and the examples and doc files to po-updates (you can also CC me)? i will commit them immediately. He's already sent them to me. I'll take care of it. rh
Re: Where are the Spanish updates fo 2.0.4
Am 08.07.2012 18:40, schrieb Richard Heck: He's already sent them to me. I'll take care of it. Please sent me the documentation files because in the meantime I have changed them in branch and trunk. I will check and commit. thanks and regards Uwe
Re: Conclusion - New Windows installer for LyX 2.0.4
Am 08.07.2012 18:25, schrieb Scott Kostyshak: I have now provided the new installer version LyX-204-3 here: http://sourceforge.net/projects/lyxwininstaller/ The download link on the sourceforge front page hasn't been changed to 204-3 yet. This usually takes a while until it is available at all mirrors. But it is now, regards Uwe
Re: [LyX master] Add very simple tex2lyx regression test suite.
Am Sonntag, 8. Juli 2012 um 19:35:10, schrieb Georg Baum b...@lyx.org Add very simple tex2lyx regression test suite. It is invoked by 'make check' (automake only, it would be nice if someone could add it to cmake as well), or by calling python src/tex2lyx/test/runtests.py path to tex2lyx binary by hand. Currently, it does not compare the output (this comes later). The added .lyx files are from tex2lyx around mid of april, so that you can see the regressions of the current version if you run the test yourself (simply run git diff afterwards). The home made test runner is quite stupid, but better than nothing. Feel free to improve it or replace it with something better, as long as running it stays as simple as now. This test overwrites data in lyx source dir. Really wanted? I've done now the cmake version. == #make test /usr/bin/python2 /usr/src/lyx/lyx-git/src/tex2lyx/test/runtests.py ../../bin/tex2lyx Overwriting existing file /usr/src/lyx/lyx-git/src/tex2lyx/test/test.lyx.lyx invalid hor_pos s for framebox Running: /usr/BUILD/BuildLyxGit/bin/lyx -f main -e latex /usr/src/lyx/lyx-git/src/tex2lyx/test/test.lyx.lyx ... +checking for package textgreek [textgreek]... yes +checking for package wasysym [wasysym]... yes +Inspection done. +Read the file doc/LaTeXConfig.lyx for more information. LyX: Fertig! Overwriting existing file /usr/src/lyx/lyx-git/src/tex2lyx/test/test-structure.lyx.lyx Running: /usr/BUILD/BuildLyxGit/bin/lyx -f main -e latex /usr/src/lyx/lyx-git/src/tex2lyx/test/test-structure.lyx.lyx Overwriting existing file /usr/src/lyx/lyx-git/src/tex2lyx/test/test-insets.lyx.lyx Overwriting existing file /usr/src/lyx/lyx-git/src/tex2lyx/test/DummyDocument.lyx Overwriting existing file /usr/src/lyx/lyx-git/src/tex2lyx/test/DummyDocument.lyx Warning: Could not find included file 'foo'. Warning: Could not find included file 'foo'. ... Running: /usr/BUILD/BuildLyxGit/bin/lyx -f main -e latex /usr/src/lyx/lyx-git/src/tex2lyx/test/CJK.lyx support/Systemcall.cpp (277): Systemcall: '/usr/BUILD/BuildLyxGit/bin/lyx -f main -e latex /usr/src/lyx-git/src/tex2lyx/test/CJK.lyx.lyx' finished with exit code 1 Error: Running '/usr/BUILD/BuildLyxGit/bin/lyx -f main -e latex /usr/src/lyx/lyx-git/src/tex2lyx/test.lyx.lyx' failed. Error: Running `../../bin/tex2lyx -roundtrip -f /usr/src/lyx/lyx-git/src/tex2lyx/test/CJK.tex´ failed. Exit 1 == Now I see in source with git status 7 modified and 7 new files Of them, only 1 modified should be there (src/tex2lyx/CMakeLists.txt) Kornel signature.asc Description: This is a digitally signed message part.
[patch] support the commands \fbox and \mbox
For an unknown reason LyX supports \framebox and \makebox only _with_ command options. \framebox{} and \makebox{} (which is the same as \fbox{} and \mbox{}) are not supported. Support for them would be very useful because one often has the case that one wants to simply draw a box around a single word or phrase and for that purpose you cannot use \framebox with options. The attached patch adds support for \fbox and \mbox. I have there used a hack where I code the case of no option to the length -999col%. This works but I am not happy with this. There must be a way to omit specifying a length but I can't figure out how. Any help is highly appreciated. (The patch would be a fileformat change.) thanks and regards Uwe src/frontends/qt4/GuiBox.cpp | 76 src/frontends/qt4/GuiBox.h|1 + src/frontends/qt4/ui/BoxUi.ui | 266 +++-- src/insets/InsetBox.cpp | 58 + 4 files changed, 236 insertions(+), 165 deletions(-) diff --git a/src/frontends/qt4/GuiBox.cpp b/src/frontends/qt4/GuiBox.cpp index c4ddeed..bf98683 100644 --- a/src/frontends/qt4/GuiBox.cpp +++ b/src/frontends/qt4/GuiBox.cpp @@ -103,7 +103,7 @@ GuiBox::GuiBox(QWidget * parent) : InsetParamsWidget(parent) widthED-setValidator(unsignedLengthValidator(widthED)); // initialize the length validator - addCheckedWidget(widthED, widthLA); + addCheckedWidget(widthED, widthCB); addCheckedWidget(heightED, heightCB); initDialog(); @@ -125,12 +125,17 @@ void GuiBox::on_innerBoxCO_activated(int /* index */) if (heightCB-isChecked() !ibox) heightCB-setChecked(false); heightCB-setEnabled(ibox); + // the width can only be selected for makebox or framebox + widthCB-setEnabled(itype == makebox + || (outer == Boxed itype == none)); + if (!widthCB-isEnabled()) + widthCB-setCheckState(Qt::Checked); // except for frameless and boxed, the width cannot be specified if // there is no inner box bool const width_enabled = ibox || outer == Frameless || outer == Boxed; - widthED-setEnabled(width_enabled); - widthUnitsLC-setEnabled(width_enabled); + widthED-setEnabled(width_enabled widthCB-isChecked()); + widthUnitsLC-setEnabled(width_enabled widthCB-isChecked()); // halign is only allowed for Boxed without inner box or for makebox halignCO-setEnabled((!ibox outer == Boxed) || (itype == makebox)); @@ -164,12 +169,17 @@ void GuiBox::on_typeCO_activated(int index) heightCB-setEnabled(ibox); setSpecial(ibox); } + // the width can only be selected for makebox or framebox + widthCB-setEnabled(itype == makebox + || (type == Boxed itype == none)); + if (!widthCB-isEnabled()) + widthCB-setCheckState(Qt::Checked); // except for frameless and boxed, the width cannot be specified if // there is no inner box bool const width_enabled = itype != none || frameless || type == Boxed; - widthED-setEnabled(width_enabled); - widthUnitsLC-setEnabled(width_enabled); + widthED-setEnabled(width_enabled widthCB-isChecked()); + widthUnitsLC-setEnabled(width_enabled widthCB-isChecked()); // halign is only allowed for Boxed without inner box or for makebox halignCO-setEnabled((type == Boxed itype == none) || (itype == makebox)); // pagebreak is only allowed for Boxed without inner box @@ -188,6 +198,12 @@ void GuiBox::initDialog() } +void GuiBox::on_widthCB_stateChanged(int state) +{ + changed(); +} + + void GuiBox::on_heightCB_stateChanged(int state) { bool const enable = (innerBoxCO-currentText() != qt_(None)) @@ -261,20 +277,27 @@ void GuiBox::paramsToDialog(Inset const * inset) // pagebreak is only allowed for Boxed without inner box pagebreakCB-setEnabled(!ibox type == Boxed); - // except for frameless and boxed, the width cannot be specified if - // there is no inner box - bool const width_enabled = (ibox || frameless || type == Boxed); - widthED-setEnabled(width_enabled); - widthUnitsLC-setEnabled(width_enabled); - Length::UNIT const default_unit = Length::defaultUnit(); - lengthToWidgets(widthED, widthUnitsLC, - (params.width).asString(), default_unit); - - QString const special = toqstr(params.special); - if (!special.isEmpty() special != none) - widthUnitsLC-setCurrentItem(special); + // the width can only be selected for makebox or framebox + widthCB-setEnabled(inner_type == makebox + || (type == Boxed inner_type == none)); + // -999col% is the code for no width + if ((params.width).asString() == -999col%) + widthCB-setCheckState(Qt::Unchecked); + else { + widthCB-setCheckState(Qt::Checked); + // except for frameless and boxed, the width cannot be specified if + // there is no inner box + bool const width_enabled = (ibox || frameless || type == Boxed); + widthED-setEnabled(width_enabled); + widthUnitsLC-setEnabled(width_enabled); + lengthToWidgets(widthED, widthUnitsLC, + (params.width).asString(), default_unit); + QString const special =
Re: [LyX 2.0.x] polyglossia tex2lyx support also for branch
Uwe Stöhr wrote: Am 03.07.2012 20:22, schrieb Georg Baum: I tested my commits as best as I could do. I also committed testfiles and updated existing ones. The new files cannot be exported by LyX again, so they do not show that much. I don't understand. I can import XeTeX-polyglossia.tex and then re-export it. Attached is the original file and the re-exported file. Diffing them you see that everything is in place and nothing is lost. Indeed. In case of XeTeX-polyglossia.tex there is a bug in the roundtrip command of tex2lyx (it tries to export to latex instead of xelatex, I'll have a look at it), but CJK.lyx cannot be exported. I also don't understand the note in CJK.lyx.lyx. The .tex file clearly states that the main language is english. IMO we should never put such notes into imported files. If there is a bug it should be fixed, and if the .tex file does not carry enough information to restore the .lyx document it was created fom, then we should do as best as we can and live with the differences. IMO it is absolutely necessary to run regression tests before each tex2lyx commit, because meanwhile it has reached a complexity that cannot be tested manually anymore. You mean automated tests? Currently I check that all our testcases work and they cover almost everything we support in tex2lyx. I don't know how an automated testing could set up. Automated or not, I don't care, as long as they are run, but of course automated is easier. Therefore I set up a very simple automatic test: Just run python src/tex2lyx/test/runtests.py path rto tex2lyx binary and run git diff afterwards to see the regressions. Question: Is it more convenient to let the test overwrite the reference results, so that the differences are automatically seen by git, or should the references better be kept in a separate location? I am unsure about that. If you run the regression tests, you will also see that some of your changes broke the defaults for math package loading. I don't see this at a quick look I now had. Could you please give me a ponter to a case or file that does not work anymore? Look at the attached diff. You changed the default of those packages from off to auto. This breaks files that use user defined math commands that trigger automatic package loading. If a user defines his own version of \utilde the undertilde package must not be used automatically, since it would conflict. Georgdiff --git a/src/tex2lyx/test/CJK.lyx.lyx b/src/tex2lyx/test/CJK.lyx.lyx index 60bf6fa..a2ca8bc 100644 --- a/src/tex2lyx/test/CJK.lyx.lyx +++ b/src/tex2lyx/test/CJK.lyx.lyx @@ -18,7 +18,7 @@ \maintain_unincluded_children false \language english \language_package default -\inputencoding utf8 +\inputencoding auto \fontencoding T1 \font_roman default \font_sans default @@ -40,12 +40,12 @@ \papersize default \use_geometry false \use_package amsmath 1 -\use_package amssymb 0 +\use_package amssymb 1 \use_package esint 1 -\use_package mathdots 0 -\use_package mathtools 0 -\use_package mhchem 0 -\use_package undertilde 0 +\use_package mathdots 1 +\use_package mathtools 1 +\use_package mhchem 1 +\use_package undertilde 1 \cite_engine basic \cite_engine_type numerical \biblio_style plain @@ -54,7 +54,11 @@ \paperorientation portrait \suppress_date false \justification true -\use_refstyle 0 +\use_refstyle 1 +\index Index +\shortcut idx +\color #008000 +\end_index \secnumdepth 3 \tocdepth 3 \paragraph_separation indent @@ -74,6 +78,26 @@ \begin_layout Standard + +\begin_inset Note Note +status open +\begin_layout Plain Layout +\series bold +Important information: +\end_layout + +\begin_layout Plain Layout +This document contains text in Chinese, Japanese or Korean. + It was therefore impossible for tex2lyx to set the correct document langue for your document. Please set the language manually in the document settings. +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard + \lang japanese-cjk Japanese diff --git a/src/tex2lyx/test/DummyDocument.lyx b/src/tex2lyx/test/DummyDocument.lyx index 2625ebc..7dd1d5c 100644 --- a/src/tex2lyx/test/DummyDocument.lyx +++ b/src/tex2lyx/test/DummyDocument.lyx @@ -29,12 +29,12 @@ \papersize a4paper \use_geometry false \use_package amsmath 2 -\use_package amssymb 0 +\use_package amssymb 1 \use_package esint 1 -\use_package mathdots 0 -\use_package mathtools 0 -\use_package mhchem 0 -\use_package undertilde 0 +\use_package mathdots 1 +\use_package mathtools 1 +\use_package mhchem 1 +\use_package undertilde 1 \cite_engine natbib \cite_engine_type numerical \biblio_style plainnat @@ -43,7 +43,11 @@ \paperorientation portrait \suppress_date false \justification true -\use_refstyle 0 +\use_refstyle 1 +\index Index +\shortcut idx +\color #008000 +\end_index \secnumdepth 3 \tocdepth 3 \paragraph_separation indent diff --git a/src/tex2lyx/test/XeTeX-polyglossia.lyx.lyx b/src/tex2lyx/test/XeTeX-polyglossia.lyx.lyx index
Re: Re: [LyX 2.0.x] polyglossia tex2lyx support also for branch
Am Sonntag, 8. Juli 2012 um 21:11:14, schrieb Georg Baum georg.b...@post.rwth-aachen.de Uwe Stöhr wrote: ... Question: Is it more convenient to let the test overwrite the reference results, so that the differences are automatically seen by git, or should the references better be kept in a separate location? I am unsure about that. Everything created should not overwrite anything under git control IMO. ... Georg Kornel signature.asc Description: This is a digitally signed message part.
Re: [LyX master] Add very simple tex2lyx regression test suite.
Kornel Benko wrote: This test overwrites data in lyx source dir. Really wanted? Yes (at least for the moment, to get the whole thing started). The advantage is that git tells you if you have changes (be it regressions or wanted changes caused by fixed bugs or file format updates). The disadvantage: You just found it. I already asked in my reply to Uwe what is more convenient: Keeping it that way, or not overwriting the reference results. I am really unsure I've done now the cmake version. Thanks! Georg
Re: [LyX 2.0.x] polyglossia tex2lyx support also for branch
Am 08.07.2012 21:11, schrieb Georg Baum: I don't understand. I can import XeTeX-polyglossia.tex and then re-export it. Attached is the original file and the re-exported file. Diffing them you see that everything is in place and nothing is lost. Indeed. In case of XeTeX-polyglossia.tex there is a bug in the roundtrip command of tex2lyx (it tries to export to latex instead of xelatex, I'll have a look at it), OK, but you can manually export it to XeTeX. but CJK.lyx cannot be exported. I can export it without problems to pdflatex. I also don't understand the note in CJK.lyx.lyx. The .tex file clearly states that the main language is english. No, this file is not in English! I wrote it in LyX using Japanese (CJK) as document language. The english is only a babel option and only appears because I used an English paragraph in the file. But that is exactly why there is a note - we cannot know the document language. IMO we should never put such notes into imported files. If there is a bug it should be fixed, and if the .tex file does not carry enough information to restore the .lyx document it was created from, then we should do as best as we can and live with the differences. There is no bug. LaTeX simply does not store the document language as we understand it. For CJK there is no such thing like we understand document language. We already do the best we can and giving the user the info to check what he thinks the document language could be is very helpful. I guess in 99% of the cases he clearly knows this and can set it quickly in the document settings. Automated or not, I don't care, as long as they are run, but of course automated is easier. Therefore I set up a very simple automatic test: Just run python src/tex2lyx/test/runtests.py path rto tex2lyx binary and run git diff afterwards to see the regressions. Thanks. Question: Is it more convenient to let the test overwrite the reference results, so that the differences are automatically seen by git, or should the references better be kept in a separate location? I am unsure about that. I prefer the latter. The best would be to import a file filename.tex, the import is saved as filename-imported.lyx If you run the regression tests, you will also see that some of your changes broke the defaults for math package loading. I don't see this at a quick look I now had. Could you please give me a ponter to a case or file that does not work anymore? Look at the attached diff. You changed the default of those packages from off to auto. This breaks files that use user defined math commands that trigger automatic package loading. If a user defines his own version of \utilde the undertilde package must not be used automatically, since it would conflict. Thanks for the pointer, I had not in mind that the user could have defined own commands. This is now fixed. regards Uwe
Re: Re: [LyX master] Add very simple tex2lyx regression test suite.
Am Sonntag, 8. Juli 2012 um 21:28:51, schrieb Georg Baum georg.b...@post.rwth-aachen.de Kornel Benko wrote: This test overwrites data in lyx source dir. Really wanted? Yes (at least for the moment, to get the whole thing started). The advantage is that git tells you if you have changes (be it regressions or wanted changes caused by fixed bugs or file format updates). The disadvantage: You just found it. I already asked in my reply to Uwe what is more convenient: Keeping it that way, or not overwriting the reference results. I am really unsure I've done now the cmake version. Thanks! OK, OK, but I am so unhappy about overwriting, that I hesitate to commit. This would be the first target in cmake overwriting source. I really had hard time to make po-translations not overwriting anything, and now this ... Georg Kornel signature.asc Description: This is a digitally signed message part.
Re: Windows installer for LyX 2.0.4
On Sun, Jul 8, 2012 at 4:38 PM, Uwe Stöhr uwesto...@web.de wrote: What about spaces in path names of files? I was quite surprised that LyX couldn't handle that on Windows, That is not true. LyX can handle them of course. Spaces in paths even exists in Windows' default installation folders. If you find a case where LyX fails, please report it as bug. I will investigate that when I get the chance. Thanks Liviu
Re: LyX on Android?
On 2012-07-05, Alessandro Di Federico wrote: Hi! There was a time when I laughed at those asking about an Android-version of LyX, first of all because LyX sometimes tends to be quite RAM-consuming. However the situation evolved quickly and now we have powerful Android devices, but most importantly tablets. I think it's time to think something about porting LyX to Android. Do you think it would be possible? Maybe we could put up some reduced functionality version. Not exactly what you were asking about, but as a very reduced functionality version, namely a viewer for LyX files you can use elyxer, the external LyX-HTML converter. This allows to view LyX files on any device that supports Python and a HTML Browser. Günter
Re: [LyX 2.0.x] polyglossia tex2lyx support also for branch
Uwe Stöhr wrote: Am 08.07.2012 21:11, schrieb Georg Baum: but CJK.lyx cannot be exported. I can export it without problems to pdflatex. Does not work either. It fails to encode 0x6587 in both cases. I also don't understand the note in CJK.lyx.lyx. The .tex file clearly states that the main language is english. No, this file is not in English! I wrote it in LyX using Japanese (CJK) as document language. The english is only a babel option and only appears because I used an English paragraph in the file. But that is exactly why there is a note - we cannot know the document language. Please forget about LyX for a moment. As far as LaTeX is concerned, english is the only language that explicitly appears in a LaTeX command (or rather the preamble in this case) in this document. All other languages do not appear explicitly in the document, you rather guess them from the used encodings. Therefore, from a LaTeX point of view, the language is clearly english. IMO we should never put such notes into imported files. If there is a bug it should be fixed, and if the .tex file does not carry enough information to restore the .lyx document it was created from, then we should do as best as we can and live with the differences. There is no bug. LaTeX simply does not store the document language as we understand it. For CJK there is no such thing like we understand document language. We already do the best we can and giving the user the info to check what he thinks the document language could be is very helpful. I guess in 99% of the cases he clearly knows this and can set it quickly in the document settings. I understand that. My point was a bit different: In general, the exported .tex files do not contain all information of the original .lyx files. There are many more cases where information is lost, e.g. branches or stuff in yellow notes. You implemented a special treatment of one of these cases. Should we add notes for the other cases as well, e.g. tex2lyx does not know if there was a note at this place originally? Of course this example is nonsense, but what should a user think who imported a true .tex file which did not come from LyX? Your note assumes that roundtrip is the main use case, but this is wrong IMO. The most important use case is true import. Adding meta data is not the way to go either (the in_lyx_preamble bool in Preamble.cpp can already cause data loss). Therefore, the only thing we should do is to use the existing information of the .tex file as best as we can. Any interpretation should be left to the user. Question: Is it more convenient to let the test overwrite the reference results, so that the differences are automatically seen by git, or should the references better be kept in a separate location? I am unsure about that. I prefer the latter. The best would be to import a file filename.tex, the import is saved as filename-imported.lyx The file name convention is already set by tex2lyx (it is filename.lyx.lyx and the re-exported file is filename.lyx.tex). The question is only where the result should go: source tree or build tree? I'll wait a bit more, but for now it looks like the majority wants the latter. Georg
Re: [LyX 2.0.x] polyglossia tex2lyx support also for branch
Am 08.07.2012 22:18, schrieb Georg Baum: Please forget about LyX for a moment. As far as LaTeX is concerned, english is the only language that explicitly appears in a LaTeX command (or rather the preamble in this case) in this document. All other languages do not appear explicitly in the document, you rather guess them from the used encodings. Therefore, from a LaTeX point of view, the language is clearly english. I don't agree. There is only one paragraph in English in this file. So what is in your opinion the document language for the attached file? But the CJK encoding determines the language. E.g. EUC-JP can only be Japanese. OK, the UTF8 case is problematic. I understand that. My point was a bit different: In general, the exported .tex files do not contain all information of the original .lyx files. There are many more cases where information is lost, e.g. branches or stuff in yellow notes. You implemented a special treatment of one of these cases. Should we add notes for the other cases as well, e.g. tex2lyx does not know if there was a note at this place originally? Of course this example is nonsense, but what should a user think who imported a true .tex file which did not come from LyX? I understand your concern, but I guess he would wonder more about that the imported file has the document language English and not e.g. Korean although it is a Korean document? I don't want to add notes for all cases but for this one I think it is useful. Your note assumes that roundtrip is the main use case, but this is wrong IMO. The most important use case is true import. No, I was not thinking of a roundtrip, it is just that the users checks to get the correct document language after importing a TeX-file and can then continue to work with LyX without any problems. If he is not setting the correct document language, LyX would set it to English which introduces babel and that can cause many troubles. With some test cases babel simply prevents the compilation. So having the note here to assure that people can compile what they imported is useful and doesn't harm. Adding meta data is not the way to go either (the in_lyx_preamble bool in Preamble.cpp can already cause data loss). Therefore, the only thing we should do is to use the existing information of the .tex file as best as we can. Any interpretation should be left to the user. I don't understand. We don't guess, we only tell the user that his file contains CJK so that the document languages set by LyX _can_ be the wrong one. The user decides what is correct as document language, not tex2lyx! tex2lyx only sets one because the LyX fileformat requires this. Question: Is it more convenient to let the test overwrite the reference results, so that the differences are automatically seen by git, or should the references better be kept in a separate location? I am unsure about that. I prefer the latter. The best would be to import a file filename.tex, the import is saved as filename-imported.lyx The file name convention is already set by tex2lyx (it is filename.lyx.lyx and the re-exported file is filename.lyx.tex). I find this hard to distinguish. by default Windows cuts off the file extension. Having dots in filenames is therefore not nice to handle and some programs even choke on them. Can this not be changed to another scheme? The question is only where the result should go: source tree or build tree? I'll wait a bit more, but for now it looks like the majority wants the latter. Build tree. regards Uwe \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{CJK} \begin{document} \begin{CJK}{EUC-JP}{}% Japanese \end{CJK} \begin{CJK}{UTF8}{}Chinese traditional\end{CJK} \begin{CJK}{EUC-JP}{} Japanese \end{CJK} \begin{CJK}{GB}{}% Chinese simplified \end{CJK}\begin{CJK}{EUC-JP}{hei} Japanese \end{CJK} \begin{CJK}{GB}{}Chinese simplified \end{CJK} \begin{CJK}{Bg5}{} Big5 文鼎楷書 \end{CJK} \begin{CJK}{SJIS}{} Shift_JIS 日本語ã�®æ–‡ç« \end{CJK} \begin{CJK}{JIS}{} JIS-code $BF|K\8l$NJ8O(B \end{CJK} \begin{CJK}{KS}{}% Korean \end{CJK} \end{document}
Re: Windows installer for LyX 2.0.4
Am 05.07.2012 06:48, schrieb Liviu Andronic: What about spaces in path names of files? I was quite surprised that LyX couldn't handle that on Windows, That is not true. LyX can handle them of course. Spaces in paths even exists in Windows' default installation folders. If you find a case where LyX fails, please report it as bug. regards Uwe
Conclusion - New Windows installer for LyX 2.0.4
Am 28.06.2012 11:23, schrieb Vincent van Ravesteijn: The reason why I don't accept this installer now is that: - the installer installs LyX in a folder called: LyX 2.0.4 instead of LyX20 as the current official installer does. I really don't see a single reason to change this behaviour; We discusses that properly and now name the proposed folder "LyX 2.0". - this means that you have to manually uninstall the previous version each time; > - this also means that you have to manually uninstall the previous version _before_ installing > the new version; > - you forced this upon the user by disallowing to install LyX when a version of LyX is already > installed; These 3 issues were not correct as one can install different LyX versions side by side. No uninstalling was necessary. However, due to the new naming scheme, users will now install over existing ones by default. So they are is fixed too. - this prevents the user from installing a new version even if it does not have rights to uninstall the previous one; Now he can. I also fixed the bug that the same LyX version could first be installed as admin and afterwards again without admin permissions. - you still insist on installing the LyX shortcut in a subfolder in the start menu. Your reply that this was much easier if you want to manually reorder the start menu, but this is totally non-sense; I provided a sscreenshot showing that almost all programs setup its own folder in the start menu. The new LyX installer there now also links our website and Wiki. Having the Wiki linked is helpful and I see that almost all other programs also link their website and help. (Personally, I often use these links when I look for help.) But however, other commented that they find it useful to have folder there. So this might be a matter of taste but is no reason to block the installer. - you fiercely protest against an option to not install all exotic MikTeX packages, but you do think it is ok to prompt a message box to the user forcing him to choose whether to update MikTeX. I explained why prompting to update MiKTeX is important. The main work is not to provide the installer but to help users getting a working installation. I have had many cases where users suffered from bugs that have already been fixed on CTAN. An update will not harm and if you don't like that you can say NO at the prompt. Concerning the automatic package installation I have made clear why this is very, very important and others commenters in this thread had the same experience. Compared to the current installer you will need the same time to install. So there is no advantage nor regression. We cannot do much to improve the situation as we cannot know what packages a user will need and which ones not. But this (on some machines) long package installation is only necessary once. For all further LyX installations you will only have to install a few packages or even no one. So this issue is not different from the current installer so that there is no reason to block the new one. So I think the new installer can now become the official one. This installer provides the same features as the current one but has some new features. More important is that we start to begin providing an installer that is under maintenance. For example the current installer for LyX 2.0.4 on our FTP-serer is not under maintenance for at least half a year so that people are for example are suffering from bugs in ImageMagick fixed last December (http://www.lyx.org/trac/ticket/8233). I have now provided the new installer version "LyX-204-3" here: http://sourceforge.net/projects/lyxwininstaller/ Richard, can you please put it on ftp.lyx.org Can anybody please tell me to whom I can send the new dependency package? I found the current one at https://sourceforge.net/projects/lyx/files/Win_installers/Dependencies/ but cannot upload it there as I am not registered as developer of this project. Can anybody please add me? thanks and regards Uwe
Re: Where are the Spanish updates fo 2.0.4
Am 07.07.2012 18:59, schrieb Ignacio García: Dear developers, I'm confused! 9/06 I sent the es.po file (to po-updates) 9/06 I sent five Spanish manuals (to Uwe stöhr) 11/06 I resent es.po, the manuals and two examples CV (to Richard Heck) Where is all this? Is neither in http://www.lyx.org/trac/browser/lyxgit, or in new release 2.0.4 or 'What's new in LyX 2.0.4' announce... What could it happen? I wrote you on 10th June that I will be away 2 weeks and that Richard would kindly commit. So either he did not receive your mails or accidentally forgot to commit them. We apologize for that. Would you please re-send the es.po and the examples and doc files to po-updates (you can also CC me)? i will commit them immediately. Sorry and regards Uwe
RE: Conclusion - New Windows installer for LyX 2.0.4
From: lyx-devel@lists.lyx.org [lyx-devel@lists.lyx.org] on behalf of Uwe Stöhr [uwesto...@web.de] Sent: Sunday, July 08, 2012 11:55 AM >I have now provided the new installer version "LyX-204-3" here: >http://sourceforge.net/projects/lyxwininstaller/ The download link on the sourceforge front page hasn't been changed to 204-3 yet. Scott
Re: Where are the Spanish updates fo 2.0.4
On 07/08/2012 12:01 PM, Uwe Stöhr wrote: Am 07.07.2012 18:59, schrieb Ignacio GarcÃa: Dear developers, I'm confused! 9/06 I sent the es.po file (to po-updates) 9/06 I sent five Spanish manuals (to Uwe stöhr) 11/06 I resent es.po, the manuals and two examples CV (to Richard Heck) Where is all this? Is neither in http://www.lyx.org/trac/browser/lyxgit, or in new release 2.0.4 or 'What's new in LyX 2.0.4' announce... What could it happen? I wrote you on 10th June that I will be away 2 weeks and that Richard would kindly commit. So either he did not receive your mails or accidentally forgot to commit them. We apologize for that. Would you please re-send the es.po and the examples and doc files to po-updates (you can also CC me)? i will commit them immediately. He's already sent them to me. I'll take care of it. rh
Re: Where are the Spanish updates fo 2.0.4
Am 08.07.2012 18:40, schrieb Richard Heck: He's already sent them to me. I'll take care of it. Please sent me the documentation files because in the meantime I have changed them in branch and trunk. I will check and commit. thanks and regards Uwe
Re: Conclusion - New Windows installer for LyX 2.0.4
Am 08.07.2012 18:25, schrieb Scott Kostyshak: I have now provided the new installer version "LyX-204-3" here: http://sourceforge.net/projects/lyxwininstaller/ The download link on the sourceforge front page hasn't been changed to 204-3 yet. This usually takes a while until it is available at all mirrors. But it is now, regards Uwe
Re: [LyX master] Add very simple tex2lyx regression test suite.
Am Sonntag, 8. Juli 2012 um 19:35:10, schrieb Georg Baum> Add very simple tex2lyx regression test suite. > > It is invoked by 'make check' (automake only, it would be nice if someone > could add it to cmake as well), or by calling > > python src/tex2lyx/test/runtests.py > > by hand. Currently, it does not compare the output (this comes later). > The added .lyx files are from tex2lyx around mid of april, so that you > can see the regressions of the current version if you run the test > yourself (simply run git diff afterwards). > > The home made test runner is quite stupid, but better than nothing. > Feel free to improve it or replace it with something better, as long > as running it stays as simple as now. > This test overwrites data in lyx source dir. Really wanted? I've done now the cmake version. == #make test /usr/bin/python2 /usr/src/lyx/lyx-git/src/tex2lyx/test/runtests.py ../../bin/tex2lyx Overwriting existing file /usr/src/lyx/lyx-git/src/tex2lyx/test/test.lyx.lyx invalid hor_pos s for framebox Running: "/usr/BUILD/BuildLyxGit/bin/lyx" -f main -e latex "/usr/src/lyx/lyx-git/src/tex2lyx/test/test.lyx.lyx" ... +checking for package textgreek [textgreek]... yes +checking for package wasysym [wasysym]... yes +Inspection done. +Read the file doc/LaTeXConfig.lyx for more information. LyX: Fertig! Overwriting existing file /usr/src/lyx/lyx-git/src/tex2lyx/test/test-structure.lyx.lyx Running: "/usr/BUILD/BuildLyxGit/bin/lyx" -f main -e latex "/usr/src/lyx/lyx-git/src/tex2lyx/test/test-structure.lyx.lyx" Overwriting existing file /usr/src/lyx/lyx-git/src/tex2lyx/test/test-insets.lyx.lyx Overwriting existing file /usr/src/lyx/lyx-git/src/tex2lyx/test/DummyDocument.lyx Overwriting existing file /usr/src/lyx/lyx-git/src/tex2lyx/test/DummyDocument.lyx Warning: Could not find included file 'foo'. Warning: Could not find included file 'foo'. ... Running: "/usr/BUILD/BuildLyxGit/bin/lyx" -f main -e latex "/usr/src/lyx/lyx-git/src/tex2lyx/test/CJK.lyx" support/Systemcall.cpp (277): Systemcall: '"/usr/BUILD/BuildLyxGit/bin/lyx" -f main -e latex "/usr/src/lyx-git/src/tex2lyx/test/CJK.lyx.lyx"' finished with exit code 1 Error: Running '"/usr/BUILD/BuildLyxGit/bin/lyx" -f main -e latex "/usr/src/lyx/lyx-git/src/tex2lyx/test.lyx.lyx"' failed. Error: Running `../../bin/tex2lyx -roundtrip -f /usr/src/lyx/lyx-git/src/tex2lyx/test/CJK.tex´ failed. Exit 1 == Now I see in source with "git status" 7 modified and 7 new files Of them, only 1 modified should be there (src/tex2lyx/CMakeLists.txt) Kornel signature.asc Description: This is a digitally signed message part.
[patch] support the commands \fbox and \mbox
For an unknown reason LyX supports \framebox and \makebox only _with_ command options. \framebox{} and \makebox{} (which is the same as \fbox{} and \mbox{}) are not supported. Support for them would be very useful because one often has the case that one wants to simply draw a box around a single word or phrase and for that purpose you cannot use \framebox with options. The attached patch adds support for \fbox and \mbox. I have there used a hack where I code the case of no option to the length "-999col%". This works but I am not happy with this. There must be a way to omit specifying a length but I can't figure out how. Any help is highly appreciated. (The patch would be a fileformat change.) thanks and regards Uwe src/frontends/qt4/GuiBox.cpp | 76 src/frontends/qt4/GuiBox.h|1 + src/frontends/qt4/ui/BoxUi.ui | 266 +++-- src/insets/InsetBox.cpp | 58 + 4 files changed, 236 insertions(+), 165 deletions(-) diff --git a/src/frontends/qt4/GuiBox.cpp b/src/frontends/qt4/GuiBox.cpp index c4ddeed..bf98683 100644 --- a/src/frontends/qt4/GuiBox.cpp +++ b/src/frontends/qt4/GuiBox.cpp @@ -103,7 +103,7 @@ GuiBox::GuiBox(QWidget * parent) : InsetParamsWidget(parent) widthED->setValidator(unsignedLengthValidator(widthED)); // initialize the length validator - addCheckedWidget(widthED, widthLA); + addCheckedWidget(widthED, widthCB); addCheckedWidget(heightED, heightCB); initDialog(); @@ -125,12 +125,17 @@ void GuiBox::on_innerBoxCO_activated(int /* index */) if (heightCB->isChecked() && !ibox) heightCB->setChecked(false); heightCB->setEnabled(ibox); + // the width can only be selected for makebox or framebox + widthCB->setEnabled(itype == "makebox" + || (outer == "Boxed" && itype == "none")); + if (!widthCB->isEnabled()) + widthCB->setCheckState(Qt::Checked); // except for frameless and boxed, the width cannot be specified if // there is no inner box bool const width_enabled = ibox || outer == "Frameless" || outer == "Boxed"; - widthED->setEnabled(width_enabled); - widthUnitsLC->setEnabled(width_enabled); + widthED->setEnabled(width_enabled && widthCB->isChecked()); + widthUnitsLC->setEnabled(width_enabled && widthCB->isChecked()); // halign is only allowed for Boxed without inner box or for makebox halignCO->setEnabled((!ibox && outer == "Boxed") || (itype == "makebox")); @@ -164,12 +169,17 @@ void GuiBox::on_typeCO_activated(int index) heightCB->setEnabled(ibox); setSpecial(ibox); } + // the width can only be selected for makebox or framebox + widthCB->setEnabled(itype == "makebox" + || (type == "Boxed" && itype == "none")); + if (!widthCB->isEnabled()) + widthCB->setCheckState(Qt::Checked); // except for frameless and boxed, the width cannot be specified if // there is no inner box bool const width_enabled = itype != "none" || frameless || type == "Boxed"; - widthED->setEnabled(width_enabled); - widthUnitsLC->setEnabled(width_enabled); + widthED->setEnabled(width_enabled && widthCB->isChecked()); + widthUnitsLC->setEnabled(width_enabled && widthCB->isChecked()); // halign is only allowed for Boxed without inner box or for makebox halignCO->setEnabled((type == "Boxed" && itype == "none") || (itype == "makebox")); // pagebreak is only allowed for Boxed without inner box @@ -188,6 +198,12 @@ void GuiBox::initDialog() } +void GuiBox::on_widthCB_stateChanged(int state) +{ + changed(); +} + + void GuiBox::on_heightCB_stateChanged(int state) { bool const enable = (innerBoxCO->currentText() != qt_("None")) @@ -261,20 +277,27 @@ void GuiBox::paramsToDialog(Inset const * inset) // pagebreak is only allowed for Boxed without inner box pagebreakCB->setEnabled(!ibox && type == "Boxed"); - // except for frameless and boxed, the width cannot be specified if - // there is no inner box - bool const width_enabled = (ibox || frameless || type == "Boxed"); - widthED->setEnabled(width_enabled); - widthUnitsLC->setEnabled(width_enabled); - Length::UNIT const default_unit = Length::defaultUnit(); - lengthToWidgets(widthED, widthUnitsLC, - (params.width).asString(), default_unit); - - QString const special = toqstr(params.special); - if (!special.isEmpty() && special != "none") - widthUnitsLC->setCurrentItem(special); + // the width can only be selected for makebox or framebox + widthCB->setEnabled(inner_type == "makebox" + || (type == "Boxed" && inner_type == "none")); + // "-999col%" is the code for no width + if ((params.width).asString() == "-999col%") + widthCB->setCheckState(Qt::Unchecked); + else { + widthCB->setCheckState(Qt::Checked); + // except for frameless and boxed, the width cannot be specified if + // there is no inner box + bool const width_enabled = (ibox || frameless || type == "Boxed"); + widthED->setEnabled(width_enabled); + widthUnitsLC->setEnabled(width_enabled); +
Re: [LyX 2.0.x] polyglossia tex2lyx support also for branch
Uwe Stöhr wrote: > Am 03.07.2012 20:22, schrieb Georg Baum: > >>> I tested my commits as best as I could do. I also committed testfiles >>> and updated existing ones. >> >> The new files cannot be exported by LyX again, so they do not show that >> much. > > I don't understand. I can import XeTeX-polyglossia.tex and then re-export > it. Attached is the original file and the re-exported file. Diffing them > you see that everything is in place and nothing is lost. Indeed. In case of XeTeX-polyglossia.tex there is a bug in the roundtrip command of tex2lyx (it tries to export to latex instead of xelatex, I'll have a look at it), but CJK.lyx cannot be exported. I also don't understand the note in CJK.lyx.lyx. The .tex file clearly states that the main language is english. IMO we should never put such notes into imported files. If there is a bug it should be fixed, and if the .tex file does not carry enough information to restore the .lyx document it was created fom, then we should do as best as we can and live with the differences. >> IMO it is absolutely necessary to run regression tests before each >> tex2lyx commit, because meanwhile it has reached a complexity that cannot >> be tested manually anymore. > > You mean automated tests? Currently I check that all our testcases work > and they cover almost everything we support in tex2lyx. I don't know how > an automated testing could set up. Automated or not, I don't care, as long as they are run, but of course automated is easier. Therefore I set up a very simple automatic test: Just run python src/tex2lyx/test/runtests.py and run git diff afterwards to see the regressions. Question: Is it more convenient to let the test overwrite the reference results, so that the differences are automatically seen by git, or should the references better be kept in a separate location? I am unsure about that. >> If you run the regression tests, you will also see that some of your >> changes broke the defaults for math package loading. > > I don't see this at a quick look I now had. Could you please give me a > ponter to a case or file that does not work anymore? Look at the attached diff. You changed the default of those packages from off to auto. This breaks files that use user defined math commands that trigger automatic package loading. If a user defines his own version of \utilde the undertilde package must not be used automatically, since it would conflict. Georgdiff --git a/src/tex2lyx/test/CJK.lyx.lyx b/src/tex2lyx/test/CJK.lyx.lyx index 60bf6fa..a2ca8bc 100644 --- a/src/tex2lyx/test/CJK.lyx.lyx +++ b/src/tex2lyx/test/CJK.lyx.lyx @@ -18,7 +18,7 @@ \maintain_unincluded_children false \language english \language_package default -\inputencoding utf8 +\inputencoding auto \fontencoding T1 \font_roman default \font_sans default @@ -40,12 +40,12 @@ \papersize default \use_geometry false \use_package amsmath 1 -\use_package amssymb 0 +\use_package amssymb 1 \use_package esint 1 -\use_package mathdots 0 -\use_package mathtools 0 -\use_package mhchem 0 -\use_package undertilde 0 +\use_package mathdots 1 +\use_package mathtools 1 +\use_package mhchem 1 +\use_package undertilde 1 \cite_engine basic \cite_engine_type numerical \biblio_style plain @@ -54,7 +54,11 @@ \paperorientation portrait \suppress_date false \justification true -\use_refstyle 0 +\use_refstyle 1 +\index Index +\shortcut idx +\color #008000 +\end_index \secnumdepth 3 \tocdepth 3 \paragraph_separation indent @@ -74,6 +78,26 @@ \begin_layout Standard + +\begin_inset Note Note +status open +\begin_layout Plain Layout +\series bold +Important information: +\end_layout + +\begin_layout Plain Layout +This document contains text in Chinese, Japanese or Korean. + It was therefore impossible for tex2lyx to set the correct document langue for your document. Please set the language manually in the document settings. +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard + \lang japanese-cjk Japanese diff --git a/src/tex2lyx/test/DummyDocument.lyx b/src/tex2lyx/test/DummyDocument.lyx index 2625ebc..7dd1d5c 100644 --- a/src/tex2lyx/test/DummyDocument.lyx +++ b/src/tex2lyx/test/DummyDocument.lyx @@ -29,12 +29,12 @@ \papersize a4paper \use_geometry false \use_package amsmath 2 -\use_package amssymb 0 +\use_package amssymb 1 \use_package esint 1 -\use_package mathdots 0 -\use_package mathtools 0 -\use_package mhchem 0 -\use_package undertilde 0 +\use_package mathdots 1 +\use_package mathtools 1 +\use_package mhchem 1 +\use_package undertilde 1 \cite_engine natbib \cite_engine_type numerical \biblio_style plainnat @@ -43,7 +43,11 @@ \paperorientation portrait \suppress_date false \justification true -\use_refstyle 0 +\use_refstyle 1 +\index Index +\shortcut idx +\color #008000 +\end_index \secnumdepth 3 \tocdepth 3 \paragraph_separation indent diff --git a/src/tex2lyx/test/XeTeX-polyglossia.lyx.lyx b/src/tex2lyx/test/XeTeX-polyglossia.lyx.lyx
Re: Re: [LyX 2.0.x] polyglossia tex2lyx support also for branch
Am Sonntag, 8. Juli 2012 um 21:11:14, schrieb Georg Baum> Uwe Stöhr wrote: ... > Question: Is it more convenient to let the test overwrite the reference > results, so that the differences are automatically seen by git, or should > the references better be kept in a separate location? I am unsure about > that. Everything created should not overwrite anything under git control IMO. ... > > > Georg Kornel signature.asc Description: This is a digitally signed message part.
Re: [LyX master] Add very simple tex2lyx regression test suite.
Kornel Benko wrote: > This test overwrites data in lyx source dir. > Really wanted? Yes (at least for the moment, to get the whole thing started). The advantage is that git tells you if you have changes (be it regressions or wanted changes caused by fixed bugs or file format updates). The disadvantage: You just found it. I already asked in my reply to Uwe what is more convenient: Keeping it that way, or not overwriting the reference results. I am really unsure > I've done now the cmake version. Thanks! Georg
Re: [LyX 2.0.x] polyglossia tex2lyx support also for branch
Am 08.07.2012 21:11, schrieb Georg Baum: I don't understand. I can import XeTeX-polyglossia.tex and then re-export it. Attached is the original file and the re-exported file. Diffing them you see that everything is in place and nothing is lost. Indeed. In case of XeTeX-polyglossia.tex there is a bug in the roundtrip command of tex2lyx (it tries to export to latex instead of xelatex, I'll have a look at it), OK, but you can manually export it to XeTeX. but CJK.lyx cannot be exported. I can export it without problems to pdflatex. I also don't understand the note in CJK.lyx.lyx. The .tex file clearly states that the main language is english. No, this file is not in English! I wrote it in LyX using "Japanese (CJK)" as document language. The "english" is only a babel option and only appears because I used an English paragraph in the file. But that is exactly why there is a note - we cannot know the document language. IMO we should never put such notes into imported files. If there is a bug it should be fixed, and if the .tex file does not carry enough information to restore the .lyx document it was created from, then we should do as best as we can and live with the differences. There is no bug. LaTeX simply does not store the document language as we understand it. For CJK there is no such thing like we understand document language. We already do the best we can and giving the user the info to check what he thinks the document language could be is very helpful. I guess in 99% of the cases he clearly knows this and can set it quickly in the document settings. Automated or not, I don't care, as long as they are run, but of course automated is easier. Therefore I set up a very simple automatic test: Just run python src/tex2lyx/test/runtests.py and run git diff afterwards to see the regressions. Thanks. Question: Is it more convenient to let the test overwrite the reference results, so that the differences are automatically seen by git, or should the references better be kept in a separate location? I am unsure about that. I prefer the latter. The best would be to import a file "filename.tex", the import is saved as "filename-imported.lyx" If you run the regression tests, you will also see that some of your changes broke the defaults for math package loading. I don't see this at a quick look I now had. Could you please give me a ponter to a case or file that does not work anymore? Look at the attached diff. You changed the default of those packages from off to auto. This breaks files that use user defined math commands that trigger automatic package loading. If a user defines his own version of \utilde the undertilde package must not be used automatically, since it would conflict. Thanks for the pointer, I had not in mind that the user could have defined own commands. This is now fixed. regards Uwe
Re: Re: [LyX master] Add very simple tex2lyx regression test suite.
Am Sonntag, 8. Juli 2012 um 21:28:51, schrieb Georg Baum> Kornel Benko wrote: > > > This test overwrites data in lyx source dir. > > Really wanted? > > Yes (at least for the moment, to get the whole thing started). The advantage > is that git tells you if you have changes (be it regressions or wanted > changes caused by fixed bugs or file format updates). The disadvantage: You > just found it. I already asked in my reply to Uwe what is more convenient: > Keeping it that way, or not overwriting the reference results. I am really > unsure > > > I've done now the cmake version. > > Thanks! > OK, OK, but I am so unhappy about overwriting, that I hesitate to commit. This would be the first target in cmake overwriting source. I really had hard time to make po-translations not overwriting anything, and now this ... > Georg Kornel signature.asc Description: This is a digitally signed message part.
Re: Windows installer for LyX 2.0.4
On Sun, Jul 8, 2012 at 4:38 PM, Uwe Stöhrwrote: >> What about spaces in path names of files? I was quite surprised that >> LyX couldn't handle that on Windows, > > That is not true. LyX can handle them of course. Spaces in paths even exists > in Windows' default installation folders. If you find a case where LyX > fails, please report it as bug. > I will investigate that when I get the chance. Thanks Liviu
Re: LyX on Android?
On 2012-07-05, Alessandro Di Federico wrote: > Hi! There was a time when I laughed at those asking about an > Android-version of LyX, first of all because LyX sometimes tends to be > quite RAM-consuming. However the situation evolved quickly and now we > have powerful Android devices, but most importantly tablets. > I think it's time to think something about porting LyX to Android. > Do you think it would be possible? Maybe we could put up some reduced > functionality version. Not exactly what you were asking about, but as a "very reduced functionality version", namely a viewer for LyX files you can use elyxer, the external LyX->HTML converter. This allows to view LyX files on any device that supports Python and a HTML Browser. Günter
Re: [LyX 2.0.x] polyglossia tex2lyx support also for branch
Uwe Stöhr wrote: > Am 08.07.2012 21:11, schrieb Georg Baum: > >> but CJK.lyx cannot be exported. > > I can export it without problems to pdflatex. Does not work either. It fails to encode 0x6587 in both cases. >> I also don't understand >> the note in CJK.lyx.lyx. The .tex file clearly states that the main >> language is english. > > No, this file is not in English! I wrote it in LyX using "Japanese (CJK)" > as document language. The "english" is only a babel option and only > appears because I used an English paragraph in the file. > > But that is exactly why there is a note - we cannot know the document > language. Please forget about LyX for a moment. As far as LaTeX is concerned, english is the only language that explicitly appears in a LaTeX command (or rather the preamble in this case) in this document. All other languages do not appear explicitly in the document, you rather guess them from the used encodings. Therefore, from a LaTeX point of view, the language is clearly english. >> IMO we should never put such notes into imported files. If there >> is a bug it should be fixed, and if the .tex file does not carry enough >> information to restore the .lyx document it was created from, then we >> should do as best as we can and live with the differences. > > There is no bug. LaTeX simply does not store the document language as we > understand it. For CJK there is no such thing like we understand document > language. We already do the best we can and giving the user the info to > check what he thinks the document language could be is very helpful. I > guess in 99% of the cases he clearly knows this and can set it quickly in > the document settings. I understand that. My point was a bit different: In general, the exported .tex files do not contain all information of the original .lyx files. There are many more cases where information is lost, e.g. branches or stuff in yellow notes. You implemented a special treatment of one of these cases. Should we add notes for the other cases as well, e.g. "tex2lyx does not know if there was a note at this place originally?" Of course this example is nonsense, but what should a user think who imported a true .tex file which did not come from LyX? Your note assumes that roundtrip is the main use case, but this is wrong IMO. The most important use case is true import. Adding meta data is not the way to go either (the in_lyx_preamble bool in Preamble.cpp can already cause data loss). Therefore, the only thing we should do is to use the existing information of the .tex file as best as we can. Any interpretation should be left to the user. >> Question: Is it more convenient to let the test overwrite the reference >> results, so that the differences are automatically seen by git, or should >> the references better be kept in a separate location? I am unsure about >> that. > > I prefer the latter. The best would be to import a file "filename.tex", > the import is saved as "filename-imported.lyx" The file name convention is already set by tex2lyx (it is filename.lyx.lyx and the re-exported file is filename.lyx.tex). The question is only where the result should go: source tree or build tree? I'll wait a bit more, but for now it looks like the majority wants the latter. Georg
Re: [LyX 2.0.x] polyglossia tex2lyx support also for branch
Am 08.07.2012 22:18, schrieb Georg Baum: Please forget about LyX for a moment. As far as LaTeX is concerned, english is the only language that explicitly appears in a LaTeX command (or rather the preamble in this case) in this document. All other languages do not appear explicitly in the document, you rather guess them from the used encodings. Therefore, from a LaTeX point of view, the language is clearly english. I don't agree. There is only one paragraph in English in this file. So what is in your opinion the document language for the attached file? But the CJK encoding determines the language. E.g. EUC-JP can only be Japanese. OK, the UTF8 case is problematic. I understand that. My point was a bit different: In general, the exported .tex files do not contain all information of the original .lyx files. There are many more cases where information is lost, e.g. branches or stuff in yellow notes. You implemented a special treatment of one of these cases. Should we add notes for the other cases as well, e.g. "tex2lyx does not know if there was a note at this place originally?" Of course this example is nonsense, but what should a user think who imported a true .tex file which did not come from LyX? I understand your concern, but I guess he would wonder more about that the imported file has the document language English and not e.g. Korean although it is a Korean document? I don't want to add notes for all cases but for this one I think it is useful. Your note assumes that roundtrip is the main use case, but this is wrong IMO. The most important use case is true import. No, I was not thinking of a roundtrip, it is just that the users checks to get the correct document language after importing a TeX-file and can then continue to work with LyX without any problems. If he is not setting the correct document language, LyX would set it to English which introduces babel and that can cause many troubles. With some test cases babel simply prevents the compilation. So having the note here to assure that people can compile what they imported is useful and doesn't harm. Adding meta data is not the way to go either (the in_lyx_preamble bool in Preamble.cpp can already cause data loss). Therefore, the only thing we should do is to use the existing information of the .tex file as best as we can. Any interpretation should be left to the user. I don't understand. We don't guess, we only tell the user that his file contains CJK so that the document languages set by LyX _can_ be the wrong one. The user decides what is correct as document language, not tex2lyx! tex2lyx only sets one because the LyX fileformat requires this. Question: Is it more convenient to let the test overwrite the reference results, so that the differences are automatically seen by git, or should the references better be kept in a separate location? I am unsure about that. I prefer the latter. The best would be to import a file "filename.tex", the import is saved as "filename-imported.lyx" The file name convention is already set by tex2lyx (it is filename.lyx.lyx and the re-exported file is filename.lyx.tex). I find this hard to distinguish. by default Windows cuts off the file extension. Having dots in filenames is therefore not nice to handle and some programs even choke on them. Can this not be changed to another scheme? The question is only where the result should go: source tree or build tree? I'll wait a bit more, but for now it looks like the majority wants the latter. Build tree. regards Uwe \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{CJK} \begin{document} \begin{CJK}{EUC-JP}{}% Japanese \end{CJK} \begin{CJK}{UTF8}{}Chinese traditional\end{CJK} \begin{CJK}{EUC-JP}{} Japanese \end{CJK} \begin{CJK}{GB}{}% Chinese simplified \end{CJK}\begin{CJK}{EUC-JP}{hei} Japanese \end{CJK} \begin{CJK}{GB}{}Chinese simplified \end{CJK} \begin{CJK}{Bg5}{} Big5 文鼎楷書 \end{CJK} \begin{CJK}{SJIS}{} Shift_JIS 日本語ã�®æ–‡ç« \end{CJK} \begin{CJK}{JIS}{} JIS-code $BF|K\8l$NJ8>O(B \end{CJK} \begin{CJK}{KS}{}% Korean \end{CJK} \end{document}