Re: Fwd: 2.3.0alpha1-1
Am Freitag, 12. Mai 2017 um 19:12:18, schrieb José Abílio Matos> On Friday, 12 May 2017 18.16.28 WEST Kornel Benko wrote: > > Have you tried math-preview with standard output format PDF(lualatex)? > > I know, this has nothing to do with python2 vs. python3, but since you are > > looking into the relevant files, it may interest you. > > > > Kornel > > I tried and I have the same problem I had sometime ago with previews, the > image is not cropped. > > 1) I set the default output to pdf(luatex). > 2) Entered in math mode $E=mc^2$ and left the math inset. > 3) The preview shows the whole page. > > FWIW I am using texlive 2016. Same here. > Also I noticed that the code in the scripts has not been touched for a long > time. I noted as example that the file fig2pdftex.py has a call to mkstemp to > create a temporary file. But that function is not defined anywhere so that > means the scripts does not work... You mean missing 'import tempfile'? I don't know how python (or if) inherits imports inside an import. Many modules are importing tempfile.py. Kornel signature.asc Description: This is a digitally signed message part.
Re: Fwd: 2.3.0alpha1-1
On Friday, 12 May 2017 18.16.28 WEST Kornel Benko wrote: > Have you tried math-preview with standard output format PDF(lualatex)? > I know, this has nothing to do with python2 vs. python3, but since you are > looking into the relevant files, it may interest you. > > Kornel I tried and I have the same problem I had sometime ago with previews, the image is not cropped. 1) I set the default output to pdf(luatex). 2) Entered in math mode $E=mc^2$ and left the math inset. 3) The preview shows the whole page. FWIW I am using texlive 2016. Also I noticed that the code in the scripts has not been touched for a long time. I noted as example that the file fig2pdftex.py has a call to mkstemp to create a temporary file. But that function is not defined anywhere so that means the scripts does not work... -- José Abílio
Re: Fwd: 2.3.0alpha1-1
Am Freitag, 12. Mai 2017 um 17:34:24, schrieb José Abílio Matos> With the several patches committed this week I am able to open all the > documents in the LyX's documentation with no crash in the lyxpreview scripts > when running python 3. > > I suspect that there could be other places needing to be fixed but for now it > is working. > > Regards, Have you tried math-preview with standard output format PDF(lualatex)? I know, this has nothing to do with python2 vs. python3, but since you are looking into the relevant files, it may interest you. Kornel signature.asc Description: This is a digitally signed message part.
Re: Fwd: Re: [LyX/master] Never, never use a string for something that has 3 values
On 2017-05-12, Jean-Marc Lasgouttes wrote: > Le 12/05/2017 à 15:45, Guenter Milde a écrit : >> Note that "math_number" is also misleading: the variable determines the >> *placement* of the equation number (left/default/right). >> Especially in connection with "math", the term "number" implies something >> quite different from a layout setting. > Indeed I proposed something like that in a followup message. > My suggestion was math_number_side. > I prefer to keep the math_ prefix rather than a new \equation_ prefix. But nobody calls this numerical tag a "math number". In ten years time, would a new maintainer understand math_number_side as the setting for "fleqn"/"freqn"? Günter
Re: Fwd: 2.3.0alpha1-1
With the several patches committed this week I am able to open all the documents in the LyX's documentation with no crash in the lyxpreview scripts when running python 3. I suspect that there could be other places needing to be fixed but for now it is working. Regards, -- José Abílio
Re: updatelayouts.py broken?
On Monday, 24 April 2017 06.46.21 WEST Scott Kostyshak wrote: > I use > > development/tools/updatelayouts.py > > to easily update the format of our layout files. The script no longer > works for me. I wonder if the script needs to be updated after 77511ea1 > (I think the call to layout2layout is now incorrect). I tried to update > it myself, but my Python skills aren't even hackish enough to fix it > with trial and error. > > This issue is not urgent at all. I can update the layout files with a > find -exec and calling layout2layout directly. > > An alternative to the script being broken is that I just don't know how > to call it correctly. Jürgen updated all layouts at a3315733 (which is > more recent than 77511ea1), but perhaps he used a find -exec also? > > Scott Hi Scott, do you still see this problem? Regards, -- José Abílio
Re: How to require "textquotedbl" in Paragraph::Private::latexSpecialChar
Le 11/05/2017 à 18:35, Guenter Milde a écrit : Dear LyX developers, in order to fix #10584, I need to call the function features.require("textquotedbl") (to insert a some fallback definition in the preamble) in Paragraph::Private::latexSpecialChar. You should probably do that in the loop at the end of Paragraph::validate(). JMarc
Re: Migration of preferences
Le 10/05/2017 à 07:11, Stephan Witt a écrit : On Mac the preferences are in a separate directory for every major release too. 2014 I added the feature to create a copy of previous major releases automatically if they’re present as first step of the configure process. Not all developers were friends of this change - so I made it limited to platform darwin (Mac OS X). If you’re interested in doing likewise on Windows too it shouldn’t be impossible. That way the old major release and the new one exists in parallel - exactly the same as without the additional copy step. It would not be too difficult when the is no user directory to make a list of the existing ones and show them to the user so that s/he can choose whether to import settings. When exporting settings, one should also run pref2pref and layout2layout in order to speed up LyX startup. JMarc
Re: Fwd: Re: [LyX/master] Never, never use a string for something that has 3 values
Le 12/05/2017 à 15:45, Guenter Milde a écrit : Note that "math_number" is also misleading: the variable determines the *placement* of the equation number (left/default/right). Especially in connection with "math", the term "number" implies something quite different from a layout setting. Indeed I proposed something like that in a followup message. My suggestion was math_number_side. I prefer to keep the math_ prefix rather than a new \equation_ prefix. I can do the code change, but I'd rather avoid the lyx2lyx part and leave it to Uwe. JMarc
Re: Fwd: Re: [LyX/master] Never, never use a string for something that has 3 values
Dear Jean-Marc and Uwe, dear LyX developers, On 2017-05-12, Jean-Marc Lasgouttes wrote: ... >> This commit replaces the string math_number_before by a proper >> math_number enum. >> Note that the _before naming was misleading. It was chosen at a time >> when we were not sure whether leqno was always left or could be right >> in RtL documents. >> Note that the token in LyX document is still \math_number_before and >> this should be changed. Note that "math_number" is also misleading: the variable determines the *placement* of the equation number (left/default/right). Especially in connection with "math", the term "number" implies something quite different from a layout setting. I suggest naming buffer setting and variable "equation_number_position". (I can also (reluctantly) agree to "formula_number_position", but "math_number" is too vague --- there are numbers anywhere in mathematics..) Therefore, I'd ask Uwe to > replace >\math_number_before true/false/default > with \equation_number_position left/right/default Günter
Re: tex2lyx tests failing on recent master
Am Freitag, 12. Mai 2017 um 13:26:13, schrieb Guenter Milde> On 2017-05-12, Scott Kostyshak wrote: > > > [-- Type: text/plain, Encoding: --] > > > The tex2lyx tests have been failing on recent master. > > There was a bug in fa0f142e that was fixed in the follow up commit ff6369d3, > maybe this led to the tex2lyx fails... > > Tests pass here with a LyX compilated with the status from ff6369d3. > > #> ctest -R tex2lyx > ... > 100% tests passed, 0 tests failed out of 28 > I confirm the failed tests. 50% tests passed, 14 tests failed out of 28 The following tests FAILED: 6 - tex2lyx/roundtrip/test.ltx (Failed) 8 - tex2lyx/roundtrip/algo2e.tex (Failed) 10 - tex2lyx/roundtrip/box-color-size-space-align.tex (Failed) 12 - tex2lyx/roundtrip/CJK.tex (Failed) 14 - tex2lyx/roundtrip/CJKutf8.tex (Failed) 16 - tex2lyx/roundtrip/test-insets-basic.tex (Failed) 18 - tex2lyx/roundtrip/test-insets.tex (Failed) 20 - tex2lyx/roundtrip/test-memoir.tex (Failed) 22 - tex2lyx/roundtrip/test-modules.tex (Failed) 24 - tex2lyx/roundtrip/test-refstyle-theorems.tex (Failed) 26 - tex2lyx/roundtrip/test-scr.tex (Failed) 28 - tex2lyx/roundtrip/test-structure.tex (Failed) 30 - tex2lyx/roundtrip/verbatim.tex (Failed) 32 - tex2lyx/roundtrip/XeTeX-polyglossia.tex (Failed) The differences between *.lyx.lyx and recreated lyx files are of the form @@ -72,7 +72,7 @@ \paragraph_separation indent \paragraph_indentation default \is_math_indent 0 -\math_number_before 0 +\math_number_before default \quotes_style english \dynamic_quotes 0 \papercolumns 1 > Günter Kornel signature.asc Description: This is a digitally signed message part.
Re: tex2lyx tests failing on recent master
On 2017-05-12, Scott Kostyshak wrote: > [-- Type: text/plain, Encoding: --] > The tex2lyx tests have been failing on recent master. There was a bug in fa0f142e that was fixed in the follow up commit ff6369d3, maybe this led to the tex2lyx fails... Tests pass here with a LyX compilated with the status from ff6369d3. #> ctest -R tex2lyx ... 100% tests passed, 0 tests failed out of 28 Günter
Re: [LyX/master] GuiDocument: support also the class option reqno
On Fri, May 12, 2017 at 01:06:14AM +0200, Uwe Stöhr wrote: > commit 19cc4a1fcbd0786406b0207dbff43badb93d32ba > Author: Uwe Stöhr> Date: Fri May 12 01:06:05 2017 +0200 > > GuiDocument: support also the class option reqno > > as discussed our support for the formula numbering side should be > complete. There are document classes that uses left numbering as default and > with the class option "reqno" this can be changed to right numbering. reqno > requires the loading of amsamth. > --- Uwe, a git bisect suggests that this commit broke the tex2lyx tests. Can you take a look? Scott signature.asc Description: PGP signature
Fwd: Re: [LyX/master] Never, never use a string for something that has 3 values
Wrong list, and forgot to take in account that Uwe does not read us. JMarc Message transféré Sujet : Re: [LyX/master] Never, never use a string for something that has 3 values Date : Fri, 12 May 2017 13:24:04 +0200 De : Jean-Marc LasgouttesPour : lyx-...@lists.lyx.org Le 12/05/2017 à 12:01, Jean-Marc Lasgouttes a écrit : commit d4685f2806683849002e0fb77b8e0335ed998092 Author: Jean-Marc Lasgouttes Date: Fri May 12 11:57:17 2017 +0200 Never, never use a string for something that has 3 values This commit replaces the string math_number_before by a proper math_number enum. Note that the _before naming was misleading. It was chosen at a time when we were not sure whether leqno was always left or could be right in RtL documents. Note that the token in LyX document is still \math_number_before and this should be changed. Fixup for 19cc4a1f. Dear Uwe, After this patch, there is still one fixup that I would want you to do: replace \math_number_before true/false/default with \math_number left/right/default This requires some small changes to BufferParams, along with a file format change. I am not at ease with these things, so I leave it to you. Also, in document settings, the label is cut to "Formula numbering si" here. JMarc
tex2lyx tests failing on recent master
The tex2lyx tests have been failing on recent master. Scott signature.asc Description: PGP signature
Re: Migration of preferences
On Thursday, 11 May 2017 14.26.37 WEST Jürgen Spitzmüller wrote: > 2017-05-11 12:51 GMT+02:00 José Abílio Matos: > > I will look into this problem if we have a bug report for it and a simple > > example file. > > http://www.lyx.org/trac/ticket/10660 > > Jürgen > > > -- > > José Abílio Thank you. First I will blame Stephan (at least according to git). ;-) The problem is: LookupError: unknown error handler name 'surrogateescape' according to PEP383: https://www.python.org/dev/peps/pep-0383/ this error handler was only introduced in python 3 and so it makes sense the error seen by Andrew. OTHO both Stephan and I (and probably others) do not see this problem with python 2, so probably the error handler was backported to python 2. So I suggest to remove for the moment the error argument from the io.open call. Also according to Nick Coghlan (python core member): http://python-notes.curiousefficiency.org/en/latest/python3/ text_file_processing.html "surrogate escape ... is the error handler that Python uses for most OS facing APIs to gracefully cope with encoding problems in the data supplied by the OS." so I think that we should be safe here. -- José Abílio