Re: export test failures 2

2015-11-19 Thread Guenter Milde
On 2015-11-19, Kornel Benko wrote:

> [-- Type: text/plain, Encoding: quoted-printable --]

> Am 19. November 2015 um 01:37:11, schrieb Kornel Benko 
> ...

> Now 57 failed left

> 669:export/doc/de/UserGuide_pdf3

Exports without problme to pdf3   pdf"PDF (dvipdfm)"
here. Try export "per-hand" and check the eventual errors.
Look for missing packages and/or special casing in the export machinery that
stands in the way...

...

> 1897:export/examples/seminar_pdf2
> 1898:export/examples/seminar_pdf3
> 1899:export/examples/seminar_pdf4_texF
> 1902:export/examples/seminar_pdf5_systemF

Here, examples/seminar.lyx 

* exports fine to ps, pdf, pdf3, pdf4_texF

Other formats should be *ignored*: 

  * seminar uses Postscript specials and does not work with PDF (pdflatex).

  * Landscape slides do not work with DVI.

Export to certain formats cannot be excluded from a module currently,
but even if they don't report an error, other formats result in corrupt
output documents (missing landscape slides).

The same applies for every translation of seminar.lyx, e.g.

> 2955:export/examples/fr/seminar_dvi
> 2958:export/examples/fr/seminar_pdf
> 2959:export/examples/fr/seminar_pdf2
> 2960:export/examples/fr/seminar_pdf3
> 2961:export/examples/fr/seminar_pdf4_texF
> 2964:export/examples/fr/seminar_pdf5_systemF

-> add a regexp for optional language-dir in the "ignore" rules!


> 2548:export/examples/de/PDF-comment_dvi3_texF
> 2549:export/examples/de/PDF-comment_dvi3_systemF
> 2899:export/examples/fr/PDF-comment_dvi3_texF
> 2900:export/examples/fr/PDF-comment_dvi3_systemF

PDF comments in DVI? No wonder we have:

  ! Package zref Error: \pdfsavepos is not supported in DVI mode

-> invert


> 2555:export/examples/de/PDF-comment_pdf5_texF
> 2906:export/examples/fr/PDF-comment_pdf5_texF

chemgreek package problem.

-> Add to the other documents inverted for using chemgreek.
   (check other translations)


> 2725:export/examples/es/europeCV_dvi3_texF
> 2732:export/examples/es/europeCV_pdf5_texF
> 2749:export/examples/es/modernCV_dvi3_texF
> 2756:export/examples/es/modernCV_pdf5_texF
> 2742:export/examples/es/linguistics_pdf4_texF

Just like the Spanisch documentation, utf8 literals in Babel's auto-strings
with Xe/LuaTeX.

-> invert all Spanish documents with these export settings
   (doc/, examples/, templates/).

> 2726:export/examples/es/europeCV_dvi3_systemF
> 2733:export/examples/es/europeCV_pdf5_systemF
> 2750:export/examples/es/modernCV_dvi3_systemF
> 2757:export/examples/es/modernCV_pdf5_systemF

  Missing character: There is no 砋 (U+780B) in font "file:lmroman10-regular:scri
  pt=latn;+trep;+tlig;"!

Character '砋' (30731, 0x780B) is not in my list of known Unicode points,
don't know where it comes from. On first inspection, the output looks OK.

Invert for now, explore later.

...


Hope this helps,

Günter



Re: export test failures 2

2015-11-19 Thread Guenter Milde
On 2015-11-19, Kornel Benko wrote:

> [-- Type: text/plain, Encoding: quoted-printable --]

> Am Donnerstag, 19. November 2015 um 09:17:44, schrieb Guenter Milde 
> 

> ...

>> Hope this helps,

>> Günter

> Yes, it does. 31 left.
> For now I suspended immediate committing in happy expectation of next advices 
> :)

>   Kornel
> [-- Skipped Type: application/pgp-signature, Filename: signature.asc --]
> [-- Type: text/plain, Encoding: 7bit, Filename: LastExportTestsFailed.log.1 
> --]

> 1621:export/examples/achemso_dvi3_texF
> 1628:export/examples/achemso_pdf5_texF

We had these already:

On 2015-11-19, Kornel Benko wrote:
>> 1621:export/examples/achemso_dvi3_texF
>> 1628:export/examples/achemso_pdf5_texF

>> chemgreek incompatible with LuaTeX (cf. Math.lyx)
>> invert for now.

> Done

>> ...



> 1726:export/examples/europeCV_dvi3_texF
> 1733:export/examples/europeCV_pdf5_texF

> 1840:export/examples/modernCV_dvi3_texF
> 1845:export/examples/modernCV_pdf4_texF
> 1847:export/examples/modernCV_pdf5_texF

Just like the Spanish ones:

  Missing character: There is no 砋 (U+780B) in font "file:lmroman10-regular:scr
  pt=latn;+trep;+tlig;"!

Character '砋' (30731, 0x780B) is not in my list of known Unicode points,
don't know where it comes from. On first inspection, the output looks OK.

> 1727:export/examples/europeCV_dvi3_systemF
> 1734:export/examples/europeCV_pdf5_systemF
> 1841:export/examples/modernCV_dvi3_systemF
> 1846:export/examples/modernCV_pdf4_systemF
> 1848:export/examples/modernCV_pdf5_systemF

Missing character: There is no 怭 (U+602D) in font rm-lmr12!

This is not a regression but surfacing of a hidden failure.
I believe that this is an encoding problem.

Invert for now, explore later. (Maybe file a bug report.)
  
(As there are only English and Spanish versions of the CV examples, one
regexp should suffice to catch all of them...)


> 1808:export/examples/linguistics_dvi3_systemF
> 1813:export/examples/linguistics_pdf4_systemF
> 1815:export/examples/linguistics_pdf5_systemF

I don't have covington.sty, do you?


> 2814:export/examples/fa/splash_dvi
> 2817:export/examples/fa/splash_pdf
> 2818:export/examples/fa/splash_pdf2
> 2819:export/examples/fa/splash_pdf3
> 2820:export/examples/fa/splash_pdf4_texF
> 2821:export/examples/fa/splash_pdf4_systemF

Do you have support for Persian installed?

Here, I get:

! Package fontenc Error: Encoding file `lfeenc.def' not found.

and a lot of follow up errors.


Whether you consider
  texlive-lang-arabic: /usr/share/texlive/texmf-dist/tex/latex/arabi/lfeenc.def
to be "nonstandard" is up to you...

> 2821:export/examples/fa/splash_pdf4_systemF

expects the bidi.sty package which I don't have...
Don't know what happens with this package.


BTW: Exporting fa/splash.lyx with LuaTeX and DroidArab fonts fails with

! Undefined control sequence.
\farsinumber ...er #1\else \ifnum \XeTeXcharglyph 

Seems like some XeTeX-special character setup in Polyglossia's Farsi support.

invert (or is this already inverted or works at your place?)



> 2871:export/examples/fr/Foils_pdf5_systemF

Look self, I don't have the foils.cls LaTeX documentclass installed.


> 1863:export/examples/powerdot-example_pdf
> 2910:export/examples/fr/exemple-powerdot_pdf

! Package hyperref Error: Wrong DVI mode driver option `dvips',
(hyperref)because pdfTeX or LuaTeX is running in PDF mode.

However, this "hardcoded" setting seems the right thing, as according to
this stackexchange answer
http://tex.stackexchange.com/questions/15633/use-of-pdflatex-with-powerdot

  it is not possible to run powerdot with pdflatex and also not with
  xelatex, it is completely based on PSTricks.
  
-> *Ignore* export of powerdot examples to pdflatex, xetex and lualatex.


> 3072:export/examples/he/splash_pdf5_systemF

False positive: if the font is e.g. set to 
LinuxLibertine and LinuxBiolinum, there are no missing characters but
polyglossia anyway throws the error:

 ! Package polyglossia Error: The current roman font does not contain the
 Hebrew script!

We had already discussed changing this into a warning, as the test for
missing characters implemented in 2.2 is more accurate.

invert for now.

> 3247:export/examples/ko/splash_dvi3_texF
> 3252:export/examples/ko/splash_pdf4_texF
> 3254:export/examples/ko/splash_pdf5_texF

Can't tell, I don't have Korean language support here, nor a suitable font
(black squares on the LyX-screen).


> 3500:export/templates/AGUTeX_dvi3_systemF
> 3505:export/templates/AGUTeX_pdf4_systemF
> 3507:export/templates/AGUTeX_pdf5_systemF

Do you have agutex.cls? 

According to http://wiki.lyx.org/Examples/AGUTeX
it is nonstandard. I don't have it.


This is all I can tell.


Günter



Re: Installation of Lyx without admin

2015-11-19 Thread Uwe Stöhr

Am 18.11.2015 um 17:55 schrieb Weijie Chen:


Hi, is it possible that Lyx be installed on Windows without the admin 
privileges?


It is possible to install LyX with only user privileges. This is 
possible for several years so you should be able to install also the old 
LyX 2.0.x that way.



I don't see such an installer right now


Just use the latest LyX 2.1.4 for Windows installer you find at 
www.lyx.org. What does not work for you?


regards Uwe


Re: [LyX/master] Cmake export tests: List of inverted tests is expanding

2015-11-19 Thread Uwe Stöhr

Am 19.11.2015 um 03:00 schrieb Kornel Benko:


commit ee72677fded357755c76e20a6adb256962d50445

>

+# Non-ASCII in ERT
+export/doc/fr/Additional_pdf4_texF


This should now work.


+# lmodern.sty? + maybe more
+export/doc/fr/(Additional_pdf5|Customization_pdf5|EmbeddedObjects_pdf4|UserGuide_pdf5)_systemF


Additional_pdf5, Customization_pdf5 and UserGuide_pdf5 work for me. 
EmbeddedObjects_pdf4 works here too.



+# chemgreek incompatible with LuaTeX (cf. Math.lyx)
+# for now inverted
+export/doc/sk/Intro_pdf5_systemF
+export/examples/PDF-comment_pdf5_texF
+export/examples/aas_sample_(dvi3|pdf5)_(texF|systemF)


sk/Intro_pdf5 works here.

I am using
LuaTeX, Version beta-0.80.
and
XeTeX, Version 3.14159265-2.6-0.2

regards Uwe


Re: [LyX/master] Cmake export tests: List of inverted tests is expanding

2015-11-19 Thread Uwe Stöhr

Another issue in revertedTests:

108 # Gives the following error:
109 # # ! Package hpstatement Error: H or P statement "H251"
110 # # (hpstatement)is not defined.
111 # 1580:export/examples/H-P-statements_pdf5_systemF
112 export/examples/H-P-statements_pdf[45]_systemF

I cannot reproduce this, I have hpstatement 2013/07/02 v1.01 and both
H-P-statements_pdf4 and H-P-statements_pdf5 works here.

regards Uwe


Re: mhchem and Xe/LuaTeX problems

2015-11-19 Thread Uwe Stöhr

Am 29.10.2015 um 17:15 schrieb Guenter Milde:


documents that use the mhchem package (which is automatically loaded if
required, by default) fail to compile with XeTeX or LuaTeX and TeX fonts.


I think you discovered a bug in LyX:
We automatically load inputenc:

\usepackage[latin9]{inputenc}

But inputenc must not be used for XeTeX.

So this file becomes uncompilable when uncommenting the inputenc line:

\documentclass[english]{article}
\usepackage[T1]{fontenc}
%\usepackage[latin9]{inputenc}
\PassOptionsToPackage{version=3}{mhchem}
\usepackage{mhchem}
\usepackage{babel}
\begin{document}
test: $\ce{H2SO4}$
\end{document}

I get then this error message:

! Package inputenc Error: inputenc is not designed for xetex or luatex.
(inputenc)only UTF-8 supported.
See the inputenc package documentation for explanation.
Type  H   for immediate help.

mhchem is not to blame here.

regards Uwe


Re: [LyX/master] Cmake export tests: List of inverted tests is expanding

2015-11-19 Thread Scott Kostyshak
On Fri, Nov 20, 2015 at 01:19:24AM +0100, Uwe Stöhr wrote:
> Another issue in revertedTests:
> 
> 108 # Gives the following error:
> 109   # # ! Package hpstatement Error: H or P statement "H251"
> 110   # # (hpstatement)is not defined.
> 111   # 1580:export/examples/H-P-statements_pdf5_systemF
> 112   export/examples/H-P-statements_pdf[45]_systemF
> 
> I cannot reproduce this, I have hpstatement 2013/07/02 v1.01 and both
> H-P-statements_pdf4 and H-P-statements_pdf5 works here.

For both TeX fonts and system fonts? For me they only compile with TeX
fonts.

If they compile with system fonts, then we should compare logs to figure
out what is different among our systems.

Scott


signature.asc
Description: PGP signature


Re: export test failures 2

2015-11-19 Thread Kornel Benko
Am Donnerstag, 19. November 2015 um 21:31:20, schrieb Guenter Milde 

> On 2015-11-19, Kornel Benko wrote:
> 

> 
> > 1726:export/examples/europeCV_dvi3_texF
> > 1733:export/examples/europeCV_pdf5_texF
> 
> > 1840:export/examples/modernCV_dvi3_texF
> > 1845:export/examples/modernCV_pdf4_texF
> > 1847:export/examples/modernCV_pdf5_texF
> 
> Just like the Spanish ones:
> 
>   Missing character: There is no 砋 (U+780B) in font 
> "file:lmroman10-regular:scr
>   pt=latn;+trep;+tlig;"!
> 
> Character '砋' (30731, 0x780B) is not in my list of known Unicode points,
> don't know where it comes from. On first inspection, the output looks OK.
> 
> > 1727:export/examples/europeCV_dvi3_systemF
> > 1734:export/examples/europeCV_pdf5_systemF
> > 1841:export/examples/modernCV_dvi3_systemF
> > 1846:export/examples/modernCV_pdf4_systemF
> > 1848:export/examples/modernCV_pdf5_systemF
> 
> Missing character: There is no 怭 (U+602D) in font rm-lmr12!
> 
> This is not a regression but surfacing of a hidden failure.
> I believe that this is an encoding problem.
> 
> Invert for now, explore later. (Maybe file a bug report.)
>   
> (As there are only English and Spanish versions of the CV examples, one
> regexp should suffice to catch all of them...)
> 
> 
> > 1808:export/examples/linguistics_dvi3_systemF
> > 1813:export/examples/linguistics_pdf4_systemF
> > 1815:export/examples/linguistics_pdf5_systemF
> 
> I don't have covington.sty, do you?

I have, part of TL2015 (but I see it also in 2013)
Package name covington, version 34064, linguistic support.

I will invert these for now.

> > 2814:export/examples/fa/splash_dvi
> > 2817:export/examples/fa/splash_pdf
> > 2818:export/examples/fa/splash_pdf2
> > 2819:export/examples/fa/splash_pdf3
> > 2820:export/examples/fa/splash_pdf4_texF
> > 2821:export/examples/fa/splash_pdf4_systemF
> 
> Do you have support for Persian installed?
> 
> Here, I get:
> 
> ! Package fontenc Error: Encoding file `lfeenc.def' not found.

Probably not. What I have is arabi/lfeenc.def, which apparently does not apply 
here.
Moving to nonstandard.

> and a lot of follow up errors.
> 
> 
> Whether you consider
>   texlive-lang-arabic: 
> /usr/share/texlive/texmf-dist/tex/latex/arabi/lfeenc.def
> to be "nonstandard" is up to you...
> 
> > 2821:export/examples/fa/splash_pdf4_systemF
> 
> expects the bidi.sty package which I don't have...
> Don't know what happens with this package.
> 

I have.

> BTW: Exporting fa/splash.lyx with LuaTeX and DroidArab fonts fails with
> 
> ! Undefined control sequence.
> \farsinumber ...er #1\else \ifnum \XeTeXcharglyph 
> 
> Seems like some XeTeX-special character setup in Polyglossia's Farsi support.
> 
> invert (or is this already inverted or works at your place?)
> 
> 
> 
> > 2871:export/examples/fr/Foils_pdf5_systemF
> 
> Look self, I don't have the foils.cls LaTeX documentclass installed.
> 
I have, but outside of TL.
It compiles, if I set also
\font_math "auto" "default"
instead of
\font_math "auto" "auto"

Unfortunately this does not work on all documents. For e.g. doc/de/UserGuide.lyx
it has to be '\font_math "auto" "auto"' otherwise I get Missing glyphs if 
testing pdf5_systemF.

> > 1863:export/examples/powerdot-example_pdf
> > 2910:export/examples/fr/exemple-powerdot_pdf
> 
> ! Package hyperref Error: Wrong DVI mode driver option `dvips',
> (hyperref)because pdfTeX or LuaTeX is running in PDF mode.
> 
> However, this "hardcoded" setting seems the right thing, as according to
> this stackexchange answer
> http://tex.stackexchange.com/questions/15633/use-of-pdflatex-with-powerdot
> 
>   it is not possible to run powerdot with pdflatex and also not with
>   xelatex, it is completely based on PSTricks.
>   
> -> *Ignore* export of powerdot examples to pdflatex, xetex and lualatex.
> 
> 
> > 3072:export/examples/he/splash_pdf5_systemF
> 
> False positive: if the font is e.g. set to 
> LinuxLibertine and LinuxBiolinum, there are no missing characters but
> polyglossia anyway throws the error:
> 
>  ! Package polyglossia Error: The current roman font does not contain the
>  Hebrew script!
> 
> We had already discussed changing this into a warning, as the test for
> missing characters implemented in 2.2 is more accurate.
> 
> invert for now.

OK

> > 3247:export/examples/ko/splash_dvi3_texF
> > 3252:export/examples/ko/splash_pdf4_texF
> > 3254:export/examples/ko/splash_pdf5_texF
> 
> Can't tell, I don't have Korean language support here, nor a suitable font
> (black squares on the LyX-screen).
> 
> 
> > 3500:export/templates/AGUTeX_dvi3_systemF
> > 3505:export/templates/AGUTeX_pdf4_systemF
> > 3507:export/templates/AGUTeX_pdf5_systemF
> 
> Do you have agutex.cls? 

Yes. And with the previous modification they also compile.

> According to http://wiki.lyx.org/Examples/AGUTeX
> it is nonstandard. I don't have it.
> 
> 
> This is all I can tell.
> 
> Günter

ATM 13 tests failed.

Kornel

signature.asc
Description: This is 

Re: export test failures 2

2015-11-19 Thread Guenter Milde
Dear Kornel,


>> 1896:export/examples/seminar_pdf

>> Works here.

> Moved to nonstandardTests

Why? It is on CTAN and in TeXLive and MikTeX and also has found a new
maintainer, see http://www.ctan.org/pkg/seminar.


On 2015-11-19, Kornel Benko wrote:

>> > Here, examples/seminar.lyx
>> > 
>> > * exports fine to ps, pdf, pdf3, pdf4_texF
> I get Missing glyphs for pdf4_texF (displaying, not exporting)
>   
> /usr9/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex
>   Missing character: There is no 0 in font nullfont!
>   Missing character: There is no . in font nullfont!
>   Missing character: There is no 0 in font nullfont!
>   Missing character: There is no p in font nullfont! 
> The font is 'Latin Modern'

Hm, the missing characters are in "nullfont".

> Changing to e.g. 'TeX Gyre' does not help.

No wonder: if the font "nullfont" misses characters. It seems your
installation misses a font for pgf and this is substituted by a nullfont.
Unfortunately, I cannot investigate and cannot tell you more.

The other "good" export routes work? 

I am actually surprised that XeTeX works. (While LuaTeX does not give
sensible results. Seems to be inherited from pdflatex which also fails to
produce landscape slides.)

Ignoring the "faulty" export formats is important, so that we don't get
false "regressions" when one day export to these formats is prevented.

Thanks, 
Günter



Re: export test failures 2

2015-11-19 Thread Kornel Benko
Am Donnerstag, 19. November 2015 um 20:49:57, schrieb Guenter Milde 

> Dear Kornel,
> 
> 
> >> 1896:export/examples/seminar_pdf
> 
> >> Works here.
> 
> > Moved to nonstandardTests
> 
> Why? It is on CTAN and in TeXLive and MikTeX and also has found a new
> maintainer, see http://www.ctan.org/pkg/seminar.
> 

Because it does not work here. And I am pretty sure to have the newest TL15 
installed.

If something never works -> ignore
if it works, depending on Moon -> nonstandardTests
if everywhere not working, but known reason -> reverted
if not working because of latex <-> font kombination -> suspended

> On 2015-11-19, Kornel Benko wrote:
> 
> >> > Here, examples/seminar.lyx
> >> > 
> >> > * exports fine to ps, pdf, pdf3, pdf4_texF
> > I get Missing glyphs for pdf4_texF (displaying, not exporting)
> > 
> > /usr9/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex
> > Missing character: There is no 0 in font nullfont!
> > Missing character: There is no . in font nullfont!
> > Missing character: There is no 0 in font nullfont!
> > Missing character: There is no p in font nullfont! 
> > The font is 'Latin Modern'
> 
> Hm, the missing characters are in "nullfont".
> 
> > Changing to e.g. 'TeX Gyre' does not help.
> 
> No wonder: if the font "nullfont" misses characters. It seems your
> installation misses a font for pgf and this is substituted by a nullfont.
> Unfortunately, I cannot investigate and cannot tell you more.

I have everything installed tlmgr can supply.

> The other "good" export routes work? 

#ctest -R examples/seminar
gives:
The following tests FAILED:
2190 - NON_STANDARD.export/examples/seminar_pdf (Failed)
2191 - NON_STANDARD.export/examples/seminar_pdf2 (Failed)
2192 - NON_STANDARD.export/examples/seminar_pdf3 (Failed)
2193 - NON_STANDARD.export/examples/seminar_pdf4_texF (Failed)
2195 - INVERTED_SEE-README.ctest_export/examples/seminar_pdf5_texF 
(Failed)
Errors while running CTest
Only NON_STANDARD.export/examples/seminar_pdf5_systemF passes.

> I am actually surprised that XeTeX works. (While LuaTeX does not give
> sensible results. Seems to be inherited from pdflatex which also fails to
> produce landscape slides.)

It does not work here. OK, it _produces_ a pdf file which looks OK. But lyx 
exits with error on export.

> Ignoring the "faulty" export formats is important, so that we don't get
> false "regressions" when one day export to these formats is prevented.
> 
> Thanks, 
> Günter

Kornel

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


simple [patch] support for verbatim*

2015-11-19 Thread Uwe Stöhr
Attached is a simple patch that adds support for the verbatim* 
environment. Simple, because we already have all we need, even the 
lyx2lyx routine (I took it from LyX 2.1)


When we implemented support for verbatim, I simply forgot that there is 
also a starred version:

http://www.lyx.org/trac/ticket/9013

OK to go in or do you think that LyX should not support verbatim* or 
that it should support it, but should show the visible space also in 
within LyX? If you vote for the latter, then we will have to postpone 
because this needs then also to be implemented for the visible space 
option in listings.


thanks and regards
Uwe
 lib/layouts/stdlayouts.inc |  5 
 lib/lyx2lyx/lyx_2_2.py | 67 +-
 2 files changed, 71 insertions(+), 1 deletion(-)

diff --git a/lib/layouts/stdlayouts.inc b/lib/layouts/stdlayouts.inc
index f8367eb..4612cbd 100644
--- a/lib/layouts/stdlayouts.inc
+++ b/lib/layouts/stdlayouts.inc
@@ -95,3 +95,8 @@ Style Verbatim
HTMLItem  p
 End
 
+
+Style Verbatim*
+   CopyStyle Verbatim
+   LatexName verbatim*
+End
diff --git a/lib/lyx2lyx/lyx_2_2.py b/lib/lyx2lyx/lyx_2_2.py
index e4d5387..2401247 100644
--- a/lib/lyx2lyx/lyx_2_2.py
+++ b/lib/lyx2lyx/lyx_2_2.py
@@ -2156,6 +2156,71 @@ def revert_solution(document):
 i = j
 
 
+def revert_verbatim(document):
+" Revert verbatim* einvironments completely to TeX-code. "
+i = 0
+consecutive = False
+subst_end = ['\end_layout', '', '\\begin_layout Plain Layout',
+'\end_layout', '',
+ '\\begin_layout Plain Layout', '', '',
+ '\\backslash', '',
+ 'end{verbatim*}',
+ '\\end_layout', '', '\\end_inset',
+ '', '', '\\end_layout']
+subst_begin = ['\\begin_layout Standard', '\\noindent',
+   '\\begin_inset ERT', 'status open', '',
+   '\\begin_layout Plain Layout', '', '', '\\backslash',
+   'begin{verbatim*}',
+   '\\end_layout', '', '\\begin_layout Plain Layout', '']
+
+while 1:
+i = find_token(document.body, "\\begin_layout Verbatim*", i)
+if i == -1:
+return
+j = find_end_of_layout(document.body, i)
+if j == -1:
+document.warning("Malformed LyX document: Can't find end of 
Verbatim layout")
+i += 1
+continue
+# delete all line breaks insets (there are no other insets)
+l = i
+while 1:
+n = find_token(document.body, "\\begin_inset Newline newline", l, 
j)
+if n == -1:
+n = find_token(document.body, "\\begin_inset Newline 
linebreak", l, j)
+if n == -1:
+break
+m = find_end_of_inset(document.body, n)
+del(document.body[m:m+1])
+document.body[n:n+1] = ['\end_layout', '', '\\begin_layout Plain 
Layout']
+l += 1
+# we deleted a line, so the end of the inset moved forward.
+j -= 1
+# consecutive verbatim environments need to be connected
+k = find_token(document.body, "\\begin_layout Verbatim", j)
+if k == j + 2 and consecutive == False:
+consecutive = True
+document.body[j:j+1] = ['\end_layout', '', '\\begin_layout Plain 
Layout']
+document.body[i:i+1] = subst_begin
+continue
+if k == j + 2 and consecutive == True:
+document.body[j:j+1] = ['\end_layout', '', '\\begin_layout Plain 
Layout']
+del(document.body[i:i+1])
+continue
+if k != j + 2 and consecutive == True:
+document.body[j:j+1] = subst_end
+# the next paragraph must not be indented
+document.body[j+19:j+19] = ['\\noindent']
+del(document.body[i:i+1])
+consecutive = False
+continue
+else:
+document.body[j:j+1] = subst_end
+# the next paragraph must not be indented
+document.body[j+19:j+19] = ['\\noindent']
+document.body[i:i+1] = subst_begin
+
+
 ##
 # Conversion hub
 #
@@ -2196,7 +2261,7 @@ convert = [
   ]
 
 revert =  [
-   [501, [revert_solution]],
+   [501, [revert_solution, revert_verbatim]],
[500, [revert_fontsettings]],
[499, [revert_achemso]],
[498, [revert_moderncv_1, revert_moderncv_2]],


Re: Packagers, please upload binaries for 2.2.0alpha1

2015-11-19 Thread Richard Heck
On 11/19/2015 05:47 PM, Scott Kostyshak wrote:
> On Wed, Nov 18, 2015 at 07:12:00PM -0500, Scott Kostyshak wrote: >> On Thu, 
> Nov 19, 2015 at 12:57:42AM +0100, Uwe Stöhr wrote: >>> One
last question before I upload: could you please send by email the >>>
MD5 sums of the files that I should upload >>> >>> Ehm, just upload the
installer, the 40MB file. >> >> OK. If I get a +1 from another LyX
developer I will just upload it. I am not planning to upload .sig files
for it though without an MD5 sum from you. > > I guess I do not have a
choice here. I will upload the installer.

Yes, sorry, that seems the only thing to do right now. I suppose I
should adopt a similar policy henceforth.

Richard




Re: simple [patch] support for verbatim*

2015-11-19 Thread Uwe Stöhr

Am 20.11.2015 um 00:25 schrieb Richard Heck:


On 11/19/2015 06:20 PM, Uwe Stöhr wrote:
What is the difference between verbatim and verbatim*?


The only difference is that every space in verbatim* is output as 
visible space. The effect is the same as if you use the "space as 
symbol" option in listings.



Also, this:

  revert =  [
-   [501, [revert_solution]],
+   [501, [revert_solution, revert_verbatim]],

is presumably wrong. We need a new format, right?


Yes, it will be a fileformat change. When I commit I of course do this.

For just testing the proposed feature you can apply the simple patch 
without to need to recompile your LyX. So without compilation you can 
also test lyx2lyx reversion if you like.


regards Uwe


Re: [patch] proof of concept for bug 9744: allow parallel configuration of TeX and non-TeX fonts

2015-11-19 Thread Guenter Milde
On 2015-11-16, Georg Baum wrote:
> Guenter Milde wrote:
>> On 2015-11-12, Georg Baum wrote:

Just one point for today:

 The automatic font package selection (fontenc vs. fontspec) would be
 similar to the automatic language package selection (babel vs.
 polyglossia).

>>> Almost: No other automatic setting is undefined if the language package
>>> is set to automatic.

>> However, currently, the only way to force "polyglossia" (in case you have
>> polyglossia-specific ERT, say) is setting "useNonTeXFonts: True" and
>> "language-package: auto". Not intuitive.

> Yes, this is not intuitive. But this calls for a "polyglossia" language 
> setting in addition to "auto" and "babel" IMHO.

I fully agree.
Now compare how this combines with the font support selection:


Without automatic font support package setting:

  language package: auto | babel | polyglossia

  fonts:TeX-Fonts  | non-TeX fonts

you still have to set "non-TeX fonts" explicitely for a
document requiring polyglossia. Not intuitive despite the explicit setting.


With automatic font setting, there is symmetry

  language package: auto | babel | polyglossia

  fonts:auto | TeX-Fonts  | non-TeX fonts

With the default "auto" for both, setting "polyglossia" would suffice to
get non-TeX fonts and compilation with Xe/LuaTeX, just like setting "non
TeX fonts" already suffices to get polyglossia and compilation with
Xe/LuaTeX.


In both cases, we must prevent the combination of "polyglossia" and "TeX
fonts".

Should after
  * setting non-TeX fonts
  * setting polyglossia
the change back to "TeX fonts" be prevented or automatically 
unselect "polyglossia"?
 



Günter



Re: Packagers, please upload binaries for 2.2.0alpha1

2015-11-19 Thread Uwe Stöhr

Am 19.11.2015 um 01:12 schrieb Scott Kostyshak:


The benefit of signing files is so that whoever downloads the file can
be confident that it is the same file that you uploaded. Downloads and
uploads are not often corrupted as they were before, but a file is made
up of many 0's and 1's which are sent through wires.


Thanks for the explanation. I understand that a download can go wrong 
but It is not clear to me what would happen that could harm anybody. if 
a download is broken you will most probably not be able to install LyX 
with this installer and we will get quickly complaints by users. What 
else could happen?


I check if anything was uploaded by downloading the file and using it to 
install LyX. If this would not be be possible, a checksum would not help 
us because I would have checksumed a broken file, right?


I just want to understand it because i always wondered about checksuming 
uploaded files. I can understand this for security-relevant programs 
like VeraCrypt. is this really necessary for LyX too?


thanks and regards
Uwe


Re: simple [patch] support for verbatim*

2015-11-19 Thread Richard Heck
On 11/19/2015 06:20 PM, Uwe Stöhr wrote:
> Attached is a simple patch that adds support for the verbatim*
> environment. Simple, because we already have all we need, even the
> lyx2lyx routine (I took it from LyX 2.1)
>
> When we implemented support for verbatim, I simply forgot that there
> is also a starred version:
> http://www.lyx.org/trac/ticket/9013
>
> OK to go in or do you think that LyX should not support verbatim* or
> that it should support it, but should show the visible space also in
> within LyX? If you vote for the latter, then we will have to postpone
> because this needs then also to be implemented for the visible space
> option in listings.

What is the difference between verbatim and verbatim*? I don't
understand the bit about "visible space".

Also, this:

 revert =  [
-   [501, [revert_solution]],
+   [501, [revert_solution, revert_verbatim]],

is presumably wrong. We need a new format, right?

Richard



Re: Packagers, please upload binaries for 2.2.0alpha1

2015-11-19 Thread Scott Kostyshak
On Wed, Nov 18, 2015 at 07:12:00PM -0500, Scott Kostyshak wrote:
> On Thu, Nov 19, 2015 at 12:57:42AM +0100, Uwe Stöhr wrote:
> > One last question before I upload: could you please send by email the
> > MD5 sums of the files that I should upload
> > 
> > Ehm, just upload the installer, the 40MB file.
> 
> OK. If I get a +1 from another LyX developer I will just upload it. I am
> not planning to upload .sig files for it though without an MD5 sum from
> you.

I guess I do not have a choice here. I will upload the installer.

Scott


signature.asc
Description: PGP signature


Re: Packagers, please upload binaries for 2.2.0alpha1

2015-11-19 Thread Richard Heck
On 11/19/2015 06:15 PM, Uwe Stöhr wrote:
> Am 19.11.2015 um 01:12 schrieb Scott Kostyshak:
>
>> The benefit of signing files is so that whoever downloads the file can
>> be confident that it is the same file that you uploaded. Downloads and
>> uploads are not often corrupted as they were before, but a file is made
>> up of many 0's and 1's which are sent through wires.
>
> Thanks for the explanation. I understand that a download can go wrong
> but It is not clear to me what would happen that could harm anybody.
> if a download is broken you will most probably not be able to install
> LyX with this installer and we will get quickly complaints by users.
> What else could happen?

The worry is not that the download goes wrong, but that someone manages
somehow to put a virus into your installer. This could happen in a
number of different ways, for example, via a man-in-the-middle attack.
Or someone could hack into your Sourceforge account and replace the
file. It's happened.

If you send Scott and MD5 sum (and me, actually), then we can be
confident that the file has not been altered. So our signature means
something.

Richard



Re: [patch] support for 'solution' in theorems

2015-11-19 Thread Uwe Stöhr

Am 18.11.2015 um 20:35 schrieb Georg Baum:


How can tex2lyx force you to touch completely unrelated modules? This looks
like a bug in tex2lyx, which should be addressed properly.


Because on importing it tex2lyx loads an AMS module because it cannot 
know if e.g. the environment "xca" should be taken from theorems or 
theorems AMS.


However, it was better to add solution to all theorem modules. There is 
no reason to not have this in AMS.



BTW, you are hopefully aware of the current commit rules (trivial changes
may go in directly, anything else needs to be supported by at least one
developer)?


Jürgen kindly reviewed it quickly. Richard and Scott did not opposed, 
they did not know about tex2lyx and that is why I asked.



Changing the AMS theorem modules does not look like a trivial change to me,
and I did not see any discussion of this change.


What problems do you see.

regards Uwe


Re: [RFC][PATCH] Get rid of some hardcoded pixel lengths

2015-11-19 Thread PhilipPirrip

On 11/19/2015 02:58 AM, Jean-Marc Lasgouttes wrote:

Le 19/11/2015 03:17, PhilipPirrip a écrit :

I didn't find placing the cursor difficult, it only looked too tight.


Would you say that the extra horizontal spacing is nevertheless useful?


I'm still good at aiming, can't tell the difference. I'd actually make 
the separation 0, so that, for example, |Note| looks like it is a 
label/tag - which it is, right?. Increase the inner margin of the insets 
(ERT has it, but not the note or URL - btw, why isn't the ERT 
collapsable, why doesn't it have a label - I think that'd be pretty 
useful as they sometimes become big and distracting).







But now you have some insets grown vertically, they increase the line
spacing which looks a bit messy:
wiki.lyx.org/uploads/Playground/JML-get_rid_of_some_hardcoded_pixel_lengths.png



Yes, that's pretty bad. THis has to be addressed indeed.


Thnx. I'll be here to test it!




Re: LyX 2.2 + Qt 5.5.1 segmentation fault on Fedora 23

2015-11-19 Thread PhilipPirrip

On 11/19/2015 01:27 AM, Stephan Witt wrote:

I've redirected it to developers list.


Sorry, that was sent by mistake. The report I sent here has an updated 
gdb output - I installed all debug-infos. QPrinter is being mentioned 
several times.
Thought we should still investigate, if it's Qt, you won't be able to 
escape from it.




Re: Installation of Lyx without admin

2015-11-19 Thread Weijie Chen
Thanks for your reply. If I run that installer on Windows as a user, it pops up 
a window asking admin passcode. What am I missing here?

Best,
Weijie

Sent from Outlook




On Thu, Nov 19, 2015 at 3:37 PM -0800, "Uwe Stöhr" 
> wrote:

Am 18.11.2015 um 17:55 schrieb Weijie Chen:

> Hi, is it possible that Lyx be installed on Windows without the admin 
> privileges?

It is possible to install LyX with only user privileges. This is
possible for several years so you should be able to install also the old
LyX 2.0.x that way.

> I don't see such an installer right now

Just use the latest LyX 2.1.4 for Windows installer you find at
www.lyx.org. What does not work for you?

regards Uwe


Re: export test failures 2

2015-11-19 Thread Kornel Benko
Am Donnerstag, 19. November 2015 um 09:17:44, schrieb Guenter Milde 


...
>
> Hope this helps,
>
> Günter

Yes, it does. 31 left.
For now I suspended immediate committing in happy expectation of next advices :)

Kornel

signature.asc
Description: This is a digitally signed message part.
1621:export/examples/achemso_dvi3_texF
1628:export/examples/achemso_pdf5_texF
1726:export/examples/europeCV_dvi3_texF
1727:export/examples/europeCV_dvi3_systemF
1733:export/examples/europeCV_pdf5_texF
1734:export/examples/europeCV_pdf5_systemF
1808:export/examples/linguistics_dvi3_systemF
1813:export/examples/linguistics_pdf4_systemF
1815:export/examples/linguistics_pdf5_systemF
1840:export/examples/modernCV_dvi3_texF
1841:export/examples/modernCV_dvi3_systemF
1845:export/examples/modernCV_pdf4_texF
1846:export/examples/modernCV_pdf4_systemF
1847:export/examples/modernCV_pdf5_texF
1848:export/examples/modernCV_pdf5_systemF
1863:export/examples/powerdot-example_pdf
2814:export/examples/fa/splash_dvi
2817:export/examples/fa/splash_pdf
2818:export/examples/fa/splash_pdf2
2819:export/examples/fa/splash_pdf3
2820:export/examples/fa/splash_pdf4_texF
2821:export/examples/fa/splash_pdf4_systemF
2871:export/examples/fr/Foils_pdf5_systemF
2910:export/examples/fr/exemple-powerdot_pdf
3072:export/examples/he/splash_pdf5_systemF
3247:export/examples/ko/splash_dvi3_texF
3252:export/examples/ko/splash_pdf4_texF
3254:export/examples/ko/splash_pdf5_texF
3500:export/templates/AGUTeX_dvi3_systemF
3505:export/templates/AGUTeX_pdf4_systemF
3507:export/templates/AGUTeX_pdf5_systemF


Re: export test failures 2

2015-11-19 Thread Kornel Benko
Am Donnerstag, 19. November 2015 um 17:17:00, schrieb Kornel Benko 

> Am Donnerstag, 19. November 2015 um 09:17:44, schrieb Guenter Milde 
> 
> 
> ...
> > 
> > Hope this helps,
> > 
> > Günter
> 
> Yes, it does. 31 left.
> For now I suspended immediate committing in happy expectation of next advices 
> :)

Ahm, some remarks:
> > > 669:export/doc/de/UserGuide_pdf3
> > 
> > Exports without problme to pdf3   pdf"PDF (dvipdfm)"
> > here. Try export "per-hand" and check the eventual errors.
> > Look for missing packages and/or special casing in the export machinery
> > that
> > stands in the way...
Exports manually fine here too.
AND also in ctest if called sequentially.

> > > 1897:export/examples/seminar_pdf2
> > > 1898:export/examples/seminar_pdf3
> > > 1899:export/examples/seminar_pdf4_texF
> > > 1902:export/examples/seminar_pdf5_systemF
> > 
> > Here, examples/seminar.lyx
> > 
> > * exports fine to ps, pdf, pdf3, pdf4_texF
I get Missing glyphs for pdf4_texF (displaying, not exporting)

/usr9/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex
Missing character: There is no 0 in font nullfont!
Missing character: There is no . in font nullfont!
Missing character: There is no 0 in font nullfont!
Missing character: There is no p in font nullfont! 
The font is 'Latin Modern'
Changing to e.g. 'TeX Gyre' does not help.
The created pdfs look good though.
...

Kornel

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


Re: mhchem and Xe/LuaTeX problems

2015-11-19 Thread Guenter Milde
Dear Uwe,

On 2015-11-20, Uwe Stöhr wrote:
> Am 29.10.2015 um 17:15 schrieb Guenter Milde:

>> documents that use the mhchem package (which is automatically loaded if
>> required, by default) fail to compile with XeTeX or LuaTeX and TeX fonts.

> I think you discovered a bug in LyX:
> We automatically load inputenc:

> \usepackage[latin9]{inputenc}

> But inputenc must not be used for XeTeX.

Well, I not only discovered this bug in LyX, but also fixed it in a series
of commits. The current LyX-dev:

* writes \usepackage[latin9]{luainputenc} with LuaTeX, and

* uses ASCII encoding and no inputenc with XeTeX.

> mhchem is not to blame here.

Compiling e.g. Math.lyx with lyx 2.2, I get:


* XeTeX and TeX fonts: no compiling error, output OK

* XeTeX and non-TeX fonts:  compiling error: missing glyphs 
  Å (212B ANGSTROM SIGN) and some other characters not in LModern, not
  related to mhchem).


* LuaTeX and TeX fonts: compiling error:

The first message points to chemgreek.sty:

  . Defining command \selectchemgreekmapping with sig. 'm' on line 485.
  .
  ! Argument of \__str_case_end:nw has an extra }.
   
  \par 
  l.573 \chemgreek_drop_symbols:
  
  ...

* LuaTeX and non-TeX fonts: compiling error, 8 missing glyphs.


As mhchem loads chemgreek.sty, it is the (indirect) reason for the failin
export test with LuaTeX.

Maybe we can describe mhchem in a separate document? After all it uses
"mathed" but is not about Mathematics.

Günter



Re: Packagers, please upload binaries for 2.2.0alpha1

2015-11-19 Thread Liviu Andronic
On Fri, Nov 20, 2015 at 12:23 AM, Richard Heck  wrote:
> On 11/19/2015 06:15 PM, Uwe Stöhr wrote:
>> Am 19.11.2015 um 01:12 schrieb Scott Kostyshak:
>>
>>> The benefit of signing files is so that whoever downloads the file can
>>> be confident that it is the same file that you uploaded. Downloads and
>>> uploads are not often corrupted as they were before, but a file is made
>>> up of many 0's and 1's which are sent through wires.
>>
>> Thanks for the explanation. I understand that a download can go wrong
>> but It is not clear to me what would happen that could harm anybody.
>> if a download is broken you will most probably not be able to install
>> LyX with this installer and we will get quickly complaints by users.
>> What else could happen?
>
> The worry is not that the download goes wrong, but that someone manages
> somehow to put a virus into your installer. This could happen in a
> number of different ways, for example, via a man-in-the-middle attack.
> Or someone could hack into your Sourceforge account and replace the
> file. It's happened.
>
This. Also providing a checksum is a *very* low effort requirement,
and it will take very little time to compute the hash of a given file
using your favorite checksum utility, like Hashtab on Windows and Mac
OS X or GtkHash on Linux. This is easier done than said.

PGP signatures on the other hand are a bit more work to understand
conceptually and set up in practice, although as Scott mentions it's a
5 min job with proper guidance. The cryptographic signature is a step
above simple checksums in ascertaining both the origin and integrity
of the file: *you* are the only one holding the private key, and a
file signed by you can be verified by *anyone* using your public key.

Cheers,
Liviu


> If you send Scott and MD5 sum (and me, actually), then we can be
> confident that the file has not been altered. So our signature means
> something.
>



> Richard
>



-- 
Do you think you know what math is?
http://www.ideasroadshow.com/issues/ian-stewart-2013-08-02
Or what it means to be intelligent?
http://www.ideasroadshow.com/issues/john-duncan-2013-08-30
Think again:
http://www.ideasroadshow.com/library


Re: [RFC][PATCH] Get rid of some hardcoded pixel lengths

2015-11-19 Thread Guillaume Munch

Le 18/11/2015 10:57, Jean-Marc Lasgouttes a écrit :

Hi there,

The followong patch replaces the hardcoded TEXT_TO_INSET_OFFSET=4 and
the workarea margin of 10 by respectively 1mm and 2.5mm. These values
should be equivalent when dpi=100 and zoom=100%.

This idea was triggered by a message (a bug) saying that in HiDPI
situations, placing the cursor was very difficult.

Please try it out. I'd be interested to know how it fares in different
situations.

JMarc




Good idea. I am not yet back to testing master, but people who wish to 
test the HiDPI version with a low-dpi monitor in Linux only have to set 
QT_DEVICE_PIXEL_RATIO in the env, e.g.:

  QT_DEVICE_PIXEL_RATIO=2 src/lyx

Sound like the sort of change that requires a lot of testing and 
polishing though.