Re: lyx in arabic or persian

2013-02-15 Thread Pavel Sanda
Parastoo Mojabi wrote:
> Thank you so much Stefano, mine is working

Please consider to add your Ubuntu recipy to LyX wiki with LyX & TeX versions...
Pavel


Re: Custom algorithm format

2013-02-15 Thread Paul A . Rubin
Start with an algorithm float (Help > Embedded Objects, section 3.2). Inside the
float, I would try the Listings package (Help > Embedded Objects, section 8).
Listings has a boatload of options; you'll want to consult its user manual to
get the precise format you desire.

Paul





Re: Typefaces Within a Paragraph

2013-02-15 Thread Rich Shepard

On Fri, 15 Feb 2013, Paul A. Rubin wrote:


Edit > Text Style (or the Text Style button - icon looks like a to the b
power) and set Family to Typewriter?


Paul,

  Thanks. I'll give that a try.

Carpe weekend,

Rich



Re: Typefaces Within a Paragraph

2013-02-15 Thread Paul A . Rubin
Rich Shepard  appl-ecosys.com> writes:

> Is there a way I've missed of having only certain words within
> a sentence typeset in the monospace font rather than the default font?

Edit > Text Style (or the Text Style button - icon looks like a to the b power)
and set Family to Typewriter?

Paul



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

2013-02-15 Thread Scott Kostyshak
Thanks for continuing to support the module. I'm not sure if you have
the time, but it would be great if some the useful tips were posted on
a wiki page, which many users find easier to read than going through
an email conversation. You could make a page and then link to it from
the module description:
http://wiki.lyx.org/Layouts/Modules#toc7

Thanks,

Scott

On Fri, Feb 15, 2013 at 3:42 PM, Thomas Coffee  wrote:
> In case it is helpful to anyone, I am posting below a recent
> conversation working out some issues with an installation of the
> SageTeX module previously discussed on this thread:
>
>
> Dear mr McCoffee,
>
> I was very excited when I discovered your module for integrating Sage
> with LyX. But I'm afraid I need a little bit more help to make it
> work.
>
> I managed to setup the one-step conversion in LyX, however, when I
> apply it to your file example.lyx all sage-blocks display as double
> questionmarks in the .pdf file. Can you point me to a more detailed
> tutorial on how to use this LyX module?
>
> Here is what I did:
>
> downloaded example.lyx, setup.sh, compile-pdf-sage.sh, sage.module
> and preferences to the desktop
> edited setup.sh to reflect non-standard paths on my system
> (~/.lyx2 and /opt/sage-5.2)
> ran setup.sh (sudo bash setup.sh)
>
> I checked that compile-pdf-sage.sh is copied to the sage directory,
> the preferences file to ~/lyx2 and sage.module to the layouts folder
> in ~/lyx2.
>
> I also copied sagetex.sty to /home/dd/texmf, my user texmf folder.
>
> I noticed the following error in the console from which I started LyX2:
>
> insets/InsetLayout.cpp (191): Flex insets must have names of the form
> `Flex:'.
> This one has the name `sagecommand'
>
> I hope you can help me out,
> yours sincerely
>
> Dirk Danckaert
>
>
>
> Hi Dirk,
>
> I'm currently running LyX 2.0.0 with Sage 4.8 on Ubuntu 11.10. Since
> my Sage version is old (for complicated reasons), it's possible
> something has changed in SageTeX, but let's try some other things
> before I install another Sage.
>
> I get the same message you do about the insets, along with some other
> LyX complaints, and they are not causing me problems (yet), so that
> may not be something to worry about.
>
> Since you're on Ubuntu, one possible source of trouble (which happened
> to me when I changed machines) is that, if you're using TeXLive, the
> potentially mis-matched version of SageTeX that it includes can stick
> around and pre-empt the correct one (even if you've followed the
> instructions --- http://www.sagemath.org/doc/installation/sagetex.html
> --- to install the one from your Sage distribution into LaTeX. Try
> making sure it's gone by doing something like
>
> sudo rm -r /usr/share/texmf-texlive/tex/latex/sagetex
> sudo texhash
>
> - Thomas
>
>
>
> Hi Thomas,
>
> I have corrected at least one error while checking things out again.
> Seems the copying of sagetex.sty had not been done as it should.
> However, still no joy. I did the two sudo-commands, with no
> error-messages. I loaded example.lyx and tried a .pdf-export (I chose
> /File/Export/PDF (pdflatex+sagetex). As a result I got the error
> message
>
> An error occurred while running:
>
> compile-pdf-sage.sh "example.sagetex.sage"
>
>
> I tried to make sense of that but I couldn't:
>
> compile-pdf-sage.sh must be located in the SAGE-directory, isn't it?
> So how does it find the .sagetex.sage-file?
>
> I tried to locate example.sagetex.sage (I thought this is an
> intermediate file produced by LyX) in the directory that contained
> example.lyx (a folder on my desktop) but it wasn't there.
>
> Is there perhaps a simpler test that I could perform, e.g. just
> calculate 1+1 in LyX?
>
> Dirk
>
>
>
> Hi Dirk,
>
> In order to figure out what's going on, please try running LyX from a
> terminal window and running the export again --- then the error
> messages from the call to compile-pdf-sage.sh will be visible in the
> terminal.
>
> I believe you edited the setup.sh script included with the module to
> point to your Sage installation at /opt/sage-5.2. The script normally
> puts compile-pdf-sage.sh in this same directory and adds that
> directory to the execution path. However, it doesn't make that change
> to the execution path permanent --- when you start a new shell, it
> won't be there --- so in retrospect, it's probably a better idea to
> move or link compile-pdf-sage.sh to somewhere like /usr/local/bin
> where it can always be found. You can always do `echo $PATH' to make
> sure it's somewhere findable. (The reason I did it this way was that,
> in the Sage installations I had used before, it was normally necessary
> to permanently add the Sage directory to the execution path anyway, so
> it didn't occur to me this would be a problem.)
>
> In the LyX that I'm running, it does all its LaTeX file operations in
> an auto-generated temporary directory with a name like
> `/tmp/lyx_tmpdir.J23736/lyx_tmpbuf2' (to avoid cluttering your file
> system). T

Re: SageTeX and LyX

2013-02-15 Thread Thomas Coffee
Hi Rob,

Sorry I did not see your message last year --- I've been filtering
lyx-users while I finish my thesis.

I just received a private email from someone installing the SageTeX
module, and I've posted the transcript of our conversation to the
existing thread on lyx-users in case it's helpful.

If you're still having issues, I should now hopefully see any messages
addressed to me specifically. Thanks for trying out the module!

- Thomas


On Wed, Oct 3, 2012 at 1:28 PM, Scott Kostyshak  wrote:
> Hi Rob,
>
> I'm CC'ing Thomas Coffee and Murat Yildizoglu, who as the wiki says
> did a lot of work on the SAGE module. They might be interested in your
> experience.
>
> On Wed, Oct 3, 2012 at 12:11 PM, Rob Oakes  wrote:
>> Hi Scott,
>>
>> On Wed, 2012-10-03 at 06:16 -0400, Scott Kostyshak wrote:
>>
>>> I've been meaning to checkout SAGE + LyX so if no one comes along to
>>> help you I might take a look.
>>
>> I appreciate the offer. After some quality time looking into how the
>> module works and how SageTeX processes documents, I was able to get it
>> up and running. I found this page to be extremely helpful:
>> http://www.sagemath.org/doc/tutorial/sagetex.html
>
> Great! Good job figuring it out.
>
>> Of course, like all things, I was hoping to get a quick response via the
>> list. I decided last year that I wanted to go back to school to improve
>> my mechanical engineering skills and was hoping to get Sage working for
>> a lab report.
>>
>> (Why I decided more education would be desirable is completely beyond
>> me. I've forgotten how thoroughly miserable it is to be a student. While
>> I frequently have to work late, it's been years since I've had to pull
>> an all-night session to finish homework. It's every bit as bad as I
>> remember. It might even be worse, if you factor in age.)
>
> I bet that it's really difficult to do what you're doing. Hopefully
> there are some fun things about being a student again that will
> surprise you. How about coming home after turning your homework in and
> crashing on your bed -- that must have felt nice at least :). Best of
> luck with your challenge!
>
>>> How did you install SAGE? In the past
>>> I've compiled from source which was very smooth but took a while.
>>> There is also a PPA: https://launchpad.net/~aims/+archive/sagemath
>>
>> To get Sage installed, I used the PPA. I thought about compiling from
>> source so that I could integrate it with the system Python, and then
>> thought better of it. The installation from the PPA was quick and I
>> haven't had any issues, so far.
>
> Glad to hear.
>
>> To install the SageTeX module (which has to be done separately from
>> installing Sage), I copied the sagetex folder into my LaTeX path and ran
>> texhash.
>
> Thanks, this is useful for me. I didn't know they were separate.
>
>>> Which version do you have installed?
>>
>> I'm running version 5.1.
>>
>>> Does the terminal output or View Messages toolbar give any useful
>>> output that you could share?
>>
>> The output was helpful, but didn't make much sense until I read more
>> about how SageTeX works.
>>
>> Sage processes files in two steps. You write your document, then you run
>> LaTeX (pdflatex, xelatex, lualatex, or regular latex) on it. This
>> creates a second file, with the Sage processing instructions in it. This
>> has a *.sagetex.sage file extension.
>>
>> At this point, you have to run Sage on this secondary file, which
>> generates your equations, plots and other elements so that they can be
>> incorporated into your original LaTeX file. At that point, you run LaTeX
>> on the original file a second time to produce the typeset document.
>>
>> The problem I was having is that I was only running LaTeX on my new
>> documents. The converters I set up didn't follow the appropriate pathway
>> of LaTeX -> Sage -> LaTeX. Once I added in the Sage processing step,
>> everything started to work.
>
> Thanks for the explanation. It would be nice if the module took care
> of all of this.
>
>>> Do you have a minimum working example that you could send or link to?
>>
>> Absolutely, attached is a simple example that I'm working up into a
>> template.
>>
>> I'm just getting started with Sage, but now that it's working, I'm quite
>> impressed with what I've seen. For the past 10 years or so, I've been
>> using aging copies of Maple for symbolic computation, and this looks
>> like it will allow me to modernize. (I don't actually have to do much
>> symbolic math, so it hasn't been that big of a deal.)
>>
>> Being able to work from within LyX, in a manner very similar to the way
>> I work with R code via Knitr/Sweave, is going to be very nice. Knowing
>> that it's all open is even better.
>
> I'm also a big fan of R + Knitr (+ LyX) and I agree with you. I think
> having things integrated is closer to how our minds work and allows
> for a more natural workflow.
>
>> PS, when I get time, I'm going to try and update the instructions on the
>> Wiki to make a couple of things cleare

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

2013-02-15 Thread Thomas Coffee
In case it is helpful to anyone, I am posting below a recent
conversation working out some issues with an installation of the
SageTeX module previously discussed on this thread:


Dear mr McCoffee,

I was very excited when I discovered your module for integrating Sage
with LyX. But I'm afraid I need a little bit more help to make it
work.

I managed to setup the one-step conversion in LyX, however, when I
apply it to your file example.lyx all sage-blocks display as double
questionmarks in the .pdf file. Can you point me to a more detailed
tutorial on how to use this LyX module?

Here is what I did:

downloaded example.lyx, setup.sh, compile-pdf-sage.sh, sage.module
and preferences to the desktop
edited setup.sh to reflect non-standard paths on my system
(~/.lyx2 and /opt/sage-5.2)
ran setup.sh (sudo bash setup.sh)

I checked that compile-pdf-sage.sh is copied to the sage directory,
the preferences file to ~/lyx2 and sage.module to the layouts folder
in ~/lyx2.

I also copied sagetex.sty to /home/dd/texmf, my user texmf folder.

I noticed the following error in the console from which I started LyX2:

insets/InsetLayout.cpp (191): Flex insets must have names of the form
`Flex:'.
This one has the name `sagecommand'

I hope you can help me out,
yours sincerely

Dirk Danckaert



Hi Dirk,

I'm currently running LyX 2.0.0 with Sage 4.8 on Ubuntu 11.10. Since
my Sage version is old (for complicated reasons), it's possible
something has changed in SageTeX, but let's try some other things
before I install another Sage.

I get the same message you do about the insets, along with some other
LyX complaints, and they are not causing me problems (yet), so that
may not be something to worry about.

Since you're on Ubuntu, one possible source of trouble (which happened
to me when I changed machines) is that, if you're using TeXLive, the
potentially mis-matched version of SageTeX that it includes can stick
around and pre-empt the correct one (even if you've followed the
instructions --- http://www.sagemath.org/doc/installation/sagetex.html
--- to install the one from your Sage distribution into LaTeX. Try
making sure it's gone by doing something like

sudo rm -r /usr/share/texmf-texlive/tex/latex/sagetex
sudo texhash

- Thomas



Hi Thomas,

I have corrected at least one error while checking things out again.
Seems the copying of sagetex.sty had not been done as it should.
However, still no joy. I did the two sudo-commands, with no
error-messages. I loaded example.lyx and tried a .pdf-export (I chose
/File/Export/PDF (pdflatex+sagetex). As a result I got the error
message

An error occurred while running:

compile-pdf-sage.sh "example.sagetex.sage"


I tried to make sense of that but I couldn't:

compile-pdf-sage.sh must be located in the SAGE-directory, isn't it?
So how does it find the .sagetex.sage-file?

I tried to locate example.sagetex.sage (I thought this is an
intermediate file produced by LyX) in the directory that contained
example.lyx (a folder on my desktop) but it wasn't there.

Is there perhaps a simpler test that I could perform, e.g. just
calculate 1+1 in LyX?

Dirk



Hi Dirk,

In order to figure out what's going on, please try running LyX from a
terminal window and running the export again --- then the error
messages from the call to compile-pdf-sage.sh will be visible in the
terminal.

I believe you edited the setup.sh script included with the module to
point to your Sage installation at /opt/sage-5.2. The script normally
puts compile-pdf-sage.sh in this same directory and adds that
directory to the execution path. However, it doesn't make that change
to the execution path permanent --- when you start a new shell, it
won't be there --- so in retrospect, it's probably a better idea to
move or link compile-pdf-sage.sh to somewhere like /usr/local/bin
where it can always be found. You can always do `echo $PATH' to make
sure it's somewhere findable. (The reason I did it this way was that,
in the Sage installations I had used before, it was normally necessary
to permanently add the Sage directory to the execution path anyway, so
it didn't occur to me this would be a problem.)

In the LyX that I'm running, it does all its LaTeX file operations in
an auto-generated temporary directory with a name like
`/tmp/lyx_tmpdir.J23736/lyx_tmpbuf2' (to avoid cluttering your file
system). This is where I would expect `example.sagetex.sage' to
appear. It might be helpful to see the files it generates in this
directory to make sure things are working right --- but whenever we
make any changes, clear out the old files so we know what's new.

If you want, you can replace the Sage insets in example.lyx with a
single simpler one, but I doubt it will help much --- once we get Sage
doing its job, the whole thing should run very fast.


- Thomas



Hi Thomas,

First I have to thank you for your time and patience. But I think I'm
making progress. As you assumed, the system couldn't find
compile-pdf-sage.sh, and I

Re: searching in the references

2013-02-15 Thread Wolfgang Engelmann
Am Freitag, 15. Februar 2013, 11:01:40 schrieb Ray Rashif:
> On 15 February 2013 17:10, Frédéric Parrenin wrote:
> > Dear all,
> > 
> > I often encounter compilation problems linked with the bibliography.
> > For example, lyx tell me that there is a syntax problem in a given
> > reference.
> > Then I need to search where I have inserted the reference in the lyx
> > document.
> > 
> > How to do that?
> > The current search tool does not seem to parse the references.
> > 
> > Best regards,
> > 
> > Frédéric Parrenin
> 
> You probably want Document > Outline and select 'List of Citations'. You
> can then type in the filter box (this will only match keys and not any
> other information about the reference).

and in addition:
outline>list of citation > sort
which gives you the citations alphabetically
You look for the problematic citation, click on it, 
and you are led to the location in the document
(if there are several locations, click again)

Wolfgang
> 
> 
> --
> GPG/PGP ID: C0711BF1


-- 
-
Wolfgang Engelmann
Schlossgartenstrasse 22
D-72070 Tübingen
Tel 07071 68325


Re: searching in the references

2013-02-15 Thread Ray Rashif
On 15 February 2013 17:10, Frédéric Parrenin wrote:

> Dear all,
>
> I often encounter compilation problems linked with the bibliography.
> For example, lyx tell me that there is a syntax problem in a given
> reference.
> Then I need to search where I have inserted the reference in the lyx
> document.
>
> How to do that?
> The current search tool does not seem to parse the references.
>
> Best regards,
>
> Frédéric Parrenin
>

You probably want Document > Outline and select 'List of Citations'. You
can then type in the filter box (this will only match keys and not any
other information about the reference).


--
GPG/PGP ID: C0711BF1


searching in the references

2013-02-15 Thread Frédéric Parrenin
Dear all,

I often encounter compilation problems linked with the bibliography.
For example, lyx tell me that there is a syntax problem in a given
reference.
Then I need to search where I have inserted the reference in the lyx
document.

How to do that?
The current search tool does not seem to parse the references.

Best regards,

Frédéric Parrenin


Re: Exercise Numbering

2013-02-15 Thread Steve Litt
On Thu, 14 Feb 2013 22:54:34 -0800
Jane Shevtsov  wrote:

> On Thu, Feb 14, 2013 at 1:08 AM, Steve Litt
> wrote:

> > Cool!
> >
> > This is going to be easier than I thought.
> >
> > Now, keep in mind this one says exercise 1, exercise2, and the MWE
> > had Problem 1, problem 2, etc. So for this email I'll use Exercise,
> > and assume you have made an environment called Exercise that works
> > on a counter called exercise_counter. Make the environment so it
> > increments the counter. Now, for every containing environment,
> > whether it be Section and Section*, or Mysection and Lab, make sure
> > that containing environment resets the counter back to 1 (or 0 if
> > your environment pre-increments). That's it, you're done.
> >
> 
> I'm afraid you're overestimating my LaTeX knowledge. (It's close to
> zero.) I didn't make the Exercise environment (it's from the
> "Theorems (AMS)" module) and have no idea how to do so. A bit more
> guidance would be very welcome.

I figured that. That's why I estimated it would take you a day instead
of three hours like it would take me, or ten minutes like it would take
a lot of the LaTeX gurus on the list.

A passing knowledge of LaTeX is very, very, VERY helpful in making you a
confident LyX user. A little LaTeX knowledge enables you to escape from
dead ends that otherwise might trap you.

My two proudest moments in LaTeX, and keep in mind that each of these
kept me busy for over a day, were:

1) Changing Section, Subsection, and SubSubSection to display lines
that are, thick, medium and light, respectively. I did this for a
decidedly non-Geek book where numbers wouldn't be appreciated.

2) I made LaTeX so I could put a non-printing command specifying a date
in the text, and the header on that page and every succeeding page
would display that date, until another command changed the date. I did
this in a business novel covering several years, in which it might have
been possible to get confused about when the present was.

In both cases, the people on the LyX list helped me with those things I
couldn't figure out how to do. In both cases, I was darned glad I knew
a little LaTeX, because it enabled me to make my book look *exactly*
how I wanted to look, instead of settling for the look of the nearest
package I could find.

HTH

SteveT