[NTG-context] Hyphens missing (again) with setupbackend[export

2017-07-23 Thread Rik Kabel
Aditya came across this in 2011 ([NTG-context] export kills hyphen 
symbol 
)[1] with 
the Fontin font. It wasn’t answered then. It is back if it ever left.


Here is an example:

   \definefontfamily
[TestFont]
[rm]
[Antykwa Torunska Cond]
   \setupbodyfont
[TestFont]
   \setupbackend
[export=maybe]% or yes, or no, or ...
   \setuppapersize
[A7]
   \starttext
   \input ward
   \stoptext

If the \setupbackend statement is removed, or an invalid key is used, 
all is well. It fails with a valid key and any value for that key.


I am experiencing the problem of missing hyphens with this font even 
without \setupbackend, but cannot yet construct a working example.


--
Rik

[1] https://www.mail-archive.com/ntg-context@ntg.nl/msg58460.html

___
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] Metafun: setting pen size in properties

2017-07-23 Thread Alan Braslau
withproperties is an experimental, metafun extension that appears to
cover color and pre/postscripts. It could be extended to cover withpen,
etc.

Look at mp-mplib.mkiv. properties() returns an image object that can
hold many things. The graph package does similar tricks.

Alan




On Sun, 23 Jul 2017 19:40:03 -0400 (EDT)
Aditya Mahajan  wrote:

> Hi,
> 
> Is it possible to set pen width using properties(...)? The following
> does not work (the color is set, but not the pen width):
> 
> \starttext
> \startMPcode
> property p[] ;
> p[1] := properties(withcolor red  withpen pencircle scaled 1bp);
> p[2] := properties(withcolor blue withpen pencircle scaled 10bp);
> 
> draw fullcircle scaled 1cm withproperties p[1];
> draw fullcircle scaled 2cm withproperties p[2];
> \stopMPcode
> \stoptext
> 
> Also, what is the advantage of using properties over a simple def?
> (except that I cannot def a suffixed variable). For example:
> 
> \starttext
> \startMPcode
> def qA = withcolor red  withpen pencircle scaled 1bp enddef;
> def qB = withcolor blue withpen pencircle scaled 10bp enddef;
> 
> draw fullcircle scaled 1cm qA;
> draw fullcircle scaled 2cm qB;
> 
> \stopMPcode
> \stoptext
> 
> Thanks,
> 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
> ___
___
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] Metafun: setting pen size in properties

2017-07-23 Thread Aditya Mahajan

Hi,

Is it possible to set pen width using properties(...)? The following does 
not work (the color is set, but not the pen width):


\starttext
\startMPcode
property p[] ;
p[1] := properties(withcolor red  withpen pencircle scaled 1bp);
p[2] := properties(withcolor blue withpen pencircle scaled 10bp);

draw fullcircle scaled 1cm withproperties p[1];
draw fullcircle scaled 2cm withproperties p[2];
\stopMPcode
\stoptext

Also, what is the advantage of using properties over a simple def? (except 
that I cannot def a suffixed variable). For example:


\starttext
\startMPcode
def qA = withcolor red  withpen pencircle scaled 1bp enddef;
def qB = withcolor blue withpen pencircle scaled 10bp enddef;

draw fullcircle scaled 1cm qA;
draw fullcircle scaled 2cm qB;

\stopMPcode
\stoptext

Thanks,
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] Problems with headers using margintext alternative

2017-07-23 Thread Rik Kabel
The following example demonstrates two problems with 
alternative=margintext in \setuphead:


1. When used with start/stop sectioning, text following the title may
   be set on the wrong line.
2. Without regard to the type of sectioning, margintext titles may
   spill over the left edge of the margin and beyond the page frame.

   \setuppapersize
[letter]
[letter,oversized]
   \setuplayout
[location={middle,middle}]
   \showframe
   \setuphead
[chapter]
[number=no,
 alternative=inmargin]
   \setuphead
[section]
[
 alternative=margintext,
 insidesection={\blank[-line]},
]
   \starttext
  \starttitle
  [title={Problem description}]
  \bgroup
  \setupwhitespace[medium]
  \startparagraph
  This demonstrates two problems with
  \type{alternative=margintext} in \tex{setuphead}:
  \startitemize[packed,n]
  \startitem
When used with start/stop sectioning, text following the
title may be set on the wrong line.
  \stopitem
  \startitem
Without regard to the type of sectioning, \type{margintext}
titles may spill over the left edge of the margin and beyond
the page frame. (Oddly, \tex{paperwidth} is less than the
sum of \tex{makeupwidth} and the margin widths and
distances for both letter and A4 paper.)
  \stopitem
  \stopitemize
  \stopparagraph
  \startparagraph
  With start/stop sectioning, the text following the section
  title may begin one line below the start of the title. That
  can be remedied if there is no whitespace between paragraphs
  with \type{insidesection={\blank[-line]}}, but the remedy
  fails when there is whitespace, and increasing the correction
  has no effect. With traditional sectioning, the text appears
  baseline|-|aligned with the heading, as expected. The
  the correction has no effect in any case with traditional
  sectioning.
  \stopparagraph
  \startparagraph
  It makes no difference in any test how the paragraphs are
  delimited—blank lines, \tex{bpar}/\tex{epar},
  \tex{startparagraph}/\tex{stopparagraph}, or \tex{par}.
  \stopparagraph
  \startparagraph
  Tested with standalone beta 2017.07.17 00:20.
  \stopparagraph
  \egroup
  \page
  \startchapter
  [title={Start/stop sectioning}]
  \startsection[title={Mis\-cel\-la\-neous quo\-ta\-tions}]
  \startparagraph
  \input jojomayer
  \stopparagraph
  \startparagraph
  \input carrol \wordright{No indent no whitespace.}
  \stopparagraph
  \stopsection
  \bgroup
  \setupwhitespace[medium]
  \startsection[title={Miscellaneous quotations}]
  \startparagraph
  \input jojomayer
  \stopparagraph
  \startparagraph
  \input carrol \wordright{No indent medium whitespace.}
  \stopparagraph
  \stopsection
  \egroup
  \bgroup
  \setupindenting[yes,small]
  \startsection[title={Miscellaneous quotations}]
  \startparagraph
  \input jojomayer
  \stopparagraph
  \startparagraph
  \input carrol \wordright{Small indent no whitespace.}
  \stopparagraph
  \stopsection
  \egroup
  \bgroup
  \setupwhitespace[medium]
  \setupindenting[yes,small]
  \startsection[title={Miscellaneous quotations}]
  \startparagraph
  \input jojomayer
  \stopparagraph
  \startparagraph
  \input carrol \wordright{Small indent medium whitespace.}
  \stopparagraph
  \stopsection
  \egroup
  \stopchapter
  \chapter{Traditional sectioning}
  \section{Mis\-cel\-la\-neous quo\-ta\-tions}
  \input jojomayer \par
  \input carrol  \wordright{No indent no whitespace.} \par
  No indent no whitespace. \par
  \bgroup
  \setupwhitespace[medium]
  \section{Miscellaneous quotations}
  \input jojomayer \par
  \input carrol \wordright{No indent medium whitespace.} \par
  \egroup
  \bgroup
  \setupindenting[yes,small]
  \section{Miscellaneous quotations}
  \input jojomayer \par
  \input carrol \wordright{Small indent no whitespace.} \par
  \egroup
  \bgroup
  \setupwhitespace[medium]
  \setupindenting[yes,small]
  \section{Miscellaneous quotations}
  \input jojomayer \par
  \input carrol \wordright{Small indent medium whitespace.} \par
  \egroup
   \showlayout
   \stoptext


--
Rik
___
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 / htt

[NTG-context] handling code in XML

2017-07-23 Thread Pablo Rodriguez
Hans,

I have the following sample:

\startbuffer[demo]


\command[option=value]{text "<&>"}





\command[option=value]{text
"<&>"}




\stopbuffer

\startxmlsetups xml:initialize
\xmlsetsetup{#1}{doc|source|div|span}{xml:*}
\xmlsetsetup{\xmldocument}
{pre[contains(@class,'sourceCode')]/
code[contains(@class,'sourceCode')]}
{xml:pre:code}
\stopxmlsetups

\xmlregistersetup{xml:initialize}

\startxmlsetups xml:doc
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:div
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:source
\xmlprettyprint{#1}{tex}
\stopxmlsetups

\startxmlsetups xml:pre:code
\xmlflushspacewise{#1}
\stopxmlsetups

\startxmlsetups xml:span
\bgroup\xmlflush{#1}\egroup
\stopxmlsetups

The .sourceCode elements are the standard way in which pandoc serves
colored code. I have to deal with them.

In the sample above, for xml:pre:code, I would need and expanded
\xmlprettyprint that also ignores tags inside (anything between < and >,
but not the entities).

Which is the way to get this expanded \xmlprettyprint?

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
___

Re: [NTG-context] Unable to switch math fonts

2017-07-23 Thread Pablo Rodriguez
On 07/22/2017 03:16 AM, Sebastian L. wrote:
> Hi, I have trouble with Neo Euler font after playing around with those
> options.
> [...]
> I am pretty sure that before I started mixing the fonts in one single
> document, Neo Euler was italic.
> 
> Does anybody have a clue what might have went wrong?

Hi Sebastian,

as far as I remember, Neo Euler is a regular font only
(https://github.com/khaledhosny/euler-otf).

Euler is an italic font and it might have the other regular, bold, bold
italic typefaces (I don’t know).

I hope it helps,

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
___

Re: [NTG-context] Compare contents of macros via \doif etc. alternatives

2017-07-23 Thread Hans Hagen

On 7/23/2017 8:46 AM, Henri Menke wrote:

On 07/23/2017 05:55 PM, Jaroslav Hajtmar wrote:


Thanx Hans for reply.



also, it depends on what you want to achieve ... maybe comparing macros is not 
needed at all


You have right, that anytime compares are not needed, but for my very needed 
compares is not working in next eight examples. Problem is in expansions macros 
with optional argument. For “normal” macros are compares without problem as you 
see in last four examples….


Did you read my first reply?  Scanning for optional arguments is _inherently_ 
unexpandable.  Peeking ahead _always_ involves \futurelet which performs an 
assignment.  This can _never_ be edef-expanded.
indeed. fwiw, one can do some trickery with lua (read and push back) but 
even then you run into the fact that when reading a token expansion 
happens (so the expanded stuff is then in front)


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] TwoColumns in two different languages, with alternate text on even and odd page.

2017-07-23 Thread Marcello Urgo
Dear Hans,
I am also intersted in this issue.
In the last years I am dealing with a multi-language technical lexicon.
Hence, different languages refer to different columns, and if the languages are 
three or four, then it is better to go with two pages side-by-side.
Nevertheless this seems a problem also in LaTeX redelpar (multiple columns are 
not supported).
I tried to manage it with \linetable but without success 
(https://tex.stackexchange.com/questions/380923/synchronise-data-spanning-over-two-side-by-side-pages-in-context)
I think this feature could be really interesting because, according to my 
knowledge, ConTeXt is at present the best way to manage the publishing of XML 
data.
Hence, this could be a useful tool to publish large sets of data.
Thank you in advance


Marcello Urgo, Ph.D.
Assistant Professor
Manufacturing and Production Systems Lab.
Mechanical Engineering Department
POLITECNICO DI MILANO
Via La Masa, 1 - 20156 Milano

Phone +39 02 2399 8521
Fax +39 02 2399 8585
tecnologie.mecc.polimi.it
www.polimi.it

This message may contain confidential and/or otherwise reserved information and 
is thus for use only by the intended recipient. If you received this in error, 
please contact the sender and delete the e-mail and its attachments from your 
computer. Thank you.
Il presente messaggio può contenere informazioni di carattere confidenziale e/o 
riservate ed è quindi ad uso esclusivo del destinatario. Nel caso aveste 
ricevuto questa e-mail  per errore siete pregati di contattare immediatamente 
il mittente e di cancellare il messaggio ed i suoi allegati dal vostro 
computer. Grazie.




___
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
___