Re: [PATCH] How to setup image converters on Mac?
Am 24.09.2017 um 23:39 schrieb Enrico Forestieri : > > On Sun, Sep 24, 2017 at 10:06:24PM +0200, Stephan Witt wrote: >> Am 24.09.2017 um 18:26 schrieb Stephan Witt : >>> Am 24.09.2017 um 18:12 schrieb Enrico Forestieri : On Sun, Sep 24, 2017 at 12:24:26PM +0200, Stephan Witt wrote: > > This is the solution I’d like to propose. It’s not tested on Linux and > Windows. > > The idea is to add imgconvert as fallback-converter for SVG to PDF and > PNG to PDF. > At the moment it uses the Qt library routines for image processing. I’ll > plan to investigate how to integrate libcairo for real vector graphics > conversion. > > I’d like to hear your comments. I think it is fine. However, I would avoid introducing 2 more converters and instead I would modify convertDefault.py so that when imagemagick is not installed the new imgconvert command is used. In this way, whatever conversion between image formats supported by Qt would succeed (without the need of new converter definitions). >>> >>> This is a good idea too. I have to admit, I had scruple to do this. >>> I’ll try to present a patch with this alternative. >> >> Here it is. >> >> I’ve improved imgconvert utility further and modified convertDefault.py >> to call it if the version of convert couldn’t be detected. >> >> Stephan >> >> PS. Of course not tested on Linux and Windows (again). > > It works for me on linux and cygwin. Of course, one has to move away > convert, rsvg-convert, and inkscape to appreciate that. Thank you for testing. Now I wonder if it would be better to name the utility lyxconvert. It will be installed in /usr/local/bin or something like that? I’d like to change it to avoid a potential name conflict. What do you think? Stephan
Re: [PATCH] How to setup image converters on Mac?
On Sun, Sep 24, 2017 at 11:39:09PM +0200, Enrico Forestieri wrote: > It works for me on linux and cygwin. Of course, one has to move away > convert, rsvg-convert, and inkscape to appreciate that. Thanks, Stephan, for the patch, and Enrico, for testing on Linux and Cygwin. I think it is a good plan for 2.3.0. Stephan, I would say go ahead and put it in the 2.3.x branch if you are comfortable with it. Scott signature.asc Description: PGP signature
Re: [PATCH] How to setup image converters on Mac?
On Sun, Sep 24, 2017 at 10:06:24PM +0200, Stephan Witt wrote: > Am 24.09.2017 um 18:26 schrieb Stephan Witt : > > Am 24.09.2017 um 18:12 schrieb Enrico Forestieri : > >> On Sun, Sep 24, 2017 at 12:24:26PM +0200, Stephan Witt wrote: > >>> > >>> This is the solution I’d like to propose. It’s not tested on Linux and > >>> Windows. > >>> > >>> The idea is to add imgconvert as fallback-converter for SVG to PDF and > >>> PNG to PDF. > >>> At the moment it uses the Qt library routines for image processing. I’ll > >>> plan to investigate how to integrate libcairo for real vector graphics > >>> conversion. > >>> > >>> I’d like to hear your comments. > >> > >> I think it is fine. However, I would avoid introducing 2 more converters > >> and instead I would modify convertDefault.py so that when imagemagick is > >> not installed the new imgconvert command is used. > >> > >> In this way, whatever conversion between image formats supported by Qt > >> would succeed (without the need of new converter definitions). > > > > This is a good idea too. I have to admit, I had scruple to do this. > > I’ll try to present a patch with this alternative. > > Here it is. > > I’ve improved imgconvert utility further and modified convertDefault.py > to call it if the version of convert couldn’t be detected. > > Stephan > > PS. Of course not tested on Linux and Windows (again). It works for me on linux and cygwin. Of course, one has to move away convert, rsvg-convert, and inkscape to appreciate that. -- Enrico
Re: Strange itemize and selection in LyX 2.3beta1
Le 24/09/2017 à 20:15, racoon a écrit : Sorry, just realized that I know how to reproduce: 1. Set Math Indentation (Document Settings) 2. Start a line with an inline math The line will be indented (although I guess that should happen only with non-inline math) and the selection behaves strange. My fault. Should be fixed now. JMarc
Re: Small scrolling/drawing issue with master
Le 24/09/2017 à 20:48, Pavel Sanda a écrit : hi, 1. have a document starting with figure 2. click on a first one a change scale on screen to much smaller %value 3. the figure gets correctly resized, but its absolute position remains at the start (bottom) of its previous y-coordinate. as a consequence there is big non-editable void space on the top part of screen, which will disappear after scrolling down. can anyone confirm? There are several problems due to missing repaint that I have not been able to track down yet. Another example: if you take a short enough document and zoom out (so that there is no scrollbar anymore), then the screen update is incomplete. Also there is the Mac situation, where the whole screen is black at first :( I have no idea of what is going on exactly, but I suspect that many of these issues share the same root. Or at least I hope so. The problem is that I do not really know what I am doing, and which code that was needed with old code should still be kept. JMarc
Re: [PATCH] How to setup image converters on Mac?
Am 24.09.2017 um 18:26 schrieb Stephan Witt : > > Am 24.09.2017 um 18:12 schrieb Enrico Forestieri : >> >> On Sun, Sep 24, 2017 at 12:24:26PM +0200, Stephan Witt wrote: >>> >>> This is the solution I’d like to propose. It’s not tested on Linux and >>> Windows. >>> >>> The idea is to add imgconvert as fallback-converter for SVG to PDF and PNG >>> to >>> PDF. >>> At the moment it uses the Qt library routines for image processing. I’ll >>> plan >>> to investigate how to integrate libcairo for real vector graphics >>> conversion. >>> >>> I’d like to hear your comments. >> >> I think it is fine. However, I would avoid introducing 2 more converters >> and instead I would modify convertDefault.py so that when imagemagick is >> not installed the new imgconvert command is used. >> >> In this way, whatever conversion between image formats supported by Qt >> would succeed (without the need of new converter definitions). > > This is a good idea too. I have to admit, I had scruple to do this. > I’ll try to present a patch with this alternative. Here it is. I’ve improved imgconvert utility further and modified convertDefault.py to call it if the version of convert couldn’t be detected. Stephan PS. Of course not tested on Linux and Windows (again). 0003-imgconvert.patch Description: Binary data
Small scrolling/drawing issue with master
hi, 1. have a document starting with figure 2. click on a first one a change scale on screen to much smaller %value 3. the figure gets correctly resized, but its absolute position remains at the start (bottom) of its previous y-coordinate. as a consequence there is big non-editable void space on the top part of screen, which will disappear after scrolling down. can anyone confirm? p
Re: Strange itemize and selection in LyX 2.3beta1
Sorry, just realized that I know how to reproduce: 1. Set Math Indentation (Document Settings) 2. Start a line with an inline math The line will be indented (although I guess that should happen only with non-inline math) and the selection behaves strange. Daniel On 24.09.2017 20:08, racoon wrote: Hi, While writing in LyX 2.3beta1 I noticed a couple of times a strange problem. In the attached file the sub itemize item is too far to the right and selection from the end of that item with the mouse behaves strange. Unfortunately, I don't know the steps to reproduce it. Maybe someone of you has an idea. Daniel
Strange itemize and selection in LyX 2.3beta1
Hi, While writing in LyX 2.3beta1 I noticed a couple of times a strange problem. In the attached file the sub itemize item is too far to the right and selection from the end of that item with the mouse behaves strange. Unfortunately, I don't know the steps to reproduce it. Maybe someone of you has an idea. Daniel lyx2.3.lyx Description: application/lyx
Re: [LyX/master] add inkscape wrapper script for Mac OS
Am Sonntag, den 24.09.2017, 18:57 +0200 schrieb Stephan Witt: > Isn’t this ok? Works for me as well. Jürgen signature.asc Description: This is a digitally signed message part
Re: [LyX/master] add inkscape wrapper script for Mac OS
Am Sonntag, den 24.09.2017, 19:03 +0200 schrieb Jürgen Spitzmüller: > You have to pass the inkscape command as first argument. No, actually, you don't. That's optional (I forgot). Jürgen > > Jürgen signature.asc Description: This is a digitally signed message part
Re: [LyX/master] add inkscape wrapper script for Mac OS
Am Sonntag, den 24.09.2017, 18:57 +0200 schrieb Stephan Witt: > Sorry, I neither read the script nor the python docs until now. > > I think it’s fine already. The subprocess.check_call gets the > args passed as array of strings and executes the sub process > with individual arguments. The spaces don’t need quotes. That's what I thought as well, but in the case of the command, it didn't work for Uwe unless I wrapped the command name in quotes. > I’ve tried this: > $ mkdir 'dir with spaces‘ > $ cp lyx/lib/images/file-open.svgz 'dir with spaces‘ > $ python lyx/lib/scripts/svg2pdftex.py $(pwd)/'dir with spaces'/file- > open.svgz $(pwd)/file-open.pdf > $ ls -l file-open.* > -rw-r--r--@ 1 stephan staff 45330 24 Sep 18:55 file-open.pdf > -rw-r--r-- 1 stephan staff 1871 24 Sep 18:55 file-open.tex > $ > > Isn’t this ok? You have to pass the inkscape command as first argument. Jürgen signature.asc Description: This is a digitally signed message part
Re: [LyX/master] add inkscape wrapper script for Mac OS
> Am 24.09.2017 um 18:57 schrieb Stephan Witt : > > Am 24.09.2017 um 18:32 schrieb Jürgen Spitzmüller : >> >> Am Sonntag, den 24.09.2017, 17:30 +0200 schrieb Stephan Witt: OK, but we might need to re-add quotes in the script (like we had to do for the first argument (inkscape command), for windows. >>> >>> Yes, that should be done to be safe anyway. >>> Every shell script needs to be written likewise to be correct. >> >> Hm, but I fail to do that. --file= (and also -f) do not seem to accept >> double nor single quotes. > > Sorry, I neither read the script nor the python docs until now. > > I think it’s fine already. The subprocess.check_call gets the > args passed as array of strings and executes the sub process > with individual arguments. The spaces don’t need quotes. > > I’ve tried this: $ mkdir 'dir with spaces‘ $ cp lyx/lib/images/file-open.svgz 'dir with spaces‘ $ python lyx/lib/scripts/svg2pdftex.py $(pwd)/'dir with spaces'/file-open.svgz $(pwd)/file-open.tex $ ls -l file-open.* -rw-r--r--@ 1 stephan staff 45330 24 Sep 18:55 file-open.pdf -rw-r--r-- 1 stephan staff 1871 24 Sep 18:55 file-open.tex $ > Isn’t this ok? > > Stephan
Re: [LyX/master] add inkscape wrapper script for Mac OS
Am 24.09.2017 um 18:32 schrieb Jürgen Spitzmüller : > > Am Sonntag, den 24.09.2017, 17:30 +0200 schrieb Stephan Witt: >>> OK, but we might need to re-add quotes in the script (like we had >>> to do >>> for the first argument (inkscape command), for windows. >> >> Yes, that should be done to be safe anyway. >> Every shell script needs to be written likewise to be correct. > > Hm, but I fail to do that. --file= (and also -f) do not seem to accept > double nor single quotes. Sorry, I neither read the script nor the python docs until now. I think it’s fine already. The subprocess.check_call gets the args passed as array of strings and executes the sub process with individual arguments. The spaces don’t need quotes. I’ve tried this: $ mkdir 'dir with spaces‘ $ cp lyx/lib/images/file-open.svgz 'dir with spaces‘ $ python lyx/lib/scripts/svg2pdftex.py $(pwd)/'dir with spaces'/file-open.svgz $(pwd)/file-open.pdf $ ls -l file-open.* -rw-r--r--@ 1 stephan staff 45330 24 Sep 18:55 file-open.pdf -rw-r--r-- 1 stephan staff 1871 24 Sep 18:55 file-open.tex $ Isn’t this ok? Stephan
Re: [LyX/master] add inkscape wrapper script for Mac OS
Am Sonntag, 24. September 2017 um 18:41:47, schrieb Stephan Witt > Am 24.09.2017 um 16:55 schrieb Kornel Benko : > > > > Am Sonntag, 24. September 2017 um 16:18:08, schrieb Kornel Benko > > > >> Am Sonntag, 24. September 2017 um 14:50:19, schrieb Stephan Witt > >> > >>> Am 24.09.2017 um 12:30 schrieb Kornel Benko : > > Am Sonntag, 24. September 2017 um 11:55:38, schrieb Stephan Witt > > > commit 350ef993e59b3ede7dd621a81f096ea78296c5c8 > > Author: Stephan Witt > > Date: Sun Sep 24 11:54:55 2017 +0200 > > > > add inkscape wrapper script for Mac OS > > > > Probably it doesn't matter, (because nobody cares for cmake on MacOSX?) > Would be fine, if someone could check. > > Kornel > >>> > >>> It doesn’t work, IMO. What I did to check: > >>> > >> > >> Could you please check, if the foreach() loop was entered? > >>message(STATUS "installing ${_i}") > >> > > > > I believe, I see the reason. Try to call cmake with '-DLYX_INSTALL=ON". > > (See {TOP_LEVEL_LYX_SRC}/CMakeLists.txt:1098) > > This works. Why is it needed? > > Stephan I don't know. Not my doing. We could always set it IMHO. Since I use '-DLYX_CPACK=ON', which sets this variable too, I never saw problems. Kornel signature.asc Description: This is a digitally signed message part.
Re: [LyX/master] add inkscape wrapper script for Mac OS
Am 24.09.2017 um 16:55 schrieb Kornel Benko : > > Am Sonntag, 24. September 2017 um 16:18:08, schrieb Kornel Benko > >> Am Sonntag, 24. September 2017 um 14:50:19, schrieb Stephan Witt >> >>> Am 24.09.2017 um 12:30 schrieb Kornel Benko : Am Sonntag, 24. September 2017 um 11:55:38, schrieb Stephan Witt > commit 350ef993e59b3ede7dd621a81f096ea78296c5c8 > Author: Stephan Witt > Date: Sun Sep 24 11:54:55 2017 +0200 > > add inkscape wrapper script for Mac OS > Probably it doesn't matter, (because nobody cares for cmake on MacOSX?) Would be fine, if someone could check. Kornel >>> >>> It doesn’t work, IMO. What I did to check: >>> >> >> Could you please check, if the foreach() loop was entered? >> message(STATUS "installing ${_i}") >> > > I believe, I see the reason. Try to call cmake with '-DLYX_INSTALL=ON". > (See {TOP_LEVEL_LYX_SRC}/CMakeLists.txt:1098) This works. Why is it needed? Stephan
Re: [LyX/master] add inkscape wrapper script for Mac OS
Am Sonntag, den 24.09.2017, 17:30 +0200 schrieb Stephan Witt: > > OK, but we might need to re-add quotes in the script (like we had > > to do > > for the first argument (inkscape command), for windows. > > Yes, that should be done to be safe anyway. > Every shell script needs to be written likewise to be correct. Hm, but I fail to do that. --file= (and also -f) do not seem to accept double nor single quotes. Jürgen > > Stephan signature.asc Description: This is a digitally signed message part
Re: [PATCH] How to setup image converters on Mac?
Am 24.09.2017 um 18:12 schrieb Enrico Forestieri : > > On Sun, Sep 24, 2017 at 12:24:26PM +0200, Stephan Witt wrote: >> >> This is the solution I’d like to propose. It’s not tested on Linux and >> Windows. >> >> The idea is to add imgconvert as fallback-converter for SVG to PDF and PNG to >> PDF. >> At the moment it uses the Qt library routines for image processing. I’ll plan >> to investigate how to integrate libcairo for real vector graphics conversion. >> >> I’d like to hear your comments. > > I think it is fine. However, I would avoid introducing 2 more converters > and instead I would modify convertDefault.py so that when imagemagick is > not installed the new imgconvert command is used. > > In this way, whatever conversion between image formats supported by Qt > would succeed (without the need of new converter definitions). This is a good idea too. I have to admit, I had scruple to do this. I’ll try to present a patch with this alternative. Stephan
Re: [PATCH] Re: How to setup image converters on Mac?
On Sun, Sep 24, 2017 at 12:24:26PM +0200, Stephan Witt wrote: > > This is the solution I’d like to propose. It’s not tested on Linux and > Windows. > > The idea is to add imgconvert as fallback-converter for SVG to PDF and PNG to > PDF. > At the moment it uses the Qt library routines for image processing. I’ll plan > to investigate how to integrate libcairo for real vector graphics conversion. > > I’d like to hear your comments. I think it is fine. However, I would avoid introducing 2 more converters and instead I would modify convertDefault.py so that when imagemagick is not installed the new imgconvert command is used. In this way, whatever conversion between image formats supported by Qt would succeed (without the need of new converter definitions). -- Enrico
Re: [LyX/master] add inkscape wrapper script for Mac OS
Am 24.09.2017 um 16:25 schrieb Jürgen Spitzmüller : > > Am Sonntag, den 24.09.2017, 13:57 +0200 schrieb Stephan Witt: >> I’d say you see the path names in svg2pdftex unquoted because of the >> shell is removing them. > > Makes sense. > >> Nevertheless you get the path names with spaces passed as one >> argument. > > OK, but we might need to re-add quotes in the script (like we had to do > for the first argument (inkscape command), for windows. Yes, that should be done to be safe anyway. Every shell script needs to be written likewise to be correct. Stephan
Re: [LyX/master] add inkscape wrapper script for Mac OS
Am Sonntag, 24. September 2017 um 16:18:08, schrieb Kornel Benko > Am Sonntag, 24. September 2017 um 14:50:19, schrieb Stephan Witt > > > Am 24.09.2017 um 12:30 schrieb Kornel Benko : > > > > > > Am Sonntag, 24. September 2017 um 11:55:38, schrieb Stephan Witt > > > > > >> commit 350ef993e59b3ede7dd621a81f096ea78296c5c8 > > >> Author: Stephan Witt > > >> Date: Sun Sep 24 11:54:55 2017 +0200 > > >> > > >>add inkscape wrapper script for Mac OS > > >> > > > > > > Probably it doesn't matter, (because nobody cares for cmake on MacOSX?) > > > Would be fine, if someone could check. > > > > > > Kornel > > > > It doesn’t work, IMO. What I did to check: > > > > Could you please check, if the foreach() loop was entered? > message(STATUS "installing ${_i}") > I believe, I see the reason. Try to call cmake with '-DLYX_INSTALL=ON". (See {TOP_LEVEL_LYX_SRC}/CMakeLists.txt:1098) Kornel signature.asc Description: This is a digitally signed message part.
Re: [LyX/master] add inkscape wrapper script for Mac OS
Am Sonntag, den 24.09.2017, 13:57 +0200 schrieb Stephan Witt: > I’d say you see the path names in svg2pdftex unquoted because of the > shell is removing them. Makes sense. > Nevertheless you get the path names with spaces passed as one > argument. OK, but we might need to re-add quotes in the script (like we had to do for the first argument (inkscape command), for windows. Jürgen > > Stephan signature.asc Description: This is a digitally signed message part
Re: [LyX/master] add inkscape wrapper script for Mac OS
Am Sonntag, 24. September 2017 um 14:50:19, schrieb Stephan Witt > Am 24.09.2017 um 12:30 schrieb Kornel Benko : > > > > Am Sonntag, 24. September 2017 um 11:55:38, schrieb Stephan Witt > > > >> commit 350ef993e59b3ede7dd621a81f096ea78296c5c8 > >> Author: Stephan Witt > >> Date: Sun Sep 24 11:54:55 2017 +0200 > >> > >>add inkscape wrapper script for Mac OS > >> > > > > Probably it doesn't matter, (because nobody cares for cmake on MacOSX?) > > Would be fine, if someone could check. > > > > Kornel > > It doesn’t work, IMO. What I did to check: > Could you please check, if the foreach() loop was entered? message(STATUS "installing ${_i}") Kornel signature.asc Description: This is a digitally signed message part.
Re: [LyX/master] add inkscape wrapper script for Mac OS
Am 24.09.2017 um 12:30 schrieb Kornel Benko : > > Am Sonntag, 24. September 2017 um 11:55:38, schrieb Stephan Witt > >> commit 350ef993e59b3ede7dd621a81f096ea78296c5c8 >> Author: Stephan Witt >> Date: Sun Sep 24 11:54:55 2017 +0200 >> >>add inkscape wrapper script for Mac OS >> > > Probably it doesn't matter, (because nobody cares for cmake on MacOSX?) > Would be fine, if someone could check. > > Kornel It doesn’t work, IMO. What I did to check: == $ cd "${LyxBuildDir}" &&\ cmake -G "Xcode" "${LyxSourceDir}" \ -DCMAKE_SYSTEM_PREFIX_PATH="/usr;${XCODE_SDK_PATH}/usr" \ -DLYX_LOCALVERSIONING=ON \ -DLYX_NLS=OFF \ -DLYX_DEBUG=ON -DLYX_RELEASE=OFF \ -DLYX_DEBUG_GLIBC=OFF -DLYX_DEBUG_GLIBC_PEDANTIC=OFF \ -DLYX_PACKAGE_SUFFIX=OFF -DLYX_PROGRAM_SUFFIX=OFF \ -DLYX_ENABLE_EXPORT_TESTS=OFF \ -DLYX_USE_QT=QT5 \ -DASPELL_INCLUDE_DIR=${LyxUtilDir}/include \ -DASPELL_LIBRARY_RELEASE=${LyxUtilDir}/lib/libaspell.dylib \ -DHUNSPELL_INCLUDE_DIR=${LyxUtilDir}/include \ -DHUNSPELL_LIBRARY=${LyxUtilDir}/lib/libhunspell.dylib \ -DENCHANT_INCLUDE_DIR=${LyxUtilDir}/include \ -DENCHANT_LIBRARY=${LyxUtilDir}/lib/libenchant.dylib \ -D_MYTHESLIB_INCLUDE_DIR=${LyxUtilDir}/include \ -D_MYTHESLIB_LIBRARY=${LyxUtilDir}/lib/libenchant.dylib \ -DMagic_INCLUDE_DIR=${LyxUtilDir}/include \ -DMagic_LIBRARY=${LyxUtilDir}/lib/libmagic.dylib \ -DLYX_ASPELL=ON -DLYX_HUNSPELL=ON \ -DCMAKE_INSTALL_PREFIX="${LyxBuildDir}“/../lyx-install $ xcodebuild -project "${LyxBuildDir}"/LyX.xcodeproj -target install snip terminal output... === BUILD AGGREGATE TARGET install OF PROJECT LyX WITH THE DEFAULT CONFIGURATION (Debug) === Check dependencies Write auxiliary files write-file /Users/stephan/git/lyx-build/cmake/2.4.0dev/LyX.build/Debug/install.build/Script-71EC931F283346709469E676.sh chmod 0755 /Users/stephan/git/lyx-build/cmake/2.4.0dev/LyX.build/Debug/install.build/Script-71EC931F283346709469E676.sh PhaseScriptExecution CMake\ PostBuild\ Rules /Users/stephan/git/lyx-build/cmake/2.4.0dev/LyX.build/Debug/install.build/Script-71EC931F283346709469E676.sh cd /Users/stephan/git/lyx /bin/sh -c /Users/stephan/git/lyx-build/cmake/2.4.0dev/LyX.build/Debug/install.build/Script-71EC931F283346709469E676.sh /opt/local/bin/cmake -DBUILD_TYPE=Debug -P cmake_install.cmake -- Install configuration: "Debug" -- Installing: /Users/stephan/git/lyx-build/cmake/lyx-install/bin/LyX -- Installing: /Users/stephan/git/lyx-build/cmake/lyx-install/bin/tex2lyx -- Installing: /Users/stephan/git/lyx-build/cmake/lyx-install/bin/lyxclient -- Installing: /Users/stephan/git/lyx-build/cmake/lyx-install/share/LyX/lyx2lyx/lyx2lyx_version.py -- Installing: /Users/stephan/git/lyx-build/cmake/lyx-install/share/LyX/lyx2lyx/lyx2lyx ** BUILD SUCCEEDED ** $ ls "${LyxBuildDir}“/../lyx-install/bin LyX lyxclient tex2lyx == I don’t see any lyxeditor, maxima or inkscape installed. Stephan
Re: [PATCH] Re: How to setup image converters on Mac?
Am 24.09.2017 um 12:24 schrieb Stephan Witt : > > Am 21.09.2017 um 15:08 schrieb Stephan Witt : >> >> Am 21.09.2017 um 14:54 schrieb Enrico Forestieri : >>> >>> On Thu, Sep 21, 2017 at 11:43:29AM +0200, Stephan Witt wrote: My question (again): how can I circumvent this and configure „my“ converter so it’s used to convert the SVG to PNG and run pdflatex with the PNG instead of the PDF (which would be rasterized anyway, when ImageMagick is used for SVG to PDF conversion). >>> >>> Maybe you can use again Qt to convert the SVG to a rasterized PDF. >>> See the attached example. Note that this is not actually limited >>> to SVG but is able to convert to PDF any format natively understood >>> by Qt (even if the original vector format is lost). >> >> Thank you. That’s not the solution I’d expected. But of course I’ll try that. >> I’d combine your code snippets into a single converter utility if it works. >> >> I’ll keep you up-to-date. :) > > This is the solution I’d like to propose. It’s not tested on Linux and > Windows. > > The idea is to add imgconvert as fallback-converter for SVG to PDF and PNG to > PDF. > At the moment it uses the Qt library routines for image processing. I’ll plan > to investigate how to integrate libcairo for real vector graphics conversion. > > I’d like to hear your comments. > > Stephan > > <0001-imgconvert.patch> Sorry, I made a last minute change and put a logic error in imgconvert.cpp. The check for to pdf or not to pdf was wrong. Here is the corrected version. Stephan 0002-imgconvert.patch Description: Binary data
Re: [LyX/master] add inkscape wrapper script for Mac OS
Am 24.09.2017 um 13:08 schrieb Jürgen Spitzmüller : > > Am Sonntag, den 24.09.2017, 12:18 +0200 schrieb Stephan Witt: >> I think they’ll be quoted automatically. > > At least in the svg2pdftex script, they end unquoted. I expect problems > if the path to the tmp dir contains spaces. See method Converters::convert() in Converter.cpp lines 607 and following. The debugger stopped at line 616 says: (lldb) print command (std::__1::string) $123 = "inkscape --file=\"/var/folders/1x/zm63s22x7s591xrlgm4rl9v4gn/T/lyx_tmpdir.miGPzmn52606/lyx_tmpbuf0/\"\"1_Users_stephan_git_lyx_lib_images_buffer-reload.svgz\" --export-area-drawing --without-gui --export-pdf=\"/var/folders/1x/zm63s22x7s591xrlgm4rl9v4gn/T/lyx_tmpdir.miGPzmn52606/lyx_tmpbuf0/\"\"1_Users_stephan_git_lyx_lib_images_buffer-reload.pdf\“" I’d say you see the path names in svg2pdftex unquoted because of the shell is removing them. Nevertheless you get the path names with spaces passed as one argument. Stephan
Re: [LyX/master] add inkscape wrapper script for Mac OS
Am Sonntag, den 24.09.2017, 12:18 +0200 schrieb Stephan Witt: > I think they’ll be quoted automatically. At least in the svg2pdftex script, they end unquoted. I expect problems if the path to the tmp dir contains spaces. Jürgen signature.asc Description: This is a digitally signed message part
Re: [LyX/master] add inkscape wrapper script for Mac OS
Am Sonntag, 24. September 2017 um 11:55:38, schrieb Stephan Witt > commit 350ef993e59b3ede7dd621a81f096ea78296c5c8 > Author: Stephan Witt > Date: Sun Sep 24 11:54:55 2017 +0200 > > add inkscape wrapper script for Mac OS > Probably it doesn't matter, (because nobody cares for cmake on MacOSX?) Would be fine, if someone could check. Kornel signature.asc Description: This is a digitally signed message part. diff --git a/development/cmake/Install.cmake b/development/cmake/Install.cmake index b2e312d..5989344 100755 --- a/development/cmake/Install.cmake +++ b/development/cmake/Install.cmake @@ -128,7 +128,9 @@ if(APPLE) install(FILES "${TOP_SRC_DIR}/development/MacOSX/PkgInfo" DESTINATION "${MACOSX_BUNDLE_STARTUP_COMMAND}/Contents") endif() - install(FILES "${TOP_SRC_DIR}/development/MacOSX/lyxeditor" DESTINATION "${LYX_UTILITIES_INSTALL_PATH}") + foreach(_i lyxeditor maxima inkscape) +install(FILES "${TOP_SRC_DIR}/development/MacOSX/${_i}" DESTINATION "${LYX_UTILITIES_INSTALL_PATH}") + endforeach() install(FILES "${TOP_SRC_DIR}/development/MacOSX/LyX.icns" DESTINATION "${LYX_DATA_SUBDIR}") set(program_suffix ${PROGRAM_SUFFIX}) elseif(UNIX)
[PATCH] Re: How to setup image converters on Mac?
Am 21.09.2017 um 15:08 schrieb Stephan Witt : > > Am 21.09.2017 um 14:54 schrieb Enrico Forestieri : >> >> On Thu, Sep 21, 2017 at 11:43:29AM +0200, Stephan Witt wrote: >>> >>> My question (again): how can I circumvent this and configure „my“ converter >>> so it’s used to convert the SVG to PNG and run pdflatex with the PNG instead >>> of the PDF (which would be rasterized anyway, when ImageMagick is used for >>> SVG to PDF conversion). >> >> Maybe you can use again Qt to convert the SVG to a rasterized PDF. >> See the attached example. Note that this is not actually limited >> to SVG but is able to convert to PDF any format natively understood >> by Qt (even if the original vector format is lost). > > Thank you. That’s not the solution I’d expected. But of course I’ll try that. > I’d combine your code snippets into a single converter utility if it works. > > I’ll keep you up-to-date. :) This is the solution I’d like to propose. It’s not tested on Linux and Windows. The idea is to add imgconvert as fallback-converter for SVG to PDF and PNG to PDF. At the moment it uses the Qt library routines for image processing. I’ll plan to investigate how to integrate libcairo for real vector graphics conversion. I’d like to hear your comments. Stephan 0001-imgconvert.patch Description: Binary data
Re: [LyX/master] add inkscape wrapper script for Mac OS
Am 24.09.2017 um 12:03 schrieb Jürgen Spitzmüller : > > Am Sonntag, den 24.09.2017, 11:55 +0200 schrieb Stephan Witt: >> -checkProg('an EMF -> EPS converter', ['metafile2eps $$i $$o', >> 'wmf2eps -o $$o $$i', inkscape_name + ' --file=$$i --export-area- >> drawing --without-gui --export-eps=$$o'], >> +checkProg('an EMF -> EPS converter', ['metafile2eps $$i $$o', >> 'wmf2eps -o $$o $$i', inkscape_name + ' --file=$$p$$i --export-area- >> drawing --without-gui --export-eps=$$p$$o'], >> rc_entry = [ r'\converter emfeps"%%" >> ""']) > > I wonder whether these $$p$$i need to be quoted, as the paths probably > can contain spaces. I think they’ll be quoted automatically. If not then we have this problem with many converters (Rscript etc). Stephan
Re: [LyX/master] add inkscape wrapper script for Mac OS
Am Sonntag, den 24.09.2017, 11:55 +0200 schrieb Stephan Witt: > -checkProg('an EMF -> EPS converter', ['metafile2eps $$i $$o', > 'wmf2eps -o $$o $$i', inkscape_name + ' --file=$$i --export-area- > drawing --without-gui --export-eps=$$o'], > +checkProg('an EMF -> EPS converter', ['metafile2eps $$i $$o', > 'wmf2eps -o $$o $$i', inkscape_name + ' --file=$$p$$i --export-area- > drawing --without-gui --export-eps=$$p$$o'], > rc_entry = [ r'\converter emfeps"%%" > ""']) I wonder whether these $$p$$i need to be quoted, as the paths probably can contain spaces. Jürgen signature.asc Description: This is a digitally signed message part