I continue not to have the optional short title in the contextual menu with
my environments in the module.

Moreover, for the \sage;{} command that can be used, I am trying to explore
the insets avenue, trying to get inspired by the FixMe module.

I have inserted the following element in my module file:

InsetLayout sagecommand
LyXType               custom
 LabelString           Sage
LatexType             command
LatexName             sage
 Decoration            classic
Font
  Color               magenta
  Family              Typewriter
EndFont
MultiPar              false
 OptionalArgs          0
End

But I cannot see this sagecommand inset in the Insert / Custom insets menu,
even if I can see there the ones created by the FixMe module in another
empty test file I have created, in which I have added the FixMe module.
What am I doing wrong here again?

I am really lost with this module affair, I have checked the Lyx Docs, the
tutorials by Rob Oakes and Steve Litt. But, the documentation does not
really explain the articulation of different elements of definition, what
they are supposed to do in Lyx and what they do in the exported LateX file.
I am trying to advance through trial and error, but this takes a lot of
time...

It would be nice to have some examples for the must common Latex constructs
in the documentation I think:

- a simple environment (like \begin{myenvironment} .... \end{myEnvironment}
)
- an environment that accepts optional arguments
(like  \begin{myenvironment}[myOption] .... \end{myEnvironment} )
- a simple inline command (like \myCommand{} )
- an inline command that accepts options (like  \myCommand[myOption]{} )
- a simple list environment
- a list environment that accepts options.
- a simple float
- a float with options.

That (+ other things that I probably forget now) would cover the basic
needs for easily building new modules.
Also a more complete explanation of the role of different options in
relation with Lyx Nad Latex would be very welcome.

These are suggestions from a person who tries to write his first module. I
am somewhat knowledgeable in Latex, maybe less in Lyx, even if I have been
using it for some years.

---------- Previous message ----------


Now, I have been able to test it, but when I right-click in the paragraph
marked as sageplot, I do not get this option in the contextual-menu. What
do I need to give as specification during the definition of this command
style to get this option from LyX?

Current definition in the module is:

Style sageplot
 LatexType             Command
 LatexName             sageplot
OptionalArgs          1
 FreeSpacing           1
 PassThru              1
Spellcheck           0
 TextFont
   Color               latex
  Family              Typewriter
 EndFont
End

I would have thought that OptionalArgs 1 would suffice.

Murat

2011/10/31 PhilipPirrip <p...@net.hr>

> On 10/30/2011 10:37 PM, Murat Yildizoglu wrote:
>
>> In order to be able to write in the lyx document [angle=0,
>> width=10cm]plot(sin(x), 0, pi), axes=True
>> and select the sageplot command from the top dropbox of styles, to
>> convert it to the latex command above.
>>
>
>
> Right click on the line containing the paragraph style, choose "Insert
> short title" and watch what happens in View->View Source.
> Unfortunatelly, no other way of doing this for now.
>
>


-- 
Prof. Murat Yildizoglu

Université Montesquieu Bordeaux IV
GREThA (UMR CNRS 5113)
Avenue Léon Duguit
33608 Pessac cedex
France

yi...@u-bordeaux4.fr

http://yildizoglu.info

http://www.twitter.com/yildizoglu




-- 
Prof. Murat Yildizoglu

Université Montesquieu Bordeaux IV
GREThA (UMR CNRS 5113)
Avenue Léon Duguit
33608 Pessac cedex
France

yi...@u-bordeaux4.fr

http://yildizoglu.info

http://www.twitter.com/yildizoglu

Reply via email to