Re: [NTG-context] deprecated startMPenvironment

2016-04-03 Thread Hans Hagen

On 4/3/2016 4:07 PM, Meer, Hans van der wrote:

Previously I could do the following

\starttext
\startMPenvironment[+]\switchtobodyfont[small]\stopMPenvironment
\startMPpage
% metafont code
\stopMPpage
\stoptext
\endinput

This is called by context --run --once etc. producing the figure and in this 
case modifying the font to a smaller size. Note, the context call occurs on the 
fly inside a \directlua{{os.execute(..)}. You may find this complicated, but it 
works for me and I would rather like not having to change may things all over 
the place.

Now I learn from the ConTeXtgarden that startMPenvironment is deprecated and 
that I should use defineMPinstance and setupMPinstance instead.
Thus I tried

\defineMPinstance[mp:local][metafun][setups=mp:smallfont,textcolor=red]
\startsetups mp:smallfont
\switchtobodyfont[small]
\stopsetups
\startMPpage  and also \startMPpage[mp:local]
% metafont code
\stopMPpage
\stoptext
\endinput

But nothing happens. How do I get the effect earlier obtained with 
startMPenvironment without having to rely an a deprecated macro?


the bodyfont environment was needed because we had to communicate to the 
external mp run what the intended settings were


in mkiv the run is internal so the mp text generator adapts to the 
current settings and there is no need to pass anything


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] How to get the current section level?

2016-04-03 Thread Lukáš Procházka

Hello,

is there a (Lua) way how to get the current section level?

Something like:


\def\GetCurrentSectionLevel{%
  % What to come here?
}

\starttext
  \chapter{Ch}
\GetCurrentSectionLevel % Should yield "chapter" or e.g. 1 (meaning 
"chapter")

\section{Sec}
  \GetCurrentSectionLevel % Should yield "section" or e.g. 2 (meaning 
"section")

\subsubsection{SSSec}
  \GetCurrentSectionLevel % Should yield "subsubsection" or e.g. 4 (meaning 
"subsubsection")
\stoptext


Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Server down

2016-04-03 Thread Mojca Miklavec
Hi,

For reasons unknown to me the contextgarden.net server is currently
down. The wiki (and some other components hosted at Taco's server) are
still working.

I have to wait until the network admin looks into the problem.

I'm really sorry for the inconvenience,
Mojca
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Margin text running off bottom of page

2016-04-03 Thread Robert Krug
Greetings,

Is there any way to prevent marginal text from running off the bottom
ot the page? I can adjust the margin widths to prevent them from
running off the edges, but I cannot figure out how to do the same for
the bottom of the page.

\starttext

text.

\vskip 7.5in

text
\margintext{The book I am working with has marginal annotations that
act as a précis of the argument in the main text. Some of them are
several sentances long.}
text.

\stoptext

Robert

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Protrusion cancellation by index term

2016-04-03 Thread Hans Hagen

On 4/1/2016 9:59 PM, Jan Tosovsky wrote:

On 2016-04-01 Hans Hagen wrote:

On 3/31/2016 10:47 PM, Wolfgang Schuster wrote:

On 2016-03-31 Jan Tosovsky wrote:

I couldn't find any details for that \leftboundary


spac-ver.mkiv:

\unexpanded\def\leftboundary   {\boundary\plusone}
\unexpanded\def\rightboundary  {\boundary\plustwo}


it will instruct the protrusion checker to skip the next or
previous node (e.g. a char or hbox or ...) when looking for
an edge


Thanks for details. So if that worked with plain \hbox should be taken rather 
as coincidence?


a hbox becomes one node so that one node is ignored


I prefer motto the fewer commands, the better :-)

Jan


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___




--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Alignment for narrower text

2016-04-03 Thread Wolfgang Schuster

Jan Tosovsky 
2. April 2016 um 23:42
I thought Hans could also mean something like example below, but while 
leftskip should 'indent' all lines inside paragraph, it works only for 
the first one. Moreover, protrusion is not applied as well. And \crlf 
doesn't seem to be soft linebreak as it behaves like normal \par 
command - which is most likely explanation for that indenting issue.


{\leftskip=2cm
“line1\crlf
line2\crlf
line3\crlf
line4.
}
Indenting the whole textblock with \leftskip (or better ConTeXt’s 
narrower environment)

doesn’t prevent protrusion as can be seen in the following example.

\definefontfeature[default][default][protrusion=quality]

\setupbodyfont[modern-designsize]

\starttext

“\vl Text\par
 \vl Text

\startnarrower
“\vl Text\par
 \vl Text
\stopnarrower

\blank[3*line]\setupalign[hanging]

“\vl Text\par
 \vl Text

\startnarrower
“\vl Text\par
 \vl Text
\stopnarrower

\stoptext

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] deprecated startMPenvironment

2016-04-03 Thread Meer, Hans van der
Previously I could do the following

\starttext
\startMPenvironment[+]\switchtobodyfont[small]\stopMPenvironment
\startMPpage
% metafont code
\stopMPpage
\stoptext
\endinput

This is called by context --run --once etc. producing the figure and in this 
case modifying the font to a smaller size. Note, the context call occurs on the 
fly inside a \directlua{{os.execute(..)}. You may find this complicated, but it 
works for me and I would rather like not having to change may things all over 
the place.

Now I learn from the ConTeXtgarden that startMPenvironment is deprecated and 
that I should use defineMPinstance and setupMPinstance instead.
Thus I tried

\defineMPinstance[mp:local][metafun][setups=mp:smallfont,textcolor=red]
\startsetups mp:smallfont
\switchtobodyfont[small]
\stopsetups
\startMPpage  and also \startMPpage[mp:local]
% metafont code
\stopMPpage
\stoptext
\endinput

But nothing happens. How do I get the effect earlier obtained with 
startMPenvironment without having to rely an a deprecated macro?

Hans van der Meer




___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___