LyX 2.2 cannot read a document from LyX 2.1?

2017-03-06 Thread Enrico Forestieri
Matěj Cepl wrote:
> Yes, this is not a minimal example, but I am hesitant to touch this
> document from LyX 2.1 so that I wouldn’t accidentally fixed it. When
> trying to open it with lyx-2.2.2-1.fc25.x86_64 I get this:
>
> matej@mitmanek: marketa$ lyx Ph.D.project-Brno1.lyx
> Error: Document format failure
> 
> /tmp/lyx_tmpdir.CLmZrzV11492/Buffer_convertLyXFormatk11492.lyx is not a
> readable LyX document.
> matej@mitmanek: marketa$
>
> Any ideas, what's wrong?

Your .lyx file starts with a byte order mark U+FEFF and lyx2lyx doesn't
expect it.
Use a binary editor to get rid of it. Alternatively, load it with lyx
2.2 and wait
for the failure. Then edit the problematic converted file (it would be
/tmp/lyx_tmpdir.CLmZrzV11492/Buffer_convertLyXFormatk11492.lyx
in your previous attempt) with a text editor, delete the *second* line and
save it with a new name. You should now be able to load it with lyx 2.2.


Re: LyX 2.2 cannot read a document from LyX 2.1?

2017-03-06 Thread Kornel Benko
Am Montag, 6. März 2017 um 13:13:58, schrieb Matěj Cepl 
> Yes, this is not a minimal example, but I am hesitant to touch this
> document from LyX 2.1 so that I wouldn’t accidentally fixed it. When
> trying to open it with lyx-2.2.2-1.fc25.x86_64 I get this:
>
> matej@mitmanek: marketa$ lyx Ph.D.project-Brno1.lyx
> Error: Document format failure
> 
> /tmp/lyx_tmpdir.CLmZrzV11492/Buffer_convertLyXFormatk11492.lyx is not a
> readable LyX document.
> matej@mitmanek: marketa$
>
> Any ideas, what's wrong?
>
> Best,
>
> Matěj
>

The document language is English. But there are 4 entries in the document
stating '\lang english'.

Removing this 4 lines, the document is readable.

OTOH, reading directly with lyx2.1, there is no problem.

For me it looks like lyx-deficiency.

Kornel

Ph.D.project-Brno1.lyx
Description: application/lyx


signature.asc
Description: This is a digitally signed message part.


LyX 2.2 cannot read a document from LyX 2.1?

2017-03-06 Thread Matěj Cepl
Yes, this is not a minimal example, but I am hesitant to touch this
document from LyX 2.1 so that I wouldn’t accidentally fixed it. When
trying to open it with lyx-2.2.2-1.fc25.x86_64 I get this:

matej@mitmanek: marketa$ lyx Ph.D.project-Brno1.lyx
Error: Document format failure

/tmp/lyx_tmpdir.CLmZrzV11492/Buffer_convertLyXFormatk11492.lyx is not a
readable LyX document.
matej@mitmanek: marketa$

Any ideas, what's wrong?

Best,

Matěj

-- 
https://matej.ceplovi.cz/blog/, Jabber: mc...@ceplovi.cz
GPG Finger: 3C76 A027 CA45 AD70 98B5  BC1D 7920 5802 880B C9D8

“I have read St. Paul’s epistle on charity,” he said, “and, after
long reflection, I am persuaded that there exists a greater thing
than charity—a thing of more value to the human family. Like
charity, it rejoiceth not in iniquity, but it does not bear all
things or believe all things, or endure all things; and, unlike
charity, it seeketh its own … Do you know what thing I mean,
Smallwood? I will tell you. It is Justice.”
  -- Uncle Abner in “The House of the Dead Man”
 by Melville Davisson Post
0_2DS96JRI 0_9RRJI5RJ 0_S69C7NHU 0_ZI9N3WDD 0_ZU58CZ5J

@book{kolektivpracovnikrulingeas.r.o.gramatika,
	title = {Gramatika sou{\v c}asn{\'e} {\v c}e{\v s}tiny {\textbar} {Lingea} s.r.o.},
	url = {https://www.lingea.cz/ceska-gramatika.html},
	urldate = {2017-03-03},
	author = {kolektiv pracovn{\'i}k{\r u} Lingea s.r.o.},
	file = {Gramatika sou{\v c}asn{\'e} {\v c}e{\v s}tiny | Lingea s.r.o.:/home/marketa/.mozilla/firefox/1oo173o1.test/zotero/storage/U66I7NWT/ceska-gramatika.html:text/html}
}
@misc{infinitiv,
	title = {{INFINITIV} {\textbar} {Nov{\'y}} encyklopedick{\'y} slovn{\'i}k {\v c}e{\v s}tiny},
	shorttitle = {{NES{\v C}}/{Infinitiv}},
	url = {https://www.czechency.org/slovnik/INFINITIV},
	urldate = {2017-03-03},
	journal = {Nov{\'y} encyklopedick{\'y} slovn{\'i}k {\v c}e{\v s}tiny/Infinitiv},
	file = {INFINITIV | Nov{\'y} encyklopedick{\'y} slovn{\'i}k {\v c}e{\v s}tiny:/home/marketa/.mozilla/firefox/1oo173o1.test/zotero/storage/9ZIQ9DFG/INFINITIV.html:text/html}
}
@book{pravdova2014akademicka,
	address = {Praha},
	edition = {Lingvistika},
	title = {Akademick{\'a} p{\v r}{\'i}ru{\v c}ka {\v c}esk{\'e}ho jazyka},
	isbn = {978-80-200-2327-8},
	url = {http://academia.cz/img/knihy/obalky1/lrg/akademicka-prirucka-ceskeho-jazyka.jpg},
	abstract = {Internetovou jazykovou p{\v r}{\'i}ru{\v c}ku kolektivu autor{\r u} {\'U}stavu pro jazyk {\v c}esk{\'y} AV {\v C}R vyu{\v z}ilo b{\v e}hem prvn{\'i}ch t{\v r}{\'i} let od jej{\'i}ho zp{\v r}{\'i}stupn{\v e}n{\'i} v{\'i}ce ne{\v z} milion u{\v z}ivatel{\r u}. Jej{\'i} v{\'y}kladov{\'a} {\v c}{\'a}st nyn{\'i} vych{\'a}z{\'i} poprv{\'e} kni{\v z}n{\v e}. Najdete zde obecn{\'a} pou{\v c}en{\'i} o {\v c}esk{\'e}m jazyce, zejm{\'e}na o pravopisu, tvaroslov{\'i} a n{\v e}kter{\'y}ch syntaktick{\'y}ch jevech. Ve v{\'y}kladech se uv{\'a}d{\v e}j{\'i} i rozpory v {\'u}daj{\'i}ch, kter{\'e} jednotliv{\'e} jazykov{\'e} p{\v r}{\'i}ru{\v c}ky p{\v r}in{\'a}{\v s}ej{\'i}, nebo rozd{\'i}ly mezi kodifikac{\'i} a spisovn{\'y}m {\'u}zem, a to s hodnot{\'i}c{\'i}m koment{\'a}{\v r}em a doporu{\v c}en{\'y}m {\v r}e{\v s}en{\'i}m. Kniha je ur{\v c}ena jak {\v s}irok{\'e} ve{\v r}ejnosti, tak profesion{\'a}ln{\'i}m u{\v z}ivatel{\r u}m, zvl{\'a}{\v s}t{\v e} u{\v c}itel{\r u}m a student{\r u}m.},
	language = {{\v c}esky},
	urldate = {2017-03-03},
	publisher = {Academia},
	editor = {Pravdov{\'a}, Mark{\'e}ta and Svobodov{\'a}, Ivana},
	year = {2014},
	file = {Snapshot:/home/marketa/.mozilla/firefox/1oo173o1.test/zotero/storage/66V892C8/akademicka-prirucka-ceskeho-jazyka.html:text/html}
}
@book{vcechova1996vcev,
	address = {Praha},
	title = {{\v C}e{\v s}tina - {\v r}e{\v c} a jazyk},
	isbn = {978-80-85866-12-4},
	language = {Czech},
	publisher = {ISV nakladatelstv{\'i}},
	author = {{\v C}echov{\'a}, Marie and Hlavsa, Zden{\v e}k and Dokulil, Milo{\v s} and Hru{\v s}kov{\'a}, Zde{\v n}ka and Hrb{\'a}{\v c}ek, Josef},
	year = {1996},
	note = {OCLC: 440808461}
}
@misc{novyencyklopedicky,
	title = {Nov{\'y} encyklopedick{\'y} slovn{\'i}k {\v c}e{\v s}tiny},
	url = {https://www.czechency.org/slovnik/},
	urldate = {2017-03-03},
	file = {Nov{\'y} encyklopedick{\'y} slovn{\'i}k {\v c}e{\v s}tiny:/home/marketa/.mozilla/firefox/1oo173o1.test/zotero/storage/KCZ28RJ3/slovnik.html:text/html}
}

Ph.D.project-Brno1.lyx
Description: application/lyx


signature.asc
Description: OpenPGP digital signature