Thanks Steve, I have a lot to read.... I have started by just to get along with your tutorials and the way you wrote them.

As I am not always focused, I have tried to add that in my layout file:

Style Dialogue
  LatexType             Environment
  LatexName             dialog_l
  ParSep                0.5

    Shape               Bold

But that doesn't work at all. It leads to what I was afraid of. The first line of my dialog has the — sign, but not the others...

I definitely have much more reading to do, but if you have an obvious solution to my problem, I'll be happy with it. Still, starting to be late for me. I'll see that another day.


On 21/08/2022 13:01, Steve Litt wrote:
On Sun, 2022-08-21 at 11:04 +0800, pierig wrote:

I have been using Lyx for years, and I am very happy with it. I am
writing novels, so my needs are pretty simple. (I would happily share
the novels here, but they are in French [Sci Fi])

In a novel, I have two main type of text. The main one, and dialogues. I
was using "Quote" for the dialogues, convenient enough.
I think you're going to be quite pleased with making your own text types 
"environments") instead of hijacking environments meant for other purposes. 
moving from two to three, but if your books are anything like mine, now that 
you can
make your own types, you'll want more of them. Just as a for instance, you have
dialog and thoughts, but what about narration? What about narration of stories 
back stories? When you can make your own environments, the world is your oyster.

But now I need a
third one to show the thoughts of a character. Then I have decided to
try to adapt the layout of "Book (standard class)"
I congratulate you on choosing Book class. It works with everything, and it's 
adaptable. 7 of my 9 books use Book class, and I'd never again use Koma or 

I have looked at some advice on the net and manage to add a /dialogue/
and /pensée/ (thoughts). For /dialogue/ it should be an itemized style,
(in French we add — for each change of speaker). Which means the code
for first line of a dialogue, the last line of dialogue and other lines
of dialogues are different

*1st line*


*other lines*

*last line*

I'm confused about the preceding. Are you intending to insert ERT code "/item"
between every speaker? Doing so would make for slow authoring.

Would you have any advice for where to look for this kind of
modification which doesn't involve a single line? For a single line, I
have done something very simple as a try, but I don't have any idea for
this multiple line problem

Example of single line:

Style Pensée
    LatexType             Environment
    LatexName             pensee_l
    ParSep                0.7

      Shape               Italic

Thanks for your help.
I suggest you find the LaTeX source for the Book document class standard 
I don't remember where it is, but other people do. Modify as needed for each of 
desired environments.

Having the first and last whatever different from the middle ones might require
three different paragraph styles. I think LyX has a "next style" property you 
put in the LyX part of the environment definition, so that pretty much makes
everything except the last whatever automatic.

Here's a doc I wrote 13 years ago discussing making your own layout file:

Also read . It's almost 20
years old, but it has ways to modify existing LaTeX environments without 
them from scratch. Combined with CopyStyle, this just might simplify your task.

If you ever need to make your own list environments, see

Actually, you might want to acquaint yourself with my whole LyX subsite, , which links to quite a few LyX 


lyx-users mailing list

Reply via email to