On 05/04/2018 07:45 AM, Csikos Bela wrote:
"Paul A. Rubin" <[email protected]> írta:
On 05/03/2018 12:05 PM, Csikos Bela wrote:
Hello:

This question applies to lyx 3.0.

I have some text formatted and entered in ERT. In the same document I inserted 
a table and formatted the table font size and shape (to larger italic) by 
selecting the whole table and applying the font commands to the whole 
selection. This works nicely. Now I would like to replace some text in the 
table with text from the ERT so that the formatted table text would keep its 
style (size and shape, larger italic). I tried to use different copy commands 
but all of them reformats the text in the table to normal size and shape. How 
can I keep the table font style (larger italic) when I copy text into the table 
from somewhere else? In other words I'd like if the copied text (into the 
table) took the style of the fonts already configured in the table.

Thanks,

bcsikos
Could you posted a minimal example of this?

Hello:

Here is a mwe.
Lyx table is formatted to have Italic large fonts.
When I copy text into it, the pasted text should be formatted to Italic large 
too.

bcsikos
The text you are copying from ERT actually has no style attached to it. The style is applied outside the ERT box. So what you are copying is, from LyX's perspective, plain text. I don't think there is a way around that, because I do not believe LyX will let you apply LyX formatting commands (\shape, \size) inside ERT.

If you want the entire LyX table to be large italic, that is easy to do. Rather than applying the format to the text inside the first row, select the entire table and then apply the format to that. Once you've done that, plain text from anywhere that you paste in becomes large and italic. If you copy formatted text from a non-ERT source (such as a typical paragraph) and paste it into the table, the formatting from the source will supersede the formatting applied to the table.

Paul

Reply via email to