Re: Embedding asymptote in Lyx

2016-05-31 Thread Scott Kostyshak
On Sat, Jun 07, 2014 at 12:07:58PM +0200, Georg Baum wrote:
> Cyril wrote:
> 
> > The converter is from what initial format ? I guess the final is PDF.
> > But the initial one is LaTeX, LyX,...?
> 
> That depends. I guess you want to use pdflatex for direct pdf production. In 
> that case, use "LaTeX (pdflatex)" (code name pdflatex in the preferences 
> file), and your three commands are
> 
> pdflatex myfile.tex
> asy myfile-*
> pdflatex myfile.tex
> 
> If you use TeXLive, you can even use latexmk instead of a wrapper script 
> (from 
> http://asymptote.sourceforge.net/doc/LaTeX-usage.html):
> 
> latexmk -pdf myfile
> 
> The final format is the new PDF variant you need to define. Otherwise your 
> new converter would overwrite the default, and this would cause errors for 
> files without asymptote code. 

Hi Cyril,

Did you get this to work? We have an open enhancement request to
possibly improve support for asymptote in LyX:
http://www.lyx.org/trac/ticket/2950

But we would need your help to proceed.

Scott


signature.asc
Description: PGP signature


Re: Embedding asymptote in Lyx

2014-06-07 Thread Cyril

Le 07/06/2014 04:52, Scott Kostyshak a écrit :

On Fri, Jun 6, 2014 at 10:53 AM, Cyril mathsbruye...@free.fr wrote:

Hello everybody,

I'm trying to embed asymptote code in my LyX files.

The compilation of a file containing asymptote code named myfile.tex works
like this:

latex myfile.tex
asy myfile-*
latex myfile.tex

How can i manage to get this sequence of instructions with a simple shortcut
inside LyX ?

Thank you for your answers,

Hi Cyril,

I have little experience with this kind of thing, but you should take
a look at the converters section in Help  Customization. You could
create a format pdfA (or PDF (Asymptote) ) and then a converter
latex - pdfA and add your commands there.

Best,

Scott



Ty Scott,

That is eactly what I did, but the problem is which commands ??.
Since I have to execute 3 commands in just one converter. The 
documentation does'nt explain how to manage with this.


Best,

Cyril


Re: Embedding asymptote in Lyx

2014-06-07 Thread Georg Baum
Cyril wrote:

 Le 07/06/2014 04:52, Scott Kostyshak a écrit :

 I have little experience with this kind of thing, but you should take
 a look at the converters section in Help  Customization. You could
 create a format pdfA (or PDF (Asymptote) ) and then a converter
 latex - pdfA and add your commands there.

 Best,

 Scott


 Ty Scott,
 
 That is eactly what I did, but the problem is which commands ??.
 Since I have to execute 3 commands in just one converter. The
 documentation does'nt explain how to manage with this.

You need a wrapper script and define that one as converter. You can use the 
default converter shipped by LyX (scripts/convertDefault.py) as a template, 
and instead of calling convert, call your three commands in a row.


Georg



Re: Embedding asymptote in Lyx

2014-06-07 Thread Cyril

Le 07/06/2014 04:52, Scott Kostyshak a écrit :

On Fri, Jun 6, 2014 at 10:53 AM, Cyril mathsbruye...@free.fr wrote:

Hello everybody,

I'm trying to embed asymptote code in my LyX files.

The compilation of a file containing asymptote code named myfile.tex works
like this:

latex myfile.tex
asy myfile-*
latex myfile.tex

How can i manage to get this sequence of instructions with a simple shortcut
inside LyX ?

Thank you for your answers,

Hi Cyril,

I have little experience with this kind of thing, but you should take
a look at the converters section in Help  Customization. You could
create a format pdfA (or PDF (Asymptote) ) and then a converter
latex - pdfA and add your commands there.

Best,

Scott



More precisely, the biggest question I have is:

The converter is from what initial format ? I guess the final is PDF. 
But the initial one is LaTeX, LyX,...?




Re: Embedding asymptote in Lyx

2014-06-07 Thread Georg Baum
Cyril wrote:

 The converter is from what initial format ? I guess the final is PDF.
 But the initial one is LaTeX, LyX,...?

That depends. I guess you want to use pdflatex for direct pdf production. In 
that case, use LaTeX (pdflatex) (code name pdflatex in the preferences 
file), and your three commands are

pdflatex myfile.tex
asy myfile-*
pdflatex myfile.tex

If you use TeXLive, you can even use latexmk instead of a wrapper script 
(from 
http://asymptote.sourceforge.net/doc/LaTeX-usage.html):

latexmk -pdf myfile

The final format is the new PDF variant you need to define. Otherwise your 
new converter would overwrite the default, and this would cause errors for 
files without asymptote code. 


Georg



Re: Embedding asymptote in Lyx

2014-06-07 Thread Cyril

Le 07/06/2014 04:52, Scott Kostyshak a écrit :

On Fri, Jun 6, 2014 at 10:53 AM, Cyril mathsbruye...@free.fr wrote:

Hello everybody,

I'm trying to embed asymptote code in my LyX files.

The compilation of a file containing asymptote code named myfile.tex works
like this:

latex myfile.tex
asy myfile-*
latex myfile.tex

How can i manage to get this sequence of instructions with a simple shortcut
inside LyX ?

Thank you for your answers,

Hi Cyril,

I have little experience with this kind of thing, but you should take
a look at the converters section in Help  Customization. You could
create a format pdfA (or PDF (Asymptote) ) and then a converter
latex - pdfA and add your commands there.

Best,

Scott



Ty Scott,

That is eactly what I did, but the problem is which commands ??.
Since I have to execute 3 commands in just one converter. The 
documentation does'nt explain how to manage with this.


Best,

Cyril


Re: Embedding asymptote in Lyx

2014-06-07 Thread Georg Baum
Cyril wrote:

 Le 07/06/2014 04:52, Scott Kostyshak a écrit :

 I have little experience with this kind of thing, but you should take
 a look at the converters section in Help  Customization. You could
 create a format pdfA (or PDF (Asymptote) ) and then a converter
 latex - pdfA and add your commands there.

 Best,

 Scott


 Ty Scott,
 
 That is eactly what I did, but the problem is which commands ??.
 Since I have to execute 3 commands in just one converter. The
 documentation does'nt explain how to manage with this.

You need a wrapper script and define that one as converter. You can use the 
default converter shipped by LyX (scripts/convertDefault.py) as a template, 
and instead of calling convert, call your three commands in a row.


Georg



Re: Embedding asymptote in Lyx

2014-06-07 Thread Cyril

Le 07/06/2014 04:52, Scott Kostyshak a écrit :

On Fri, Jun 6, 2014 at 10:53 AM, Cyril mathsbruye...@free.fr wrote:

Hello everybody,

I'm trying to embed asymptote code in my LyX files.

The compilation of a file containing asymptote code named myfile.tex works
like this:

latex myfile.tex
asy myfile-*
latex myfile.tex

How can i manage to get this sequence of instructions with a simple shortcut
inside LyX ?

Thank you for your answers,

Hi Cyril,

I have little experience with this kind of thing, but you should take
a look at the converters section in Help  Customization. You could
create a format pdfA (or PDF (Asymptote) ) and then a converter
latex - pdfA and add your commands there.

Best,

Scott



More precisely, the biggest question I have is:

The converter is from what initial format ? I guess the final is PDF. 
But the initial one is LaTeX, LyX,...?




Re: Embedding asymptote in Lyx

2014-06-07 Thread Georg Baum
Cyril wrote:

 The converter is from what initial format ? I guess the final is PDF.
 But the initial one is LaTeX, LyX,...?

That depends. I guess you want to use pdflatex for direct pdf production. In 
that case, use LaTeX (pdflatex) (code name pdflatex in the preferences 
file), and your three commands are

pdflatex myfile.tex
asy myfile-*
pdflatex myfile.tex

If you use TeXLive, you can even use latexmk instead of a wrapper script 
(from 
http://asymptote.sourceforge.net/doc/LaTeX-usage.html):

latexmk -pdf myfile

The final format is the new PDF variant you need to define. Otherwise your 
new converter would overwrite the default, and this would cause errors for 
files without asymptote code. 


Georg



Re: Embedding asymptote in Lyx

2014-06-07 Thread Cyril

Le 07/06/2014 04:52, Scott Kostyshak a écrit :

On Fri, Jun 6, 2014 at 10:53 AM, Cyril  wrote:

Hello everybody,

I'm trying to embed asymptote code in my LyX files.

The compilation of a file containing asymptote code named "myfile.tex" works
like this:

latex myfile.tex
asy myfile-*
latex myfile.tex

How can i manage to get this sequence of instructions with a simple shortcut
inside LyX ?

Thank you for your answers,

Hi Cyril,

I have little experience with this kind of thing, but you should take
a look at the converters section in Help > Customization. You could
create a format "pdfA" (or "PDF (Asymptote)" ) and then a converter
latex -> pdfA and add your commands there.

Best,

Scott



Ty Scott,

That is eactly what I did, but the problem is "which commands ??".
Since I have to execute 3 commands in just one converter. The 
documentation does'nt explain how to manage with this.


Best,

Cyril


Re: Embedding asymptote in Lyx

2014-06-07 Thread Georg Baum
Cyril wrote:

> Le 07/06/2014 04:52, Scott Kostyshak a écrit :
>>
>> I have little experience with this kind of thing, but you should take
>> a look at the converters section in Help > Customization. You could
>> create a format "pdfA" (or "PDF (Asymptote)" ) and then a converter
>> latex -> pdfA and add your commands there.
>>
>> Best,
>>
>> Scott
>>
>>
> Ty Scott,
> 
> That is eactly what I did, but the problem is "which commands ??".
> Since I have to execute 3 commands in just one converter. The
> documentation does'nt explain how to manage with this.

You need a wrapper script and define that one as converter. You can use the 
default converter shipped by LyX (scripts/convertDefault.py) as a template, 
and instead of calling convert, call your three commands in a row.


Georg



Re: Embedding asymptote in Lyx

2014-06-07 Thread Cyril

Le 07/06/2014 04:52, Scott Kostyshak a écrit :

On Fri, Jun 6, 2014 at 10:53 AM, Cyril  wrote:

Hello everybody,

I'm trying to embed asymptote code in my LyX files.

The compilation of a file containing asymptote code named "myfile.tex" works
like this:

latex myfile.tex
asy myfile-*
latex myfile.tex

How can i manage to get this sequence of instructions with a simple shortcut
inside LyX ?

Thank you for your answers,

Hi Cyril,

I have little experience with this kind of thing, but you should take
a look at the converters section in Help > Customization. You could
create a format "pdfA" (or "PDF (Asymptote)" ) and then a converter
latex -> pdfA and add your commands there.

Best,

Scott



More precisely, the biggest question I have is:

The converter is from what initial format ? I guess the final is PDF. 
But the initial one is LaTeX, LyX,...?




Re: Embedding asymptote in Lyx

2014-06-07 Thread Georg Baum
Cyril wrote:

> The converter is from what initial format ? I guess the final is PDF.
> But the initial one is LaTeX, LyX,...?

That depends. I guess you want to use pdflatex for direct pdf production. In 
that case, use "LaTeX (pdflatex)" (code name pdflatex in the preferences 
file), and your three commands are

pdflatex myfile.tex
asy myfile-*
pdflatex myfile.tex

If you use TeXLive, you can even use latexmk instead of a wrapper script 
(from 
http://asymptote.sourceforge.net/doc/LaTeX-usage.html):

latexmk -pdf myfile

The final format is the new PDF variant you need to define. Otherwise your 
new converter would overwrite the default, and this would cause errors for 
files without asymptote code. 


Georg



Re: Embedding asymptote in Lyx

2014-06-06 Thread Scott Kostyshak
On Fri, Jun 6, 2014 at 10:53 AM, Cyril mathsbruye...@free.fr wrote:
 Hello everybody,

 I'm trying to embed asymptote code in my LyX files.

 The compilation of a file containing asymptote code named myfile.tex works
 like this:

 latex myfile.tex
 asy myfile-*
 latex myfile.tex

 How can i manage to get this sequence of instructions with a simple shortcut
 inside LyX ?

 Thank you for your answers,

Hi Cyril,

I have little experience with this kind of thing, but you should take
a look at the converters section in Help  Customization. You could
create a format pdfA (or PDF (Asymptote) ) and then a converter
latex - pdfA and add your commands there.

Best,

Scott


Re: Embedding asymptote in Lyx

2014-06-06 Thread Scott Kostyshak
On Fri, Jun 6, 2014 at 10:53 AM, Cyril mathsbruye...@free.fr wrote:
 Hello everybody,

 I'm trying to embed asymptote code in my LyX files.

 The compilation of a file containing asymptote code named myfile.tex works
 like this:

 latex myfile.tex
 asy myfile-*
 latex myfile.tex

 How can i manage to get this sequence of instructions with a simple shortcut
 inside LyX ?

 Thank you for your answers,

Hi Cyril,

I have little experience with this kind of thing, but you should take
a look at the converters section in Help  Customization. You could
create a format pdfA (or PDF (Asymptote) ) and then a converter
latex - pdfA and add your commands there.

Best,

Scott


Re: Embedding asymptote in Lyx

2014-06-06 Thread Scott Kostyshak
On Fri, Jun 6, 2014 at 10:53 AM, Cyril  wrote:
> Hello everybody,
>
> I'm trying to embed asymptote code in my LyX files.
>
> The compilation of a file containing asymptote code named "myfile.tex" works
> like this:
>
> latex myfile.tex
> asy myfile-*
> latex myfile.tex
>
> How can i manage to get this sequence of instructions with a simple shortcut
> inside LyX ?
>
> Thank you for your answers,

Hi Cyril,

I have little experience with this kind of thing, but you should take
a look at the converters section in Help > Customization. You could
create a format "pdfA" (or "PDF (Asymptote)" ) and then a converter
latex -> pdfA and add your commands there.

Best,

Scott


Re: Embedding asymptote in LyX

2008-05-14 Thread Peleg Michaeli
Oh, I see...

They also wrote this line under that figure: For ASYMPTOTE versions ≥
1.14, you can simply call PDFLATEX directly - but I have misunderstood
it, probably; I thought it meant that in this specific case (version ≥
1.14), I *don't* need to do that.

Well, then...

I am looking for a workaround now.

Is it possible to export a LyX document to a TeX document without losing
data? Then, I'll be able to do what they suggest in the documentation.

Thanks,
Peleg.

On Tue, 2008-05-13 at 19:38 +0200, Manveru wrote:
 Hough!
 
 I am not a specialist of ASYMPTOTE, but I've just looked into the
 documentation. They directly tell about makefile for latex with asymptote:
 
 document.pdf: document.tex
 pdflatex -shell-escape document
 asy document
 pdflatex -shell-escape document
 
 It means that ASYMPTOTE need an additional step during document generation
 which launch asy command between two pdflatex invocations. This is what
 LyX is *not able* to do. Generation process is compiled in, automatic... and
 as some people suggests, not user configurable.
 
 Maybe it is worth to put feature request in bugzilla, to get this to work
 when \usepackage{asymptote} is used in preamble definition.
 
 Regards,
 M.
 
 2008/5/13 Peleg Michaeli [EMAIL PROTECTED]:
 
  Hello!
 
  I am trying to embed Asymptote in LyX documents.
 
  I am following this tutorial:
  http://www.dse.nl/~dario/projects/asylatex/asylatex.pdfhttp://www.dse.nl/%7Edario/projects/asylatex/asylatex.pdf
 
  I am doing everything as suggested:
  * I have included \usepackage{asymptote} and
  \usepackage[pdftex]{graphicx} in the LaTeX preamble
  * I have done Crtl-L in the middle of the document and added this LaTeX
  code:
 
  \begin{figure}
  \centering
  \begin{asy}
  size (3cm);
  draw (unitcircle);
  \end{asy}
  \caption{Embedded Asymptote figures are easy!}
  \label{fig:embedded}
  \end{figure}
 
  When I generate the document (using pdflatex), I get nothing special: a
  figure with PDF written there, but no image (no unitcircle)...
  when I do the same, but with DVI, I get EPS written instead of the
  unitcircle. Either way, I don't see any picture...
 
  I have a new version of Asymptote: 1.18 - so it should work
  automatically with pdflatex.
 
  Any ideas?
  Maybe I should ask a different list?
 
  Thanks ahead,
  Peleg.
 
 
 
 
 



Re: Embedding asymptote in LyX

2008-05-14 Thread Peleg Michaeli
Ok, I have succeded to export to TeX, and I am now trying asymptote as
the instructions advised.

It is NOT a LyX question, I guess, but still it might be useful to ask
it here, since I believe that there are LyX users who use Asymptote...
and because it might be still LyX related, because of the following
fact:
doing what the instructions advised, on a test.tex file which contains
only what's written in this document, works well. Here is the code:

\documentclass[10pt]{article}
\usepackage[pdftex]{graphicx}
\usepackage{asymptote}
\begin{document}
\begin{figure}
\centering
\begin{asy}
size (3cm);
draw (unitcircle);
\end{asy}
\caption{Embedded Asymptote figures are easy!}
\label{fig:embedded}
\end{figure}
\end{document}

Again - this code works WELL.

So now I am trying to do the same with an exported-to-tex LyX document.
For that purpose, I have created a very simple LyX document, and
exported it to TeX; it worked as well.

I have tried to make it a bit more complicated - I tried to do the SAME
simple document, but in Hebrew (as I usually do). I have left the code
inside the asymptote example in English.

And that's it. Now it is not working any more...

A simple analyzation of the situation:
a. when the document was in English, the first pdflatex asytest2 had
created a file named asytest2.asy with this line in it:
defaultfilename='asytest2_1';
this is probably good, because the command asy asytest2 generates a
file asytest2_1.pdf with the unit circle, and the second pdflatex
asytest2 generates asytest2.pdf with the unit circle embedded.
but:
b. when the document is still mainly in English, but I have a *single
word* in Hebrew (actually, in a Hebrew direction, but it is still with
English characters; it looks like that: [in the tex file] sometext
\inputencoding{cp1255}\R{some more text}) then the first pdflatex
asytest2 generates the file asytest2.asy as before, but in it, the
relevant line is now:
defaultfilename='asytest2_\protect \beginL 1\endL ';
and that is probably not good, since the command asy asytest2
generates a file named asytest2_\protect eginL 1\endL .pdf (which
can't be good) and of course, the second pdflatex asytest2 does *not*
embed the nice unitcircle from that pdf.

manually removing the line \inputencoding{cp1255}\R{text} does not
make any difference, so I assumed it is something with the main
configuration of the tex file. So, I have compared to files, one with
thi encoding difference, and one without, that are otherwise the same,
and these are the results:
The ONLY difference (besides the line with
\inputencoding{cp1255}\R{text} - which its removal changes nothing), is
in the heading -
\documentclass[10pt,english]{article} becomes
\documentclass[10pt,hebrew,english]{article}
and \usepackage[latin9]{inputenc} becomes
\usepackage[cp1255,latin9]{inputenc}

I have tried to remove only one of them, so see what happens... I have
tried only to remove hebrew from the first line, but then the second
line caused an error; so I have kept the hebrew in the first line, and
removed cp1255 from the second line. well, that didn't change anything
either.
Removing both changes, that is, removing both hebrew and cp1255 from
the heading, return the situation - of course - to the one we had in the
beginning - a pure English document; then, of course, it worked well
again.

That's my little research...
Any ideas?

Thanks ahead,
Peleg.

On Wed, 2008-05-14 at 08:40 +0100, Peleg Michaeli wrote:
 Oh, I see...
 
 They also wrote this line under that figure: For ASYMPTOTE versions ≥
 1.14, you can simply call PDFLATEX directly - but I have misunderstood
 it, probably; I thought it meant that in this specific case (version ≥
 1.14), I *don't* need to do that.
 
 Well, then...
 
 I am looking for a workaround now.
 
 Is it possible to export a LyX document to a TeX document without losing
 data? Then, I'll be able to do what they suggest in the documentation.
 
 Thanks,
 Peleg.
 
 On Tue, 2008-05-13 at 19:38 +0200, Manveru wrote:
  Hough!
  
  I am not a specialist of ASYMPTOTE, but I've just looked into the
  documentation. They directly tell about makefile for latex with asymptote:
  
  document.pdf: document.tex
  pdflatex -shell-escape document
  asy document
  pdflatex -shell-escape document
  
  It means that ASYMPTOTE need an additional step during document generation
  which launch asy command between two pdflatex invocations. This is what
  LyX is *not able* to do. Generation process is compiled in, automatic... and
  as some people suggests, not user configurable.
  
  Maybe it is worth to put feature request in bugzilla, to get this to work
  when \usepackage{asymptote} is used in preamble definition.
  
  Regards,
  M.
  
  2008/5/13 Peleg Michaeli [EMAIL PROTECTED]:
  
   Hello!
  
   I am trying to embed Asymptote in LyX documents.
  
   I am following this tutorial:
   http://www.dse.nl/~dario/projects/asylatex/asylatex.pdfhttp://www.dse.nl/%7Edario/projects/asylatex/asylatex.pdf
  
  

Re: Embedding asymptote in LyX

2008-05-14 Thread Peleg Michaeli
Oh, I see...

They also wrote this line under that figure: For ASYMPTOTE versions ≥
1.14, you can simply call PDFLATEX directly - but I have misunderstood
it, probably; I thought it meant that in this specific case (version ≥
1.14), I *don't* need to do that.

Well, then...

I am looking for a workaround now.

Is it possible to export a LyX document to a TeX document without losing
data? Then, I'll be able to do what they suggest in the documentation.

Thanks,
Peleg.

On Tue, 2008-05-13 at 19:38 +0200, Manveru wrote:
 Hough!
 
 I am not a specialist of ASYMPTOTE, but I've just looked into the
 documentation. They directly tell about makefile for latex with asymptote:
 
 document.pdf: document.tex
 pdflatex -shell-escape document
 asy document
 pdflatex -shell-escape document
 
 It means that ASYMPTOTE need an additional step during document generation
 which launch asy command between two pdflatex invocations. This is what
 LyX is *not able* to do. Generation process is compiled in, automatic... and
 as some people suggests, not user configurable.
 
 Maybe it is worth to put feature request in bugzilla, to get this to work
 when \usepackage{asymptote} is used in preamble definition.
 
 Regards,
 M.
 
 2008/5/13 Peleg Michaeli [EMAIL PROTECTED]:
 
  Hello!
 
  I am trying to embed Asymptote in LyX documents.
 
  I am following this tutorial:
  http://www.dse.nl/~dario/projects/asylatex/asylatex.pdfhttp://www.dse.nl/%7Edario/projects/asylatex/asylatex.pdf
 
  I am doing everything as suggested:
  * I have included \usepackage{asymptote} and
  \usepackage[pdftex]{graphicx} in the LaTeX preamble
  * I have done Crtl-L in the middle of the document and added this LaTeX
  code:
 
  \begin{figure}
  \centering
  \begin{asy}
  size (3cm);
  draw (unitcircle);
  \end{asy}
  \caption{Embedded Asymptote figures are easy!}
  \label{fig:embedded}
  \end{figure}
 
  When I generate the document (using pdflatex), I get nothing special: a
  figure with PDF written there, but no image (no unitcircle)...
  when I do the same, but with DVI, I get EPS written instead of the
  unitcircle. Either way, I don't see any picture...
 
  I have a new version of Asymptote: 1.18 - so it should work
  automatically with pdflatex.
 
  Any ideas?
  Maybe I should ask a different list?
 
  Thanks ahead,
  Peleg.
 
 
 
 
 



Re: Embedding asymptote in LyX

2008-05-14 Thread Peleg Michaeli
Ok, I have succeded to export to TeX, and I am now trying asymptote as
the instructions advised.

It is NOT a LyX question, I guess, but still it might be useful to ask
it here, since I believe that there are LyX users who use Asymptote...
and because it might be still LyX related, because of the following
fact:
doing what the instructions advised, on a test.tex file which contains
only what's written in this document, works well. Here is the code:

\documentclass[10pt]{article}
\usepackage[pdftex]{graphicx}
\usepackage{asymptote}
\begin{document}
\begin{figure}
\centering
\begin{asy}
size (3cm);
draw (unitcircle);
\end{asy}
\caption{Embedded Asymptote figures are easy!}
\label{fig:embedded}
\end{figure}
\end{document}

Again - this code works WELL.

So now I am trying to do the same with an exported-to-tex LyX document.
For that purpose, I have created a very simple LyX document, and
exported it to TeX; it worked as well.

I have tried to make it a bit more complicated - I tried to do the SAME
simple document, but in Hebrew (as I usually do). I have left the code
inside the asymptote example in English.

And that's it. Now it is not working any more...

A simple analyzation of the situation:
a. when the document was in English, the first pdflatex asytest2 had
created a file named asytest2.asy with this line in it:
defaultfilename='asytest2_1';
this is probably good, because the command asy asytest2 generates a
file asytest2_1.pdf with the unit circle, and the second pdflatex
asytest2 generates asytest2.pdf with the unit circle embedded.
but:
b. when the document is still mainly in English, but I have a *single
word* in Hebrew (actually, in a Hebrew direction, but it is still with
English characters; it looks like that: [in the tex file] sometext
\inputencoding{cp1255}\R{some more text}) then the first pdflatex
asytest2 generates the file asytest2.asy as before, but in it, the
relevant line is now:
defaultfilename='asytest2_\protect \beginL 1\endL ';
and that is probably not good, since the command asy asytest2
generates a file named asytest2_\protect eginL 1\endL .pdf (which
can't be good) and of course, the second pdflatex asytest2 does *not*
embed the nice unitcircle from that pdf.

manually removing the line \inputencoding{cp1255}\R{text} does not
make any difference, so I assumed it is something with the main
configuration of the tex file. So, I have compared to files, one with
thi encoding difference, and one without, that are otherwise the same,
and these are the results:
The ONLY difference (besides the line with
\inputencoding{cp1255}\R{text} - which its removal changes nothing), is
in the heading -
\documentclass[10pt,english]{article} becomes
\documentclass[10pt,hebrew,english]{article}
and \usepackage[latin9]{inputenc} becomes
\usepackage[cp1255,latin9]{inputenc}

I have tried to remove only one of them, so see what happens... I have
tried only to remove hebrew from the first line, but then the second
line caused an error; so I have kept the hebrew in the first line, and
removed cp1255 from the second line. well, that didn't change anything
either.
Removing both changes, that is, removing both hebrew and cp1255 from
the heading, return the situation - of course - to the one we had in the
beginning - a pure English document; then, of course, it worked well
again.

That's my little research...
Any ideas?

Thanks ahead,
Peleg.

On Wed, 2008-05-14 at 08:40 +0100, Peleg Michaeli wrote:
 Oh, I see...
 
 They also wrote this line under that figure: For ASYMPTOTE versions ≥
 1.14, you can simply call PDFLATEX directly - but I have misunderstood
 it, probably; I thought it meant that in this specific case (version ≥
 1.14), I *don't* need to do that.
 
 Well, then...
 
 I am looking for a workaround now.
 
 Is it possible to export a LyX document to a TeX document without losing
 data? Then, I'll be able to do what they suggest in the documentation.
 
 Thanks,
 Peleg.
 
 On Tue, 2008-05-13 at 19:38 +0200, Manveru wrote:
  Hough!
  
  I am not a specialist of ASYMPTOTE, but I've just looked into the
  documentation. They directly tell about makefile for latex with asymptote:
  
  document.pdf: document.tex
  pdflatex -shell-escape document
  asy document
  pdflatex -shell-escape document
  
  It means that ASYMPTOTE need an additional step during document generation
  which launch asy command between two pdflatex invocations. This is what
  LyX is *not able* to do. Generation process is compiled in, automatic... and
  as some people suggests, not user configurable.
  
  Maybe it is worth to put feature request in bugzilla, to get this to work
  when \usepackage{asymptote} is used in preamble definition.
  
  Regards,
  M.
  
  2008/5/13 Peleg Michaeli [EMAIL PROTECTED]:
  
   Hello!
  
   I am trying to embed Asymptote in LyX documents.
  
   I am following this tutorial:
   http://www.dse.nl/~dario/projects/asylatex/asylatex.pdfhttp://www.dse.nl/%7Edario/projects/asylatex/asylatex.pdf
  
  

Re: Embedding asymptote in LyX

2008-05-14 Thread Peleg Michaeli
Oh, I see...

They also wrote this line under that figure: "For ASYMPTOTE versions ≥
1.14, you can simply call PDFLATEX directly" - but I have misunderstood
it, probably; I thought it meant that in this specific case (version ≥
1.14), I *don't* need to do that.

Well, then...

I am looking for a workaround now.

Is it possible to export a LyX document to a TeX document without losing
data? Then, I'll be able to do what they suggest in the documentation.

Thanks,
Peleg.

On Tue, 2008-05-13 at 19:38 +0200, Manveru wrote:
> Hough!
> 
> I am not a specialist of ASYMPTOTE, but I've just looked into the
> documentation. They directly tell about makefile for latex with asymptote:
> 
> document.pdf: document.tex
> pdflatex -shell-escape document
> asy document
> pdflatex -shell-escape document
> 
> It means that ASYMPTOTE need an additional step during document generation
> which launch "asy" command between two "pdflatex" invocations. This is what
> LyX is *not able* to do. Generation process is compiled in, automatic... and
> as some people suggests, not user configurable.
> 
> Maybe it is worth to put feature request in bugzilla, to get this to work
> when \usepackage{asymptote} is used in preamble definition.
> 
> Regards,
> M.
> 
> 2008/5/13 Peleg Michaeli <[EMAIL PROTECTED]>:
> 
> > Hello!
> >
> > I am trying to embed Asymptote in LyX documents.
> >
> > I am following this tutorial:
> > http://www.dse.nl/~dario/projects/asylatex/asylatex.pdf
> >
> > I am doing everything as suggested:
> > * I have included \usepackage{asymptote} and
> > \usepackage[pdftex]{graphicx} in the LaTeX preamble
> > * I have done Crtl-L in the middle of the document and added this LaTeX
> > code:
> >
> > \begin{figure}
> > \centering
> > \begin{asy}
> > size (3cm);
> > draw (unitcircle);
> > \end{asy}
> > \caption{Embedded Asymptote figures are easy!}
> > \label{fig:embedded}
> > \end{figure}
> >
> > When I generate the document (using pdflatex), I get nothing special: a
> > "figure" with "PDF" written there, but no image (no "unitcircle")...
> > when I do the same, but with DVI, I get "EPS" written instead of the
> > unitcircle. Either way, I don't see any picture...
> >
> > I have a new version of Asymptote: 1.18 - so it should work
> > automatically with pdflatex.
> >
> > Any ideas?
> > Maybe I should ask a different list?
> >
> > Thanks ahead,
> > Peleg.
> >
> >
> >
> 
> 



Re: Embedding asymptote in LyX

2008-05-14 Thread Peleg Michaeli
Ok, I have succeded to export to TeX, and I am now trying asymptote as
the instructions advised.

It is NOT a LyX question, I guess, but still it might be useful to ask
it here, since I believe that there are LyX users who use Asymptote...
and because it might be still LyX related, because of the following
fact:
doing what the instructions advised, on a test.tex file which contains
only what's written in this document, works well. Here is the code:

\documentclass[10pt]{article}
\usepackage[pdftex]{graphicx}
\usepackage{asymptote}
\begin{document}
\begin{figure}
\centering
\begin{asy}
size (3cm);
draw (unitcircle);
\end{asy}
\caption{Embedded Asymptote figures are easy!}
\label{fig:embedded}
\end{figure}
\end{document}

Again - this code works WELL.

So now I am trying to do the same with an exported-to-tex LyX document.
For that purpose, I have created a very simple LyX document, and
exported it to TeX; it worked as well.

I have tried to make it a bit more complicated - I tried to do the SAME
simple document, but in Hebrew (as I usually do). I have left the code
inside the asymptote example in English.

And that's it. Now it is not working any more...

A simple analyzation of the situation:
a. when the document was in English, the first "pdflatex asytest2" had
created a file named "asytest2.asy" with this line in it:
defaultfilename='asytest2_1';
this is probably good, because the command "asy asytest2" generates a
file "asytest2_1.pdf" with the unit circle, and the second "pdflatex
asytest2" generates "asytest2.pdf" with the unit circle embedded.
but:
b. when the document is still mainly in English, but I have a *single
word* in Hebrew (actually, in a Hebrew "direction", but it is still with
English characters; it looks like that: [in the tex file] sometext
\inputencoding{cp1255}\R{some more text}) then the first "pdflatex
asytest2" generates the file "asytest2.asy" as before, but in it, the
relevant line is now:
defaultfilename='asytest2_\protect \beginL 1\endL ';
and that is probably not good, since the command "asy asytest2"
generates a file named "asytest2_\protect eginL 1\endL .pdf" (which
can't be good) and of course, the second "pdflatex asytest2" does *not*
embed the nice unitcircle from that pdf.

manually removing the line "\inputencoding{cp1255}\R{text}" does not
make any difference, so I assumed it is something with the main
configuration of the tex file. So, I have compared to files, one with
thi encoding difference, and one without, that are otherwise the same,
and these are the results:
The ONLY difference (besides the line with
\inputencoding{cp1255}\R{text} - which its removal changes nothing), is
in the heading -
\documentclass[10pt,english]{article} becomes
\documentclass[10pt,hebrew,english]{article}
and \usepackage[latin9]{inputenc} becomes
\usepackage[cp1255,latin9]{inputenc}

I have tried to remove only one of them, so see what happens... I have
tried only to remove hebrew from the first line, but then the second
line caused an error; so I have kept the "hebrew" in the first line, and
removed "cp1255" from the second line. well, that didn't change anything
either.
Removing both changes, that is, removing both "hebrew" and "cp1255" from
the heading, return the situation - of course - to the one we had in the
beginning - a pure English document; then, of course, it worked well
again.

That's my little research...
Any ideas?

Thanks ahead,
Peleg.

On Wed, 2008-05-14 at 08:40 +0100, Peleg Michaeli wrote:
> Oh, I see...
> 
> They also wrote this line under that figure: "For ASYMPTOTE versions ≥
> 1.14, you can simply call PDFLATEX directly" - but I have misunderstood
> it, probably; I thought it meant that in this specific case (version ≥
> 1.14), I *don't* need to do that.
> 
> Well, then...
> 
> I am looking for a workaround now.
> 
> Is it possible to export a LyX document to a TeX document without losing
> data? Then, I'll be able to do what they suggest in the documentation.
> 
> Thanks,
> Peleg.
> 
> On Tue, 2008-05-13 at 19:38 +0200, Manveru wrote:
> > Hough!
> > 
> > I am not a specialist of ASYMPTOTE, but I've just looked into the
> > documentation. They directly tell about makefile for latex with asymptote:
> > 
> > document.pdf: document.tex
> > pdflatex -shell-escape document
> > asy document
> > pdflatex -shell-escape document
> > 
> > It means that ASYMPTOTE need an additional step during document generation
> > which launch "asy" command between two "pdflatex" invocations. This is what
> > LyX is *not able* to do. Generation process is compiled in, automatic... and
> > as some people suggests, not user configurable.
> > 
> > Maybe it is worth to put feature request in bugzilla, to get this to work
> > when \usepackage{asymptote} is used in preamble definition.
> > 
> > Regards,
> > M.
> > 
> > 2008/5/13 Peleg Michaeli <[EMAIL PROTECTED]>:
> > 
> > > Hello!
> > >
> > > I am trying to embed Asymptote in LyX documents.
> > >
> > > I am following this tutorial:

Re: Embedding asymptote in LyX

2008-05-13 Thread Manveru
Hough!

I am not a specialist of ASYMPTOTE, but I've just looked into the
documentation. They directly tell about makefile for latex with asymptote:

document.pdf: document.tex
pdflatex -shell-escape document
asy document
pdflatex -shell-escape document

It means that ASYMPTOTE need an additional step during document generation
which launch asy command between two pdflatex invocations. This is what
LyX is *not able* to do. Generation process is compiled in, automatic... and
as some people suggests, not user configurable.

Maybe it is worth to put feature request in bugzilla, to get this to work
when \usepackage{asymptote} is used in preamble definition.

Regards,
M.

2008/5/13 Peleg Michaeli [EMAIL PROTECTED]:

 Hello!

 I am trying to embed Asymptote in LyX documents.

 I am following this tutorial:
 http://www.dse.nl/~dario/projects/asylatex/asylatex.pdfhttp://www.dse.nl/%7Edario/projects/asylatex/asylatex.pdf

 I am doing everything as suggested:
 * I have included \usepackage{asymptote} and
 \usepackage[pdftex]{graphicx} in the LaTeX preamble
 * I have done Crtl-L in the middle of the document and added this LaTeX
 code:

 \begin{figure}
 \centering
 \begin{asy}
 size (3cm);
 draw (unitcircle);
 \end{asy}
 \caption{Embedded Asymptote figures are easy!}
 \label{fig:embedded}
 \end{figure}

 When I generate the document (using pdflatex), I get nothing special: a
 figure with PDF written there, but no image (no unitcircle)...
 when I do the same, but with DVI, I get EPS written instead of the
 unitcircle. Either way, I don't see any picture...

 I have a new version of Asymptote: 1.18 - so it should work
 automatically with pdflatex.

 Any ideas?
 Maybe I should ask a different list?

 Thanks ahead,
 Peleg.





-- 
Manveru
jabber: [EMAIL PROTECTED]
gg: 1624001
http://www.manveru.pl


Re: Embedding asymptote in LyX

2008-05-13 Thread Manveru
Hough!

I am not a specialist of ASYMPTOTE, but I've just looked into the
documentation. They directly tell about makefile for latex with asymptote:

document.pdf: document.tex
pdflatex -shell-escape document
asy document
pdflatex -shell-escape document

It means that ASYMPTOTE need an additional step during document generation
which launch asy command between two pdflatex invocations. This is what
LyX is *not able* to do. Generation process is compiled in, automatic... and
as some people suggests, not user configurable.

Maybe it is worth to put feature request in bugzilla, to get this to work
when \usepackage{asymptote} is used in preamble definition.

Regards,
M.

2008/5/13 Peleg Michaeli [EMAIL PROTECTED]:

 Hello!

 I am trying to embed Asymptote in LyX documents.

 I am following this tutorial:
 http://www.dse.nl/~dario/projects/asylatex/asylatex.pdfhttp://www.dse.nl/%7Edario/projects/asylatex/asylatex.pdf

 I am doing everything as suggested:
 * I have included \usepackage{asymptote} and
 \usepackage[pdftex]{graphicx} in the LaTeX preamble
 * I have done Crtl-L in the middle of the document and added this LaTeX
 code:

 \begin{figure}
 \centering
 \begin{asy}
 size (3cm);
 draw (unitcircle);
 \end{asy}
 \caption{Embedded Asymptote figures are easy!}
 \label{fig:embedded}
 \end{figure}

 When I generate the document (using pdflatex), I get nothing special: a
 figure with PDF written there, but no image (no unitcircle)...
 when I do the same, but with DVI, I get EPS written instead of the
 unitcircle. Either way, I don't see any picture...

 I have a new version of Asymptote: 1.18 - so it should work
 automatically with pdflatex.

 Any ideas?
 Maybe I should ask a different list?

 Thanks ahead,
 Peleg.





-- 
Manveru
jabber: [EMAIL PROTECTED]
gg: 1624001
http://www.manveru.pl


Re: Embedding asymptote in LyX

2008-05-13 Thread Manveru
Hough!

I am not a specialist of ASYMPTOTE, but I've just looked into the
documentation. They directly tell about makefile for latex with asymptote:

document.pdf: document.tex
pdflatex -shell-escape document
asy document
pdflatex -shell-escape document

It means that ASYMPTOTE need an additional step during document generation
which launch "asy" command between two "pdflatex" invocations. This is what
LyX is *not able* to do. Generation process is compiled in, automatic... and
as some people suggests, not user configurable.

Maybe it is worth to put feature request in bugzilla, to get this to work
when \usepackage{asymptote} is used in preamble definition.

Regards,
M.

2008/5/13 Peleg Michaeli <[EMAIL PROTECTED]>:

> Hello!
>
> I am trying to embed Asymptote in LyX documents.
>
> I am following this tutorial:
> http://www.dse.nl/~dario/projects/asylatex/asylatex.pdf
>
> I am doing everything as suggested:
> * I have included \usepackage{asymptote} and
> \usepackage[pdftex]{graphicx} in the LaTeX preamble
> * I have done Crtl-L in the middle of the document and added this LaTeX
> code:
>
> \begin{figure}
> \centering
> \begin{asy}
> size (3cm);
> draw (unitcircle);
> \end{asy}
> \caption{Embedded Asymptote figures are easy!}
> \label{fig:embedded}
> \end{figure}
>
> When I generate the document (using pdflatex), I get nothing special: a
> "figure" with "PDF" written there, but no image (no "unitcircle")...
> when I do the same, but with DVI, I get "EPS" written instead of the
> unitcircle. Either way, I don't see any picture...
>
> I have a new version of Asymptote: 1.18 - so it should work
> automatically with pdflatex.
>
> Any ideas?
> Maybe I should ask a different list?
>
> Thanks ahead,
> Peleg.
>
>
>


-- 
Manveru
jabber: [EMAIL PROTECTED]
gg: 1624001
http://www.manveru.pl