Re: Setting section color in local layout

2023-01-06 Thread Daniel

On 2023-01-06 13:47, Jean-Marc Lasgouttes wrote:

Le 06/01/2023 à 12:37, Daniel a écrit :
We would need two different settings then: one to tell what the LaTeX 
layout does, and one to change it.


Probably I misunderstand, but that seems to be no particular issue. 
Isn't it the same with, e.g., font-sizes of headings? If I see it 
correctly, the current way to take care of that is to provide the 
LaTeX layout already in the work area, e.g. setting the headings to 
the appropriate font-size. No extra setting needed. Just the layout 
has to provide the right WYSIWYM style in order to work correctly. Or 
why would colors be different?


Indeed, this is not special to colors and this is what we have already.


Great. That is what I thought, too.

Daniel



--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Setting section color in local layout

2023-01-06 Thread Jean-Marc Lasgouttes

Le 06/01/2023 à 12:37, Daniel a écrit :
We would need two different settings then: one to tell what the LaTeX 
layout does, and one to change it.


Probably I misunderstand, but that seems to be no particular issue. 
Isn't it the same with, e.g., font-sizes of headings? If I see it 
correctly, the current way to take care of that is to provide the LaTeX 
layout already in the work area, e.g. setting the headings to the 
appropriate font-size. No extra setting needed. Just the layout has to 
provide the right WYSIWYM style in order to work correctly. Or why would 
colors be different?


Indeed, this is not special to colors and this is what we have already.

JMarc


--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Setting section color in local layout

2023-01-06 Thread Daniel

On 2023-01-06 10:55, Jean-Marc Lasgouttes wrote:

Le 06/01/2023 à 08:15, Daniel a écrit :

On 2023-01-04 23:50, Richard Kimberly Heck wrote:
That's a missing feature then. We do handle some font features, but 
not all of them. (We would only do this for LyXHTML. The font color 
in LyX itself is not meant to be reflected in LaTeX, unless you 
specify that separately, as above.)


(I guess you didn't mean rule out that at some point in the future, it 
will be possible to set colors for all section headings without 
manually tampering with either local layout or the preamble but that 
behind the scenes both would be changed.)



We would need two different settings then: one to tell what the LaTeX 
layout does, and one to change it.


Probably I misunderstand, but that seems to be no particular issue. 
Isn't it the same with, e.g., font-sizes of headings? If I see it 
correctly, the current way to take care of that is to provide the LaTeX 
layout already in the work area, e.g. setting the headings to the 
appropriate font-size. No extra setting needed. Just the layout has to 
provide the right WYSIWYM style in order to work correctly. Or why would 
colors be different?


However, the way to change it 
(typically for headings) is very often class-dependent (classes have 
their own idea on how customization shall be done).


A possibility would be to have a layout setting for allowing "standard" 
customizations. Those could be either disabled/not enabled in classes 
that are incompatible with the standards or, even better, be overwritten 
by the appropriate custom command.


Daniel


--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Setting section color in local layout

2023-01-06 Thread Jean-Marc Lasgouttes

Le 06/01/2023 à 08:15, Daniel a écrit :

On 2023-01-04 23:50, Richard Kimberly Heck wrote:
That's a missing feature then. We do handle some font features, but 
not all of them. (We would only do this for LyXHTML. The font color in 
LyX itself is not meant to be reflected in LaTeX, unless you specify 
that separately, as above.)


(I guess you didn't mean rule out that at some point in the future, it 
will be possible to set colors for all section headings without manually 
tampering with either local layout or the preamble but that behind the 
scenes both would be changed.)



We would need two different settings then: one to tell what the LaTeX 
layout does, and one to change it. However, the way to change it 
(typically for headings) is very often class-dependent (classes have 
their own idea on how customization shall be done).


JMarc

--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Setting section color in local layout

2023-01-05 Thread Daniel

On 2023-01-04 23:50, Richard Kimberly Heck wrote:
That's a missing feature then. We do handle some font features, but not 
all of them. (We would only do this for LyXHTML. The font color in LyX 
itself is not meant to be reflected in LaTeX, unless you specify that 
separately, as above.)


(I guess you didn't mean rule out that at some point in the future, it 
will be possible to set colors for all section headings without manually 
tampering with either local layout or the preamble but that behind the 
scenes both would be changed.)


Best,
Daniel


--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Setting section color in local layout

2023-01-04 Thread Richard Kimberly Heck

On 1/4/23 16:37, Lorenzo Bertini wrote:

Il 04/01/23 22:06, Ricardo Berlasso ha scritto:


El mié, 4 ene 2023 a las 21:41, Lorenzo Bertini 
(mailto:lorenzobertin...@gmail.com>>) 
escribió:


    Hi,

    setting the following in local layout

 > Style Section
 >       Font
 >               Color           Pink
 >       EndFont
 > End

    makes Lyx's workarea sections pink indeed (it's just a test color, I
    swear it's temporary :)), so Lyx is reading the layout alright. But
    if I
    output the document, both with Latex and LyXHTML, section labels are
    black. Could someone tell me what I'm doing wrong?


In fact, the Font block on the local layout only affect the editing 
area. If you want to change the actual heading formatting you need to 
use the titlesec package. For example, to set the section heading to 
use the sans font defined in the document (\sffamily), in bold and 
with its size set as \Large, assigning to it a custom color (I don't 
like pink), write in the document preamble,


\usepackage{titlesec}
\usepackage{xcolor}
\definecolor{Gren}{rgb}{.3,.7,.3}
\titleformat*{\section}{
   \Large\bfseries\sffamily
   \color{Gren}}

[[   BTW, I talk about those things in chapter 12 here: 
https://frommindtotype.wordpress.com/lyx-book/ 
   ;) ]]


Regards,
Ricardo


Thank you, I was aware of the titlesec package, but using mainly 
LyXHTML I was looking into something less specific to output method. 
In the Font block however, the Size parameter does affect output, at 
least in the LyXHTML case.


Why this inconsistency? Should I ask lyx-devel about possibly 
implementing color from layout (titlesec for Latex and CSS for LyXHTML)?


That's a missing feature then. We do handle some font features, but not 
all of them. (We would only do this for LyXHTML. The font color in LyX 
itself is not meant to be reflected in LaTeX, unless you specify that 
separately, as above.)


The easiest way to solve this for now would be to add some CSS to the 
layout.


Riki


--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Setting section color in local layout

2023-01-04 Thread Lorenzo Bertini

Il 04/01/23 22:06, Ricardo Berlasso ha scritto:


El mié, 4 ene 2023 a las 21:41, Lorenzo Bertini 
(mailto:lorenzobertin...@gmail.com>>) escribió:


Hi,

setting the following in local layout

 > Style Section
 >       Font
 >               Color           Pink
 >       EndFont
 > End

makes Lyx's workarea sections pink indeed (it's just a test color, I
swear it's temporary :)), so Lyx is reading the layout alright. But
if I
output the document, both with Latex and LyXHTML, section labels are
black. Could someone tell me what I'm doing wrong?


In fact, the Font block on the local layout only affect the editing 
area. If you want to change the actual heading formatting you need to 
use the titlesec package. For example, to set the section heading to use 
the sans font defined in the document (\sffamily), in bold and with its 
size set as \Large, assigning to it a custom color (I don't like pink), 
write in the document preamble,


\usepackage{titlesec}
\usepackage{xcolor}
\definecolor{Gren}{rgb}{.3,.7,.3}
\titleformat*{\section}{
   \Large\bfseries\sffamily
   \color{Gren}}

[[   BTW, I talk about those things in chapter 12 here: 
https://frommindtotype.wordpress.com/lyx-book/ 
   ;)    ]]


Regards,
Ricardo


Thank you, I was aware of the titlesec package, but using mainly LyXHTML 
I was looking into something less specific to output method. In the Font 
block however, the Size parameter does affect output, at least in the 
LyXHTML case.


Why this inconsistency? Should I ask lyx-devel about possibly 
implementing color from layout (titlesec for Latex and CSS for LyXHTML)?


--
Lorenzo
--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Setting section color in local layout

2023-01-04 Thread Ricardo Berlasso
El mié, 4 ene 2023 a las 21:41, Lorenzo Bertini ()
escribió:

> Hi,
>
> setting the following in local layout
>
> > Style Section
> >   Font
> >   Color   Pink
> >   EndFont
> > End
>
> makes Lyx's workarea sections pink indeed (it's just a test color, I
> swear it's temporary :)), so Lyx is reading the layout alright. But if I
> output the document, both with Latex and LyXHTML, section labels are
> black. Could someone tell me what I'm doing wrong?
>

In fact, the Font block on the local layout only affect the editing area.
If you want to change the actual heading formatting you need to use the
titlesec package. For example, to set the section heading to use the sans
font defined in the document (\sffamily), in bold and with its size set as
\Large, assigning to it a custom color (I don't like pink), write in the
document preamble,

\usepackage{titlesec}
\usepackage{xcolor}
\definecolor{Gren}{rgb}{.3,.7,.3}
\titleformat*{\section}{
  \Large\bfseries\sffamily
  \color{Gren}}

[[   BTW, I talk about those things in chapter 12 here:
https://frommindtotype.wordpress.com/lyx-book/   ;)]]

Regards,
Ricardo



>
> --
> Lorenzo
> --
> lyx-users mailing list
> lyx-users@lists.lyx.org
> http://lists.lyx.org/mailman/listinfo/lyx-users
>
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users