Re: [patch] support for \baselineskip

2017-04-10 Thread Jean-Marc Lasgouttes
Le 08/04/2017 à 04:58, Uwe Stöhr a écrit : El 07.04.2017 a las 10:51, Jean-Marc Lasgouttes escribió: Maybe more like:... Thanks. The patch is now in including this hint and the new BLS unit is available for all lengths. Thanks. JMarc

Re: [patch] support for \baselineskip

2017-04-07 Thread Uwe Stöhr
El 07.04.2017 a las 13:30, Helge Hafting escribió: Do you want to have the BLS unit for all lengths, no matter if for vertical or horizontal? Yes, please. To be consistent with existing lengths/heights, and because it is useful sometimes. No need for artifical limitations. I put it in

Re: [patch] support for \baselineskip

2017-04-07 Thread Uwe Stöhr
El 07.04.2017 a las 10:51, Jean-Marc Lasgouttes escribió: Maybe more like:... Thanks. The patch is now in including this hint and the new BLS unit is available for all lengths. regards Uwe

Re: [patch] support for \baselineskip

2017-04-07 Thread Jean-Marc Lasgouttes
Le 07/04/2017 à 02:03, Uwe Stöhr a écrit : OK, what about this?: Maybe more like: // baselineskip is approx. 1.2 times the font size for the cmr fonts // The value actually depends on the current paragraph (see TextMetrics::setRowHeight), but we do not have this information here. result =

Re: [patch] support for \baselineskip

2017-04-06 Thread Uwe Stöhr
El 06.04.2017 a las 10:50, Jean-Marc Lasgouttes escribió: Concerning the code in Length::inInch: the value normally needs to take into account the line spacing setting of the document. I understand that it is difficult to obtain here, but a minimal action would be to document this shortcoming

Re: [patch] support for \baselineskip

2017-04-06 Thread Uwe Stöhr
El 06.04.2017 a las 09:41, Jean-Marc Lasgouttes escribió: Le 06/04/2017 à 08:08, Pavel Sanda a écrit : I don't have strong opinion whether BLS should or shouldn't be available for both horizontal and vertical. I however dislike the code you posted. The easy way how to 'fix' it is to drop all

Re: [patch] support for \baselineskip

2017-04-06 Thread Jean-Marc Lasgouttes
Le 02/04/2017 à 14:52, Uwe Stöhr a écrit : After only 7 years ;-) I found time to finish a patch to support \baselineskip, see attached. The patch is a fileformat change. \baselineskip is the distance between the baseline of 2 subsequent text lines in a paragraph. Therefore \vspace

Re: [patch] support for \baselineskip

2017-04-06 Thread Jean-Marc Lasgouttes
Le 06/04/2017 à 08:08, Pavel Sanda a écrit : I don't have strong opinion whether BLS should or shouldn't be available for both horizontal and vertical. I however dislike the code you posted. The easy way how to 'fix' it is to drop all these removeUnits on various places and thus effectively

Re: [patch] support for \baselineskip

2017-04-06 Thread Pavel Sanda
Uwe Stöhr wrote: >>> + // remove baselineskip from width units >>> + columnWidthUnitLC->removeUnit(Length::BLS); >>> + tabularWidthUnitLC->removeUnit(Length::BLS); >> >> This is ugly. >> >> Unless you want to be consistent and do it for all 'senseless' combinations >> of vert/horiz spacing

Re: [patch] support for \baselineskip

2017-04-04 Thread Uwe Stöhr
El 04.04.2017 a las 05:02, Pavel Sanda escribió: Uwe Stöhr wrote: revert = [ - [534, [revert_dashligatures]], + [535, [revert_baselineskip]], + [534, [revert_dashligatures, revert_baselineskip]], why is revert_baselineskip 2x? This was a mistake. I forgot to

Re: [patch] support for \baselineskip

2017-04-03 Thread Pavel Sanda
Uwe Stöhr wrote: > revert = [ > - [534, [revert_dashligatures]], > + [535, [revert_baselineskip]], > + [534, [revert_dashligatures, revert_baselineskip]], why is revert_baselineskip 2x? > diff --git a/src/frontends/qt4/GuiGraphics.cpp >

[patch] support for \baselineskip

2017-04-02 Thread Uwe Stöhr
After only 7 years ;-) I found time to finish a patch to support \baselineskip, see attached. The patch is a fileformat change. \baselineskip is the distance between the baseline of 2 subsequent text lines in a paragraph. Therefore \vspace{\baselineskip} is a useful spacing. I implemented

Re: [patch] support for \\baselineskip

2011-10-29 Thread Uwe Stöhr
Am 28.10.2011 09:36, schrieb Jürgen Spitzmüller: You are right, that it is not in every case the exact value, but in, lets say, 90%. I think that the impossibility to get for all 100% the exact value should not prevent us from supporting \baselineskip. 90% or 80% or whatever is not the

Re: [patch] support for \\baselineskip

2011-10-29 Thread Uwe Stöhr
Am 28.10.2011 09:36, schrieb Jürgen Spitzmüller: You are right, that it is not in every case the exact value, but in, lets say, 90%. I think that the impossibility to get for all 100% the exact value should not prevent us from supporting \baselineskip. "90%" or "80%" or whatever is not the

Re: [patch] support for \\baselineskip

2011-10-28 Thread Jürgen Spitzmüller
Uwe Stöhr wrote: I don't understand. How can you find out the exact value of \baselineskip if the font size and linespread are defined in a class file? This is not possible. You are right, that it is not in every case the exact value, but in, lets say, 90%. I think that the

Re: [patch] support for \\baselineskip

2011-10-28 Thread Jürgen Spitzmüller
Uwe Stöhr wrote: > > I don't understand. How can you find out the exact value of > > \baselineskip if > > the font size and linespread are defined in a class file? This is not > > possible. > > You are right, that it is not in every case the exact value, but in, lets > say, 90%. I think that

Re: [patch] support for \\\\baselineskip

2010-08-13 Thread Jürgen Spitzmüller
Uwe Stöhr wrote: I cannot agree to this. LyX is not there to tell the user what to use. We should provide what LaTeX provides. We therefore already provide vertical lengths for horizontal features. There is no reason why we should not do the same for baselineskip. The users aren't stupid

Re: [patch] support for \\\\baselineskip

2010-08-13 Thread Jürgen Spitzmüller
Uwe Stöhr wrote: > >> I cannot agree to this. LyX is not there to tell the user what to use. > >> We should provide what LaTeX provides. We therefore already provide > >> vertical lengths for horizontal features. There is no reason why we > >> should not do the same for baselineskip. The users

Re: [patch] support for \\\\baselineskip

2010-08-12 Thread Uwe Stöhr
Am 26.07.2010 15:06, schrieb Jürgen Spitzmüller: I cannot agree to this. LyX is not there to tell the user what to use. We should provide what LaTeX provides. We therefore already provide vertical lengths for horizontal features. There is no reason why we should not do the same for

Re: [patch] support for \\\\baselineskip

2010-08-12 Thread Uwe Stöhr
Am 26.07.2010 15:12, schrieb Jürgen Spitzmüller: Default is in almost all classes, except of the presentation classes, 10. Well, at least for the KOMA classes, it is 11. I'm sure there are many more variations if you go through the hundreds of classes available at CTAN. Thanks for the hint.

Re: [patch] support for \\\\baselineskip

2010-08-12 Thread Uwe Stöhr
Am 26.07.2010 15:06, schrieb Jürgen Spitzmüller: I cannot agree to this. LyX is not there to tell the user what to use. We should provide what LaTeX provides. We therefore already provide vertical lengths for horizontal features. There is no reason why we should not do the same for

Re: [patch] support for \\\\baselineskip

2010-08-12 Thread Uwe Stöhr
Am 26.07.2010 15:12, schrieb Jürgen Spitzmüller: Default is in almost all classes, except of the presentation classes, "10". Well, at least for the KOMA classes, it is "11". I'm sure there are many more variations if you go through the hundreds of classes available at CTAN. Thanks for the

Re: [patch] support for \\\\baselineskip

2010-07-26 Thread Jürgen Spitzmüller
Uwe Stöhr wrote: That's why I wrote in 90%. Usually you have single line space and nearly all document classes use 1.2 for the baselineskip then. I don't know where you have that stats from. Anyway, reverting a dynamic value to a fixed one is the wrong way IMHO. Why don't you revert to

Re: [patch] support for \\\\baselineskip

2010-07-26 Thread Richard Heck
On 07/25/2010 08:55 PM, Uwe Stöhr wrote: Am 26.07.2010 00:32, schrieb Richard Heck: That's why I wrote in 90%. Usually you have single line space and nearly all document classes use 1.2 for the baselineskip then. I thought the worry was that there is no way to determine the fontsize. If

Re: [patch] support for \\\\baselineskip

2010-07-26 Thread Uwe Stöhr
Am 26.07.2010 08:02, schrieb Jürgen Spitzmüller: But all insets have different syntax. That would mean that I have to write a detection routine foe every inst. E.g. when I find baselineskip in a box I need to revert the whole box as TeX-code. This is a horror. I think this can be done. We

Re: [patch] support for \\\\baselineskip

2010-07-26 Thread Uwe Stöhr
Am 26.07.2010 14:45, schrieb Richard Heck: The class the defines the possible font sizes. You specify the font size in the document settings. But one option is default, i.e., not to specify it. How do you know what that means? Default is in almost all classes, except of the presentation

Re: [patch] support for \\\\baselineskip

2010-07-26 Thread Richard Heck
On 07/26/2010 08:56 AM, Uwe Stöhr wrote: Am 26.07.2010 14:45, schrieb Richard Heck: The class the defines the possible font sizes. You specify the font size in the document settings. But one option is default, i.e., not to specify it. How do you know what that means? Default is in almost

Re: [patch] support for \\\\baselineskip

2010-07-26 Thread Jürgen Spitzmüller
Uwe Stöhr wrote: Anyway, if you're too lazy to do this, I opt for limiting \baselineskip to vspace only (and maybe add other access points later). I cannot agree to this. LyX is not there to tell the user what to use. We should provide what LaTeX provides. We therefore already provide

Re: [patch] support for \\\\baselineskip

2010-07-26 Thread Jürgen Spitzmüller
Uwe Stöhr wrote: Default is in almost all classes, except of the presentation classes, 10. Well, at least for the KOMA classes, it is 11. I'm sure there are many more variations if you go through the hundreds of classes available at CTAN. Jürgen

Re: [patch] support for \\\\baselineskip

2010-07-26 Thread Jürgen Spitzmüller
Uwe Stöhr wrote: > That's why I wrote in 90%. Usually you have single line space and nearly > all document classes use 1.2 for the baselineskip then. I don't know where you have that stats from. Anyway, reverting a dynamic value to a fixed one is the wrong way IMHO. > >> > Why don't you

Re: [patch] support for \\\\baselineskip

2010-07-26 Thread Richard Heck
On 07/25/2010 08:55 PM, Uwe Stöhr wrote: Am 26.07.2010 00:32, schrieb Richard Heck: That's why I wrote in 90%. Usually you have single line space and nearly all document classes use 1.2 for the baselineskip then. I thought the worry was that there is no way to determine the fontsize. If

Re: [patch] support for \\\\baselineskip

2010-07-26 Thread Uwe Stöhr
Am 26.07.2010 08:02, schrieb Jürgen Spitzmüller: But all insets have different syntax. That would mean that I have to write a detection routine foe every inst. E.g. when I find baselineskip in a box I need to revert the whole box as TeX-code. This is a horror. I think this can be done. We

Re: [patch] support for \\\\baselineskip

2010-07-26 Thread Uwe Stöhr
Am 26.07.2010 14:45, schrieb Richard Heck: The class the defines the possible font sizes. You specify the font size in the document settings. But one option is "default", i.e., not to specify it. How do you know what that means? Default is in almost all classes, except of the presentation

Re: [patch] support for \\\\baselineskip

2010-07-26 Thread Richard Heck
On 07/26/2010 08:56 AM, Uwe Stöhr wrote: Am 26.07.2010 14:45, schrieb Richard Heck: The class the defines the possible font sizes. You specify the font size in the document settings. But one option is "default", i.e., not to specify it. How do you know what that means? Default is in

Re: [patch] support for \\\\baselineskip

2010-07-26 Thread Jürgen Spitzmüller
Uwe Stöhr wrote: > > Anyway, if you're too lazy to do this, I opt for limiting \baselineskip > > to vspace only (and maybe add other access points later). > > I cannot agree to this. LyX is not there to tell the user what to use. We > should provide what LaTeX provides. We therefore already

Re: [patch] support for \\\\baselineskip

2010-07-26 Thread Jürgen Spitzmüller
Uwe Stöhr wrote: > Default is in almost all classes, except of the presentation classes, "10". Well, at least for the KOMA classes, it is "11". I'm sure there are many more variations if you go through the hundreds of classes available at CTAN. Jürgen

Re: [patch] support for \\baselineskip

2010-07-25 Thread Jürgen Spitzmüller
Uwe Stöhr wrote: In my patch I failed to look in Length.cpp what is the current fontsize. Calling bv.buffer().params().fontsize doesn't work. Can you please help me here? All other things work as they should. No idea either. There was also a bug in the lyx2lyx routine. Better patch

Re: [patch] support for \\baselineskip

2010-07-25 Thread Uwe Stöhr
Am 25.07.2010 16:17, schrieb Jürgen Spitzmüller: In my patch I failed to look in Length.cpp what is the current fontsize. Calling bv.buffer().params().fontsize doesn't work. Can you please help me here? All other things work as they should. No idea either. Too bad. I only want to have a

Re: [patch] support for \\baselineskip

2010-07-25 Thread Jürgen Spitzmüller
Uwe Stöhr wrote: I don't think it's feasible to revert to some pt value. Its in ofer 90% the exact value in pt. So my reversion keeps the size the users wanted. I don't understand. How can you find out the exact value of \baselineskip if the font size and linespread are defined in a class

Re: [patch] support for \\\\baselineskip

2010-07-25 Thread Uwe Stöhr
Its in ofer 90% the exact value in pt. So my reversion keeps the size the users wanted. I don't understand. How can you find out the exact value of \baselineskip if the font size and linespread are defined in a class file? This is not possible. That's why I wrote in 90%. Usually you have

Re: [patch] support for \\\\baselineskip

2010-07-25 Thread Richard Heck
On 07/25/2010 03:25 PM, Uwe Stöhr wrote: Its in ofer 90% the exact value in pt. So my reversion keeps the size the users wanted. I don't understand. How can you find out the exact value of \baselineskip if the font size and linespread are defined in a class file? This is not possible.

Re: [patch] support for \\\\baselineskip

2010-07-25 Thread Uwe Stöhr
Am 26.07.2010 00:32, schrieb Richard Heck: That's why I wrote in 90%. Usually you have single line space and nearly all document classes use 1.2 for the baselineskip then. I thought the worry was that there is no way to determine the fontsize. If it's default, which it is in most cases by

Re: [patch] support for \\baselineskip

2010-07-25 Thread Jürgen Spitzmüller
Uwe Stöhr wrote: > > In my patch I failed to look in Length.cpp what is the current fontsize. > > Calling bv.buffer().params().fontsize doesn't work. Can you please help > > me here? All other things work as they should. No idea either. > There was also a bug in the lyx2lyx routine. Better patch

Re: [patch] support for \\baselineskip

2010-07-25 Thread Uwe Stöhr
Am 25.07.2010 16:17, schrieb Jürgen Spitzmüller: In my patch I failed to look in Length.cpp what is the current fontsize. Calling bv.buffer().params().fontsize doesn't work. Can you please help me here? All other things work as they should. No idea either. Too bad. I only want to have a

Re: [patch] support for \\baselineskip

2010-07-25 Thread Jürgen Spitzmüller
Uwe Stöhr wrote: > > I don't think it's feasible to revert to some pt value. > > Its in ofer 90% the exact value in pt. So my reversion keeps the size the > users wanted. I don't understand. How can you find out the exact value of \baselineskip if the font size and linespread are defined in a

Re: [patch] support for \\\\baselineskip

2010-07-25 Thread Uwe Stöhr
>> Its in ofer 90% the exact value in pt. So my reversion keeps the size the >> users wanted. > > I don't understand. How can you find out the exact value of \baselineskip if > the font size and linespread are defined in a class file? This is not > possible. That's why I wrote in 90%. Usually

Re: [patch] support for \\\\baselineskip

2010-07-25 Thread Richard Heck
On 07/25/2010 03:25 PM, Uwe Stöhr wrote: >> Its in ofer 90% the exact value in pt. So my reversion keeps the size the >> users wanted. > > I don't understand. How can you find out the exact value of \baselineskip if > the font size and linespread are defined in a class file? This is not >

Re: [patch] support for \\\\baselineskip

2010-07-25 Thread Uwe Stöhr
Am 26.07.2010 00:32, schrieb Richard Heck: That's why I wrote in 90%. Usually you have single line space and nearly all document classes use 1.2 for the baselineskip then. I thought the worry was that there is no way to determine the fontsize. If it's default, which it is in most cases by

Re: [patch] support for \baselineskip

2010-07-24 Thread Jürgen Spitzmüller
Uwe Stöhr wrote: The attached simple patch adds \baselineskip as length for \vspace. \baselineskip is exactly the distance between two baselines of consecutive text lines. If the line spacing is default, \bigskip is equal to \baselineskip. If not one needs \baselineskip as length to get the

Re: [patch] support for \\baselineskip

2010-07-24 Thread Uwe Stöhr
IMHO \baselineskip is a very useful unit, I use it frequently. However, I think we should put baselineskip rather to the unit combo and make it accessible via custom vspace. Often, one needs a value such as \vspace{3\baselineskip} or even \vspace{0.5\baselineskip}. Good idea. Attached is the

Re: [patch] support for \\baselineskip

2010-07-24 Thread Uwe Stöhr
Am 25.07.2010 05:57, schrieb Uwe Stöhr: In my patch I failed to look in Length.cpp what is the current fontsize. Calling bv.buffer().params().fontsize doesn't work. Can you please help me here? All other things work as they should. There was also a bug in the lyx2lyx routine. Better patch

Re: [patch] support for \baselineskip

2010-07-24 Thread Jürgen Spitzmüller
Uwe Stöhr wrote: > The attached simple patch adds \baselineskip as length for \vspace. > > \baselineskip is exactly the distance between two baselines of consecutive > text lines. If the line spacing is default, \bigskip is equal to > \baselineskip. If not one needs \baselineskip as length to get

Re: [patch] support for \\baselineskip

2010-07-24 Thread Uwe Stöhr
> IMHO \baselineskip is a very useful unit, I use it frequently. However, I > think we should put baselineskip rather to the unit combo and make it > accessible via "custom" vspace. Often, one needs a value such as > \vspace{3\baselineskip} or even \vspace{0.5\baselineskip}. Good idea. Attached

Re: [patch] support for \\baselineskip

2010-07-24 Thread Uwe Stöhr
Am 25.07.2010 05:57, schrieb Uwe Stöhr: In my patch I failed to look in Length.cpp what is the current fontsize. Calling bv.buffer().params().fontsize doesn't work. Can you please help me here? All other things work as they should. There was also a bug in the lyx2lyx routine. Better patch

[patch] support for \baselineskip

2010-07-20 Thread Uwe Stöhr
The attached simple patch adds \baselineskip as length for \vspace. \baselineskip is exactly the distance between two baselines of consecutive text lines. If the line spacing is default, \bigskip is equal to \baselineskip. If not one needs \baselineskip as length to get the space between

[patch] support for \baselineskip

2010-07-20 Thread Uwe Stöhr
The attached simple patch adds \baselineskip as length for \vspace. \baselineskip is exactly the distance between two baselines of consecutive text lines. If the line spacing is default, \bigskip is equal to \baselineskip. If not one needs \baselineskip as length to get the space between