...
>>- 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}
...
I just implemented your solution -- works great. Patches attached as well
as the insetshorttitle.[Ch] files to be added to CVS.
>>- 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?
I used this as seen in the second patch file. I also used
LatexParam none
to designate that short titles are *not* allowed (as does the absence of
this parameter in the layout file -- but I need a way to suppress the
short title option for the "starred" layouts, which inherit from the
unstarred ones.)
>>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).
Still so. This could be somewhat fixed by adding a macro to the menu
system which does "jump-start-paragraph; shortinset-insert;".
Also you can add shorttitle insets to standard layout paragraphs etc.
They will just vanish in the LaTeX output. Not very elegant, but
effectively turns the inset into a "note" inset.
>>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.
See if this cuts it.
>The .lyx document format will become
[...]
(Nobody unhappy about this?)
>
>>JMarc
>
>Martin
Changelog:
Aug 16 2002 Martin Vermeer <[EMAIL PROTECTED]>
* BufferView_pimpl.C:
LyXAction.C:
buffer.C:
commandtags.h:
lyxfunc.C:
paragraph.[Ch]:
text2.C:
insets/Makefile.am:
insets/inset.h:
stdlayouts.inc:
stdsections.inc:
stdstarsections.inc: Added "short title" collapsible inset and
code to make it work with the paragraph code. The inset can be
anywhere in the paragraph, but will only do the expected thing
in LaTeX if the layout file contains the parameter line
LatexParam void
for that layout.
* insetshorttitle.[Ch] add class ShortTitleInset.
Martin, again unplugged due to electrical work at HUT. Cannot test these
patches properly (-R --dry-run) as my LyX checkout is on my job machine,
now shut down. Hope they apply reasonably cleanly.