Re: [NTG-context] bold sc again

2005-12-28 Thread Mojca Miklavec
Peter Münster wrote:
> Hello,
>
> finally I got bold small caps with the attached module.
> It's certainly a bad hack, but unfortunately I don't know nothing about
> typescripts, variants and other details about fonts in ConTeXt (it looks
> too complicated to me...).
> If somebody knows a cleaner way, feel free to update the wiki.

I doubt there's a cleaner way (except that it's polite to start the
definitions with something like \starttypescript [..?..]
[computer-modern] [size]), but I noticed something else when I looked
into your other file with support for bold typewriter: Hans, wouldn't
it be time to do some clean-up on type-siz.tex?

Why do all these definitions still refer to cmr? (I understand that
cmr synonyms have to stay for backward compatibility, but not that
their leftovers have to be used in the distribution source.)

  \definebodyfont [12pt] [rm]
[tf=cmr12,
 bf=cmbx12,
 it=cmti12,
 sl=cmsl12,
 bi=cmbxti10 at 12pt,
 bs=cmbxsl10 at 12pt,
 sc=cmcsc10 at 12pt]

OK, I know that they map further to lmr, but not all of them do (bold
typewriter font doesn't for example). Why not using lmr names
directly?

Now I also finally understand why \bi never worked when trying to use
it with \setupbodyfont[ss] or [tt]:

  \definebodyfont [12pt] [ss]
[tf=cmss12,
 bf=cmssbx10 at 12pt,
 it=cmssi12,
 sl=cmssi12,
 bi=cmssbx10 at 12pt,
 bs=cmssbx10 at 12pt,
 sc=cmss10 at 12pt]

bi= refers to cmssbx for example, which is only bold, not bold italic
as it is supposed to be ("bi=LMSans10-BoldOblique at 12pt" or
something similar, I guess?), probably because there was no bold
italic sans available under cmr.

Even worse situation with typewritter, where most switches aren't
defined at all. Since there exists a bold and bold italic variant of
typewritter, why not defining it, so that there would be no need to
write additional modules for it?

Bold small caps (for which Peter's module was written) don't exist in
lmr (yet), so the module is still of interest, but I would be very
grateful if these files could be completed to reflect the current
state of lmr. I'm willing to help of nobody else is willing to fix
that (I'm slow & not that I know much about fonts, but it seems that
I'll have to learn more about typescripts anyway). I have no idea
about how to scale the fonts properly and which design sizes to use
for which font size, but if that can be copied from the current
definitions ...

Mojca


PS to Peter: I would suggest you to write "author=Peter M\udiaeresis
nster" instead of \enableregime[utf] in the header of your modules
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \celsius and \inch

2005-12-28 Thread Mojca Miklavec
Hans Hagen wrote:
> Peter Münster wrote:
> >The symbol for \inch is strange: "}". What is \char125 supposed to be,
> >doesn't it depend on the font encoding?
> >
> indeed ... what \symbolicnameofquotes do you suggest? i never use inches -)

What about Ux2033, double prime? Or - in TeX dialect -
\mathematics{^{\prime\prime}} or simply \mathematics{''} (twice the
apostrophe) unless it already exists in the font under the name
"second" (according to the Adobe Glyph List).
In unicode reference Ux2033 is described as the character used for
inches and seconds.

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


Re: [NTG-context] color in textext

2005-12-28 Thread Hans Hagen

Hans van der Meer wrote:


I'm sorry, I ran it in a few variations, but neither does work here:

ah .. all those users who want to stress this tex-mp game to the limits 
... keep in mind that tex in mp is actually a hack!


your unknown will go away when you redefine the color commands to be 
unexpandable


\unexpanded\def\startcolor
 {\ifincolor
\expandafter\doglobalstartcolor
  \else
\expandafter\noglobalstartcolor
  \fi}

\unexpanded\def\stopcolor
 {\ifincolor
\doglobalstopcolor
  \else
\noglobalstopcolor
  \fi}


\setupcolors[state=start]
\startMPenvironment   % both with and without: [global]
\setupcolors[state=start]
\stopMPenvironment
\setupMPpage[offset=2mm]
\startuseMPgraphic{test}
label(textext("\color[green]{XYZ}"), (0,0));   % 
returns  black XYZ on execute
label(textext("\startcolor[red]{XYZ}\stopcolor"), (0,20)); % 
returns  "unknown" on execute

\stopuseMPgraphic
\starttext
\forceMPTEXgraphictrue
\startMPpage
\includeMPgraphic{test}
\stopMPpage
\stoptext

I tried to run this on context-live but there got both outputs to  
"unknown".


color itself ... mp only reads back the character (+ some rule) data, 
nothing else, so color needs to be applied at another level (there is 
some limited and therefore useless special support)


so, the best i can give you is:

% output=pdf

\unexpanded\def\startcolor
 {\ifincolor
\expandafter\doglobalstartcolor
  \else
\expandafter\noglobalstartcolor
  \fi}

\unexpanded\def\stopcolor
 {\ifincolor
\doglobalstopcolor
  \else
\noglobalstopcolor
  \fi}

\setupcolors[state=start]

\startMPenvironment   % both with and without: [global]
   % only font and macro defs make sense here
\stopMPenvironment

\setupMPpage[offset=2mm]

\startuseMPgraphic{test}
   draw thelabel(textext("XYZ"), (0,0)) withcolor \MPcolor{green} ;
   draw thelabel(textext("XYZ"), (0,20)) withcolor \MPcolor{red} ;
\stopuseMPgraphic

\starttext
\forceMPTEXgraphictrue
\startMPpage
   \includeMPgraphic{test}
\stopMPpage
\stoptext


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


Re: [NTG-context] \celsius and \inch

2005-12-28 Thread Peter Münster
On Wed, 28 Dec 2005, Hans Hagen wrote:

> indeed ... what \symbolicnameofquotes do you suggest? i never use inches -)

Me neither... ;)
Perhaps \doublequote ?
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] bold sc again

2005-12-28 Thread Peter Münster
Hello,

finally I got bold small caps with the attached module.
It's certainly a bad hack, but unfortunately I don't know nothing about
typescripts, variants and other details about fonts in ConTeXt (it looks
too complicated to me...).
If somebody knows a cleaner way, feel free to update the wiki.

Cheers, Peter

-- 
http://pmrb.free.fr/contact/

t-cmscbf.tex
Description: TeX document
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] color in textext

2005-12-28 Thread Hans van der Meer

I'm sorry, I ran it in a few variations, but neither does work here:

\setupcolors[state=start]
\startMPenvironment   % both with and without: [global]
\setupcolors[state=start]
\stopMPenvironment
\setupMPpage[offset=2mm]
\startuseMPgraphic{test}
	label(textext("\color[green]{XYZ}"), (0,0));   % returns  
black XYZ on execute
	label(textext("\startcolor[red]{XYZ}\stopcolor"), (0,20)); % returns  
"unknown" on execute

\stopuseMPgraphic
\starttext
\forceMPTEXgraphictrue
\startMPpage
\includeMPgraphic{test}
\stopMPpage
\stoptext

I tried to run this on context-live but there got both outputs to  
"unknown".


yours sincerely,
dr. H. van der Meer



On Dec 28, 2005, at 15:46, Hans Hagen wrote:


Hans van der Meer wrote:


Is it possible that \setupcolors[state=start] is not communicated?


indeed,

\startMPenvironment
 \setupcolors[state=start]
\stopMPenvironment

if you want to share settings between the tex and mp runs:

\startMPenvironment[global]
 \setupcolors[state=start]
\stopMPenvironment

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


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


Re: [NTG-context] \celsius and \inch

2005-12-28 Thread Taco Hoekwater

Hans Hagen wrote:



i wonder what happens with the symbol when one uses it this way:

\usemodule[unit] 10 \Square \Inch


I believe the shortcut forms are only ever used for distances,
never for areas. So a rectangle with sides 2" by 4" has 8in^2
surface area.

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


Re: [NTG-context] function machine

2005-12-28 Thread David Arnold

Mojca,

I've used clip currentpicture to cpath before, then saved the result,  
draw the grid, draw the axes, then draw the saved clipped picture.  
But, you're right, I can't use drawdblarrow then.


In our classes, the drawdblarrow is important, having the same  
meaning as the ellipsis in 1, 3, 5, 7, 9, ..., that is, "etc." In   
the case of a parabola opening upward, the arrow on the right half  
would indicate that the graph continues opening upward and to the  
right indefinitely. This is an important distinction from say a line  
segment that "stops" at one end, especially when asked to determine  
the domain and range of a function from its graph.


The clipping path is a huge convenience for an instructor crafting  
plots for an exam, activity, or lesson. Otherwise, the instructor  
would have to calculate the points where the graph leaves the  
bounding box (less painful if you use Matlab, Maple, or Mathematica,  
or a graphing calculator), a time consuming task.


I am not so concerned about a plot that might lie entirely outside  
the clipping window. That just requires, as on the graphing  
calculator, that one adjust the window (different xmin, xmax, xscl,  
ymin, ymax, and yscl). I just need to be able to clip the plot and  
retain the part that lies inside the clipping window, then use  
drawdblarrow on the part that remains.


My clip routine won't (cutbefore, reverse, cutbefore) won't work on  
something like y=sqrt(3-x) for two reasons:


1. A domain problem (easily solved by adjusting the drawfcn command  
to include two more parameters: beginx, endx.


2. The clip routine is not general enough to handle this situation.

So, there's room for improvement if you want to use this routine on  
irrational, rational, and logarithmic functions.



On Dec 28, 2005, at 8:57 AM, Mojca Miklavec wrote:


Please, put this example on the wiki (together with some sample images
that can be created, with or without some cheating).

The community would be greatful for that.


Hans, Taco, et al,

This is getting pretty close to the limit of my expertise. The good
stuff of it is stolen from Metafun and mp-func.mp.

Because of the way I handle clipping the path,

   p:=p cutbefore cpath;
   p:=reverse p;
   p:=p cutbefore cpath;

this will only work on functions (like lines, quadratics, and
polynomials, maybe sinusoids) that both enter and leave the region
inside the clipping path.


If I understand it properly (that you only want to draw the content
inside the square, while the function may be a circle or something
lying completely outside the region), you could also use something
like
clip currentpicture to cpath;
although you may have to change the code that draws double arrow then.

Mojca

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


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


Re: [NTG-context] \celsius and \inch

2005-12-28 Thread Hans Hagen

Taco Hoekwater wrote:




Peter M�nster wrote:


Hello,

a suggestion for \celsius in core-mis.tex:
\def\celsius#1{#1\,\mathematics{^\circ}\kern-0.1emC}



As is (perhaps) normal for this kind of thing, the "\," depends
on your local typesetting tradition, and the "\kern-0.1em" depends
on the  used font family.

That is not to say yours isn't better then the current one :-)


The symbol for \inch is strange: "}". What is \char125 supposed to be,
doesn't it depend on the font encoding?



Yes, it does, so there should be a named character created for it.

IIRC, these symbols are in one of the unicode planes that are not
(completely) supported yet. It would make sense to do a whole
block (partial plane) at the same time then?


i wonder what happens with the symbol when one uses it this way:

\usemodule[unit] 10 \Square \Inch

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


Re: [NTG-context] \celsius and \inch

2005-12-28 Thread Hans Hagen

Taco Hoekwater wrote:




Peter M�nster wrote:


Hello,

a suggestion for \celsius in core-mis.tex:
\def\celsius#1{#1\,\mathematics{^\circ}\kern-0.1emC}



As is (perhaps) normal for this kind of thing, the "\," depends
on your local typesetting tradition, and the "\kern-0.1em" depends
on the  used font family.

That is not to say yours isn't better then the current one :-)


The symbol for \inch is strange: "}". What is \char125 supposed to be,
doesn't it depend on the font encoding?



Yes, it does, so there should be a named character created for it.

IIRC, these symbols are in one of the unicode planes that are not
(completely) supported yet. It would make sense to do a whole
block (partial plane) at the same time then?


indeed

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


Re: [NTG-context] \celsius and \inch

2005-12-28 Thread Hans Hagen

� wrote:


Hello,

a suggestion for \celsius in core-mis.tex:
\def\celsius#1{#1\,\mathematics{^\circ}\kern-0.1emC}

The symbol for \inch is strange: "}". What is \char125 supposed to be,
doesn't it depend on the font encoding?

 


indeed ... what \symbolicnameofquotes do you suggest? i never use inches -)

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


Re: [NTG-context] textext funny error

2005-12-28 Thread David Arnold

Hans, Taco,

Of course. Thanks.

On Dec 28, 2005, at 1:31 AM, Taco Hoekwater wrote:




David Arnold wrote:

Hans, Taco, et al,
I have a funny error involving textext. If I do two compiles of  
the  following code, saved a junk6.tex, with:

texexec junk6
texexec junk6
This produces a file junk6.pdf that looks as it should.
However, if I compile the junk6-mpgraph.mp that is produced with  
the  above runs, I get:


You need:

  mpost -mem=metafun junk6-mpgraph

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


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


Re: [NTG-context] \celsius and \inch

2005-12-28 Thread Taco Hoekwater



Peter Münster wrote:

Hello,

a suggestion for \celsius in core-mis.tex:
\def\celsius#1{#1\,\mathematics{^\circ}\kern-0.1emC}


As is (perhaps) normal for this kind of thing, the "\," depends
on your local typesetting tradition, and the "\kern-0.1em" depends
on the  used font family.

That is not to say yours isn't better then the current one :-)


The symbol for \inch is strange: "}". What is \char125 supposed to be,
doesn't it depend on the font encoding?


Yes, it does, so there should be a named character created for it.

IIRC, these symbols are in one of the unicode planes that are not
(completely) supported yet. It would make sense to do a whole
block (partial plane) at the same time then?

Cheers, Taco

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


Re: [NTG-context] function machine

2005-12-28 Thread Mojca Miklavec
Please, put this example on the wiki (together with some sample images
that can be created, with or without some cheating).

The community would be greatful for that.

> Hans, Taco, et al,
>
> This is getting pretty close to the limit of my expertise. The good
> stuff of it is stolen from Metafun and mp-func.mp.
>
> Because of the way I handle clipping the path,
>
>p:=p cutbefore cpath;
>p:=reverse p;
>p:=p cutbefore cpath;
>
> this will only work on functions (like lines, quadratics, and
> polynomials, maybe sinusoids) that both enter and leave the region
> inside the clipping path.

If I understand it properly (that you only want to draw the content
inside the square, while the function may be a circle or something
lying completely outside the region), you could also use something
like
clip currentpicture to cpath;
although you may have to change the code that draws double arrow then.

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


[NTG-context] pushed text in description

2005-12-28 Thread Peter Münster
Hello,

Taco said on http://context.literatesolutions.com/collector/66
that the new \txt should solve my problem, but I cannot find the right way.
If nobody knows a solution, perhaps I'm going to translate the LaTeX macros
to ConTeXt (at least trying to ...).

Here is the LaTeX-code, that does the thing I'm looking for:

\documentclass{article}
\usepackage{mdwlist}
\begin{document}
\begin{basedescript}{\desclabelstyle{\pushlabel}\desclabelwidth{6em}}
\item[Short]  This is a shorter item label, and some text that talks about it.
  The text is wrapped into a paragraph, with successive lines indented.
\item[Normal]  This is a normal item label, and some text that talks about it.
  The text is wrapped into a paragraph in the same manner as above.
\item[Rather longer label] This is a longer item label.  It's somewhat an
  exception.  As you can see, the text is pushed to the right, to leave some
  place for the label.
\end{basedescript}
\end{document}

I would be glad about a ConTeXt-solution.
Cheers, Peter

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


Re: [NTG-context] accents in math

2005-12-28 Thread Hans Hagen

� wrote:


On Wed, 28 Dec 2005, Hans Hagen wrote:

 


$\hbox{l?slich}$

This seems to be a workaround:

$\displaystyle\text{l?slich}$
\stoptext

Bug or new feature?


 


it depends on what ? is
   



Hello Hans,
that means, that your email-reader does not show 8-bit characters??
I believed that this would be no more possible... ;)
 

it depends, last week i got mails with chinese showing up all right so 
it's also a matter of how the mails specifies the encoding (i use 
Thunderbird)


Hans

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


[NTG-context] \celsius and \inch

2005-12-28 Thread Peter Münster
Hello,

a suggestion for \celsius in core-mis.tex:
\def\celsius#1{#1\,\mathematics{^\circ}\kern-0.1emC}

The symbol for \inch is strange: "}". What is \char125 supposed to be,
doesn't it depend on the font encoding?

Cheers, Peter

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


Re: [NTG-context] accents in math

2005-12-28 Thread Peter Münster
On Wed, 28 Dec 2005, Hans Hagen wrote:

> >$\hbox{l?slich}$
> >
> >This seems to be a workaround:
> >
> >$\displaystyle\text{l?slich}$
> >\stoptext
> >
> >Bug or new feature?
> >  
> >
> it depends on what ? is

Hello Hans,
that means, that your email-reader does not show 8-bit characters??
I believed that this would be no more possible... ;)
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] problem with starttable and subscript

2005-12-28 Thread Peter Münster
Hello,
the problem with the following example is, that the last X touches the
line.

\starttext
\starttable[|p(2em)|]
\NC $X^X$ $X_X^-$ \NC\AR
\HL
\stoptable
\stoptext

TIA for any help!
Greetings, Peter

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


Re: [NTG-context] start-stop consistency

2005-12-28 Thread schaouette
Selon Hans Hagen <[EMAIL PROTECTED]>:

> Gilles Grégoire wrote:
>
> >  Hello,
> >I was wondering why ConTeXt doesn't use a syntax like \startsomething
> >\stopsomething for chapters, sections, etc.
> >So I had a look on Google and found this:
> >
> >
> >
> >I see you planned to include the \start-\stop thing in ConTeXt, I even
> >understand that you already implemented this method.
> >
> >Did you change your mind or is it something you just don't have time to do?
> >Would it be possible to retrieve the macro you use?
> >
> >I think this kind of feature would really be an improvement since it allows
> to
> >learn faster.
> >
> >
>
> i haven't had time for that yet but it will happen
>
> Hans
Ok, thanks.

The macro proposed by Taco could be a good replacement for instance, but an
important issue is also to use the \stopsection command.

--
Gilles Grégoire
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] accents in math

2005-12-28 Thread Taco Hoekwater



Hans Hagen wrote:
 


it depends on what ? is


Try this:  $\hbox{l\odiaeresis slich}$ vs. $\text{l\odiaeresis slich}$

It is the difference between \hbox and \text  that does it,
not the regime.

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


Re: [NTG-context] color in textext

2005-12-28 Thread Hans Hagen

Hans van der Meer wrote:


I'm trying to play with colors in textext inclusions:

\setupcolors[state=start]
\setupMPpage[offset=2mm]
\startuseMPgraphic{test}
label(textext("\color[green]{XYZ}"), (0,0));
\stopuseMPgraphic
\starttext
\forceMPTEXgraphictrue
\startMPpage
\includeMPgraphic{test}
\stopMPpage
\stoptext

This label does not appear in green, although the intermediate files  
contain:

% figure 1 : texpictures[1] := btex \color [green]{XYZ} etex ;

Is it possible that \setupcolors[state=start] is not communicated?


indeed,

\startMPenvironment
 \setupcolors[state=start]
\stopMPenvironment

if you want to share settings between the tex and mp runs:

\startMPenvironment[global]
 \setupcolors[state=start]
\stopMPenvironment

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


Re: [NTG-context] accents in math

2005-12-28 Thread Hans Hagen

� wrote:


Hello,

\enableregime[il1]
\starttext
This used to work once upon a time, but now the � is not ok:

$\hbox{l�slich}$

This seems to be a workaround:

$\displaystyle\text{l�slich}$
\stoptext

Bug or new feature?
 


it depends on what ? is

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


[NTG-context] accents in math

2005-12-28 Thread Peter Münster
Hello,

\enableregime[il1]
\starttext
This used to work once upon a time, but now the ö is not ok:

$\hbox{löslich}$

This seems to be a workaround:

$\displaystyle\text{löslich}$
\stoptext

Bug or new feature?

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] byte order marks in utf-8 (old)

2005-12-28 Thread Taco Hoekwater


Hi,

A long time ago, Hans wrote:

Patrick Gundlach wrote:


are you sure that your scite does not use utf-16 and puts the BOM (byte
order mark) there?


scite indeed does this (kind of annoying)


It is the BOM, in utf-8 file encoding. A bit pointless (utf-8 is
based on opcodes instead of byte ordering), but is allowed by the
unicode specification.


context can handle that for xml files

i can consider handling it automatically (i.e. when BOM before first start-stop,
then assume utf-8)


It is a safe bet that any document that starts with the three bytes
  0xEF 0xBB 0xBF
is encoded as UTF-8, esp. if it is supposed to be text input.

Cheers,
Taco



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


[NTG-context] color in textext

2005-12-28 Thread Hans van der Meer

I'm trying to play with colors in textext inclusions:

\setupcolors[state=start]
\setupMPpage[offset=2mm]
\startuseMPgraphic{test}
label(textext("\color[green]{XYZ}"), (0,0));
\stopuseMPgraphic
\starttext
\forceMPTEXgraphictrue
\startMPpage
\includeMPgraphic{test}
\stopMPpage
\stoptext

This label does not appear in green, although the intermediate files  
contain:

% figure 1 : texpictures[1] := btex \color [green]{XYZ} etex ;

Is it possible that \setupcolors[state=start] is not communicated?
If so, how and where should this be done?
\setupcolors[state=start] cannot be put inside the textext as it is a  
preamble thing (tried it)


(note: although one could do: "label(textext("XYZ"), (0,0) withcolor  
green;" this interferes with other macro operations I want to perform)


yours sincerely,
dr. H. van der Meer



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


Re: [NTG-context] expert font access

2005-12-28 Thread Siep Kroonenberg
On Wed, Dec 28, 2005 at 10:49:20AM +0100, Henning Hraban Ramm wrote:
> Ahoi!
> 
> One decorative font that I use contains some additional (swashed  
> etc.) characters.
> At the moment I access them like this:
> 
> \def\DelitschC#1{\getglyph{\defaultencoding-raw-delitschantiqua} 
> {\char#1}}
> \definetextmodediscretionary A {\DelitschC{197}}
> 
> So I get the alternative A as |A|, and that's enough for me.
> But in this way |A| always takes this character from the same font.
> 
> How could I solve this more generally, two cases:
> 1. if several fonts use the same "expert" encoding
> 2. if I change the font, I'd like to get a simple A instead of |A|
> 
> At the moment I need (2.), because I'd like to use something like  
> \chapter{|A|nfang};
> that's ok with my definition of chapter style=\hw (Delitsch font  
> being defined as handwriting), but not in the ToC (rm font).
> 
> Further (don't know how different), how could I define "take this  
> special character always at the end/beginning of a word" or the like,  
> e.g. how could I enable the different 's' of gothic fonts?

Can't you define this behavior with ligatures?

> Another one: How can I define additional ligatures, e.g. if my font  
> provides a "Qu" or some other unusual ligature?

You can add ligature specifications to an enc file, see e.g.
cork.enc. For afm2pl, you can also specify ligatures in a separate
lig file. But I don't know how to use such custom enc or lig files
in the context of the texfont utility.

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


[NTG-context] expert font access

2005-12-28 Thread Henning Hraban Ramm

Ahoi!

One decorative font that I use contains some additional (swashed  
etc.) characters.

At the moment I access them like this:

\def\DelitschC#1{\getglyph{\defaultencoding-raw-delitschantiqua} 
{\char#1}}

\definetextmodediscretionary A {\DelitschC{197}}

So I get the alternative A as |A|, and that's enough for me.
But in this way |A| always takes this character from the same font.

How could I solve this more generally, two cases:
1. if several fonts use the same "expert" encoding
2. if I change the font, I'd like to get a simple A instead of |A|

At the moment I need (2.), because I'd like to use something like  
\chapter{|A|nfang};
that's ok with my definition of chapter style=\hw (Delitsch font  
being defined as handwriting), but not in the ToC (rm font).


Further (don't know how different), how could I define "take this  
special character always at the end/beginning of a word" or the like,  
e.g. how could I enable the different 's' of gothic fonts?


Another one: How can I define additional ligatures, e.g. if my font  
provides a "Qu" or some other unusual ligature?



Grüßlis vom Hraban!
---
http://www.fiee.net/texnique/
http://contextgarden.net
http://www.cacert.org (I'm an assurer)

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


Re: [NTG-context] start-stop consistency

2005-12-28 Thread Hans Hagen

Gilles Grégoire wrote:


 Hello,
I was wondering why ConTeXt doesn't use a syntax like \startsomething 
\stopsomething for chapters, sections, etc.

So I had a look on Google and found this:

 

I see you planned to include the \start-\stop thing in ConTeXt, I even 
understand that you already implemented this method.


Did you change your mind or is it something you just don't have time to do?
Would it be possible to retrieve the macro you use?

I think this kind of feature would really be an improvement since it allows to 
learn faster.
 



i haven't had time for that yet but it will happen

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


Re: [NTG-context] textext funny error

2005-12-28 Thread Taco Hoekwater



David Arnold wrote:

Hans, Taco, et al,

I have a funny error involving textext. If I do two compiles of the  
following code, saved a junk6.tex, with:


texexec junk6
texexec junk6

This produces a file junk6.pdf that looks as it should.

However, if I compile the junk6-mpgraph.mp that is produced with the  
above runs, I get:


You need:

  mpost -mem=metafun junk6-mpgraph

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


Re: [NTG-context] textext funny error

2005-12-28 Thread Hans Hagen

David Arnold wrote:


Hans, Taco, et al,

I have a funny error involving textext. If I do two compiles of the  
following code, saved a junk6.tex, with:


texexec junk6
texexec junk6


how about

texexec --mptex junk6-mpgraph.mp
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] start-stop consistency

2005-12-28 Thread Taco Hoekwater



Gilles Grégoire wrote:

  Hello,
I was wondering why ConTeXt doesn't use a syntax like \startsomething 
\stopsomething for chapters, sections, etc.



So I had a look on Google and found this:


I have usually have something like this in my environmentfile:

  \def\startchapter[#1]%
  {\getparameters[Chapter][#1]\chapter{\ChapterTitle}}
  \def\stopchapter{}

Does that help?


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


Re: [NTG-context] function machine

2005-12-28 Thread Hans Hagen

David Arnold wrote:



\startMPinclusions
...
\stopMPinclusions


you can consider putting that code into an environment file

easier to maintain

Hans

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


[NTG-context] start-stop consistency

2005-12-28 Thread Gilles Grégoire
  Hello,
I was wondering why ConTeXt doesn't use a syntax like \startsomething 
\stopsomething for chapters, sections, etc.
So I had a look on Google and found this:

> At 03:46 PM 6/21/2002 +0200, Giuseppe Bilotta wrote:
> 
> >one of the main features of both ConTeXt and LaTeX over plain TeX
> >is their heavily "object-oriented" approach to source writing,
> >giving a large set of useful tools to build well-structured
> >documents.
> >
> >There is though one aspect which has not been addressed in either:
> >structuring of the sections. One still uses \chapter, \section,
> >\subsection etc to denote the start of any of these, while
> >structured writing would call for \startchapter ... \stopchapter,
> >\startsection ... \stopsection etc.
> >
> >My proposal is to switch to such a method, while still retaining
> >compatibility with the old-style sectioning (maybe we can use some
> >flag like the one used to left left/right alignment use the
> >_correct_ term --what was the switch name?).
> 
> actually, this is on my to do list, for most of the project that we run 
> currently we use this approach since it gives you the options
> 
> (1) to skip a chapter / section
> (2) to attach hooks to the end-of-some-section
> 
> >How should it work:
> >
> >\startchapter[optional reference name]
> >
> >Possible stuff before the title (e.g. an epigraph)
> >
> >\title{Title of the chapter}
> >Optional commands to set alternative forms of the title (see
> >below)
> 
> no, just \startchapter[ref]{title} is ok, since i don't want to pick up the 
> title separately (imagine that you want \startchapter to trigger a complex 
> title page
> 
> also, we currently test (play with) some mechanism to have section (or 
> whatever) dependent variables, thereby introducing more convenient ways to 
> tune typo behaviour.
> 
> * easy way to set different titles for ToCs, running heads, (PDF)
> >bookmarks etc. Consider the following hierarchy of titles:
> >
> >title listtitle markingtitle bmtitle
> 
> that's for variables (since here we also have things like several graphics 
> to be used in typesetting the chapter page)
> 
> >write anything to the .tuo file; this ought to be done by the
> >\stop command, which would save all of them together
> >with the appropriate counter values and beginning/ending page.
> 
> hm, i'm not sure if i like that
> 
> >* easy way to put things before the title (e.g. an epigraph) while
> >still within the structure of the section.
> >
> >* also comes from the above: currently, when using the /XYZ method
> >for PDF references, link targets end out-of-the-window because the
> >TeX cohordinate used is that of the baseline. This means that the
> >visible part of the page does not include the target reference
> >(which is rather uncomfortable). Instead, with the new approach
> >the mark could be set "right before everything else, but still
> >within the correct structure", with optimal PDF navigation.
> 
> that is a whole different matter, (1) output format/driver dependent and 
> (2) can handled now by moving things around and (3) we don't want those 
> funny nodes to screw up the spacing [actually, since i never use that xyz 
> way of viewing docs [too inconstent auto scaling in viewers] i never felt 
> the need to look into it; maybe something for a cold winter night]
> 
> >Hans, do you think you can implement this easily?
> 
> the \start-\stop thing will certainly be there
I see you planned to include the \start-\stop thing in ConTeXt, I even 
understand that you already implemented this method.

Did you change your mind or is it something you just don't have time to do?
Would it be possible to retrieve the macro you use?

I think this kind of feature would really be an improvement since it allows to 
learn faster.

Thanks a lot.
-- 
Gilles Grégoire

-- 
Gilles Grégoire
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context