...

>Here is another less dirty idea:
>
>- have InsetShortTitle::latex do nothing
>
>- add a InsetShortTitle::realLaTeX which does what ::latex should do
>
>- when outputing a paragraph, search for a shorttitle in it. If it
>  exists, output
>    \command[InsetShortTitle::realLaTeX]{par contents}
>  otherwise
>    \command{par contents}

Great idea! Actually I am independently working on something resembling
this (but less clever). I may still go to your solution.

>- now add a new member to LyXLayout telling whether short titles are
>  allowed or not and honor it as you see fit.

Actually I have earlier used 

        LatexParam      void

in the layout file to flag this. Too tricky?

>Note that this solution allow for inserting short titles anywhere in
>the paragraph.

Yes... as I have now. Or anywhere else, without doing anything or causing
harm (esthetically wrong, I admit).

>I feel that this kind of solution could be good enough to go in 1.3.0,
>although it does not catter for the general 'turn the label of a
>paragraph into an inset' problem.

I would hope so ... but I'll continue looking for a cleaner approach (with
SectionInset?)

The .lyx document format will become 

\layout Section
\begin_inset ShortTitle |
collapsed true          |
                        |
\layout Standard        |
<short title text>      |
\end_inset              |

<long title text>

\layout Standard

<document continues...>

Where '|' marks the addition. Acceptable?


>JMarc

Martin



Reply via email to