Re: 2.4.0-beta-2 possible regression: Float inset stops instant preview functionality in Fedora 37 X86_64
On Mon, Sep 04, 2023 at 08:57:38PM +0100, José Matos wrote: > On Mon, 2023-09-04 at 21:50 +0200, Pavel Sanda wrote: > > Tested, works, committed. Pavel > > Thank you. Thanks, José! Scott signature.asc Description: PGP signature -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: 2.4.0-beta-2 possible regression: Float inset stops instant preview functionality in Fedora 37 X86_64
On Mon, 2023-09-04 at 21:50 +0200, Pavel Sanda wrote: > Tested, works, committed. Pavel Thank you. -- José Abílio -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: 2.4.0-beta-2 possible regression: Float inset stops instant preview functionality in Fedora 37 X86_64
On Mon, Sep 04, 2023 at 07:47:04PM +0100, José Matos wrote: > What about this change? With the attached patch I get: Tested, works, committed. Pavel -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: 2.4.0-beta-2 possible regression: Float inset stops instant preview functionality in Fedora 37 X86_64
On Wed, 2023-01-18 at 11:13 -0500, Scott Kostyshak wrote: > On Wed, Jan 18, 2023 at 08:45:22AM +, José Matos wrote: > > > Python detected: python3 -tt > > > > Thinking aloud... here we could also output the Python version, for > > consistency sake... > > +1 > > Scott What about this change? With the attached patch I get: Version 2.4.0~RC1.devel (not released yet) Built from git commit hash 0c6101b0 Qt Version (run-time): 5.15.10 on platform wayland Qt Version (compile-time): 5.15.10 OS Version (run-time): Fedora Linux 39 (KDE Plasma Prerelease) Python detected: 3.12.0rc1 (/usr/bin/python3) We have several recent threads, for example on Mac systems, where this output is useful without the need to go to a terminal. IMHO it is also more relevant than what we get now. As a bonus if no python is detected then the output is: Python detected: None None is not supposed to be translated, it is (Monty) Python's humour. :-D -- José Abílio diff --git a/src/frontends/qt/GuiAbout.cpp b/src/frontends/qt/GuiAbout.cpp index 325801c521..0a585f0eac 100644 --- a/src/frontends/qt/GuiAbout.cpp +++ b/src/frontends/qt/GuiAbout.cpp @@ -222,7 +222,7 @@ static QString buildinfo() << endl; #endif - out << lyx_version_info + out << lyx_version_info #if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)) << Qt::endl; #else @@ -297,7 +297,7 @@ static QString version(bool const plain = false) else out << ""; #endif - out << toqstr(bformat(_("Python detected: %1$s"), from_utf8(os::python(; + out << toqstr(bformat(_("Python detected: %1$s"), from_utf8(os::python_info(; if (!plain) out << toqstr(""); return res; diff --git a/src/support/os.cpp b/src/support/os.cpp index abb9ec6d67..27427cd8ea 100644 --- a/src/support/os.cpp +++ b/src/support/os.cpp @@ -58,7 +58,7 @@ int timeout_ms() static string const python23_call(string const & binary, bool verbose = false) { - const string version_info = " -c \"from __future__ import print_function;import sys; print(sys.version_info[:2], end=\\\"\\\")\""; + const string version_info = " -c \"from __future__ import print_function; import sys; print(sys.version_info[:2], end='')\""; // Default to "python" if no binary is given. if (binary.empty()) return "python -tt"; @@ -142,7 +142,7 @@ static string const find_python_binary() return command; #ifdef _WIN32 - // python launcher is not installed, let cmd auto check + // python launcher is not installed, let cmd auto check // PATH for a python.exe command = python23_call("python"); if (!command.empty()) @@ -197,6 +197,14 @@ bool hasPython() return !(python23_call(python()).empty()); } +string const python_info() +{ + const string info_version = " -c \"from __future__ import print_function; import sys; print('{} ({})'.format(sys.version.split()[0],sys.executable), end='')\""; + if (!hasPython()) + return("None"); + return (runCommand(python() + info_version).result); +} + } // namespace os } // namespace support } // namespace lyx diff --git a/src/support/os.h b/src/support/os.h index 7e6bdbde95..35154a8c34 100644 --- a/src/support/os.h +++ b/src/support/os.h @@ -65,6 +65,9 @@ std::string const python(bool reset = false); /// Check for availability of the python interpreter bool hasPython(); +/// Return information about the ython interper +std::string const python_info(); + /// bool isFilesystemCaseSensitive(); -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: 2.4.0-beta-2 possible regression: Float inset stops instant preview functionality in Fedora 37 X86_64
On 1/22/23 13:37, José Matos wrote: On Sun, 2023-01-22 at 11:46 +, José Matos wrote: This is not a difficult problem but it takes time to get all the packages right. It would be nice to have an automatic way to do this but for now I settled for the manual solution. @Riki since you also use Fedora, but this also applies to distributors from other distributions and OS's. What do you think it constitutes a minimal distribution, or an average distribution, in terms of the requirements for latex packages? I would think enough to compile the User Guide would count as a reasonable starting point. Beyond that, we're getting into things that are very user-dependent. One thing we could maybe do to help is try to detect when compilation will fail and pop a dialog saying: "LyX has not deteced package X on your system. The document may not compile correctly if you do not install it." And maybe direct the user to the relevant part of the documentation, where we could give basic hints about how to install missing packages. I think we have the information already to be able to do this. Riki -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: 2.4.0-beta-2 possible regression: Float inset stops instant preview functionality in Fedora 37 X86_64
On Sun, 2023-01-22 at 11:46 +, José Matos wrote: > This is not a difficult problem but it takes time to get all the > packages right. It would be nice to have an automatic way to do this > but for now I settled for the manual solution. @Riki since you also use Fedora, but this also applies to distributors from other distributions and OS's. What do you think it constitutes a minimal distribution, or an average distribution, in terms of the requirements for latex packages? One (extreme) option would be to look into configure and depend on all the latex packages that it searches. In terms of implementation we can easily define other metapackages whose sole purpose is to hold the dependencies. An unrelated example that shows what I mean would be an hypothetical lyx-docbook sub-package that requires all the packages necessary to fully support the docbook tools required by LyX. In this way we ensure that only the users who need this incur in the space costs that comes with installing them. The con of this approach is that it requires an one time extra step to install the full support for docbook. After the installation the upgrade process is the same as a standard installation. The issue here are what it should be the standard set: # repoquery -q --requires texlive-collection-latexextra | wc -l 1358 # repoquery -q --requires texlive-collection-latexrecommended | wc -l 74 # repoquery -q --requires texlive-collection-latex | wc -l 58 So one option would be to jump from recommending texlive-collection- latexrecommended to texlive-collection-latexextra... but it implies to install more than one thousand packages (the size is small). Choices... choices... the life is made of choices. :-D Regards, -- José Abílio -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: 2.4.0-beta-2 possible regression: Float inset stops instant preview functionality in Fedora 37 X86_64
On Sat, 2023-01-21 at 17:19 -0800, Eric Barkan wrote: > Success! I tried installing texlive-cprotect per @nealbecker and the > problem was fixed. Thanks to you both. > Just in case it's still of interest I ran lyx-devel -dbg graphics in > the repaired system. All earlier error messages are gone. the only > mesages now are similar to: > graphics/PreviewLoader.cpp (753): > PreviewLoader::finishedInProgress(0): processing succeeded for pyth > on3 -tt $$s/scripts/lyxpreview2bitmap.py --png > "/tmp/lyx_tmpdir.CxxjlOzXElUM/lyx_tmpbuf4/lyxpreviewvmIpAu.tex" --dpi > 200 --fg 00 --bg faf > 0e6 --bibtex="bibtex" > > Jose -- let me know if I can help with further testing on F37. > Thanks again Jose and Neal for your help. > Eric Barkan Could you, please, try to compile the User's Guide? The issue is simple, I would like to determine what is the minimal set of latex packages required to have a working LyX version. I do not see these problems because I have all the texlive packages installed. For the Fedora package tough that is not the best scenario. For example in the spec file we have: # basic set of latex packages Recommends: texlive-collection-latexrecommended # required for file conversions Requires: ImageMagick Requires: xdg-utils Requires: ghostscript ## produce PDF files directly from DVI files Requires: tex-dvipdfmx ## convert eps to pdf Requires: tex-epstopdf ## checking the quality of the generated latex Requires: tex-chktex ## instant preview Requires: tex-dtl Requires: tex(cprotect.sty) # LaTeX packages required to compile the User's Manual Requires: tex(dvips) Requires: tex(esint.map) Requires: tex(esint.sty) Requires: tex(latex) Requires: tex(nomencl.sty) Requires: tex(simplecv.cls) Requires: tex(ulem.sty) Requires: tex(xcolor.sty) As you can see we are identifying a given set of packages in order to have a minimal working package. This is not a difficult problem but it takes time to get all the packages right. It would be nice to have an automatic way to do this but for now I settled for the manual solution. Best regards, -- José Abílio -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: 2.4.0-beta-2 possible regression: Float inset stops instant preview functionality in Fedora 37 X86_64
Success! I tried installing texlive-cprotect per @nealbecker and the problem was fixed. Thanks to you both. Just in case it's still of interest I ran lyx-devel -dbg graphics in the repaired system. All earlier error messages are gone. the only mesages now are similar to: graphics/PreviewLoader.cpp (753): PreviewLoader::finishedInProgress(0): processing succeeded for pyth on3 -tt $$s/scripts/lyxpreview2bitmap.py --png "/tmp/lyx_tmpdir.CxxjlOzXElUM/lyx_tmpbuf4/lyxpreviewvmIpAu.tex" --dpi 200 --fg 00 --bg faf 0e6 --bibtex="bibtex" Jose -- let me know if I can help with further testing on F37. Thanks again Jose and Neal for your help. Eric Barkan On 1/21/23 04:39, José Matos wrote: On Thu, 2023-01-19 at 11:08 -0800, Eric Barkan wrote: ose, Here's my output from "Copy version info": Version 2.4.0-beta2 (Sunday, December 11, 2022) Qt Version (run-time): 5.15.8 on platform xcb Qt Version (compile-time): 5.15.8 OS Version (run-time): Fedora Linux 37 (Thirty Seven) Python detected: python3 -tt Python --version gives "Python 3.11.1" Also, I've tried running beta-2 from a terminal and I find that "Error: No DVI or PDF output. latex failed." is printed after each attempt to preview by clicking in and out of an equation. I am sorry for the slow responses still dealing with the last bits of the first semester here. First there is a remark that needs to be done. Since lyx-devel uses a different configuration directory, by default ~/.lyx-devel, the configurations are not synchronized with those used by LyX 2.3 (that should be using, in general, ~/.lyx. LyX has debugging options that allow a better handling of the several internal processes. Please, both to you and @Neal Becker, try to run LyX 2.4 from the command line like this: $ lyx-devel -dbg graphics Is there any interesting bit in the console? Best regards,-- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: 2.4.0-beta-2 possible regression: Float inset stops instant preview functionality in Fedora 37 X86_64
On Sat, Jan 21, 2023 at 7:39 AM José Matos wrote: > On Thu, 2023-01-19 at 11:08 -0800, Eric Barkan wrote: > > ose, > > > > Here's my output from "Copy version info": > > > > > > Version 2.4.0-beta2 > > (Sunday, December 11, 2022) > > > > Qt Version (run-time): 5.15.8 on platform xcb > > Qt Version (compile-time): 5.15.8 > > OS Version (run-time): Fedora Linux 37 (Thirty Seven) > > Python detected: python3 -tt > > > > Python --version gives "Python 3.11.1" > > > > Also, I've tried running beta-2 from a terminal and I find that > > "Error: > > No DVI or PDF output. latex failed." is printed after each attempt to > > preview by clicking in and out of an equation. > > I am sorry for the slow responses still dealing with the last bits of > the first semester here. > > First there is a remark that needs to be done. Since lyx-devel uses a > different configuration directory, by default ~/.lyx-devel, the > configurations are not synchronized with those used by LyX 2.3 (that > should be using, in general, ~/.lyx. > > LyX has debugging options that allow a better handling of the several > internal processes. > > Please, both to you and @Neal Becker, try to run LyX 2.4 from the > command line like this: > > $ lyx-devel -dbg graphics > > Is there any interesting bit in the console? > > Error: Failed to extract metrics info from lyxpreviewlYmtTI.log graphics/PreviewLoader.cpp (753): PreviewLoader::finishedInProgress(1): processing failed for python -tt $$s/scripts/lyxpreview2bitmap.py --png "/tmp/lyx_tmpdir.KxvirIvkKhib/lyx_tmpbuf0/lyxpreviewlYmtTI.tex" --dpi 115 --fg 00 --bg ff --latex=lualatex --bibtex="bibtex" -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: 2.4.0-beta-2 possible regression: Float inset stops instant preview functionality in Fedora 37 X86_64
On Thu, 2023-01-19 at 11:08 -0800, Eric Barkan wrote: > ose, > > Here's my output from "Copy version info": > > > Version 2.4.0-beta2 > (Sunday, December 11, 2022) > > Qt Version (run-time): 5.15.8 on platform xcb > Qt Version (compile-time): 5.15.8 > OS Version (run-time): Fedora Linux 37 (Thirty Seven) > Python detected: python3 -tt > > Python --version gives "Python 3.11.1" > > Also, I've tried running beta-2 from a terminal and I find that > "Error: > No DVI or PDF output. latex failed." is printed after each attempt to > preview by clicking in and out of an equation. I am sorry for the slow responses still dealing with the last bits of the first semester here. First there is a remark that needs to be done. Since lyx-devel uses a different configuration directory, by default ~/.lyx-devel, the configurations are not synchronized with those used by LyX 2.3 (that should be using, in general, ~/.lyx. LyX has debugging options that allow a better handling of the several internal processes. Please, both to you and @Neal Becker, try to run LyX 2.4 from the command line like this: $ lyx-devel -dbg graphics Is there any interesting bit in the console? Best regards, -- José Abílio -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: 2.4.0-beta-2 possible regression: Float inset stops instant preview functionality in Fedora 37 X86_64
I have some new information. I did a clean install of F37 on a virtual machine. Although I usually use KDE, I used the vanilla Fedora iso install which uses Gnome, so as to avoid any non-standard surprises. At first, I didn't even update the system before doing the following. I installed lyx-devel-beta2 from the jamatos repo using dnf. The install went cleanly including basic dependencies. Loading my test files into LyX I found preview inoperative, but fixed this by installing the tex-preview package and reconfiguring (possible dependency for tex-preview?). Preview now (mal)functions exactly as before: preview normal with no float inset, preview fails with float inset. But I now get some new, possibly more informative error messages. When clicking in and out of an equation to force preview I get the following messages at the terminal: Warning: Failed: dvips lyxpreviewkqkzoE.dvi ... looking for PDF Error: Failed to extract metrics info from lyxpreviewkqkzoE.log Version information for this install: Version 2.4.0-beta2 (Sunday, December 11, 2022) Qt Version (run-time): 5.15.6 on platform xcb Qt Version (compile-time): 5.15.8 OS Version (run-time): Fedora Linux 37 (Workstation Edition) Python detected: python3 -tt python --version gives: Python 3.11.0 After doing the above, I fully updated the system. LyX behavior is unchanged (still shows problem). Same error messages. Version information after update: Version 2.4.0-beta2 (Sunday, December 11, 2022) Qt Version (run-time): 5.15.8 on platform wayland Qt Version (compile-time): 5.15.8 OS Version (run-time): Fedora Linux 37 (Workstation Edition) python --version gives: Python 3.11.1 I have tried these tests both as a normal user and as root. Same results. Hope this helps. -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: 2.4.0-beta-2 possible regression: Float inset stops instant preview functionality in Fedora 37 X86_64
This (at bottom) is in reply to Jose Matos' first posting of January 18. Sorry for the confusion, but I haven't been able to figure out how to make a normal reply to the list so that the thread structure is maintained. Any help would be appreciated. Jose's post: On Tue, 2023-01-17 at 18:06 -0800, Eric Barkan wrote: As a long time user of LyX, I want to thank you all for this awesome piece of software. Couldn't live without it! Thank you. :-) I installed lyx-devel-2.4.0~beta2-1 and its dependencies from the jamatos copr lyx-devel repository for Fedora 37 X86_64 using dnf. The program starts and functions normally as far as I can tell, except for the instant preview problem described below. This same system has lyx-2.3.7-1.fc37 also installed and seeming to work perfectly. Specifically, this bug does NOT occur on the 2.3.7 installation. That is the strange element here. Bug Description: Inclusion of a float inset in a .lyx file prevents instant preview from functioning. Removal of the float inset restores instant preview functionality. Details of the float seem irrelevant; the attached MRE contains an empty float which causes the problem, but I've tried non-empty floats too with the same results. Both figure floats and table floats have the same effect. I've attached two small lyx files as an MRE. The file preview-test- float.lyx exhibits the bug; it contains an empty float inset. The otherwise identical file preview-test-no-float.lyx (with no float inset) does not. The files contain two short equations. In the example with the float, clicking in and out of the equations does not force preview, and nothing else I've tried seems to either. Running the same version here I see the preview on both files. What do you get from Help -> About LyX, in the Version tab you have an option to "Copy Version Info". In my case I have: Version 2.4.0-beta2 (Sunday, 11 December 2022) Qt Version (run-time): 5.15.8 on platform xcb Qt Version (compile-time): 5.15.8 OS Version (run-time): Fedora Linux 37 (KDE Plasma) Python detected: python3 -tt Thinking aloud... here we could also output the Python version, for consistency sake... Thanks again for all your hard work. Looking forward to the final release. Thank you for the report, -- José Abílio My reply: Jose, Here's my output from "Copy version info": Version 2.4.0-beta2 (Sunday, December 11, 2022) Qt Version (run-time): 5.15.8 on platform xcb Qt Version (compile-time): 5.15.8 OS Version (run-time): Fedora Linux 37 (Thirty Seven) Python detected: python3 -tt Python --version gives "Python 3.11.1" Also, I've tried running beta-2 from a terminal and I find that "Error: No DVI or PDF output. latex failed." is printed after each attempt to preview by clicking in and out of an equation. -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: 2.4.0-beta-2 possible regression: Float inset stops instant preview functionality in Fedora 37 X86_64
On Wed, Jan 18, 2023 at 08:45:22AM +, José Matos wrote: > Python detected: python3 -tt > > Thinking aloud... here we could also output the Python version, for > consistency sake... +1 Scott signature.asc Description: PGP signature -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: 2.4.0-beta-2 possible regression: Float inset stops instant preview functionality in Fedora 37 X86_64
On Wed, 2023-01-18 at 08:45 +, José Matos wrote: > What do you get from Help -> About LyX, in the Version tab you have > an > option to "Copy Version Info". In my case I have: > > Version 2.4.0-beta2 > (Sunday, 11 December 2022) FWIW, and unrelated to this case it would be also probably nice to copy the file locations to the report. In the case of Fedora's package of 2.4 I am using a different different directories for library and user, respectively: /usr/share/lyx-devel and ~/.lyx-devel. This option is related with allowing to keep both versions for the moment. In the case of the OP' report this means the LyX 2.3 and 2.4 are using user's directories. Not that I think that it matters but the disclaimer goes here. -- José Abílio -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: 2.4.0-beta-2 possible regression: Float inset stops instant preview functionality in Fedora 37 X86_64
On Tue, 2023-01-17 at 18:06 -0800, Eric Barkan wrote: > As a long time user of LyX, I want to thank you all for this awesome > piece of software. Couldn't live without it! Thank you. :-) > I installed lyx-devel-2.4.0~beta2-1 and its dependencies from the > jamatos copr lyx-devel repository for Fedora 37 X86_64 using dnf. > The program starts and functions normally as far as I can tell, > except for the instant preview problem described below. > This same system has lyx-2.3.7-1.fc37 also installed and seeming to > work perfectly. Specifically, this bug does NOT occur on the 2.3.7 > installation. That is the strange element here. > Bug Description: Inclusion of a float inset in a .lyx file prevents > instant preview from functioning. Removal of the float inset > restores instant preview functionality. Details of the float seem > irrelevant; the attached MRE contains an empty float which causes the > problem, but I've tried non-empty floats too with the same results. > Both figure floats and table floats have the same effect. > I've attached two small lyx files as an MRE. The file preview-test- > float.lyx exhibits the bug; it contains an empty float inset. The > otherwise identical file preview-test-no-float.lyx (with no float > inset) does not. > The files contain two short equations. In the example with the > float, clicking in and out of the equations does not force preview, > and nothing else I've tried seems to either. Running the same version here I see the preview on both files. What do you get from Help -> About LyX, in the Version tab you have an option to "Copy Version Info". In my case I have: Version 2.4.0-beta2 (Sunday, 11 December 2022) Qt Version (run-time): 5.15.8 on platform xcb Qt Version (compile-time): 5.15.8 OS Version (run-time): Fedora Linux 37 (KDE Plasma) Python detected: python3 -tt Thinking aloud... here we could also output the Python version, for consistency sake... > Thanks again for all your hard work. Looking forward to the final > release. Thank you for the report, -- José Abílio -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel