Re: [PATCH] Fix offset error in computation of hfills

2015-11-27 Thread Jürgen Spitzmüller
2015-11-27 14:37 GMT+01:00 Jean-Marc Lasgouttes : > What about the start of a paragraph? At the start of a paragraph, hfills and hspaces are _not_discarded. > And what about the end of row/paragraph? > hfills at the end of a paragraph are expanded. I think what the old mechanism tried to do

Re: [PATCH] Fix offset error in computation of hfills

2015-11-27 Thread Jean-Marc Lasgouttes
Le 27/11/2015 14:29, Jürgen Spitzmüller a écrit : \hspace and \hfill will be discarded at the beginning of a line (as opposed to the starred forms). So after \\, \newline etc., but also after an automatic line break. The former is something which we can symbolize in the work area (and do so,

Re: [PATCH] Fix offset error in computation of hfills

2015-11-27 Thread Jürgen Spitzmüller
2015-11-27 12:12 GMT+01:00 Jean-Marc Lasgouttes : > Ping! Is there some LaTeXnician that can tell me what we are supposed to > do to detect which hfills will expand and which will not? > \hspace and \hfill will be discarded at the beginning of a line (as opposed to the starred forms). So after \

Re: [PATCH] Fix offset error in computation of hfills

2015-11-27 Thread Jean-Marc Lasgouttes
Le 24/11/2015 09:37, Jean-Marc Lasgouttes a écrit : I do not really understand myself when hfills get discarded. As I understand it, hspace can be discarded too in some cases. I have first to have a description of the algorithm to be able to proceed. Ping! Is there some LaTeXnician that can tel

Re: [PATCH] Fix offset error in computation of hfills

2015-11-24 Thread Jean-Marc Lasgouttes
Le 24/11/2015 00:55, Guillaume Munch a écrit : A simple argument for going further and getting rid of ParagraphMetrics::hfillExpansion (which I understand is causing the remaining problem) is that LyX's row breaks are different from LaTeX's anyway, as shown in Example 3 (or whenever there is a wi

Re: [PATCH] Fix offset error in computation of hfills

2015-11-24 Thread Jean-Marc Lasgouttes
Le 24/11/2015 01:48, Uwe Stöhr a écrit : Am 23.11.2015 um 18:05 schrieb Jean-Marc Lasgouttes: Can I commit this first patch? The patch looks reasonable but why is this change necessary?: -dim = Dimension(10, 10, 10); +dim = Dimension(5, 10, 10); Maybe the reason for the valu

Re: [PATCH] Fix offset error in computation of hfills

2015-11-23 Thread Uwe Stöhr
Am 23.11.2015 um 18:05 schrieb Jean-Marc Lasgouttes: Can I commit this first patch? The patch looks reasonable but why is this change necessary?: - dim = Dimension(10, 10, 10); + dim = Dimension(5, 10, 10); Maybe the reason for the values should be documented in a

Re: [PATCH] Fix offset error in computation of hfills

2015-11-23 Thread Guillaume Munch
Le 23/11/2015 17:05, Jean-Marc Lasgouttes a écrit : This patch is part of ticket: http://www.lyx.org/trac/ticket/9860 Consider the file newfile1.lyx in attachment. The length of hfills is not computed correctly, since the minimal size of each hfill is forgotten. Basically, a 'wid = hfill' has t

[PATCH] Fix offset error in computation of hfills

2015-11-23 Thread Jean-Marc Lasgouttes
This patch is part of ticket: http://www.lyx.org/trac/ticket/9860 Consider the file newfile1.lyx in attachment. The length of hfills is not computed correctly, since the minimal size of each hfill is forgotten. Basically, a 'wid = hfill' has to be replaced by a 'wid += hfill'. The rest of the