Can someone update the tex2lyx files to format 475??

2014-05-12 Thread Scott Kostyshak
The tex2lyx tests are failing for me because of the recent format
change. Can someone update the files?

I tried to do so by running
${LYX2LYX} $1  temp.lyx  mv temp.lyx $1
on all .lyx files in src/tex2lyx/test

I got the following warnings:
Warning: #LyX file created by tex2lyx 2.1

Why is this a warning? As long as lyx2lyx finds \lyxformat why does it
care who made the file?

In any case, at this point I realized the fix is a little more
complicated because I need to run tex2lyx on the files so I wanted to
check in here first to see what the process is for updating the files
and if someone has automated it.

Scott


Re: Call for testers: the features/str-metrics branch

2014-05-12 Thread Jean-Marc Lasgouttes

11/05/2014 23:31, Guy Rutenberg:

I did some initial testing and came up with the following wrong
behavior: When in RTL mode (i.e. settng the document language to hebrew)
and typing some narrow characters such as ו (vav) or even the English
`i` slightly moves the right margin to the left. By typing consecutive
narrow characters this movement is significant.

Typing wide characters has the opposite effect: The margin moves to the
right.

I've attached a screenshot. All the lines should be aligned the same,
however different character width shift the margin differently (there
should be no shift at all).


Hello Guy,

Thanks a lot for your tests. This effect is very weird. Could you create 
a bug, maybe with an example file since I can't type Hebrew characters 
:) I have to track correctly all the bugs that got reported.


JMarc



Re: Call for testers: the features/str-metrics branch

2014-05-12 Thread Jean-Marc Lasgouttes

11/05/2014 23:37, Guy Rutenberg:

I actually found a more serious bug. When in RTL mode (`language
hebrew`) if one types a single continuous line without any spaces, LyX
simply hangs when it reaches the end-of-line. If there are spaces it
breaks the line correctly. I've checked it on Linux, can others
reproduce the bug as well?


Noted. Could you create a bug too?

Thanks,
JMarc



Re: Call for testers: the features/str-metrics branch

2014-05-12 Thread Jean-Marc Lasgouttes

03/05/2014 00:16, Scott Kostyshak:

On Fri, May 2, 2014 at 12:00 PM, Scott Kostyshak skost...@lyx.org wrote:

On Fri, May 2, 2014 at 8:18 AM, Jean-Marc Lasgouttes lasgout...@lyx.org wrote:

I did not manage to reproduce. Do you have a file to try is out?


I will send you the file when I get home. I will also check that the
build logs are the same. I took care to use the latest commit from
master that you merged in for the comparison and the same build
script, but maybe somehow a CMake flag was added/subtracted.

Scott


See attached for the example. I checked and that build logs are the
same. Attached is my output of CMake. I've also tried with my normal
preferences and with default preferences. I've also confirmed that the
output of ldd on the binaries is the same. And I reproduced the same
difference in behaviors on a different machine (although a very
similar setup).


This is now ticket #9114.

JMarc



Re: cmake warnings

2014-05-12 Thread Kornel Benko
Am Montag, 12. Mai 2014 um 07:35:36, schrieb Stephan Witt st.w...@gmx.net
  I'd like to terminate if there is no spell checker and it's not said to 
  ignore this.
  The LYX_ options aren't three state. So this is possible only with a check 
  for another
  option, right?
  
  Yes.
  
  Then I'd prefer to give the hint at a more prominent location.
  
  Alternative patch is attached.
  
  Stephan
  
  Yes, better place for the message. But the option is missing.
 
 Yes, I didn't insist to abort. What's your opinion?
 

I don't insist either. The behaviour until now was to do nothing.
Therefore the new option should start with default not to abort (if any option).

Proposing the name as LYX_REQUIRE_SPELLCHECK.

Kornel

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


Re: Call for testers: the features/str-metrics branch

2014-05-12 Thread Jean-Marc Lasgouttes

08/05/2014 12:22, Stephan Witt:

Currently the drawing of LyX is not appropriate for high resolution displays.

I'm afraid your suggestion is not suitable to improve this.


This is something unrelated to str-metrics branch, right? I agree that 
we will have to fix this soon. Do we have an open bug? Is it only a 
mac/retina issue, or is it also true on windows/linux hi definition 
displays.


JMarc



Re: LyX Export via LaTeXML

2014-05-12 Thread Guenter Milde
Dear Frédéric,

thanks for your efforts merging LyX and LaTeXML - this looks promising.

On 2014-05-11, Frédéric WANG wrote:
 Thanks Richard,

 I just had a quick look at the code. Indeed, I realized that the case of 
 LyXHTML is a bit special. So in a first step, I'll just focus on 
 EPUB3/HTML5 export via LaTeXML without special option. I see this would 
 be essentially modifying lib/configure.py. 

This is, IMO, the second step.

First, I recommend, try a custom converter:

 Open Lyx and go to 
 
 ToolsPreferencesFile HandlingConverters

Add Converters for the desired conversion. You may have to add dummy
fileformats for different ways to create the same format (HTML, say).
(See how this is done with PDF1 ... PDF5.)

This is also described in Chapter 3 of the HelpCustomization documentation.


If this works, report back here or at the LyX wiki.
Then as a next step an auto-configuration can be set up.

Günter



Re: Call for testers: the features/str-metrics branch

2014-05-12 Thread Jean-Marc Lasgouttes

08/05/2014 22:14, Vincent van Ravesteijn:

I think the real solution then would be to use glyphs.


But glyphs do not work for ff ligature, right?

I think only clipping can work (see ticket #9116).

But first, we have to get cursor positioning right (ticket #9115).

JMarc


Re: Can someone update the tex2lyx files to format 475??

2014-05-12 Thread Kornel Benko
Am Montag, 12. Mai 2014 um 03:34:10, schrieb Scott Kostyshak skost...@lyx.org
 The tex2lyx tests are failing for me because of the recent format
 change. Can someone update the files?
 
 I tried to do so by running
 ${LYX2LYX} $1  temp.lyx  mv temp.lyx $1
 on all .lyx files in src/tex2lyx/test
 
 I got the following warnings:
 Warning: #LyX file created by tex2lyx 2.1
 
 Why is this a warning? As long as lyx2lyx finds \lyxformat why does it
 care who made the file?


The message says it all: files are not created by lyx2lyx but tex2lyx.

 In any case, at this point I realized the fix is a little more
 complicated because I need to run tex2lyx on the files so I wanted to
 check in here first to see what the process is for updating the files
 and if someone has automated it.

I run one test.
# ctest -R tex2lyx/cmplyx/box-color-size-space-align.tex
== FAILED

Look into Testing/Temporary/LastTest.log I see diff of
/usr/BUILD/BuildLyxGit/src/tex2lyx/test/box-color-size-space-align.lyx
and
/usr/src/lyx/lyx-git/src/tex2lyx/test/box-color-size-space-align.lyx.lyx

If the differences are OK for me, I can then copy
/usr/BUILD/BuildLyxGit/src/tex2lyx/test/box-color-size-space-align.lyx
over
/usr/src/lyx/lyx-git/src/tex2lyx/test/box-color-size-space-align.lyx.lyx

There should be nothing automated. We should always check the diffs IMHO.

 Scott

Kornel

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


Re: LyX Export via LaTeXML

2014-05-12 Thread Frédéric WANG

Le 12/05/2014 10:23, Guenter Milde a écrit :
This is, IMO, the second step. First, I recommend, try a custom 
converter: Open Lyx and go to ToolsPreferencesFile 
HandlingConverters Add Converters for the desired conversion. You may 
have to add dummy fileformats for different ways to create the same 
format (HTML, say). (See how this is done with PDF1 ... PDF5.) This is 
also described in Chapter 3 of the HelpCustomization documentation. 
If this works, report back here or at the LyX wiki. Then as a next 
step an auto-configuration can be set up. Günter 
Thank Günter. Well, given that I already built the development program 
and started to modify configure.py, I think it will be more convenient 
for me to continue like that instead of using the LyX user interface. 
However, I see that the latter will be useful to allow users to use 
LaTeXML on the LyX release, so I'll try  report that too when I submit 
a patch for configure.py.


--
Frédéric Wang
maths-informatique-jeux.com/blog/frederic



Re: Is the user-dir/scripts folder added to PATH for converter script execution?

2014-05-12 Thread Jean-Marc Lasgouttes

29/04/2014 19:29, Scott Kostyshak:

We do not parse looking for R commands in Systemcall::startscript as
we were doing for Python. The second patch should not change any
functionality, just organization (I will state this explicitly in the
commit message). Just in case, I tested exporting the knitr manual and
it exported successfully.


OK, then.

JMarc



Re: Call for testers: the features/str-metrics branch

2014-05-12 Thread Jean-Marc Lasgouttes

30/04/2014 18:36, Jean-Marc Lasgouttes:

Hello,

I finally think that the str-metrics branch is ready for a first round
of testing. I would like to know everything that does not work
especially (but not limited to) RTL writing.


I get what I asked for, and quite a lot of work to do :)

The tracking bug for this branch is #9003.
http://www.lyx.org/trac/ticket/9003

I tried to update it so that it is a good entry point to see the 
advancement of the feature.


JMarc



Re: LyX Export via LaTeXML

2014-05-12 Thread Frédéric WANG

Hi all,

I provide in attachment a small patch for what I think is essentially 
needed for LaTeXML export in LyX


1) merging the checkViewer call for HTML previewer + adding the HTML5 
format to it.
2) adding checkViewer for EPUB. At the moment, the viewer is Firefox and 
it is assumed that one EPUB reader add-on is installed.

3) adding latexmlc --format=html4 as another HTML converter.
4) adding latexml as an EPUB3 and HTML5 converters. More could be added 
later, in particular I'm aware of 
https://github.com/michal-h21/tex4ebook for an extension of tex4ht with 
EPUB export.


I tested the HTML5 and EPUB3 export. The files are generated and I can 
preview them in Firefox (even if the document contains babel errors). 
Things that remains to consider:


a) Fix LaTeXML bug with babel 
https://github.com/brucemiller/LaTeXML/issues/487 and do more testing to 
see how LaTeXML deals with LaTeX files generated by LyX.
b) Improve detection of EPUB reader, perhaps add more EPUB readers in 
the list.
c) Check if we need to handle directories instead of a single file for 
HTML5/HTML export (LaTeXML generates png  css files, so I wonder if the 
ext_copy.py script should be used).


--
Frédéric Wang
maths-informatique-jeux.com/blog/frederic

diff --git a/lib/configure.py b/lib/configure.py
index ddaeb0c..247ab6a 100644
--- a/lib/configure.py
+++ b/lib/configure.py
@@ -634,7 +634,14 @@ def checkFormatEntries(dtl_tools):
 \Format oocalc odsOpenOffice spreadsheet   %%document	application/vnd.oasis.opendocument.spreadsheet'''])
  #
 checkViewer('an HTML previewer', ['firefox', 'mozilla file://$$p$$i', 'netscape'],
-rc_entry = [r'\Format xhtml  xhtml   LyXHTML  y %% document,menu=export	application/xhtml+xml'])
+rc_entry = [r'''\Format xhtml  xhtml   LyXHTML  y %% document,menu=exportapplication/xhtml+xml
+\Format html	html, htm	HTML	H	%%		document,menu=export	text/html
+\Format html5	html  	HTML5		%%		document,menu=export	text/html'''])
+ #
+ #  FIXME: check that the EPUBReader/Lucifox add-ons are installed?
+checkViewer('an EPUB reader', ['firefox', 'mozilla file://$$p$$i', 'netscape'],
+rc_entry = [r'''\Format epub	epub	EPUB3		%%		document,menu=export	application/epub+zip'''])
+
  #
 checkEditor('a BibTeX editor', ['jabref', 'JabRef', \
 'pybliographic', 'bibdesk', 'gbib', 'kbib', \
@@ -670,9 +677,6 @@ def checkFormatEntries(dtl_tools):
 # Windows only: DraftDVI
 addToRC(r'\Format dvi2   dvi DraftDVI   			vector	')
 #
-checkViewer('an HTML previewer', ['firefox', 'mozilla file://$$p$$i', 'netscape'],
-rc_entry = [r'\Format html  html, htm HTMLH  %%		document,menu=export	text/html'])
-#
 checkViewerEditor('Noteedit', ['noteedit'],
 rc_entry = [r'\Format noteedit   not Noteedit%%	%%	vector	'])
 #
@@ -789,7 +793,8 @@ def checkConverterEntries():
   # On SuSE the scripts have a .sh suffix, and on debian they are in /usr/share/tex4ht/
   path, htmlconv = checkProg('a LaTeX - HTML converter', ['htlatex $$i', 'htlatex.sh $$i', \
   '/usr/share/tex4ht/htlatex $$i', 'tth  -t -e2 -L$$b  $$i  $$o', \
-  'latex2html -no_subdir -split 0 -show_section_numbers $$i', 'hevea -s $$i'],
+  'latex2html -no_subdir -split 0 -show_section_numbers $$i',
+  'hevea -s $$i', 'latexmlc --dest $$o --format=html4 $$i'],
   rc_entry = [ r'\converter latex  html   %%	needaux' ])
   if htmlconv.find('htlatex') = 0 or htmlconv == 'latex2html':
 addToRC(r'''\copierhtml   python -tt $$s/scripts/ext_copy.py -e html,png,css $$i $$o''')
@@ -804,6 +809,15 @@ def checkConverterEntries():
   else:
 addToRC(r'''\copierwordhtml   python -tt $$s/scripts/ext_copy.py $$i $$o''')
 
+# Search for HTML5 converters
+path, html5conv = checkProg('a LaTeX - HTML5 converter',
+['latexmlc --dest $$o $$i'],
+rc_entry = [ r'\converter	latex	html5	%%	' ])
+
+# Search for EPUB3 converters
+path, epub3conv = checkProg('a LaTeX - EPUB3 converter',
+['latexmlc --dest $$o $$i'],
+rc_entry = [ r'\converter	latex	epub	%%	' ])
 
 # Check if LyXBlogger is installed
 lyxblogger_found = checkModule('lyxblogger')


Re: Call for testers: the features/str-metrics branch

2014-05-12 Thread Richard Heck

On 05/12/2014 06:01 AM, Jean-Marc Lasgouttes wrote:

30/04/2014 18:36, Jean-Marc Lasgouttes:

Hello,

I finally think that the str-metrics branch is ready for a first round
of testing. I would like to know everything that does not work
especially (but not limited to) RTL writing.


I get what I asked for, and quite a lot of work to do :)

The tracking bug for this branch is #9003.
http://www.lyx.org/trac/ticket/9003

I tried to update it so that it is a good entry point to see the 
advancement of the feature.


Do you want to create a str-metrics component for this?

Richard



Re: Call for testers: the features/str-metrics branch

2014-05-12 Thread Jean-Marc Lasgouttes

Le 12/05/14 15:13, Richard Heck a écrit :

I tried to update it so that it is a good entry point to see the
advancement of the feature.


Do you want to create a str-metrics component for this?


It seemed a bit too much, especially since this is supposed to be 
transient. I have the tracking bug, and all bugs new to the branch have 
a title that starts with [str-metrics]. I could also have used a keyword.


JMarc


new layout and distribution files

2014-05-12 Thread DM Bortz
Hello,

I have written some layout and template files for article classes currently
not included in the standard lyx distribution, including:

Proc. Nat. Acad. of Science USA (pnastwo)
DeGruyter (degruyter-journal-a)
Computer Modeling in Engineering  Sciences (cmes)

In reading online, it wasn't clear what the best way was to go about
sharing them...

D

-- 
DM Bortz
Applied Mathematics
University of Colorado
Boulder, CO 80309-0526
http://mathbio.colorado.edu


Re: new layout and distribution files

2014-05-12 Thread Jürgen Spitzmüller
2014-05-12 19:18 GMT+02:00 DM Bortz:

 Hello,

 I have written some layout and template files for article classes
 currently not included in the standard lyx distribution, including:

 Proc. Nat. Acad. of Science USA (pnastwo)
 DeGruyter (degruyter-journal-a)
 Computer Modeling in Engineering  Sciences (cmes)

 In reading online, it wasn't clear what the best way was to go about
 sharing them...


Such layouts are usually collected here:

http://wiki.lyx.org/Layouts/Layouts

If there is general interest, they can also be considered for inclusion
into the distribution (after some testing).

Thanks for sharing
Jürgen


Re: Can someone update the tex2lyx files to format 475??

2014-05-12 Thread Enrico Forestieri
On Mon, May 12, 2014 at 03:34:10AM -0400, Scott Kostyshak wrote:

 The tex2lyx tests are failing for me because of the recent format
 change. Can someone update the files?
 
 I tried to do so by running
 ${LYX2LYX} $1  temp.lyx  mv temp.lyx $1
 on all .lyx files in src/tex2lyx/test
 
 I got the following warnings:
 Warning: #LyX file created by tex2lyx 2.1
 
 Why is this a warning? As long as lyx2lyx finds \lyxformat why does it
 care who made the file?
 
 In any case, at this point I realized the fix is a little more
 complicated because I need to run tex2lyx on the files so I wanted to
 check in here first to see what the process is for updating the files
 and if someone has automated it.

I have no idea. However, after running tex2lyx there should be no difference
(apart from the first two lines of the generated LyX document), except if
the .tex file had two same environments one after the other, without
anything in between. In this case, the only difference should be that
a plain separator inset is inserted instead of the old layout separator.

-- 
Enrico


Re: Can someone update the tex2lyx files to format 475??

2014-05-12 Thread Enrico Forestieri
On Mon, May 12, 2014 at 10:36:32AM +0200, Kornel Benko wrote:
 
 I run one test.
   # ctest -R tex2lyx/cmplyx/box-color-size-space-align.tex
   == FAILED

I think that the test should not take into account the first two lines
of the LyX documents. Indeed, there is no reason for failure in this case.
Look:

$ ../../../build/src/tex2lyx/tex2lyx box-color-size-space-align.tex 
box-color-size-space-align.lyx
Creating file 
/usr/local/src/lyx/lyx-devel/src/tex2lyx/test/box-color-size-space-align.lyx
$ diff -u -I '^#LyX' -I '^\\lyxformat' box-color-size-space-align.lyx.lyx 
box-color-size-space-align.lyx
no output

So, the only difference is in the first two lines and the test should
succeed. However, I don't know what is the rationale of these tests.

-- 
Enrico


Re: Converters: Skip Qt's loadable svg function

2014-05-12 Thread Georg Baum
Vincent van Ravesteijn wrote:

 Richard Heck schreef op 6-5-2014 15:41:
 On 05/06/2014 04:57 AM, Vincent van Ravesteijn wrote:
 Previewing of some (most) svg files does not work anymore even if
 Inkscape and the converters has been set correctly. This is because
 Qt claims to be able to load svg files natively. However, Qt does a
 bad job doing that. Therefore, I want to use my configured converter.
 How can I do that ?

 I now applied the attached patch, but it might not be everyone's choice.

 I guess my only thought, if Qt really does such a bad job with these,
 would be to put this hack in loadableImageFormats(), to ensure
 consistency. At the moment, that is only used here anyway, so it is
 equivalent.
 
 Now I remember why I didn't do that. We might want the Qt-automatic-way
 as a fallback when no custom converter is defined.

The Qt builtin converters should not be special IMHO: They should get 
entries in the preferences file (we would probably need something like a new 
keyword for that), and configure.py could then set them as a last resort 
fallback if nothing else is available. Then users could also switch it off 
if needed, and nothing is hardcoded.


Georg



Re: examples/thesis/thesis.lyx Malformed LyX document

2014-05-12 Thread Georg Baum
Scott Kostyshak wrote:

 On master branch, the command
 lyx2lyx -t 413 thesis.lyx  temp.lyx
 gives the output
 Warning: Malformed LyX document: Missing \justification.
 but just opening the LyX document does not give any error.
 
 Is it malformed?

It is malformed in such a way that lyx2lyx does not find the \justification 
header setting. However, this does not matter, since it simply would remove 
it. See the commit log of cacd2a041d2c for details.

 Note that other documents in the same folder give that error also.

These were obviously converted from older versions by lyx2lyx and not saved 
by LyX.


Georg



Re: Can someone update the tex2lyx files to format 475??

2014-05-12 Thread Georg Baum
Enrico Forestieri wrote:

 On Mon, May 12, 2014 at 03:34:10AM -0400, Scott Kostyshak wrote:
 
 The tex2lyx tests are failing for me because of the recent format
 change. Can someone update the files?
 
 I tried to do so by running
 ${LYX2LYX} $1  temp.lyx  mv temp.lyx $1
 on all .lyx files in src/tex2lyx/test
 
 I got the following warnings:
 Warning: #LyX file created by tex2lyx 2.1
 
 Why is this a warning? As long as lyx2lyx finds \lyxformat why does it
 care who made the file?

Because lyx2lyx tries to read the LyX version from that file (see 
read_version() in LyX.py), and this fails. lyx2lyx should be teached about 
tex2lyx, then the warning would vanish.

 In any case, at this point I realized the fix is a little more
 complicated because I need to run tex2lyx on the files so I wanted to
 check in here first to see what the process is for updating the files
 and if someone has automated it.

It is automated. Please read section 3.2.2 of lib/doc/Development.lyx. 
Kornel is right, you need to look at the diffs manually in order to judge 
whether the updated references are OK, but the process of producing them and 
copying them where git expects them is automated (and needs to be automated 
- nobody would copy over all these files by hand).

 I have no idea. However, after running tex2lyx there should be no
 difference (apart from the first two lines of the generated LyX document),
 except if the .tex file had two same environments one after the other,
 without anything in between. In this case, the only difference should be
 that a plain separator inset is inserted instead of the old layout
 separator.

The procedure of updating a file format is documented in section 2.3 of 
lib/doc/Development.lyx. Your update was perfect (including tex2lyx support 
- this is often not done), the only missing bit was the update of the test 
references. I verified that the new code is correct and did the update.


Georg



Re: Can someone update the tex2lyx files to format 475??

2014-05-12 Thread Georg Baum
Enrico Forestieri wrote:

 I think that the test should not take into account the first two lines
 of the LyX documents. Indeed, there is no reason for failure in this case.
 Look:
 
 $ ../../../build/src/tex2lyx/tex2lyx box-color-size-space-align.tex
 box-color-size-space-align.lyx Creating file
 /usr/local/src/lyx/lyx-devel/src/tex2lyx/test/box-color-size-space-
align.lyx
 $ diff -u -I '^#LyX' -I '^\\lyxformat' box-color-size-space-align.lyx.lyx
 box-color-size-space-align.lyx no output
 
 So, the only difference is in the first two lines and the test should
 succeed. However, I don't know what is the rationale of these tests.

This has been discussed at length in the past. The very first line does not 
need to be compared (it is only a comment), but the second one is important. 
For example, if the file format number would be ignored, and you had updated 
LYX_FORMAT_TEX2LYX, but forgot the change in src/tex2lyx/text.cpp, then all 
tests would still have been passed, although test-structure.lyx would be 
invalid (file format 475, but still using the old separator layout). 
Therefore, a new file format number invalidates all tests, and one needs to 
manually verify whether the new output is still OK (for the current change I 
did that by searching for --Separator-- in all updated test references, but 
of course the details of the verify step depend strongly on the nature of 
the file format update).


Georg



Re: Can someone update the tex2lyx files to format 475??

2014-05-12 Thread Enrico Forestieri
On Mon, May 12, 2014 at 09:41:50PM +0200, Georg Baum wrote:

 Enrico Forestieri wrote:
 
  I think that the test should not take into account the first two lines
  of the LyX documents. Indeed, there is no reason for failure in this case.
  Look:
  
  $ ../../../build/src/tex2lyx/tex2lyx box-color-size-space-align.tex
  box-color-size-space-align.lyx Creating file
  /usr/local/src/lyx/lyx-devel/src/tex2lyx/test/box-color-size-space-
 align.lyx
  $ diff -u -I '^#LyX' -I '^\\lyxformat' box-color-size-space-align.lyx.lyx
  box-color-size-space-align.lyx no output
  
  So, the only difference is in the first two lines and the test should
  succeed. However, I don't know what is the rationale of these tests.
 
 This has been discussed at length in the past. The very first line does not 
 need to be compared (it is only a comment), but the second one is important. 
 For example, if the file format number would be ignored, and you had updated 
 LYX_FORMAT_TEX2LYX, but forgot the change in src/tex2lyx/text.cpp, then all 
 tests would still have been passed, although test-structure.lyx would be 
 invalid (file format 475, but still using the old separator layout). 
 Therefore, a new file format number invalidates all tests, and one needs to 
 manually verify whether the new output is still OK (for the current change I 
 did that by searching for --Separator-- in all updated test references, but 
 of course the details of the verify step depend strongly on the nature of 
 the file format update).

I see. Thanks for the clarification.

-- 
Enrico


Re: Call for testers: the features/str-metrics branch

2014-05-12 Thread Stephan Witt
Am 12.05.2014 um 10:21 schrieb Jean-Marc Lasgouttes lasgout...@lyx.org:

 08/05/2014 12:22, Stephan Witt:
 Currently the drawing of LyX is not appropriate for high resolution displays.
 
 I'm afraid your suggestion is not suitable to improve this.
 
 This is something unrelated to str-metrics branch, right?

Text rendering shouldn't go to bitmaps and later copied to screen. This is what 
I wanted to avoid.

 I agree that we will have to fix this soon. Do we have an open bug?

There are some, but I don't know of a bug mentioning the problem with text in 
work area.

 Is it only a mac/retina issue, or is it also true on windows/linux hi 
 definition displays.

I don't know how hi-resolution on windows/linux look.

Stephan

Re: Can someone update the tex2lyx files to format 475??

2014-05-12 Thread Enrico Forestieri
On Mon, May 12, 2014 at 09:33:39PM +0200, Georg Baum wrote:
 
 The procedure of updating a file format is documented in section 2.3 of 
 lib/doc/Development.lyx.

Doh! I was missing that. Sorry.

 I verified that the new code is correct and did the update.

Thank you. I had manually checked the tests but was unsure about
what to do.

-- 
Enrico


Re: Shortcuts for 'post' arguments

2014-05-12 Thread aparsloe


On 26/04/2014 8:15 p.m., Jürgen Spitzmüller wrote:

2014-04-26 2:50 GMT+02:00 aparsloe:

The Alt+A 1, etc. shortcuts  for custom inset arguments are a real
boon. However, I note that a 'post' argument, following the main
argument, doesn't get a shortcut, which is a pity. Is this
oversight or are there technical reasons preventing the extension
of shortcuts to 'post' arguments?


It's just not implemented. You can create shortcuts via bindings to 
argument-insert post:1 etc. similar to the normal argument bindings 
in menus.inc. Same for the 'item' argument.


Jürgen
Very belatedly, thank you. Of course you meant menus.bind (in the bind 
folder in the LyX Resources folder). I have a custom inset with two post 
arguments and have altered menus.bind by commenting out the first line 
and adding the other two, then saving the changed file in my personal 
LyX bind folder:


#\bind M-a 9argument-insert 9

\bind M-a 0argument-insert post:1
\bind M-a 9argument-insert post:2

The shortcuts are considerably more convenient than the mouse work 
previously required.


Andrew





Can someone update the tex2lyx files to format 475??

2014-05-12 Thread Scott Kostyshak
The tex2lyx tests are failing for me because of the recent format
change. Can someone update the files?

I tried to do so by running
${LYX2LYX} "$1" > temp.lyx && mv temp.lyx "$1"
on all .lyx files in src/tex2lyx/test

I got the following warnings:
Warning: #LyX file created by tex2lyx 2.1

Why is this a warning? As long as lyx2lyx finds \lyxformat why does it
care who made the file?

In any case, at this point I realized the fix is a little more
complicated because I need to run tex2lyx on the files so I wanted to
check in here first to see what the process is for updating the files
and if someone has automated it.

Scott


Re: Call for testers: the features/str-metrics branch

2014-05-12 Thread Jean-Marc Lasgouttes

11/05/2014 23:31, Guy Rutenberg:

I did some initial testing and came up with the following wrong
behavior: When in RTL mode (i.e. settng the document language to hebrew)
and typing some narrow characters such as ו (vav) or even the English
`i` slightly moves the right margin to the left. By typing consecutive
"narrow" characters this movement is significant.

Typing wide characters has the opposite effect: The margin moves to the
right.

I've attached a screenshot. All the lines should be aligned the same,
however different character width shift the margin differently (there
should be no shift at all).


Hello Guy,

Thanks a lot for your tests. This effect is very weird. Could you create 
a bug, maybe with an example file since I can't type Hebrew characters 
:) I have to track correctly all the bugs that got reported.


JMarc



Re: Call for testers: the features/str-metrics branch

2014-05-12 Thread Jean-Marc Lasgouttes

11/05/2014 23:37, Guy Rutenberg:

I actually found a more serious bug. When in RTL mode (`language
hebrew`) if one types a single continuous line without any spaces, LyX
simply hangs when it reaches the end-of-line. If there are spaces it
breaks the line correctly. I've checked it on Linux, can others
reproduce the bug as well?


Noted. Could you create a bug too?

Thanks,
JMarc



Re: Call for testers: the features/str-metrics branch

2014-05-12 Thread Jean-Marc Lasgouttes

03/05/2014 00:16, Scott Kostyshak:

On Fri, May 2, 2014 at 12:00 PM, Scott Kostyshak  wrote:

On Fri, May 2, 2014 at 8:18 AM, Jean-Marc Lasgouttes  wrote:

I did not manage to reproduce. Do you have a file to try is out?


I will send you the file when I get home. I will also check that the
build logs are the same. I took care to use the latest commit from
master that you merged in for the comparison and the same build
script, but maybe somehow a CMake flag was added/subtracted.

Scott


See attached for the example. I checked and that build logs are the
same. Attached is my output of CMake. I've also tried with my normal
preferences and with default preferences. I've also confirmed that the
output of ldd on the binaries is the same. And I reproduced the same
difference in behaviors on a different machine (although a very
similar setup).


This is now ticket #9114.

JMarc



Re: cmake warnings

2014-05-12 Thread Kornel Benko
Am Montag, 12. Mai 2014 um 07:35:36, schrieb Stephan Witt 
> >> I'd like to terminate if there is no spell checker and it's not said to 
> >> ignore this.
> >> The LYX_ options aren't three state. So this is possible only with a check 
> >> for another
> >> option, right?
> > 
> > Yes.
> > 
> >> Then I'd prefer to give the hint at a more prominent location.
> >> 
> >> Alternative patch is attached.
> >> 
> >> Stephan
> > 
> > Yes, better place for the message. But the option is missing.
> 
> Yes, I didn't insist to abort. What's your opinion?
> 

I don't insist either. The behaviour until now was to do nothing.
Therefore the new option should start with default not to abort (if any option).

Proposing the name as LYX_REQUIRE_SPELLCHECK.

Kornel

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


Re: Call for testers: the features/str-metrics branch

2014-05-12 Thread Jean-Marc Lasgouttes

08/05/2014 12:22, Stephan Witt:

Currently the drawing of LyX is not appropriate for high resolution displays.

I'm afraid your suggestion is not suitable to improve this.


This is something unrelated to str-metrics branch, right? I agree that 
we will have to fix this soon. Do we have an open bug? Is it only a 
mac/retina issue, or is it also true on windows/linux hi definition 
displays.


JMarc



Re: LyX Export via LaTeXML

2014-05-12 Thread Guenter Milde
Dear Frédéric,

thanks for your efforts merging LyX and LaTeXML - this looks promising.

On 2014-05-11, Frédéric WANG wrote:
> Thanks Richard,

> I just had a quick look at the code. Indeed, I realized that the case of 
> LyXHTML is a bit special. So in a first step, I'll just focus on 
> EPUB3/HTML5 export via LaTeXML without special option. I see this would 
> be essentially modifying lib/configure.py. 

This is, IMO, the second step.

First, I recommend, try a custom converter:

 Open Lyx and go to 
 
 Tools>Preferences>File Handling>Converters

Add Converters for the desired conversion. You may have to add dummy
fileformats for different ways to create the same format (HTML, say).
(See how this is done with PDF1 ... PDF5.)

This is also described in Chapter 3 of the Help>Customization documentation.


If this works, report back here or at the LyX wiki.
Then as a next step an auto-configuration can be set up.

Günter



Re: Call for testers: the features/str-metrics branch

2014-05-12 Thread Jean-Marc Lasgouttes

08/05/2014 22:14, Vincent van Ravesteijn:

I think the real solution then would be to use glyphs.


But glyphs do not work for ff ligature, right?

I think only clipping can work (see ticket #9116).

But first, we have to get cursor positioning right (ticket #9115).

JMarc


Re: Can someone update the tex2lyx files to format 475??

2014-05-12 Thread Kornel Benko
Am Montag, 12. Mai 2014 um 03:34:10, schrieb Scott Kostyshak 
> The tex2lyx tests are failing for me because of the recent format
> change. Can someone update the files?
> 
> I tried to do so by running
> ${LYX2LYX} "$1" > temp.lyx && mv temp.lyx "$1"
> on all .lyx files in src/tex2lyx/test
> 
> I got the following warnings:
> Warning: #LyX file created by tex2lyx 2.1
> 
> Why is this a warning? As long as lyx2lyx finds \lyxformat why does it
> care who made the file?


The message says it all: files are not created by lyx2lyx but tex2lyx.

> In any case, at this point I realized the fix is a little more
> complicated because I need to run tex2lyx on the files so I wanted to
> check in here first to see what the process is for updating the files
> and if someone has automated it.

I run one test.
# ctest -R tex2lyx/cmplyx/box-color-size-space-align.tex
==> FAILED

Look into Testing/Temporary/LastTest.log I see diff of
/usr/BUILD/BuildLyxGit/src/tex2lyx/test/box-color-size-space-align.lyx
and
/usr/src/lyx/lyx-git/src/tex2lyx/test/box-color-size-space-align.lyx.lyx

If the differences are OK for me, I can then copy
/usr/BUILD/BuildLyxGit/src/tex2lyx/test/box-color-size-space-align.lyx
over
/usr/src/lyx/lyx-git/src/tex2lyx/test/box-color-size-space-align.lyx.lyx

There should be nothing automated. We should always check the diffs IMHO.

> Scott

Kornel

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


Re: LyX Export via LaTeXML

2014-05-12 Thread Frédéric WANG

Le 12/05/2014 10:23, Guenter Milde a écrit :
This is, IMO, the second step. First, I recommend, try a custom 
converter: Open Lyx and go to Tools>Preferences>File 
Handling>Converters Add Converters for the desired conversion. You may 
have to add dummy fileformats for different ways to create the same 
format (HTML, say). (See how this is done with PDF1 ... PDF5.) This is 
also described in Chapter 3 of the Help>Customization documentation. 
If this works, report back here or at the LyX wiki. Then as a next 
step an auto-configuration can be set up. Günter 
Thank Günter. Well, given that I already built the development program 
and started to modify configure.py, I think it will be more convenient 
for me to continue like that instead of using the LyX user interface. 
However, I see that the latter will be useful to allow users to use 
LaTeXML on the LyX release, so I'll try & report that too when I submit 
a patch for configure.py.


--
Frédéric Wang
maths-informatique-jeux.com/blog/frederic



Re: Is the user-dir/scripts folder added to PATH for converter script execution?

2014-05-12 Thread Jean-Marc Lasgouttes

29/04/2014 19:29, Scott Kostyshak:

We do not parse looking for R commands in Systemcall::startscript as
we were doing for Python. The second patch should not change any
functionality, just organization (I will state this explicitly in the
commit message). Just in case, I tested exporting the knitr manual and
it exported successfully.


OK, then.

JMarc



Re: Call for testers: the features/str-metrics branch

2014-05-12 Thread Jean-Marc Lasgouttes

30/04/2014 18:36, Jean-Marc Lasgouttes:

Hello,

I finally think that the str-metrics branch is ready for a first round
of testing. I would like to know everything that does not work
especially (but not limited to) RTL writing.


I get what I asked for, and quite a lot of work to do :)

The tracking bug for this branch is #9003.
http://www.lyx.org/trac/ticket/9003

I tried to update it so that it is a good entry point to see the 
advancement of the feature.


JMarc



Re: LyX Export via LaTeXML

2014-05-12 Thread Frédéric WANG

Hi all,

I provide in attachment a small patch for what I think is essentially 
needed for LaTeXML export in LyX


1) merging the checkViewer call for HTML previewer + adding the HTML5 
format to it.
2) adding checkViewer for EPUB. At the moment, the viewer is Firefox and 
it is assumed that one EPUB reader add-on is installed.

3) adding "latexmlc --format=html4" as another HTML converter.
4) adding latexml as an EPUB3 and HTML5 converters. More could be added 
later, in particular I'm aware of 
https://github.com/michal-h21/tex4ebook for an extension of tex4ht with 
EPUB export.


I tested the HTML5 and EPUB3 export. The files are generated and I can 
preview them in Firefox (even if the document contains babel errors). 
Things that remains to consider:


a) Fix LaTeXML bug with babel 
https://github.com/brucemiller/LaTeXML/issues/487 and do more testing to 
see how LaTeXML deals with LaTeX files generated by LyX.
b) Improve detection of EPUB reader, perhaps add more EPUB readers in 
the list.
c) Check if we need to handle directories instead of a single file for 
HTML5/HTML export (LaTeXML generates png & css files, so I wonder if the 
ext_copy.py script should be used).


--
Frédéric Wang
maths-informatique-jeux.com/blog/frederic

diff --git a/lib/configure.py b/lib/configure.py
index ddaeb0c..247ab6a 100644
--- a/lib/configure.py
+++ b/lib/configure.py
@@ -634,7 +634,14 @@ def checkFormatEntries(dtl_tools):
 \Format oocalc ods"OpenOffice spreadsheet" "" "" "%%""document"	"application/vnd.oasis.opendocument.spreadsheet"'''])
  #
 checkViewer('an HTML previewer', ['firefox', 'mozilla file://$$p$$i', 'netscape'],
-rc_entry = [r'\Format xhtml  xhtml   "LyXHTML"  y "%%" """document,menu=export"	"application/xhtml+xml"'])
+rc_entry = [r'''\Format xhtml  xhtml   "LyXHTML"  y "%%" """document,menu=export""application/xhtml+xml"
+\Format html	"html, htm"	HTML	H	"%%"	""	"document,menu=export"	"text/html"
+\Format html5	html  	HTML5	""	"%%"	""	"document,menu=export"	"text/html"'''])
+ #
+ #  FIXME: check that the EPUBReader/Lucifox add-ons are installed?
+checkViewer('an EPUB reader', ['firefox', 'mozilla file://$$p$$i', 'netscape'],
+rc_entry = [r'''\Format epub	"epub"	"EPUB3"	""	"%%"	""	"document,menu=export"	"application/epub+zip"'''])
+
  #
 checkEditor('a BibTeX editor', ['jabref', 'JabRef', \
 'pybliographic', 'bibdesk', 'gbib', 'kbib', \
@@ -670,9 +677,6 @@ def checkFormatEntries(dtl_tools):
 # Windows only: DraftDVI
 addToRC(r'\Format dvi2   dvi DraftDVI   ""	""	""	"vector"	""')
 #
-checkViewer('an HTML previewer', ['firefox', 'mozilla file://$$p$$i', 'netscape'],
-rc_entry = [r'\Format html  "html, htm" HTMLH  "%%"	""	"document,menu=export"	"text/html"'])
-#
 checkViewerEditor('Noteedit', ['noteedit'],
 rc_entry = [r'\Format noteedit   not Noteedit   "" "%%"	"%%"	"vector"	""'])
 #
@@ -789,7 +793,8 @@ def checkConverterEntries():
   # On SuSE the scripts have a .sh suffix, and on debian they are in /usr/share/tex4ht/
   path, htmlconv = checkProg('a LaTeX -> HTML converter', ['htlatex $$i', 'htlatex.sh $$i', \
   '/usr/share/tex4ht/htlatex $$i', 'tth  -t -e2 -L$$b < $$i > $$o', \
-  'latex2html -no_subdir -split 0 -show_section_numbers $$i', 'hevea -s $$i'],
+  'latex2html -no_subdir -split 0 -show_section_numbers $$i',
+  'hevea -s $$i', 'latexmlc --dest $$o --format=html4 $$i'],
   rc_entry = [ r'\converter latex  html   "%%"	"needaux"' ])
   if htmlconv.find('htlatex') >= 0 or htmlconv == 'latex2html':
 addToRC(r'''\copierhtml   "python -tt $$s/scripts/ext_copy.py -e html,png,css $$i $$o"''')
@@ -804,6 +809,15 @@ def checkConverterEntries():
   else:
 addToRC(r'''\copierwordhtml   "python -tt $$s/scripts/ext_copy.py $$i $$o"''')
 
+# Search for HTML5 converters
+path, html5conv = checkProg('a LaTeX -> HTML5 converter',
+['latexmlc --dest $$o $$i'],
+rc_entry = [ r'\converter	latex	html5	"%%"	""' ])
+
+# Search for EPUB3 converters
+path, epub3conv = checkProg('a LaTeX -> EPUB3 converter',
+['latexmlc --dest $$o $$i'],
+rc_entry = [ r'\converter	latex	epub	"%%"	""' ])
 
 # Check if LyXBlogger is installed
 lyxblogger_found = checkModule('lyxblogger')


Re: Call for testers: the features/str-metrics branch

2014-05-12 Thread Richard Heck

On 05/12/2014 06:01 AM, Jean-Marc Lasgouttes wrote:

30/04/2014 18:36, Jean-Marc Lasgouttes:

Hello,

I finally think that the str-metrics branch is ready for a first round
of testing. I would like to know everything that does not work
especially (but not limited to) RTL writing.


I get what I asked for, and quite a lot of work to do :)

The tracking bug for this branch is #9003.
http://www.lyx.org/trac/ticket/9003

I tried to update it so that it is a good entry point to see the 
advancement of the feature.


Do you want to create a str-metrics component for this?

Richard



Re: Call for testers: the features/str-metrics branch

2014-05-12 Thread Jean-Marc Lasgouttes

Le 12/05/14 15:13, Richard Heck a écrit :

I tried to update it so that it is a good entry point to see the
advancement of the feature.


Do you want to create a str-metrics component for this?


It seemed a bit too much, especially since this is supposed to be 
transient. I have the tracking bug, and all bugs new to the branch have 
a title that starts with [str-metrics]. I could also have used a keyword.


JMarc


new layout and distribution files

2014-05-12 Thread DM Bortz
Hello,

I have written some layout and template files for article classes currently
not included in the standard lyx distribution, including:

Proc. Nat. Acad. of Science USA (pnastwo)
DeGruyter (degruyter-journal-a)
Computer Modeling in Engineering & Sciences (cmes)

In reading online, it wasn't clear what the best way was to go about
sharing them...

D

-- 
DM Bortz
Applied Mathematics
University of Colorado
Boulder, CO 80309-0526
http://mathbio.colorado.edu


Re: new layout and distribution files

2014-05-12 Thread Jürgen Spitzmüller
2014-05-12 19:18 GMT+02:00 DM Bortz:

> Hello,
>
> I have written some layout and template files for article classes
> currently not included in the standard lyx distribution, including:
>
> Proc. Nat. Acad. of Science USA (pnastwo)
> DeGruyter (degruyter-journal-a)
> Computer Modeling in Engineering & Sciences (cmes)
>
> In reading online, it wasn't clear what the best way was to go about
> sharing them...
>

Such layouts are usually collected here:

http://wiki.lyx.org/Layouts/Layouts

If there is general interest, they can also be considered for inclusion
into the distribution (after some testing).

Thanks for sharing
Jürgen


Re: Can someone update the tex2lyx files to format 475??

2014-05-12 Thread Enrico Forestieri
On Mon, May 12, 2014 at 03:34:10AM -0400, Scott Kostyshak wrote:

> The tex2lyx tests are failing for me because of the recent format
> change. Can someone update the files?
> 
> I tried to do so by running
> ${LYX2LYX} "$1" > temp.lyx && mv temp.lyx "$1"
> on all .lyx files in src/tex2lyx/test
> 
> I got the following warnings:
> Warning: #LyX file created by tex2lyx 2.1
> 
> Why is this a warning? As long as lyx2lyx finds \lyxformat why does it
> care who made the file?
> 
> In any case, at this point I realized the fix is a little more
> complicated because I need to run tex2lyx on the files so I wanted to
> check in here first to see what the process is for updating the files
> and if someone has automated it.

I have no idea. However, after running tex2lyx there should be no difference
(apart from the first two lines of the generated LyX document), except if
the .tex file had two same environments one after the other, without
anything in between. In this case, the only difference should be that
a plain separator inset is inserted instead of the old layout separator.

-- 
Enrico


Re: Can someone update the tex2lyx files to format 475??

2014-05-12 Thread Enrico Forestieri
On Mon, May 12, 2014 at 10:36:32AM +0200, Kornel Benko wrote:
> 
> I run one test.
>   # ctest -R tex2lyx/cmplyx/box-color-size-space-align.tex
>   ==> FAILED

I think that the test should not take into account the first two lines
of the LyX documents. Indeed, there is no reason for failure in this case.
Look:

$ ../../../build/src/tex2lyx/tex2lyx box-color-size-space-align.tex 
box-color-size-space-align.lyx
Creating file 
/usr/local/src/lyx/lyx-devel/src/tex2lyx/test/box-color-size-space-align.lyx
$ diff -u -I '^#LyX' -I '^\\lyxformat' box-color-size-space-align.lyx.lyx 
box-color-size-space-align.lyx


So, the only difference is in the first two lines and the test should
succeed. However, I don't know what is the rationale of these tests.

-- 
Enrico


Re: Converters: Skip Qt's loadable svg function

2014-05-12 Thread Georg Baum
Vincent van Ravesteijn wrote:

> Richard Heck schreef op 6-5-2014 15:41:
>> On 05/06/2014 04:57 AM, Vincent van Ravesteijn wrote:
>>> Previewing of some (most) svg files does not work anymore even if
>>> Inkscape and the converters has been set correctly. This is because
>>> Qt claims to be able to load svg files natively. However, Qt does a
>>> bad job doing that. Therefore, I want to use my configured converter.
>>> How can I do that ?
>>>
>>> I now applied the attached patch, but it might not be everyone's choice.
>>
>> I guess my only thought, if Qt really does such a bad job with these,
>> would be to put this hack in loadableImageFormats(), to ensure
>> consistency. At the moment, that is only used here anyway, so it is
>> equivalent.
> 
> Now I remember why I didn't do that. We might want the Qt-automatic-way
> as a fallback when no custom converter is defined.

The Qt builtin converters should not be special IMHO: They should get 
entries in the preferences file (we would probably need something like a new 
keyword for that), and configure.py could then set them as a last resort 
fallback if nothing else is available. Then users could also switch it off 
if needed, and nothing is hardcoded.


Georg



Re: examples/thesis/thesis.lyx "Malformed LyX document"

2014-05-12 Thread Georg Baum
Scott Kostyshak wrote:

> On master branch, the command
> lyx2lyx -t 413 thesis.lyx > temp.lyx
> gives the output
> Warning: Malformed LyX document: Missing \justification.
> but just opening the LyX document does not give any error.
> 
> Is it malformed?

It is malformed in such a way that lyx2lyx does not find the \justification 
header setting. However, this does not matter, since it simply would remove 
it. See the commit log of cacd2a041d2c for details.

> Note that other documents in the same folder give that error also.

These were obviously converted from older versions by lyx2lyx and not saved 
by LyX.


Georg



Re: Can someone update the tex2lyx files to format 475??

2014-05-12 Thread Georg Baum
Enrico Forestieri wrote:

> On Mon, May 12, 2014 at 03:34:10AM -0400, Scott Kostyshak wrote:
> 
>> The tex2lyx tests are failing for me because of the recent format
>> change. Can someone update the files?
>> 
>> I tried to do so by running
>> ${LYX2LYX} "$1" > temp.lyx && mv temp.lyx "$1"
>> on all .lyx files in src/tex2lyx/test
>> 
>> I got the following warnings:
>> Warning: #LyX file created by tex2lyx 2.1
>> 
>> Why is this a warning? As long as lyx2lyx finds \lyxformat why does it
>> care who made the file?

Because lyx2lyx tries to read the LyX version from that file (see 
read_version() in LyX.py), and this fails. lyx2lyx should be teached about 
tex2lyx, then the warning would vanish.

>> In any case, at this point I realized the fix is a little more
>> complicated because I need to run tex2lyx on the files so I wanted to
>> check in here first to see what the process is for updating the files
>> and if someone has automated it.

It is automated. Please read section 3.2.2 of lib/doc/Development.lyx. 
Kornel is right, you need to look at the diffs manually in order to judge 
whether the updated references are OK, but the process of producing them and 
copying them where git expects them is automated (and needs to be automated 
- nobody would copy over all these files by hand).

> I have no idea. However, after running tex2lyx there should be no
> difference (apart from the first two lines of the generated LyX document),
> except if the .tex file had two same environments one after the other,
> without anything in between. In this case, the only difference should be
> that a plain separator inset is inserted instead of the old layout
> separator.

The procedure of updating a file format is documented in section 2.3 of 
lib/doc/Development.lyx. Your update was perfect (including tex2lyx support 
- this is often not done), the only missing bit was the update of the test 
references. I verified that the new code is correct and did the update.


Georg



Re: Can someone update the tex2lyx files to format 475??

2014-05-12 Thread Georg Baum
Enrico Forestieri wrote:

> I think that the test should not take into account the first two lines
> of the LyX documents. Indeed, there is no reason for failure in this case.
> Look:
> 
> $ ../../../build/src/tex2lyx/tex2lyx box-color-size-space-align.tex
> box-color-size-space-align.lyx Creating file
> /usr/local/src/lyx/lyx-devel/src/tex2lyx/test/box-color-size-space-
align.lyx
> $ diff -u -I '^#LyX' -I '^\\lyxformat' box-color-size-space-align.lyx.lyx
> box-color-size-space-align.lyx 
> 
> So, the only difference is in the first two lines and the test should
> succeed. However, I don't know what is the rationale of these tests.

This has been discussed at length in the past. The very first line does not 
need to be compared (it is only a comment), but the second one is important. 
For example, if the file format number would be ignored, and you had updated 
LYX_FORMAT_TEX2LYX, but forgot the change in src/tex2lyx/text.cpp, then all 
tests would still have been passed, although test-structure.lyx would be 
invalid (file format 475, but still using the old separator layout). 
Therefore, a new file format number invalidates all tests, and one needs to 
manually verify whether the new output is still OK (for the current change I 
did that by searching for --Separator-- in all updated test references, but 
of course the details of the verify step depend strongly on the nature of 
the file format update).


Georg



Re: Can someone update the tex2lyx files to format 475??

2014-05-12 Thread Enrico Forestieri
On Mon, May 12, 2014 at 09:41:50PM +0200, Georg Baum wrote:

> Enrico Forestieri wrote:
> 
> > I think that the test should not take into account the first two lines
> > of the LyX documents. Indeed, there is no reason for failure in this case.
> > Look:
> > 
> > $ ../../../build/src/tex2lyx/tex2lyx box-color-size-space-align.tex
> > box-color-size-space-align.lyx Creating file
> > /usr/local/src/lyx/lyx-devel/src/tex2lyx/test/box-color-size-space-
> align.lyx
> > $ diff -u -I '^#LyX' -I '^\\lyxformat' box-color-size-space-align.lyx.lyx
> > box-color-size-space-align.lyx 
> > 
> > So, the only difference is in the first two lines and the test should
> > succeed. However, I don't know what is the rationale of these tests.
> 
> This has been discussed at length in the past. The very first line does not 
> need to be compared (it is only a comment), but the second one is important. 
> For example, if the file format number would be ignored, and you had updated 
> LYX_FORMAT_TEX2LYX, but forgot the change in src/tex2lyx/text.cpp, then all 
> tests would still have been passed, although test-structure.lyx would be 
> invalid (file format 475, but still using the old separator layout). 
> Therefore, a new file format number invalidates all tests, and one needs to 
> manually verify whether the new output is still OK (for the current change I 
> did that by searching for --Separator-- in all updated test references, but 
> of course the details of the verify step depend strongly on the nature of 
> the file format update).

I see. Thanks for the clarification.

-- 
Enrico


Re: Call for testers: the features/str-metrics branch

2014-05-12 Thread Stephan Witt
Am 12.05.2014 um 10:21 schrieb Jean-Marc Lasgouttes :

> 08/05/2014 12:22, Stephan Witt:
>> Currently the drawing of LyX is not appropriate for high resolution displays.
>> 
>> I'm afraid your suggestion is not suitable to improve this.
> 
> This is something unrelated to str-metrics branch, right?

Text rendering shouldn't go to bitmaps and later copied to screen. This is what 
I wanted to avoid.

> I agree that we will have to fix this soon. Do we have an open bug?

There are some, but I don't know of a bug mentioning the problem with text in 
work area.

> Is it only a mac/retina issue, or is it also true on windows/linux hi 
> definition displays.

I don't know how hi-resolution on windows/linux look.

Stephan

Re: Can someone update the tex2lyx files to format 475??

2014-05-12 Thread Enrico Forestieri
On Mon, May 12, 2014 at 09:33:39PM +0200, Georg Baum wrote:
> 
> The procedure of updating a file format is documented in section 2.3 of 
> lib/doc/Development.lyx.

Doh! I was missing that. Sorry.

> I verified that the new code is correct and did the update.

Thank you. I had manually checked the tests but was unsure about
what to do.

-- 
Enrico


Re: Shortcuts for 'post' arguments

2014-05-12 Thread aparsloe


On 26/04/2014 8:15 p.m., Jürgen Spitzmüller wrote:

2014-04-26 2:50 GMT+02:00 aparsloe:

The Alt+A 1, etc. shortcuts  for custom inset arguments are a real
boon. However, I note that a 'post' argument, following the main
argument, doesn't get a shortcut, which is a pity. Is this
oversight or are there technical reasons preventing the extension
of shortcuts to 'post' arguments?


It's just not implemented. You can create shortcuts via bindings to 
"argument-insert post:1" etc. similar to the normal argument bindings 
in menus.inc. Same for the 'item' argument.


Jürgen
Very belatedly, thank you. Of course you meant menus.bind (in the bind 
folder in the LyX Resources folder). I have a custom inset with two post 
arguments and have altered menus.bind by commenting out the first line 
and adding the other two, then saving the changed file in my personal 
LyX bind folder:


#\bind "M-a 9""argument-insert 9"

\bind "M-a 0""argument-insert post:1"
\bind "M-a 9""argument-insert post:2"

The shortcuts are considerably more convenient than the mouse work 
previously required.


Andrew