Re: Examples of integration between Lyx, Sage computations, and PDFLateX

2011-10-31 Thread Murat Yildizoglu
Hi Xu,

Thank you for your appreciation. I cannot advance anymore without any help
from Lyx gurus.
I think I have extracted all the information I can from the help docs. If I
get any answer to my questions, I can construct a little bit smarter module
but the one we have now is already usable. With some supplementary tricks
from the sagetex documentation and through manual executions of the
latex-sage-latex chain, it is possible to make a lot of computations.

I was also very agreeably surprised that this module can be used for
conversion to HTML from LyX, with figures and all.

I attach to this message the module in its actual stage and some
instruction for making the conversion chain functional. I hope this would
already help some of you.

As soon as I have more information, I will try to complete the module file.

Best regards,

Murat

2011/10/31 Xu Wang 

> Dear Murat,
>
> This is great! I have been waiting for something like this for a long
> time. I also like the Sweave-like philosophy of this. It's more transparent
> and reproducible.
>
> I am looking forward to the final release with much excitement.
>
> Thank you for your work!
>
> Best,
>
> Xu
>
>
> On Mon, Oct 31, 2011 at 12:54 PM, Murat Yildizoglu wrote:
>
>> Just another mail to correct a problem with the preceding Lyx file (see
>> the new file attached, and the $ signs in ERT boxes, this is connected with
>> the problem I describe below) and ask a question about insets again:
>>
>> What kind of Flex insets can be included in a math mode text? Is this
>> possible at all? Especially in displayed equation where one would like to
>> include results from SAge computations?
>> I cannot write the following in math mode in Lyx, putting the left member
>> in a displayed equation and the right member in a sagecode inset that would
>> be converted to the expression I give  (\sage{integral(x/(x^2+1),x,0,1))
>>\dfrac{\partial^{4}y}{\partial
>> x^{4}}=\sage{integral(x/(x^2+1),x,0,1)}
>>
>> I meet two problems:
>> 1/ I cannot insert a Flex:sagecommand inset in a displayed equation, Lyx
>> just goes to the next line before inserting it...
>> 2/ I cannot type the sagetex instruction (*sage{}  ) by hand, because
>>  "x^2" in the right member must not be interpreted by LyX, since Sage will
>> need it for its computation.
>>
>> I can of course type everything in an ERT, but this cannot be called
>> "integration" can it? ;-)
>>
>> I have reread again the help document on layouts and insets, and I have
>> checked the files that come in the layout folder of LyX, but cannot find
>> any answer to my question.
>>
>> Sorry for bothering you again with my problems... I hope that Sage
>> integration will interest other people...
>>
>> Murat
>>
>> I definitely need the help of a Lyx wizard who understands well the
>> insets and their integration in Lyx/Latex...
>>
>>
>>
>> 2011/10/31 Murat Yildizoglu 
>>
>>> Just to show you the kind of niceties that such an integration can
>>> bring, I send you two files. One is the Lyx source and the other one is the
>>> final PDF.
>>> In Lyx, I just click on the  Preview button and wait a little bit to get
>>> the final PDF that I show here, with results of the computations done by
>>> Sage and converted back to Latex.
>>>
>>> The module isfar from perfect yet (this is the first module I am
>>> creating), a better integration between the Latex output by Sage, and the
>>> math mode in LyX would be implemented to have nice equations typeset with
>>> equation numbers and what not. You can also see that the output of the
>>> integral by Sage is not very beautiful...
>>>
>>> I will continue to work on this module, but it is already useful for me
>>> and eliminates some regrets I feel ;-), since I have dropped Scientific
>>> Workplace in favor of LyX.
>>>
>>> I hope that you will like this new possibilities.
>>>
>>> Best regards,
>>>
>>> Murat
>>>
>>> PS. Sage lives in: http://www.sagemath.org
>>>
>>>
>>> --
>>> 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
>>
>>
>


-- 
Prof. Murat Yildizoglu

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

yi...@u-bordeaux4.fr

h ttp://yildizoglu.info

http://www.twitter.com/yildizoglu
The Sage module allows the use of the open source Sage mathematical platform 
for computations in Lyx (with results inserted in the final PDF file), in a 
somewhat similar way for R-project with the Sweave module.

To be able to use it, you must have Sage installed on your c

Re: Examples of integration between Lyx, Sage computations, and PDFLateX

2011-10-31 Thread Xu Wang
Dear Murat,

This is great! I have been waiting for something like this for a long time.
I also like the Sweave-like philosophy of this. It's more transparent and
reproducible.

I am looking forward to the final release with much excitement.

Thank you for your work!

Best,

Xu

On Mon, Oct 31, 2011 at 12:54 PM, Murat Yildizoglu  wrote:

> Just another mail to correct a problem with the preceding Lyx file (see
> the new file attached, and the $ signs in ERT boxes, this is connected with
> the problem I describe below) and ask a question about insets again:
>
> What kind of Flex insets can be included in a math mode text? Is this
> possible at all? Especially in displayed equation where one would like to
> include results from SAge computations?
> I cannot write the following in math mode in Lyx, putting the left member
> in a displayed equation and the right member in a sagecode inset that would
> be converted to the expression I give  (\sage{integral(x/(x^2+1),x,0,1))
>\dfrac{\partial^{4}y}{\partial
> x^{4}}=\sage{integral(x/(x^2+1),x,0,1)}
>
> I meet two problems:
> 1/ I cannot insert a Flex:sagecommand inset in a displayed equation, Lyx
> just goes to the next line before inserting it...
> 2/ I cannot type the sagetex instruction (*sage{}  ) by hand, because
>  "x^2" in the right member must not be interpreted by LyX, since Sage will
> need it for its computation.
>
> I can of course type everything in an ERT, but this cannot be called
> "integration" can it? ;-)
>
> I have reread again the help document on layouts and insets, and I have
> checked the files that come in the layout folder of LyX, but cannot find
> any answer to my question.
>
> Sorry for bothering you again with my problems... I hope that Sage
> integration will interest other people...
>
> Murat
>
> I definitely need the help of a Lyx wizard who understands well the insets
> and their integration in Lyx/Latex...
>
>
>
> 2011/10/31 Murat Yildizoglu 
>
>> Just to show you the kind of niceties that such an integration can bring,
>> I send you two files. One is the Lyx source and the other one is the final
>> PDF.
>> In Lyx, I just click on the  Preview button and wait a little bit to get
>> the final PDF that I show here, with results of the computations done by
>> Sage and converted back to Latex.
>>
>> The module isfar from perfect yet (this is the first module I am
>> creating), a better integration between the Latex output by Sage, and the
>> math mode in LyX would be implemented to have nice equations typeset with
>> equation numbers and what not. You can also see that the output of the
>> integral by Sage is not very beautiful...
>>
>> I will continue to work on this module, but it is already useful for me
>> and eliminates some regrets I feel ;-), since I have dropped Scientific
>> Workplace in favor of LyX.
>>
>> I hope that you will like this new possibilities.
>>
>> Best regards,
>>
>> Murat
>>
>> PS. Sage lives in: http://www.sagemath.org
>>
>>
>> --
>> 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
>
>


Re: Examples of integration between Lyx, Sage computations, and PDFLateX

2011-10-31 Thread Murat Yildizoglu
Just another mail to correct a problem with the preceding Lyx file (see the
new file attached, and the $ signs in ERT boxes, this is connected with the
problem I describe below) and ask a question about insets again:

What kind of Flex insets can be included in a math mode text? Is this
possible at all? Especially in displayed equation where one would like to
include results from SAge computations?
I cannot write the following in math mode in Lyx, putting the left member
in a displayed equation and the right member in a sagecode inset that would
be converted to the expression I give  (\sage{integral(x/(x^2+1),x,0,1))
   \dfrac{\partial^{4}y}{\partial
x^{4}}=\sage{integral(x/(x^2+1),x,0,1)}

I meet two problems:
1/ I cannot insert a Flex:sagecommand inset in a displayed equation, Lyx
just goes to the next line before inserting it...
2/ I cannot type the sagetex instruction (*sage{}  ) by hand, because
 "x^2" in the right member must not be interpreted by LyX, since Sage will
need it for its computation.

I can of course type everything in an ERT, but this cannot be called
"integration" can it? ;-)

I have reread again the help document on layouts and insets, and I have
checked the files that come in the layout folder of LyX, but cannot find
any answer to my question.

Sorry for bothering you again with my problems... I hope that Sage
integration will interest other people...

Murat

I definitely need the help of a Lyx wizard who understands well the insets
and their integration in Lyx/Latex...



2011/10/31 Murat Yildizoglu 

> Just to show you the kind of niceties that such an integration can bring,
> I send you two files. One is the Lyx source and the other one is the final
> PDF.
> In Lyx, I just click on the  Preview button and wait a little bit to get
> the final PDF that I show here, with results of the computations done by
> Sage and converted back to Latex.
>
> The module isfar from perfect yet (this is the first module I am
> creating), a better integration between the Latex output by Sage, and the
> math mode in LyX would be implemented to have nice equations typeset with
> equation numbers and what not. You can also see that the output of the
> integral by Sage is not very beautiful...
>
> I will continue to work on this module, but it is already useful for me
> and eliminates some regrets I feel ;-), since I have dropped Scientific
> Workplace in favor of LyX.
>
> I hope that you will like this new possibilities.
>
> Best regards,
>
> Murat
>
> PS. Sage lives in: http://www.sagemath.org
>
>
> --
> 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


testsage-mod.lyx
Description: Binary data


Re: Module inset problem has been solved. Remains the options problem..

2011-10-31 Thread Murat Yildizoglu
Now it worked:

http://www.lyx.org/trac/ticket/7869

2011/10/31 Richard Heck 

>  On 10/31/2011 08:19 AM, Murat Yildizoglu wrote:
>
> I should not get too much inspired from FixME it seems, since what seems
> to work for this module does not for mine.
>
>  Following the documentation in a more strict manner + some inspiration
> from the beamer module (not the simplest one ;-)  ), has allowed me to
> solve my problem fro the inset. The version that works is the following:
>
>  InsetLayout Flex:sagecommand
>  LyXType   custom
>  LabelString   Sage
>  LatexType command
>  LatexName sage
>  Decorationclassic
>  PassThru  1
>  Font
>   Color   magenta
>   Family  Typewriter
>  EndFont
>  MultiPar  false
>  OptionalArgs  0
> End
>
>  Now, if I could also solve the problem for the optional arguments of the
> \sageplot environment... I continue not to get the Short name option when I
> right-click in this environment. My declaration must have a problem and
> does not tell to Lyx to get options from the short name.
>
>  Can commands get a short name from Lyx?
>
>   I think this is a known issue, actually. The problem is that PassThru
> insets/styles/etc do not allow for optional arguments.
>
> If you file a bug about this, I'll try to fix it for 2.0.2.
>
> Richard
>
>


-- 
Prof. Murat Yildizoglu

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

yi...@u-bordeaux4.fr

h ttp://yildizoglu.info

http://www.twitter.com/yildizoglu


Re: Module inset problem has been solved. Remains the options problem..

2011-10-31 Thread Murat Yildizoglu
Thanks a lot Richard. That would be wonderful.

I would like to do it, but

http://www.lyx.org/trac/wiki/BugTrackerHome

does not seem to answer my calls :-)

Is the track server out of order?

Murat

2011/10/31 Richard Heck 

>  On 10/31/2011 08:19 AM, Murat Yildizoglu wrote:
>
> I should not get too much inspired from FixME it seems, since what seems
> to work for this module does not for mine.
>
>  Following the documentation in a more strict manner + some inspiration
> from the beamer module (not the simplest one ;-)  ), has allowed me to
> solve my problem fro the inset. The version that works is the following:
>
>  InsetLayout Flex:sagecommand
>  LyXType   custom
>  LabelString   Sage
>  LatexType command
>  LatexName sage
>  Decorationclassic
>  PassThru  1
>  Font
>   Color   magenta
>   Family  Typewriter
>  EndFont
>  MultiPar  false
>  OptionalArgs  0
> End
>
>  Now, if I could also solve the problem for the optional arguments of the
> \sageplot environment... I continue not to get the Short name option when I
> right-click in this environment. My declaration must have a problem and
> does not tell to Lyx to get options from the short name.
>
>  Can commands get a short name from Lyx?
>
>   I think this is a known issue, actually. The problem is that PassThru
> insets/styles/etc do not allow for optional arguments.
>
> If you file a bug about this, I'll try to fix it for 2.0.2.
>
> Richard
>
>


-- 
Prof. Murat Yildizoglu

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

yi...@u-bordeaux4.fr

h ttp://yildizoglu.info

http://www.twitter.com/yildizoglu


Re: Weird linebreaks

2011-10-31 Thread Liviu Andronic
On Mon, Oct 31, 2011 at 4:10 PM, Helge Hafting  wrote:
> With this, your document looks much better. There is still one line
> that doesn't break properly. The best solution is to rewrite it
> slightly. Or you can tweak the interword space/stretch/shrink, at the
>
Manual hyphenation can be achieved by Insert > Formatting >
Hyphenation point. See [1] section 5.6.

Liviu

[1] http://wiki.lyx.org/uploads/LyX/tutorials/essentials/LyX_Essentials.pdf


Re: Weird linebreaks

2011-10-31 Thread Helge Hafting

On 28. okt. 2011 17:43, Bianca Kranzusch wrote:

My thesis contains a "material" part where I have, among other stuff,
a list of used equipment with names and manufacturers.
I would like to use typewriter font for product names and small caps
for manufacturer names. Within the thesis text, this looks good, but
when I format this list in this pattern, I get all sorts of weird line
breaks and it looks very messy. (There are line breaks, but the lines
have very strange lengths.)

Can somebody help me to prevent/fix this?
I have included a minimal file.


The typewriter font is often used for stuff that should not be 
hyphenated or justified. It is therefore set up to not hyphenate, and 
this causes your problems.


LaTeX is unable to break up the lines in the middle of words in 
typewriter font. So the words stick into the margin and the

line breaks after them.

The fix for this, is to reconfigure the typewriter font so it
permits normal hyphenation and some justification. It can be done with
this addition to the preamble:
%Hyphenation in typewriter font
\usepackage{everysel}
\let\oldttdefault=\ttdefault
\renewcommand*\ttdefault{\oldttdefault}
\EverySelectfont{%
\fontdimen2\font=0.4em% interword space
\fontdimen3\font=0.2em% interword stretch
\fontdimen4\font=0.1em% interword shrink
\fontdimen7\font=0.1em% extra space
\hyphenchar\font=`\-% to allow hyphenation
}


Based on this webpage:
http://texblog.net/latex-archive/plaintex/full-justification-with-typewriter-font/

With this, your document looks much better. There is still one line
that doesn't break properly. The best solution is to rewrite it
slightly. Or you can tweak the interword space/stretch/shrink, at the
tisk of getting some uglier lines.

Your testfile with this modification is attached.

Helge Hafting


Diplomarbeit_fixit.lyx
Description: application/lyx


Re: Module inset problem has been solved. Remains the options problem..

2011-10-31 Thread Richard Heck

On 10/31/2011 08:19 AM, Murat Yildizoglu wrote:
I should not get too much inspired from FixME it seems, since what 
seems to work for this module does not for mine.


Following the documentation in a more strict manner + some inspiration 
from the beamer module (not the simplest one ;-)  ), has allowed me to 
solve my problem fro the inset. The version that works is the following:


InsetLayout Flex:sagecommand
LyXType   custom
LabelString   Sage
LatexType command
LatexName sage
Decorationclassic
PassThru  1
Font
 Color   magenta
 Family  Typewriter
EndFont
MultiPar  false
OptionalArgs  0
End

Now, if I could also solve the problem for the optional arguments of 
the \sageplot environment... I continue not to get the Short name 
option when I right-click in this environment. My declaration must 
have a problem and does not tell to Lyx to get options from the short 
name.


Can commands get a short name from Lyx?

I think this is a known issue, actually. The problem is that PassThru 
insets/styles/etc do not allow for optional arguments.


If you file a bug about this, I'll try to fix it for 2.0.2.

Richard



Re: Help Formatting and fonts... Beggining Thesis! Critical...

2011-10-31 Thread Helge Hafting

On 29. okt. 2011 16:15, Kenedy Torcatt wrote:


4 -Can I stablish that when I press enter on keyboard the space between
paragraph be equivalent to "2 enters on word", I mean without inserting
forced spaces on lyx, you know : ctrl+enter. That would save me a lot of
time.


When you press enter on the keyboard, you get a paragraph break. The 
size of paragraph breaks are indeed configurable in LyX.


Menu: Document->Settings->Text Layout

Separate paragraphs with: select "vertical space".
Notice that you can select several sizes of that vertical space.
smallskip, medskip, and bigskip are usually enough, try
them out and see what works best. If you need a very
specific distance, select "custom" and set the exact distance you need.

You should not need to use ctrl+enter between paragraphs - that is 
horrible. Normally, you should not need to perform such "explicit 
formatting" at all.


You set the font, the font size, the margins, the paragraph
skip and a few more things - and then you just write. The formatting 
*should* then be fully automatic, with noticeably less tweaking than 
word would need. That is the whole point of LyX.


Helge Hafting




Re: Creating a new module : some questions and suggestion for the documentation

2011-10-31 Thread Murat Yildizoglu
Hi Philip,

The inset problem has been solved (see my previous mail, sorry for filling
your mailboxes). The inline \sage command works nicely now, using
Flex:sagecommand in the declaration of the InsetLayout

Remains the problem with the option of \sageplot command, through the
contextual menu + Short name (which I do not get in the contextual menu).

Also, some updating is maybe necessary for the doc, since the actual format
number is indicated as 21 instead of 35. SO, I do not know if some other
elements have changed between the version of docs and the version of Lyx.

Murat


2011/10/31 PhilipPirrip 

> If someone from the documentation list is reading this, I'd kindly ask not
> to refer to the description of the options already mentioned, it adds to
> the confusion. I think it's better to repeat rather than force user to jump
> up and down.
>
>
>
>
>
>
> On 10/31/2011 12:05 PM, Murat Yildizoglu wrote:
>
>> InsetLayout sagecommand
>>
>
>
> This was "Style sagecommand" yesterday, what happened?
>
> Style sagecommand
>
> LabelString   Sage
> LatexType command
> LatexName sage
> Font
>  Color   magenta
>  Family  Typewriter
> EndFont
> OptionalArgs  1
> End
>
>
> Try this one, first in "Local layout" of Document settings. And please
> read the Customization manual more carefully.
>
> Also, try to study some standard insets, like
> stdcharstyles.inc   stdsections.inc  stdfloats.inc
> stdinsets.inc stdlayouts.inc
>
>
>
>
>
>
>


-- 
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


Re: Creating a new module : some questions and suggestion for the documentation

2011-10-31 Thread PhilipPirrip
If someone from the documentation list is reading this, I'd kindly ask 
not to refer to the description of the options already mentioned, it 
adds to the confusion. I think it's better to repeat rather than force 
user to jump up and down.







On 10/31/2011 12:05 PM, Murat Yildizoglu wrote:

InsetLayout sagecommand



This was "Style sagecommand" yesterday, what happened?

Style sagecommand
LabelString   Sage
LatexType command
LatexName sage
Font
 Color   magenta
 Family  Typewriter
EndFont
OptionalArgs  1
End


Try this one, first in "Local layout" of Document settings. And please 
read the Customization manual more carefully.


Also, try to study some standard insets, like
stdcharstyles.inc   stdsections.inc  stdfloats.inc
stdinsets.inc stdlayouts.inc








Module inset problem has been solved. Remains the options problem..

2011-10-31 Thread Murat Yildizoglu
I should not get too much inspired from FixME it seems, since what seems to
work for this module does not for mine.

Following the documentation in a more strict manner + some inspiration from
the beamer module (not the simplest one ;-)  ), has allowed me to solve my
problem fro the inset. The version that works is the following:

InsetLayout Flex:sagecommand
LyXType   custom
LabelString   Sage
 LatexType command
LatexName sage
Decorationclassic
 PassThru  1
Font
  Color   magenta
  Family  Typewriter
EndFont
MultiPar  false
 OptionalArgs  0
End

Now, if I could also solve the problem for the optional arguments of the
\sageplot environment... I continue not to get the Short name option when I
right-click in this environment. My declaration must have a problem and
does not tell to Lyx to get options from the short name.

Can commands get a short name from Lyx?

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

Murat


-- 
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


More module and custom inset jokes ;-)

2011-10-31 Thread Murat Yildizoglu
Well,

I have also tried to put my new inset in the Local layout of the document.
Then it appeared as a possibility in the Insert/ Custom insets menu.

I have inserted it using this menu and it does exactly what I want (inserts
an inline command), and it compiles without any problem, putting the
results of the computations in the final PDF document (the roots of a
second order equation).

Now, I have deleted it again from the local layout. The instructions
corresponding to the inset remained in my document and they continue to
compile, but I cannot introduce new instances of this inset (it disappeared
again from the Insert menu).

What I have in my module is:

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

(I also attach the full module file to this mail - you can see that there
are both an inset and a style corresponding to the \sage command, but
deleting the style does not solve my problem anyway, I have tested it)

How can I make them appear in the menu ? What am I missing here?

This module is installed as ~/Library/Application Support/
Lyx-2.0/layouts/sage.module

I have reconfigured Lyx several times and relaunched it to be sure that it
gets the new version of the module... It seems to get it, since, if I
delete an environment from the module, my test file suffers from and
indicates it as missing.

Sorry for bothering you but I feel that I am touching the solution and
would like to get there with your help.

Best regards,

Murat

-- 
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


sage.module
Description: Binary data


Creating a new module : some questions and suggestion for the documentation

2011-10-31 Thread Murat Yildizoglu
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
 Decorationclassic
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 

> 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


Re: How to change numeration size and upper case

2011-10-31 Thread Olivier Ripoll

On 30.10.2011 23:00, Kenedy Torcatt wrote:

Hello, I have LyX 2.0, using urw-arial, calling the packege with this
code in the preamble:

\usepackage[T1]{fontenc}
\usepackage[scaled]{uarial}
\renewcommand*\familydefault{\sfdefault}

I realized that roman numbers are so tiny and lower case. I need them
upper case a bit bigger.
Arabic numbers are fine.

How could I achieve that?

P.S:_ for roman numbers I used this in the preamble:

\renewcommand{\thepage}{\roman{page}}
\setcounter{page}{1}


I think "roman" means lowercase while "Roman" means uppercase. And 
"arabic" for arabic numbers (*)


Best regards,

Olivier



Thankyou!

Kenedy



(*) Indian numbers in fact ;-)



Re: Beginner Tutorials

2011-10-31 Thread paul sutton
On 31/10/11 06:17, stephen's mailinglist account wrote:
> On 25 October 2011 17:22, Rob Oakes  wrote:
>
>> Are there any good beginner video tutorials that cover LyX? I followed most 
>> of the discussion, but wasn't sure if a consensus emerged. Nor was it really 
>> clear if this was a resource that we should invest time in creating.
>>
>> I know that there are several very good guides. Liviu created one which I 
>> skimmed, and we have the official documentation (which is excellent); and 
>> these are fantastic for users who have already decided to use the program.
>>
>> However, I'm wondering if it might be worthwhile to also create a series of 
>> short videos that might also be used for promotion, training, etc. This 
>> series could certainly be aimed at helping current users, but I'm also 
>> thinking that beginner videos which show how LyX works might be good for 
>> brand new users who need a reason to try it out.  Something perhaps along 
>> the lines of what Apple has done with their iWork Suite [1]
>>
>>
>> 1.) Installation and Setup
>> 2.) The UI and Productively (LyX-Codes, Shortcuts, Styles)
>> 3.) Bibliographies and Automatically Generated Lists
>> 4.) Using Sweave and Other Advanced Features
>> 5.) Going from Outline to Draft (Outline Tools)
>>
>> Rob
>> _
>>
> Have you any willing guinea pigs who would be prepared to use the
> existing help and tutorials whilst you sit in and you can learn from
> where they struggle?
>
Sorry i keep hitting reply and forget to include the cc to the list


I did write a very basic and short guide on using math mode to write
chemical formulae and

things like


CH
4

2+
Na

as in super / subscripts

and

1
 H
1

Showing mass number / atomic number

will try and dig it out,   if anything something like that is useful for
school chemistry students,  I am sure there is a way to insert
/longarrow or similar and also put things on top of long arrow

e.g


catalyst
>
yeast

for example if you are writing about fermentation.


Paul




Re: Can I Install a New TeX font in LyX?

2011-10-31 Thread Olivier Ripoll

On 29.10.2011 22:33, Kenedy Torcatt wrote:

Hello Guys. I' a windows user and using LyX 2.0.

I need to use Arial font for my documents, I tried deactivating TeX
Fonts and choose Arial from my windows installed fonts, after that I
tried to compile with Xetex but I'm just getting errors!


Probably one on the XeteX/MikTeX packages is broken. Hopefully, it may 
be fixed soon.



I know that Helvetiva is almost an Arial clone and I can select
Helvetica from TeX fonts from sans serif 's drop down menu, but I did
a research and found that urw-arial
located here: http://www.ctan.org/tex-archive/fonts/urw/arial/  is an
Arial font pack for use with LaTeX. I need to know how to install it
and show it in the LyX dropdown menu for sans serif 's fonts the same
way as selecting Helvetica.


I have the same limitation as you have. Please note that the URW A030 
Arial is not really Arial. The differences between Arial and Helvetica 
are described in

http://ilovetypography.com/2007/10/06/arial-versus-helvetica/
http://en.wikipedia.org/wiki/Helvetica
http://www.ms-studio.com/articlesarialsid.html

When using the URW Arial, the G and R are the Arial ones, but the C, t, 
a, 1 are the Helvetica ones. You can actually even see that for a, t and 
1 on the sample text on page:

http://www.tug.dk/FontCatalogue/arial/
which also states that "The font that is actually provided is URW A030".


I could notice that in latex code appear \usepackage{helvet} when I
select it in the drop down menu, so I think is possible to do the same
thing for the urw-arial. After all it will be just adding another font
to LyX.


If you nonetheless want to use this fake arial font, once you have it 
installed through MikTeX (which I think you have already), all you need 
to do is to add


\usepackage[scaled]{uarial}

to the preamble (in Document -> Settings... -> LaTeX Preamble).



I need to know how to do that... A tutorial or something please.

Please help!
Thankyou in advance...


Best regards,

Olivier

PS: off-topic. You wrote "Helvetiva is almost an Arial clone", but it's 
more the opposite.




Kenedy