Re: [NTG-context] Re: function plotting

2005-10-04 Thread luigi.scarso

Peter Münster wrote:


On Tue, 4 Oct 2005, Alexander Lazic wrote:

 


\usemodule[pstric]
\starttext
\startPSTRICKS
\psplot[plotpoints=100]{0}{1}{x 360 mul sin}
\stopPSTRICKS
\stoptext
 


Thanx i have try an get:

figures : figure pstest-texapp can not be found

but there is the file: pstest-texapp.tex
   



Hello Alexander,
I don't understand your problem, but perhaps you should write the psplot
command inside a \pspicture(0,-1)(1,1) ... \endpspicture.
Cheers, Peter

 


This works for me (I suppose your code is in pstest-texapp.tex):
$> texexec --output=dvips pstest-texapp.tex
$> dvips -o pstest-texapp.ps pstest-texapp.dvi
$> ps2pdf14 pstest-texapp.ps

luigi
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Re: function plotting

2005-10-04 Thread David Arnold

Alexander,

There is a lot of plots you can do with Metapost. Ordinary, every day  
stuff. For example:


beginfig(1);

% initialize a and c for f(x)=|x-a| and g(x)=c
numeric a, c;
a=-2;
c=2;

% initialize function label abcissas and postions
numeric flabel, glabel;
flabel:=-5;
glabel:=-5;

% define function f(x)=|x-a|
vardef f(expr x)=
abs(x-a)
enddef;

% draw line with given point and slope
path F;
F:=(-5,f(-5));
for x=-5 step 1 until 5:
F:=F--(x,f(x));
endfor;

% initialize scale
numeric u; 10u=4cm;

% the line
F:=F scaled 1u;
draw F withcolor blue;

% clipping path
path cpath;
cpath:=(-5,-5)--(5,-5)--(5,5)--(-5,5)--cycle;
cpath:=cpath scaled 1u;

% clip and save current picture
picture pic;
clip currentpicture to cpath;
pic:=currentpicture;

% erase currentpicture
currentpicture:=nullpicture;

% draw grid
for k=-5u step 1u until 5u:
draw (-5u,k)--(5u,k) withcolor 0.85white;
draw (k,-5u)--(k,5u) withcolor 0.85white;
endfor;

% draw axes
drawarrow (-5u,0)--(5u,0);
drawarrow (0,-5u)--(0,5u);

% label axes
label.rt(btex $x$ etex, (5.2u,0));
label.top(btex $y$ etex, (0,5.2.u));
label.bot(btex $5$ etex, (5u,0));
label.lft(btex $5$ etex, (0,5u));

% redraw line
draw pic;

% label the functions f(x)=|x-a| and g(x)=c
pair D, E;
D:=(-5,f(-5)) scaled u;
label.lft(btex $f$ etex,D);
E:=(-5,2) scaled u;
label.lft(btex $g$ etex, E);

% draw the graph of g(x)=c
path G;
G:=(-5,2)--(5,2);
G:=G scaled u;
draw G withcolor blue;

endfig;

end.

And for a good stats package, see:

http://www-math.univ-poitiers.fr/~phan/statsmac.html

And for good circuits diagrams, see:

http://www.cnm.es/~pserra/schema/whatis.html

Don't give up on Metapost too soon. It's an awesome language and the  
file size created are small, a plus when you're document includes  
lots of figures and you want it to download in reasonable time on the  
internet.


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Re: function plotting

2005-10-04 Thread Peter Münster
On Tue, 4 Oct 2005, Alexander Lazic wrote:

> >\usemodule[pstric]
> >\starttext
> >\startPSTRICKS
> >\psplot[plotpoints=100]{0}{1}{x 360 mul sin}
> >\stopPSTRICKS
> >\stoptext
> 
> Thanx i have try an get:
> 
> figures : figure pstest-texapp can not be found
> 
> but there is the file: pstest-texapp.tex

Hello Alexander,
I don't understand your problem, but perhaps you should write the psplot
command inside a \pspicture(0,-1)(1,1) ... \endpspicture.
Cheers, Peter

-- 
http://pmrb.free.fr/contact/
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Re: function plotting

2005-10-04 Thread Christopher Creutzig
Mojca Miklavec wrote:

> and then "\input file" inside of the main LaTeX file. Gnuplot cannot
> make output in ConTeXt (yet), but perhaps you can include the

 Since afaik ConTeXt does not have an equivalent of LaTeX's picture
environment, I don't see much point in teaching gnuplot some sort of
ConTeXt output.  I'm no gnuplot expert, but my guess is that tweaking
the metapost prologues and some minor code tweaks would probably be the
easiest way to go.

> examples where I still use LaTeX.) You can also output the
> (ConTeXt-friendly) metapost (with set terminal), but you lose on
> quality.

 In what respect do you lose quality?


Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Help with more the one figures

2005-10-04 Thread Alexander Lazic

Hi,

today i have try to use two figures generated with gnuplot.

When i have the png-file generated then i get both figures in my pdf?!
I'am a little bit confused about this!

After:

gnuplot first.gp
---first.gp
set terminal mp color
set output "figure.mp"

#set terminal png large size 1024x768
#set output "figure.png"

set xrange [-10:10]
set yrange [] writeback
plot sin(x)
set yrange restore
replot x/2
---
mpost figure.mp
texexec --pdf testi.tex

---testi.tex
\setupcolors[state=start]
 
\starttext

\externalfigure[figure.0]
\externalfigure[figure.1]
\stoptext
---

---
texexec --version

TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005

  texexec : TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005
  texutil : TeXUtil 9.0.0 - ConTeXt / PRAGMA ADE 1992-2004
  tex : pdfeTeX, 3.141592-1.30.3-2.2 (Web2C 7.5.5)
  context : ver: 2005.08.31
  cont-en : ver: 2005.08.31  fmt: 2005.10.4  mes: english
---
mpost --version
MetaPost 0.901 (Web2C 7.5.5)
kpathsea version 3.5.5
Copyright 2005 AT&T Bell Laboratories.
Kpathsea is copyright 2005 Karl Berry and Olaf Weber.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the MetaPost copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the MetaPost source.
Primary author of MetaPost: John Hobby.
Kpathsea written by Karl Berry, Olaf Weber, and others.
---

Greetings

al ;-)
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Re: function plotting

2005-10-04 Thread Alexander Lazic

Hi,

On Die 04.10.2005 21:14, Peter Münster wrote:


You could also try PSTricks:

\usemodule[pstric]
\starttext
\startPSTRICKS
\psplot[plotpoints=100]{0}{1}{x 360 mul sin}
\stopPSTRICKS
\stoptext


Thanx i have try an get:

figures : figure pstest-texapp can not be found

but there is the file: pstest-texapp.tex

You can get the output and some otherfiles from:

http://www.none.at/tex/

Greetings

al ;-)
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] ISO Latin 2 input under the new ConTeXt

2005-10-04 Thread Vit Zyka

Michal Kvasnička wrote:

Mojca Miklavec wrote:

There are two things: input encoding or regime (\enableregime[utf] 
inyour case) and font  


Many thanks, \enableregime did what I needed.

But I still have some minor questions:
1) Where should I put \loadmapfile[psclean.map]? (I can't include it in 
pdftex.cnf, since there is none under my new teTeX 3.0 in SuSE.)


For standard fonts you do not need to include any map file. If you 
really need to incorporate something to format, put it to 
cont-(cz|en).tex or look to the context.tex.


2) Is it a goold idea to place in the same file \enableregime[il2] if 
almost all my documents are typed in this encoding?


My Czech setup for:
  format: cont-en
  input regime: il2
  font|hyphenation encoding: ec

\enableregime[il2]
\mainlanguage[cz]
\loadmapfile[lm.map]

3) What is the native ConTeXt font encoding? If I use many different 


IFAIK there is no native font encoding since ConTeXt tries to maintain 
many languages with different hyphenation patterns needed to encode.
Czech hyphenation pattern for Czech language is in ec encoding in 
cont-en format.


fonts (most being reencoded via virtual fonts into IL2 encoding), should 
I reencode them into the native ConTeXt font encoding (whatever it is), 
or can I make ConTeXt work with a different font encoding, perhaps 
different for different fonts? How? How?
4) What documentations for fonts in ConTeXt should I read, and in what 
order?


Try to look at http://wiki.contextgarden.net

Vit

P.S. Czech support in ConTeXt is far from optimal; after I will finnish 
the real big publication I will summarize it. No time for that now I am 
 a month late.



And I have one (I hope) little plea to Mr. Hagen:
Please, can you add MetaFont to your minimum TeX installation? I would 
like to use it instead of teTeX because it is more flexible. But I still 
use heavily some MetaFont bitmapped fonts. Many thanks anyway.


Your thankful
Michal Kvasnicka

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context



--
===
Ing. Vít Zýka, Ph.D. TYPOkvítek

database publishing  databazove publikovani
data maintaining and typesetting in typographic quality
priprava dat a jejich sazba v typograficke kvalite

tel.: (+420) 777 198 189 www: http://typokvitek.com
===

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Bib-module: crossreferences

2005-10-04 Thread Roelof Langman
Hi Taco,

Are crossreferences supposed to work in the new bib module? According to the
Latex companion pp. 404ff. a crossreference can be made in an @inbook to a
@book provided the @inbook precedes the @book in a .bib-file. If a @book is
referenced at least two times by an @inbook, an entry for the @book is
included in the reference list. 

In the new bibtex-module for Context, the crossreferences are resolved
properly, I think, but the crossreferenced entry is not yet included in the
reference list.

I \cite[gould:1979] and \cite[rioch:1979], but lawrence:1979 doesn't appear
in the reference list.

Cheers, Roelof

@inbook{gould:1979,
  author = "Gould, Laurence J.",
  crossref = "lawrence:1979",
  title = "Men and Women at Work: A Group Relations Conference on Person and
Role",
  note = "See also \cite[rioch:1979].",
  pages = "111--122"   }

@inbook{rioch:1979,
  author = "Rioch, Margaret J.",
  crossref = "lawrence:1979",
  title = "The A.K. Rice Group Relations Conferences as a Reflection of
Society",
  pages = "53--68"   }

@book{lawrence:1979,
  editor = "Lawrence, W. Gordon",
  title = "Exploring Individual and Organizational Boundaries.",
  publisher = "John Wiley \& Sons Ltd",
  year = 1979}


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Re: function plotting

2005-10-04 Thread Peter Münster
On Tue, 4 Oct 2005, Alexander Lazic wrote:

> On Mon 03.10.2005 19:26, Christopher Creutzig wrote:
> >
> > MetaPost is not really a function plotter.  So, yes, you have to use
> >some sort of loop, although there may be some predefined macros hiding
> >them.
> 
> Is there a better way in ConTeXt/tex for this?!

You could also try PSTricks:

\usemodule[pstric]
\starttext
\startPSTRICKS
\psplot[plotpoints=100]{0}{1}{x 360 mul sin}
\stopPSTRICKS
\stoptext

Cheers, Peter

-- 
http://pmrb.free.fr/contact/
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: function plotting (was: Re: [NTG-context] Q: about \externalfile from metafun-p.pdf)

2005-10-04 Thread Alexander Lazic

On Die 04.10.2005 19:48, Mojca Miklavec wrote:


I use gnuplot which makes graphs of superb visual quality and has
extensive support for many different function manipulations and weird
stuff that you want to do with it. 


I have also think on gnuplot, but wasn't sure that i can use the ps/pdf
into my context doc.


and then "\input file" inside of the main LaTeX file. Gnuplot cannot
make output in ConTeXt (yet), but perhaps you can include the resulting
PDFs in your ConTeXt source. (Gnuplot is one of the very few examples
where I still use LaTeX.) You can also output the (ConTeXt-friendly)
metapost (with set terminal), but you lose on quality.


Well i will also try with gnuplot.

How much bad is 'lose quality' in %?

greetings

al ;-)
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Re: function plotting

2005-10-04 Thread Alexander Lazic

On Die 04.10.2005 18:07, Christopher Creutzig wrote:


But you might be interested (assuming you can read or at least
decipher French) in the pages at
http://melusine.eu.org/syracuse/metapost/galeries/ ? complete code
included.  (Those are the predefined macros I was talking about above.)


Thanx for that link looks very nice ;-)

greetings

al ;-)
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: function plotting (was: Re: [NTG-context] Q: about \externalfile from metafun-p.pdf)

2005-10-04 Thread Mojca Miklavec
Alexander Lazic wrote:
> On Mon 03.10.2005 19:26, Christopher Creutzig wrote:
> >
> > MetaPost is not really a function plotter.  So, yes, you have to use
> >some sort of loop, although there may be some predefined macros hiding
> >them.
>
> Is there a better way in ConTeXt/tex for this?!
>
> Should i use some external Programms for this?
>
> al ;-)

I use gnuplot which makes graphs of superb visual quality and has
extensive support for many different function manipulations and weird
stuff that you want to do with it. I do something like:

set terminal latex
set output "file.tex"
set title '\bf My wonderful function $sin(\omega t)$'
set xlabel '$t\ \rm[s]$'
set ylabel '$A$'
plot sin(x)

and then "\input file" inside of the main LaTeX file. Gnuplot cannot
make output in ConTeXt (yet), but perhaps you can include the
resulting PDFs in your ConTeXt source. (Gnuplot is one of the very few
examples where I still use LaTeX.) You can also output the
(ConTeXt-friendly) metapost (with set terminal), but you lose on
quality.

Mojca
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] ISO Latin 2 input under the new ConTeXt

2005-10-04 Thread Michal Kvasnička

Mojca Miklavec wrote:

There are two things: input encoding or regime (\enableregime[utf] inyour case) and font 
 


Many thanks, \enableregime did what I needed.

But I still have some minor questions:
1) Where should I put \loadmapfile[psclean.map]? (I can't include it in 
pdftex.cnf, since there is none under my new teTeX 3.0 in SuSE.)
2) Is it a goold idea to place in the same file \enableregime[il2] if 
almost all my documents are typed in this encoding?
3) What is the native ConTeXt font encoding? If I use many different 
fonts (most being reencoded via virtual fonts into IL2 encoding), should 
I reencode them into the native ConTeXt font encoding (whatever it is), 
or can I make ConTeXt work with a different font encoding, perhaps 
different for different fonts? How? How?
4) What documentations for fonts in ConTeXt should I read, and in what 
order?


And I have one (I hope) little plea to Mr. Hagen:
Please, can you add MetaFont to your minimum TeX installation? I would 
like to use it instead of teTeX because it is more flexible. But I still 
use heavily some MetaFont bitmapped fonts. Many thanks anyway.


Your thankful
Michal Kvasnicka

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Re: function plotting

2005-10-04 Thread Christopher Creutzig
Alexander Lazic wrote:
> On Mon 03.10.2005 19:26, Christopher Creutzig wrote:
> 
>>MetaPost is not really a function plotter.  So, yes, you have to use
>>some sort of loop, although there may be some predefined macros hiding
>>them.
> 
> 
> Is there a better way in ConTeXt/tex for this?!
> 
> Should i use some external Programms for this?

 Not really, that causes all sorts of problems when trying to get the
same font all over the place etc.

 But you might be interested (assuming you can read or at least decipher
French) in the pages at
http://melusine.eu.org/syracuse/metapost/galeries/ – complete code
included.  (Those are the predefined macros I was talking about above.)
 I guess something like
http://melusine.eu.org/syracuse/metapost/galeries/courbes02/07riemann-img.html
should wet your appetite. :-)


Regards,
Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] ISO Latin 2 input under the new ConTeXt

2005-10-04 Thread Michal Kvasnička

Good evening.

Many thanks to all of you that helped me to install teTeX 3.0. I found 
that I can really use SuSE 9.3 rpms under my SuSE 9.2, which quite 
surprised me. (I can't use Mr. Hagen's minimumdistribution, because 
there is no MetaFont in it, and I still use some bitmapped fonts, e.g. 
Concrete Math).


Now I have to solve the last (I hope so) problem: The Czech encoding. I 
have all my input files in ISO Latin 2 encoding. It was no problem up to 
now because I used fonts with IL2 encoding. What shoud I do now the new 
LM fonts?


(BTW, is it all right that I have to include
   \loadmapfile[psclean.map]
in all my documents? LM fonts are not preloaded, and I can't find in 
teTeX 3.0 pdftex.conf to include it.)


(In the last two years I missed all font-related changes in ConTeXt. 
What manuals should I read to understand how to use ConTeXt properly?)


With many thanks
Michal Kvasnicka

P.S. And by the way, in the future I may need to switch all my inputs 
into UTF8. How can I typeset files like that in the ConTeXt? Many thanks.



___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


function plotting (was: Re: [NTG-context] Q: about \externalfile from metafun-p.pdf)

2005-10-04 Thread Alexander Lazic

On Mon 03.10.2005 19:26, Christopher Creutzig wrote:


MetaPost is not really a function plotter.  So, yes, you have to use
some sort of loop, although there may be some predefined macros hiding
them.


Is there a better way in ConTeXt/tex for this?!

Should i use some external Programms for this?

al ;-)
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context