Re: [NTG-context] Dangerous bend sign in mkiv

2017-08-31 Thread Hans Hagen

On 8/31/2017 9:45 PM, Otared Kavian wrote:

Thanks Hans! That’s great indeed!

I put on the wiki your code

http://wiki.contextgarden.net/symbolset

but could not explain where to find the information which tells us that the 
desired characters are
\resolvedglyphdirect{bends}{n:char_7e} and 
\resolvedglyphdirect{bends}{n:char_7f}.

just look in the afm file and then trial and error

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Dangerous bend sign in mkiv

2017-08-31 Thread Otared Kavian
Thanks Hans! That’s great indeed!

I put on the wiki your code 

http://wiki.contextgarden.net/symbolset

but could not explain where to find the information which tells us that the 
desired characters are
\resolvedglyphdirect{bends}{n:char_7e} and 
\resolvedglyphdirect{bends}{n:char_7f}.

Best regrads: OK

> On 31 Aug 2017, at 21:12, Hans Hagen  wrote:
> 
> On 8/31/2017 4:02 PM, Otared Kavian wrote:
>> Hi,
>> Is there a way to get the dangerous bend sign (which exists in the Donald 
>> Knuth’s manfnt) in mkiv?
>> The following (given by one of our gurus and dating back to sevral years) 
>> works fine in mkii, but I don’t know how to translate it in mkiv…
>> %%% begin dangerous-bend.tex
>> \loadmapfile [manfnt.map]
>> \definefontsynonym [bends] [manfnt]
>> \def\GetSym#1{\getglyph{bends}{\char#1}}
>> \startsymbolset [Dangerous Bends]
>> \definesymbol [dbend]   [\GetSym{127}]
>> \definesymbol [lhdbend] [\GetSym{126}]
>> \stopsymbolset
>> \setupsymbolset [Dangerous Bends]
>> \setupbodyfont[manfnt]
>> \starttext
>> \symbol{dbend}
>> \blank[big]
>> \symbol{lhdbend}
>> \stoptext
>> %%% end dangerous-bend.tex
>> Thanks in advance: OK
> \definefontsynonym [bends] [file:manfnt.afm]
> 
> \startsymbolset [Dangerous Bends]
>\definesymbol [dbend]   [\resolvedglyphdirect{bends}{n:char_7e}]
>\definesymbol [lhdbend] [\resolvedglyphdirect{bends}{n:char_7f}]
> \stopsymbolset
> 
> \setupsymbolset [Dangerous Bends]
> 
> \starttext
>\symbol{dbend}\quad \symbol{lhdbend}
> \stoptext
> 
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Dangerous bend sign in mkiv

2017-08-31 Thread Hans Hagen

On 8/31/2017 4:02 PM, Otared Kavian wrote:

Hi,

Is there a way to get the dangerous bend sign (which exists in the Donald 
Knuth’s manfnt) in mkiv?
The following (given by one of our gurus and dating back to sevral years) works 
fine in mkii, but I don’t know how to translate it in mkiv…

%%% begin dangerous-bend.tex
\loadmapfile [manfnt.map]
\definefontsynonym [bends] [manfnt]

\def\GetSym#1{\getglyph{bends}{\char#1}}

\startsymbolset [Dangerous Bends]
 \definesymbol [dbend]   [\GetSym{127}]
 \definesymbol [lhdbend] [\GetSym{126}]
\stopsymbolset

\setupsymbolset [Dangerous Bends]

\setupbodyfont[manfnt]

\starttext
\symbol{dbend}
\blank[big]

\symbol{lhdbend}
\stoptext
%%% end dangerous-bend.tex

Thanks in advance: OK

\definefontsynonym [bends] [file:manfnt.afm]

\startsymbolset [Dangerous Bends]
\definesymbol [dbend]   [\resolvedglyphdirect{bends}{n:char_7e}]
\definesymbol [lhdbend] [\resolvedglyphdirect{bends}{n:char_7f}]
\stopsymbolset

\setupsymbolset [Dangerous Bends]

\starttext
\symbol{dbend}\quad \symbol{lhdbend}
\stoptext


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] option none for \scitebuffer and \sciteinlinebuffer

2017-08-31 Thread Pablo Rodriguez
Hans,

I have the following sample:

\usemodule[scite]
\starttext
\startbuffer
This is text. % and this is a comment
\stopbuffer

\scitebuffer
\sciteinlinebuffer
\stoptext

Since \scitebuffer and \sciteinlinebuffer default to TEX typing when
none is set, would it be possible to set colors to "none".

I need it to be able to use both buffers with \xmlprettyprinttext and
\xmlinlineprettyprint.

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] Dangerous bend sign in mkiv

2017-08-31 Thread Otared Kavian
Hi,

Is there a way to get the dangerous bend sign (which exists in the Donald 
Knuth’s manfnt) in mkiv?
The following (given by one of our gurus and dating back to sevral years) works 
fine in mkii, but I don’t know how to translate it in mkiv…

%%% begin dangerous-bend.tex
\loadmapfile [manfnt.map]
\definefontsynonym [bends] [manfnt]

\def\GetSym#1{\getglyph{bends}{\char#1}}

\startsymbolset [Dangerous Bends]
\definesymbol [dbend]   [\GetSym{127}]
\definesymbol [lhdbend] [\GetSym{126}]
\stopsymbolset

\setupsymbolset [Dangerous Bends]

\setupbodyfont[manfnt]

\starttext
\symbol{dbend}
\blank[big]

\symbol{lhdbend}
\stoptext
%%% end dangerous-bend.tex

Thanks in advance: OK
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Head sections automatically marked for conditional text

2017-08-31 Thread Aditya Mahajan

On Tue, 29 Aug 2017, Paul Mazaitis wrote:



The short version:

I'd like to set up a context document with multiple user-defined heads, 
such that they can be conditionally compiled and/or altered. It seems 
that modes are what I want, but I'm having trouble figuring out how to 
automatically set up a particular section to be wrapped in a particular 
mode (if that makes any sense at all).


Is this possible?


Here is how I usually do this:

\definemode[showexamples][keep]

\doifmodeelse{showexamples}
{\definehead[example][subject][style=\bfc]}
{\definebuffer[example]}

\starttext

\input ward

\startexample[title={I'd like to be able to use modes to enable or
disable this section}]

I'd like to have a mode to conditionally show all of the {\tt example}
sections (without affecting other content, etc.).

\stopexample

\stoptext

Aditya
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] Head sections automatically marked for conditional text

2017-08-31 Thread Paul Mazaitis


The short version:

I'd like to set up a context document with multiple user-defined heads, 
such that they can be conditionally compiled and/or altered. It seems 
that modes are what I want, but I'm having trouble figuring out how to 
automatically set up a particular section to be wrapped in a particular 
mode (if that makes any sense at all).


Is this possible?

The long version:

What I think I want is something like:

--- begin foo.tex ---

\startenvironment foo

\definemode[showexamples][keep]

% Can I add some magic here in the following setup to automagically
% wrap these sections with commands to start and stop a particular mode?
\definehead[example][subject][style=\bfc]

---  end foo.tex  ---

--- begin bar.tex ---

\environment foo

\enablemode[showexamples]

\starttext

\startexample[title={I'd like to be able to use modes to enable or 
disable this section}]


I'd like to have a mode to conditionally show all of the {\tt example} 
sections (without affecting other content, etc.).


\stopexample

\stoptext

---  end bar.tex  ---

The added difficulty here is that I need three kinds of modes (A, B, And 
C) with the need to support changing the layout, etc. based on what 
modes are enabled.


I've gotten this to work by including \startmode[example] and \stopmode 
commands in the document, but I'd love to find a way to have this happen 
automatically by some clever setups for user defined heads, as above. (I 
tried playing around with before= and after=, with disastrous 
results...)


I've worked through the discussion about using blocks against 
enumerations, found here:


http://www.mail-archive.com/ntg-context@ntg.nl/msg83818.html

...but I'm hoping that there's a simpler solution (without the external 
file, etc.)


Is there a way to do this within the current framework, or should I be 
wrapping all of this in new commands? Or something else entirely?


Thanks!

 -Paul
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Empty page to suppress header (background) frame

2017-08-31 Thread Procházka Lukáš Ing .

Hello Pablo,

thanks for the answer - yes, it works - for the situation header underline has 
been defined via \blackrule and not background.

I found a proposal for this situation spoken here before:

- to provide [noheaderandfooterbackground] (or similar) option for \page which 
would temporarily switch header and footer background off;

would \page[noheaderandfooterbackground] be implemented (kindly asking Hans...)?

Best regards,

Lukas


On Wed, 30 Aug 2017 19:43:57 +0200, Pablo Rodriguez  wrote:


On 08/30/2017 05:19 PM, Procházka Lukáš Ing. wrote:

[...]
How to:

- define header to be framed normally and
- to be "frame-free" when \page[empty] (and/or maybe \page[blank]) is called?


Hi Lukáš,

from your sample, I wonder whether you need a complete frame or only a
rule in the header.

If you only need a rule, this is the way to go:

\setuplayout[header=5mm,headerdistance=5mm,]
%~ \setupheader[text][after=\vskip 4pt\hrule]
\setupheader[text][after={\blackrule[
width=\textwidth,
height=1em]}]
\setupheadertexts[left][right]

\starttext
   Page 1
   \page[empty,blank]
   Page 2
\stoptext

I hope it helps,

Pablo



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

Mob.: +420 702 033 396

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___