Re: Exporting compressed files
On Friday, July 8, 2016 2:10:07 PM WEST Richard Heck wrote: > Good, and thanks for fixing this. > > rh Thank you. :-) The change is in for 2.2.2 together with a change status and the bug close. Regards, -- José Abílio
Re: Exporting compressed files
On 07/08/2016 12:01 PM, José Abílio Matos wrote: > On Thursday, July 7, 2016 4:05:15 PM WEST Richard Heck wrote: >> Patch seems reasonable to me. >> >> Please commit to 2.2.x after 2.2.1 is released. >> >> Richard > Thank you Richard. :-) > > Commited to master and I will do the same to 2.2.x after 2.2.1 is out. Good, and thanks for fixing this. rh
Re: Exporting compressed files
On Thursday, July 7, 2016 4:05:15 PM WEST Richard Heck wrote: > Patch seems reasonable to me. > > Please commit to 2.2.x after 2.2.1 is released. > > Richard Thank you Richard. :-) Commited to master and I will do the same to 2.2.x after 2.2.1 is out. Regards, -- José Abílio
Re: Exporting compressed files
Patch seems reasonable to me. Please commit to 2.2.x after 2.2.1 is released. Richard On 07/07/2016 05:18 AM, José Abílio Matos wrote: On Thursday, July 7, 2016 10:09:44 AM WEST Andrew Parsloe wrote: Yes, changing > to -o results in an exported compressed file that 2.1.5 can read. Thanks for the help. Andrew Thank you Andrew. I still blame windows for this but in any case to use the option -o is the right thing to do since we already know where to write. As it is now lyx2lyx tries to guess where to write it and since no clue is offered it writes to stdout that then it is written to $$o. I propose the following patch to go in 2.3 (btw I think we can drop the 2. prefix from the version ;-) ) and later this could go to 2.2.x (with x >= 2). The patch makes the call to lyx2lyx less cryptic, e.g. to revert to the 1.3 format we have: \converter lyx lyx13x "python -tt $$s/lyx2lyx/lyx2lyx -t 221 $$i > $$o" "" what I propose is that instead of python -tt $$s/lyx2lyx/lyx2lyx -t 221 $$i > $$o we can write python -tt $$s/lyx2lyx/lyx2lyx -V 1.3 -o $$o $$i or we could write a longer, but more understandable form: python -tt $$s/lyx2lyx/lyx2lyx --final_version 1.3 --output $$o $$i FWIW I shuffled the order of the arguments just for the sake of readability, to let $$i as the last argument. The funny thing about this is the code is there for almost 8 years. :-) Regards,
Re: Exporting compressed files
On Thursday, July 7, 2016 10:09:44 AM WEST Andrew Parsloe wrote: > > Yes, changing > to -o results in an exported compressed file that 2.1.5 > can read. Thanks for the help. > > Andrew Thank you Andrew. I still blame windows for this but in any case to use the option -o is the right thing to do since we already know where to write. As it is now lyx2lyx tries to guess where to write it and since no clue is offered it writes to stdout that then it is written to $$o. I propose the following patch to go in 2.3 (btw I think we can drop the 2. prefix from the version ;-) ) and later this could go to 2.2.x (with x >= 2). The patch makes the call to lyx2lyx less cryptic, e.g. to revert to the 1.3 format we have: \converter lyx lyx13x "python -tt $$s/lyx2lyx/lyx2lyx -t 221 $$i > $$o" "" what I propose is that instead of python -tt $$s/lyx2lyx/lyx2lyx -t 221 $$i > $$o we can write python -tt $$s/lyx2lyx/lyx2lyx -V 1.3 -o $$o $$i or we could write a longer, but more understandable form: python -tt $$s/lyx2lyx/lyx2lyx --final_version 1.3 --output $$o $$i FWIW I shuffled the order of the arguments just for the sake of readability, to let $$i as the last argument. The funny thing about this is the code is there for almost 8 years. :-) Regards, -- José Abíliodiff --git a/lib/configure.py b/lib/configure.py index ccf7226..6f13356 100644 --- a/lib/configure.py +++ b/lib/configure.py @@ -1086,19 +1086,19 @@ def checkConverterEntries(): \converter csvlyx"python -tt $$s/scripts/csv2lyx.py $$i $$o" "" \converter docbookdocbook-xml "cp $$i $$o" "xml" \converter fenasciichess "python -tt $$s/scripts/fen2ascii.py $$i $$o" "" -\converter lyxlyx13x "python -tt $$s/lyx2lyx/lyx2lyx -t 221 $$i > $$o" "" -\converter lyxlyx14x "python -tt $$s/lyx2lyx/lyx2lyx -t 245 $$i > $$o" "" -\converter lyxlyx15x "python -tt $$s/lyx2lyx/lyx2lyx -t 276 $$i > $$o" "" -\converter lyxlyx16x "python -tt $$s/lyx2lyx/lyx2lyx -t 345 $$i > $$o" "" -\converter lyxlyx20x "python -tt $$s/lyx2lyx/lyx2lyx -t 413 $$i > $$o" "" -\converter lyxlyx21x "python -tt $$s/lyx2lyx/lyx2lyx -t 474 $$i > $$o" "" -\converter lyxlyx22x "python -tt $$s/lyx2lyx/lyx2lyx -t 508 $$i > $$o" "" -\converter lyxclyx "python -tt $$s/lyx2lyx/lyx2lyx -c big5 -t 245 $$i > $$o" "" -\converter lyxjlyx "python -tt $$s/lyx2lyx/lyx2lyx -c euc_jp -t 245 $$i > $$o" "" -\converter lyxklyx "python -tt $$s/lyx2lyx/lyx2lyx -c euc_kr -t 245 $$i > $$o" "" -\converter clyx lyx"python -tt $$s/lyx2lyx/lyx2lyx -c big5 $$i > $$o" "" -\converter jlyx lyx"python -tt $$s/lyx2lyx/lyx2lyx -c euc_jp $$i > $$o" "" -\converter klyx lyx"python -tt $$s/lyx2lyx/lyx2lyx -c euc_kr $$i > $$o" "" +\converter lyxlyx13x "python -tt $$s/lyx2lyx/lyx2lyx -V 1.3 -o $$o $$i" "" +\converter lyxlyx14x "python -tt $$s/lyx2lyx/lyx2lyx -V 1.4 -o $$o $$i" "" +\converter lyxlyx15x "python -tt $$s/lyx2lyx/lyx2lyx -V 1.5 -o $$o $$i" "" +\converter lyxlyx16x "python -tt $$s/lyx2lyx/lyx2lyx -V 1.6 -o $$o $$i" "" +\converter lyxlyx20x "python -tt $$s/lyx2lyx/lyx2lyx -V 2.0 -o $$o $$i" "" +\converter lyxlyx21x "python -tt $$s/lyx2lyx/lyx2lyx -V 2.1 -o $$o $$i" "" +\converter lyxlyx22x "python -tt $$s/lyx2lyx/lyx2lyx -V 2.2 -o $$o $$i" "" +\converter lyxclyx "python -tt $$s/lyx2lyx/lyx2lyx -V 1.4 -o $$o -c big5 $$i" "" +\converter lyxjlyx "python -tt $$s/lyx2lyx/lyx2lyx -V 1.4 -o $$o -c euc_jp $$i" "" +\converter lyxklyx "python -tt $$s/lyx2lyx/lyx2lyx -V 1.4 -o $$o -c euc_kr $$i" "" +\converter clyx lyx"python -tt $$s/lyx2lyx/lyx2lyx -c big5 -o $$o $$i" "" +\converter jlyx lyx"python -tt $$s/lyx2lyx/lyx2lyx -c euc_jp -o $$o $$i" "" +\converter klyx lyx"python -tt $$s/lyx2lyx/lyx2lyx -c euc_kr -o $$o $$i" "" \converter lyxpreview png"python -tt $$s/scripts/lyxpreview2bitmap.py --png" "" \converter lyxpreview ppm"python -tt $$s/scripts/lyxpreview2bitmap.py --ppm" "" ''')
Re: Exporting compressed files
On 6/07/2016 9:14 p.m., José Abílio Matos wrote: Could you try the following: *) go to Tools->Preferences->File Handling->Converters *) choose in the Converter Definition "LyX -> LyX 2.1.x" *) change the converter from "python -tt $$s/lyx2lyx/lyx2lyx -t 474 $$i > $$o" to "python -tt $$s/lyx2lyx/lyx2lyx -t 474 $$i -o $$o" that is the change > to -o. *) select Modify in upper right side and then Save in the lower part. *) repeat the export to 2.1.x and see if it works now. As I have told you before this works in Linux. Regards, Yes, changing > to -o results in an exported compressed file that 2.1.5 can read. Thanks for the help. Andrew --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
Re: Exporting compressed files
On Wednesday, July 6, 2016 10:31:45 AM WEST Andrew Parsloe wrote: > LyX 2.1.5 has no trouble saving and reading its own compressed files. That is good, I was being thoroughly in order to not to discart any possibility. > If I save a compressed file in 2.2.0, LyX 2.1.5 can read it. If I export > a compressed file from 2.2.0 to 2.1.x, LyX 2.1.5 cannot read it. > > I've attached four files: > > test.lyx The original 2.2.0 file ("A quick brown fox jumps over the > lazy dog.") *saved* as a compressed file. That is OK. > test.21.lyx This is test.lyx *exported* as a compressed file to 2.1.x > format. This file is corrupted as you show up in _stdout_ > test This is test.lyx as extracted by 7zip. After adding the .lyx > extension it can be read in LyX 2.1.5. > > _stdout_ This is what 7zip produces when attempting to extract > test.21.lyx. A dialog pops up with the message "CRC failed: ". > Looked at in a text editor, some extraction has occurred, but obviously > not to completion. Yes, the file is corrupted. > Windows' builtin zip mechanism is unable to extract either test.lyx or > test.21.lyx. I have to change the extensions to .zip for it to recognize > them as zipped, but it claims both zipped folders are empty. This is a nicety of windows. :-( > Andrew Could you try the following: *) go to Tools->Preferences->File Handling->Converters *) choose in the Converter Definition "LyX -> LyX 2.1.x" *) change the converter from "python -tt $$s/lyx2lyx/lyx2lyx -t 474 $$i > $$o" to "python -tt $$s/lyx2lyx/lyx2lyx -t 474 $$i -o $$o" that is the change > to -o. *) select Modify in upper right side and then Save in the lower part. *) repeat the export to 2.1.x and see if it works now. As I have told you before this works in Linux. Regards, -- José Abílio
Re: Exporting compressed files
On 6/07/2016 2:16 a.m., José Abílio Matos wrote: Could you, please, test the following (independent) tests: 1) take the compressed ".21.lyx" created with 2.2 use an external program to decompress that file and see if lyx 2.1 opens that file? 2) use lyx 2.1 to create a compressed file, save it, close lyx and try to open it again with lyx 2.1 Regards, LyX 2.1.5 has no trouble saving and reading its own compressed files. If I save a compressed file in 2.2.0, LyX 2.1.5 can read it. If I export a compressed file from 2.2.0 to 2.1.x, LyX 2.1.5 cannot read it. I've attached four files: test.lyx The original 2.2.0 file ("A quick brown fox jumps over the lazy dog.") *saved* as a compressed file. test.21.lyx This is test.lyx *exported* as a compressed file to 2.1.x format. test This is test.lyx as extracted by 7zip. After adding the .lyx extension it can be read in LyX 2.1.5. _stdout_ This is what 7zip produces when attempting to extract test.21.lyx. A dialog pops up with the message "CRC failed: ". Looked at in a text editor, some extraction has occurred, but obviously not to completion. Windows' builtin zip mechanism is unable to extract either test.lyx or test.21.lyx. I have to change the extensions to .zip for it to recognize them as zipped, but it claims both zipped folders are empty. Andrew --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus #LyX 2.2 created this file. For more info see http://www.lyx.org/ \lyxformat 474 \begin_document \begin_header \textclass book \begin_preamble \end_preamble \use_default_options false \maintain_unincluded_children false \language english \language_package default \inputencoding auto \fontencoding global \font_roman lmodern \font_sans lmss \font_typewriter lmtt \font_math auto \font_default_family default \use_non_tex_fonts false \font_sc false \font_osf false \font_sf_scale 100 \font_tt_scale 100 \graphics default \default_output_format default \output_sync 0 \bibtex_command default \index_command default \paperfontsize default \spacing single \use_hyperref false \papersize default \use_geometry true \use_package amsmath 1 \use_package amssymb 1 \use_package cancel 1 \use_package esint 2 \use_package mathdots 1 \use_package mathtools 1 \use_package mhchem 1 \use_package stackrel 1 \use_package stmaryrd 1 \use_package undertilde 1 \cite_engine basic \cite_engine_type default \biblio_style plain \use_bibtopic false \use_indices false \paperorientation portrait \suppress_date false \justification true \use_refstyle 0 \boxbg_o dadate false/ffaa7fommand Iand s_dhsupcut id s_ false/0080ics ble iand s_lef \us de 4cm \righ \us de 3.5cm \secnumdep_packatocdep_pa1ientradefau_sentra \useiandntientradefau_iandnta \usebiblio_stquotes_english \language_ntati faumnsa1ientefauld\pa2ientefapsh boxbg_biblio_stpprcke_h fangl\paperorienc 0 \bfangl\paperorieh \lo \foormat d_o dh \localsas_ mor_o dh \lobeainrictaperorieble extclasreamble bodysreamble layrma Stlt ard A quick browlanox jumps ovfonthe laz \uog.ieble layrmaeamble bodysmble \begin_he #LyX 2.2 created this file. For more info see http://www.lyx.org/ \lyxformat 508 \begin_document \begin_header \save_transient_properties true \origin unavailable \textclass book \begin_preamble \end_preamble \use_default_options false \maintain_unincluded_children false \language english \language_package default \inputencoding auto \fontencoding global \font_roman "lmodern" "default" \font_sans "lmss" "default" \font_typewriter "lmtt" "default" \font_math "auto" "auto" \font_default_family default \use_non_tex_fonts false \font_sc false \font_osf false \font_sf_scale 100 100 \font_tt_scale 100 100 \graphics default \default_output_format default \output_sync 0 \bibtex_command default \index_command default \paperfontsize default \spacing single \use_hyperref false \papersize default \use_geometry true \use_package amsmath 1 \use_package amssymb 1 \use_package cancel 1 \use_package esint 2 \use_package mathdots 1 \use_package mathtools 1 \use_package mhchem 1 \use_package stackrel 1 \use_package stmaryrd 1 \use_package undertilde 1 \cite_engine basic \cite_engine_type default \biblio_style plain \use_bibtopic false \use_indices false \paperorientation portrait \suppress_date false \justification true \use_refstyle 0 \boxbgcolor #ffaa7f \index Index \shortcut idx \color #008000 \end_index \leftmargin 4cm \rightmargin 3.5cm \secnumdepth 2 \tocdepth 1 \paragraph_separation indent \paragraph_indentation default \quotes_language english \papercolumns 1 \papersides 2 \paperpagestyle default \tracking_changes false \output_changes false \html_math_output 0 \html_css_as_file 0 \html_be_strict false \end_header \begin_body \begin_layout Standard A quick brown fox jumps over the lazy dog. \end_layout \end_body \end_document test.21.lyx Description: application/lyx test.lyx Description: application/lyx
Re: Exporting compressed files
On Tuesday, July 5, 2016 10:36:51 PM WEST Andrew Parsloe wrote: > The problem is just with compressed files. Uncompressed they export > fine, and can be read in 2.1.5. With the compressed file when I try to > open it in 2.1.5 I get the message: ".21.lyx is not a > readable LyX document." Perhaps this is a Windows only problem? Could you, please, test the following (independent) tests: 1) take the compressed ".21.lyx" created with 2.2 use an external program to decompress that file and see if lyx 2.1 opens that file? 2) use lyx 2.1 to create a compressed file, save it, close lyx and try to open it again with lyx 2.1 Regards, -- José Abílio
Re: Exporting compressed files
On 5/07/2016 8:40 p.m., José Abílio Matos wrote: On Saturday, May 28, 2016 3:00:09 PM WEST Andrew Parsloe wrote: I inadvertently tried exporting a compressed 2.2 file to 2.1.4. It was not recognised by 2.1.4. When I try exporting an empty 2.2 compressed file, it too isn't recognized by 2.1.4, so clearly this is not an allowed mode of export. However I can't see anything saying that this won't work in the documentation, and I wonder if it *should* be possible -- uncompress in the background and then export that? (I have a number of older files saved in compressed format which I'm looking at in 2.2 and saving, but also exporting to 2.1 format to retain a copy I can work on in 2.1.4.) Andrew Hi Andrew, are you having problems just with compressed files or with any type of files? I ask this because I tried several examples here and it worked. So I am not able to replicate your findings. :-( Could you try to uncompress the files firt and the export to 2.1.x and see if the problem persists? A priori there is no reason for this not to work. Regards, The problem is just with compressed files. Uncompressed they export fine, and can be read in 2.1.5. With the compressed file when I try to open it in 2.1.5 I get the message: ".21.lyx is not a readable LyX document." Perhaps this is a Windows only problem? --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
Re: Exporting compressed files
On Saturday, May 28, 2016 3:00:09 PM WEST Andrew Parsloe wrote: > I inadvertently tried exporting a compressed 2.2 file to 2.1.4. It was > not recognised by 2.1.4. When I try exporting an empty 2.2 compressed > file, it too isn't recognized by 2.1.4, so clearly this is not an > allowed mode of export. However I can't see anything saying that this > won't work in the documentation, and I wonder if it *should* be possible > -- uncompress in the background and then export that? (I have a number > of older files saved in compressed format which I'm looking at in 2.2 > and saving, but also exporting to 2.1 format to retain a copy I can work > on in 2.1.4.) > > Andrew Hi Andrew, are you having problems just with compressed files or with any type of files? I ask this because I tried several examples here and it worked. So I am not able to replicate your findings. :-( Could you try to uncompress the files firt and the export to 2.1.x and see if the problem persists? A priori there is no reason for this not to work. Regards, -- José Abílio
Re: Exporting compressed files
On Tue, Jul 05, 2016 at 10:12:52AM +1200, Andrew Parsloe wrote: > > > On 4/07/2016 10:52 a.m., Scott Kostyshak wrote: > > On Sat, May 28, 2016 at 03:00:09PM +1200, Andrew Parsloe wrote: > > > I inadvertently tried exporting a compressed 2.2 file to 2.1.4. It was not > > > recognised by 2.1.4. When I try exporting an empty 2.2 compressed file, it > > > too isn't recognized by 2.1.4, so clearly this is not an allowed mode of > > > export. However I can't see anything saying that this won't work in the > > > documentation, and I wonder if it *should* be possible -- uncompress in > > > the > > > background and then export that? (I have a number of older files saved in > > > compressed format which I'm looking at in 2.2 and saving, but also > > > exporting > > > to 2.1 format to retain a copy I can work on in 2.1.4.) > > > > > > Andrew > > > > Can you make a bug report about this, Andrew, so we don't forget? > > > > Scott > > > http://www.lyx.org/trac/ticket/10273 Thanks. > I wasn't sure of the component. File? Or is it lyx2lyx? Good question. I think either would be fine. I don't actually know what File is meant for. I would go for lyx2lyx. Scott signature.asc Description: PGP signature
Re: Exporting compressed files
On 4/07/2016 10:52 a.m., Scott Kostyshak wrote: On Sat, May 28, 2016 at 03:00:09PM +1200, Andrew Parsloe wrote: I inadvertently tried exporting a compressed 2.2 file to 2.1.4. It was not recognised by 2.1.4. When I try exporting an empty 2.2 compressed file, it too isn't recognized by 2.1.4, so clearly this is not an allowed mode of export. However I can't see anything saying that this won't work in the documentation, and I wonder if it *should* be possible -- uncompress in the background and then export that? (I have a number of older files saved in compressed format which I'm looking at in 2.2 and saving, but also exporting to 2.1 format to retain a copy I can work on in 2.1.4.) Andrew Can you make a bug report about this, Andrew, so we don't forget? Scott http://www.lyx.org/trac/ticket/10273 I wasn't sure of the component. File? Or is it lyx2lyx? Andrew --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
Re: Exporting compressed files
On Sat, May 28, 2016 at 03:00:09PM +1200, Andrew Parsloe wrote: > I inadvertently tried exporting a compressed 2.2 file to 2.1.4. It was not > recognised by 2.1.4. When I try exporting an empty 2.2 compressed file, it > too isn't recognized by 2.1.4, so clearly this is not an allowed mode of > export. However I can't see anything saying that this won't work in the > documentation, and I wonder if it *should* be possible -- uncompress in the > background and then export that? (I have a number of older files saved in > compressed format which I'm looking at in 2.2 and saving, but also exporting > to 2.1 format to retain a copy I can work on in 2.1.4.) > > Andrew Can you make a bug report about this, Andrew, so we don't forget? Scott signature.asc Description: PGP signature
Exporting compressed files
I inadvertently tried exporting a compressed 2.2 file to 2.1.4. It was not recognised by 2.1.4. When I try exporting an empty 2.2 compressed file, it too isn't recognized by 2.1.4, so clearly this is not an allowed mode of export. However I can't see anything saying that this won't work in the documentation, and I wonder if it *should* be possible -- uncompress in the background and then export that? (I have a number of older files saved in compressed format which I'm looking at in 2.2 and saving, but also exporting to 2.1 format to retain a copy I can work on in 2.1.4.) Andrew --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus