Re: [NTG-context] \basegrid ignores color

2018-03-22 Thread Henri Menke
Bump!

I attached the updated core file to make it easier for you.

On Wed, 2018-03-21 at 09:51 +1300, Henri Menke wrote:
> Dear devs,
> 
> The \basegrid macro ignores its color option.  That's kind of obvious because
> as
> I look at the code I don't see the color being communicated to Metapost at any
> point.  When you're at it, could you please also add a rulethickness
> parameters?
>  Thanks!
> 
> Reproducible in TL2018 pertest and latest beta.  MWE is below (as always).
> 
> Cheers, Henri
> 
> ---
> 
> \starttext
> 
> \basegrid[color=red]
> 
> \color[red]{\basegrid}
> 
> \stoptext
> %D \module
%D   [   file=meta-grd,
%Dversion=2012.06.28,
%D  title=\METAPOST\ Graphics,
%D   subtitle=grids,
%D author=Hans Hagen,
%D   date=\currentdate,
%D  copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

\writestatus{loading}{MetaPost Graphics / Grids}

%D This used to be a \TEX\ method, and a rather old one too. We keep it around but
%D in a more modern way.
%D
%D \startbuffer
%D \basegrid
%D   [nx=8,ny=5,
%Ddx=.5,dy=.25,
%Dunit=cm,scale=2,factor=1,
%Doffset=1ex,xstep=2,ystep=1,
%Dalign=middle,style=\tt\tx]
%D \stopbuffer
%D
%D \typebuffer
%D
%D \placefigure
%D   {An example of a grid.}
%D   {\getbuffer}

\startuseMPgraphic{grid}{nx,ny,dx,dy,factor,scale,xstep,ystep,xoffset,yoffset,align,rulecolor,rulethickness}
begingroup ;

save nx, ny, dx, dy, wd, ht, xstep, ystep, xoffset, yoffset, align, xalign, yalign, rulecolor, rulethickness ;

numeric nx  ; nx  := \MPvar{nx} ;
numeric ny  ; ny  := \MPvar{ny} ;
numeric dx  ; dx  := \MPvar{factor} * \MPvar{scale} * \MPvar{dx} ;
numeric dy  ; dy  := \MPvar{factor} * \MPvar{scale} * \MPvar{dy} ;
numeric wd  ; wd  := nx * dx ;
numeric ht  ; ht  := ny * dy ;
numeric xstep   ; xstep   := \MPvar{xstep} ;
numeric ystep   ; ystep   := \MPvar{ystep} ;
numeric xoffset ; xoffset := \MPvar{xoffset} ;
numeric yoffset ; yoffset := \MPvar{yoffset} ;
numeric align   ; align   := \MPvar{align} ;
color rulecolor ; rulecolor := \MPvar{rulecolor} ;
numeric rulethickness ; rulethickness := \MPvar{rulethickness} ;
numeric xalign  ; xalign  := 0 ;
numeric yalign  ; yalign  := 0 ;

if align = 1 :
xalign := dx/2 ;
yalign := dy/2 ;
fi ;

for i=0 step dx until wd :
draw (i,0) -- (i,ht)
withpen pencircle scaled rulethickness
withcolor rulecolor ;
endfor ;
for i=0 step dy until ht :
draw (0,i) -- (wd,i)
withpen pencircle scaled rulethickness
withcolor rulecolor ;
endfor ;

if xstep > 0 :
for i=1 step xstep until nx :
draw thetextext.bot(decimal i,(i*dx-xalign,-xoffset));
endfor ;
fi ;
if ystep > 0 :
for i=1 step ystep until ny :
draw thetextext.lft(decimal i,(-yoffset,i*dy-yalign)) ;
endfor ;
fi ;

endgroup ;
\stopuseMPgraphic

\unprotect

\unexpanded\def\basegrid
  {\dosingleempty\typo_grid_base}

\def\typo_grid_base[#1]%
  {\hbox\bgroup
   \getdummyparameters
 [\c!nx=10,\c!ny=10,\c!dx=.5,\c!dy=.5,\c!xstep=0,\c!ystep=0,
  \c!unit=\s!cm,\c!scale=1,\c!factor=1,
  \c!offset=.25ex,\c!xoffset=\directdummyparameter\c!offset,\c!yoffset=\directdummyparameter\c!offset,
  \c!align=,
  \c!rulecolor=\s!black,
  \c!rulethickness=\linewidth,
  #1]%
   \usedummystyleandcolor\c!style\c!color
   \edef\p_align{\directdummyparameter\c!align}%
   \ifx\p_align\v!middle
  \let\p_align\!!plusone
   \else
  \let\p_align\!!zerocount
   \fi
   \useMPgraphic
{grid}%
{nx=\directdummyparameter\c!nx,%
 ny=\directdummyparameter\c!ny,%
 dx=\directdummyparameter\c!dx\directdummyparameter\c!unit,%
 dy=\directdummyparameter\c!dy\directdummyparameter\c!unit,%
 factor=\directdummyparameter\c!factor,%
 scale=\directdummyparameter\c!scale,%
 xstep=\directdummyparameter\c!xstep,%
 ystep=\directdummyparameter\c!ystep,%
 xoffset=\directdummyparameter\c!xoffset,%
 yoffset=\directdummyparameter\c!yoffset,%
 align=\p_align,%
 rulecolor=\directdummyparameter\c!rulecolor,%
 rulethickness=\directdummyparameter\c!rulethickness,%
}%
  \egroup}

\let\grid\basegrid

\protect \endinput
\loadmarkfile{meta-grd}
\starttext
\basegrid[rulecolor=gray,rulethickness=.1pt]
\stoptext
___
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

Re: [NTG-context] Framed & before/after

2018-03-22 Thread Wolfgang Schuster




Procházka Lukáš Ing. 
21. März 2018 um 14:24
Hello,

does \framed recognize before and after keys, as mentioned here:

http://wiki.contextgarden.net/Command/defineframed
or:http://wiki.contextgarden.net/Command/setupframedtexts ?

In the following example it seems both keys are ignored:


\defineframed[AddressBox][before=\red,after=\small]

\starttext
  \green A
  \AddressBox{\cldcontext{"Hele"}}
  B
\stoptext

The values of the before and after keys are only used when you write

\startAdressBox
…
\stopAdressBox


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

Re: [NTG-context] Fwd: Macro to write a vector (Metafun) is broken

2018-03-22 Thread Fabrice Couvreur
Hi Hans,
No, I did not check this file but only update context Standalone. I guess
this is not enough since the compilation does not work.
Thank you
Fabrice

Running `ConTeXt Full' on `ntg80' with ``context --purgeall --nonstop
ntg80.tex''

resolvers   | trees | analyzing 'home:texmf'
mtx-context | run 1: luatex
--fmt="/home/fab/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en"
--interaction="nonstopmode" --jobname="ntg80"
--lua="/home/fab/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui"
--no-parse-first-line --c:currentrun=1 --c:fulljobname="./ntg80.tex"
--c:input="./ntg80.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:nonstopmode
--c:purgeall "cont-yes.mkiv"
This is LuaTeX, Version 1.07.0 (TeX Live 2018)
 system commands enabled.

resolvers   > trees > analyzing 'home:texmf'
open source > level 1, order 1, name
'/home/fab/context/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
system  >
system  > ConTeXt  ver: 2018.03.16 22:20 MKIV beta  fmt: 2018.3.20
int: english/english
system  >
system  > 'cont-new.mkiv' loaded
open source > level 2, order 2, name
'/home/fab/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
close source> level 2, order 2, name
'/home/fab/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'

system  > files > jobname 'ntg80', input './ntg80', result 'ntg80'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 2, order 3, name '/home/fab/ntg80.tex'
metapost> library 'mat' is loaded
open source > level 3, order 4, name
'/home/fab/context/tex/texmf-context/tex/context/base/mkiv/meta-imp-mat.mkiv'
close source> level 3, order 4, name
'/home/fab/context/tex/texmf-context/tex/context/base/mkiv/meta-imp-mat.mkiv'
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
metapost> initializing instance 'metafun' using format 'metafun'
metapost> loading 'metafun' as
'/home/fab/context/tex/texmf-context/metapost/context/base/mpiv/metafun.mpiv'
using method 'default'
metapost> initializing number mode 'scaled'

tex error   > mp error on line 61 in file /home/fab/ntg80.tex:

>> math_stacker_draw
! Isolated expression.

(
<*>  math_stacker_draw(
math_stacker_leftarrow_shape) ; ;
I couldn't find an `=' or `:=' after the
expression that is shown above this error message,
so I guess I'll just ignore it and carry on.

! Extra tokens will be flushed.

(
<*>  math_stacker_draw(
math_stacker_leftarrow_shape) ; ;
I've just read as much of that statement as I could fathom,
so a semicolon should have been next. It's very puzzling...
but I'll try to get myself back together, by ignoring
everything up to the next `;'. Please insert a semicolon
now in front of anything that you don't want me to delete.
(See Chapter 27 of The METAFONTbook for an example.)

[1]

51
52 $\overbracket   {a+b+c+d} \quad \underbracket{a+b+c+d} \quad
53 \doublebracket{a+b+c+d}$ \blank
54 $\overparent{a+b+c+d} \quad \underparent {a+b+c+d} \quad
55 \doubleparent {a+b+c+d}$ \blank
56 $\overbrace {a+b+c+d} \quad \underbrace  {a+b+c+d} \quad
57 \doublebrace  {a+b+c+d}$ \blank
58 $\overbar   {a+b+c+d} \quad \underbar{a+b+c+d} \quad
59 \doublebar{a+b+c+d}$ \blank
60
61 >>  $\overleftarrow  {a+b+c+d} \quad \overrightarrow  {a+b+c+d} $ \blank
62 $\underleftarrow {a+b+c+d} \quad \underrightarrow {a+b+c+d} $ \blank
63
64 \stoptext


metapost> error: unknown, no error, terminal or log messages

tex error   > mp error on line 3 in file /home/fab/ntg80.tex:

>> math_stacker_draw
! Isolated expression.

(
<*>  math_stacker_draw(
math_stacker_leftarrow_shape) ; ;
I couldn't find an `=' or `:=' after the
expression that is shown above this error message,
so I guess I'll just ignore it and carry on.

! Extra tokens will be flushed.

(
<*>  math_stacker_draw(
math_stacker_leftarrow_shape) ; ;
I've just read as much of that statement as I could fathom,
so a semicolon should have been next. It's very puzzling...
but I'll try to get myself back together, by ignoring
everything up to the next `;'. Please insert a semicolon
now in front of anything that you don't want me to delete.
(See Chapter 27 of The METAFONTbook for an example.)

[1]

 1
 2 \useMPlibrary[mat]
 3 >>
 4 % will be in meta-imp-mat.mkiv
 5
 6 \startMPextensions
 7  vardef math_stacker_arrow_shape =
 8  image (
 9  drawarrow
10  (OverlayWidth,OverlayOffset) -- (0,OverlayOffset)
11  withcolor
12  OverlayLineColor ;
13  setbounds currentpicture to boundingbox currentpicture


metapost> error: unknown, no 

Re: [NTG-context] Fwd: Re: Fwd: (again) issue with lpath and conditional

2018-03-22 Thread Pablo Rodriguez
On 03/22/2018 05:57 PM, Hans Hagen wrote:
> [...]
>> What am I missing in the lpath and the css selector?
> \xmldoifelse {#1} {..[contains(@class,'fullwidth')]}

Many thanks for your reply, Hans.

I’m afraid I wouldn’t have figured out myself in thousand years.

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] Fwd: Custom sorting of "pseudo-language" in a register

2018-03-22 Thread Hans Hagen

On 3/22/2018 9:25 AM, luigi scarso wrote:

-- Forwarded message --
From: John Grasty 
Date: Fri, Mar 16, 2018 at 4:15 PM
Subject: [NTG-context] Custom sorting of "pseudo-language" in a register
To: mailing list for ConTeXt users 


Hello all,

I’m just getting acquainted with ConTeXt, and I am finding it so much
more suitable for my work and needs. Thanks for the great software.
Here’s my situation. I write in Slovene and in English, and I need to
make numerous references to biblical passages. I want to create an
index of these citations, but I want them in the order they appear in
the Bible rather than alphabetical order. Henri Menke provided a
perfectly workable solution on TeX StackExchange[^1], but because this
is a multi-year project, I wanted to find a bit more permanent
solution. I discovered I can use Lua LPEG to parse and normalize my
citations so they are referenced in a uniform style.

My problem comes in the register sorting. Hans, I saw where in the
paste you have recommended a “pseudo-language” to implement a custom
sort in such a situation. I have almost figured out how to accomplish
this. (See the MWE below.) I have no problem with single word sections
(Genesis, Exodus, etc.). I can turn off indicators, do the custom sort
(see below), and I get the intended result. If I have a multiple word
title (Evangelij po Janezu), that technique doesn’t work. The
replacement for more than one word (or if a number is involved, like
1John) doesn’t seem to work. I have no doubt there is a good reason;
I’m just a newbie!

It seems my options are to:

1. Figure out how to do a replacement for a phrase or a book with a
number in its name. Then this technique seems to work ok.
2. Or to add an entries and figure out some way to not print the first
level in the index. So the indicator will be the book name, and
underneath the chapter and verses will be listed with out the book
name being repeated.


Are there any ideas to point me in the right direction?


You're bitten by the cleaner that kind of normalizes entries as you can 
see when you say


\enabletrackers[*sort*]

replacing spaces by \0 can help but that sort of assumes that you know 
what happens inside


So, i added some code to handle that. I also added a helper so that you 
can do:


\startluacode
local list = {
-- old testament
"Genesis", "Exodus", "Leviticus", "Numbers", "Deuteronomy", 
"Joshua",

"Judges", "Ruth", "1 Samuel", "2 Samuel", "1 Kings", "2 Kings",
"1 Chronicles", "2 Chronicles", "Ezra", "Nehemiah", "Esther", 
"Job", "Psalms",

"Proverbs", "Ecclesiastes", "Canticles", "Isaiah", "Jeremiah",
"Lamentations", "Ezekiel", "Daniel", "Hosea", "Joel", "Amos", 
"Obadiah",
"Jonah", "Micah", "Nahum", "Habakkuk", "Zephaniah", "Haggai", 
"Zechariah",

"Malachi",
-- new testament
"Matthew", "Mark", "Luke", "John", "Acts", "Romans", "1 
Corinthians",
"2 Corinthians", "Galatians", "Ephesians", "Philippians", 
"Colossians",
"1 Thessalonians", "2 Thessalonians", "1 Timothy", "2 Timothy", 
"Titus",
"Philemon", "Hebrews", "James", "1 Peter", "2 Peter", "1 John", 
"2 John",

"3 John", "Jude", "Revelation",
}

sorters.definitions['bbt'] = {
replacements = sorters.replacementlist(list),
}
\stopluacode

\defineregister
  [booksort]
  [language=bbt,
   n=1,
   indicator=no]

\starttext

One   \booksort{Genesis+5.2}
Two   \booksort{Exodus+2}
Three \booksort{Genesis+45}
Four  \booksort{Philemon+2}
Five  \booksort{John+45}
Six   \booksort{1 John 1+45}
Seven \booksort{2 John 2+45}

\blank[3*line]

\placeregister[booksort][language=bbt]

\stoptext

It probably makes sense to make this into a module but then we need to 
collect a few lists.


I'll upload a beta.

Hans


Thanks so much for your help,
John Grasty



[1]: 
https://tex.stackexchange.com/questions/418575/custom-ordering-for-a-index-register-in-context/

- - - -

\startluacode

local utfchar, utfbyte  = utf.char, utf.byte
local sorters   = sorters
local definitions   = sorters.definitions
local replacementoffset = sorters.constants.replacementoffset
local variables = interfaces.variables

local gen  = utfchar(replacementoffset + 1), utfchar(replacementoffset + 11)
local exo = utfchar(replacementoffset + 2), utfchar(replacementoffset + 220)
local jn = utfchar(replacementoffset + 4), utfchar(replacementoffset + 27)


sorters.definitions['bbt'] = {
 replacements = {
 { "Geneza", gen },
 { "Eksodus", exo },
 { "Janez", jn },
 },

 orders = {
 gen, exo, jn
 }
}
\stopluacode

\mainlanguage[sl]

\defineregister[booksort]
\setupregister[booksort]
  [language=bbt,
   n=1,
   indicator=yes,
   ]


\starttext

\booksort{Janez+5.2}One
\booksort{Eksodus+2}Two
\booksort{Geneza+45}Three

\page


Re: [NTG-context] Fwd: Adding a parameter to a module

2018-03-22 Thread Hans Hagen

On 3/22/2018 9:37 AM, luigi scarso wrote:

-- Forwarded message --
From: John Grasty 
Date: Tue, Mar 20, 2018 at 11:56 AM
Subject: [NTG-context] Adding a parameter to a module
To: mailing list for ConTeXt users 


Hello list,

One more question. Since I could not figure the problem with the wiki
article for a title, I have turned my attention to modify the t-title
module for my needs. If I want to add let's say a publication
location, how would I go about that?

I have copied and renamed t-title.mkvi to p-mymodule.mkvi. I have
changed the formatting to suit my needs, but I can't not figure out
how to add parameters. What is the connection to the t-title.xml
interface file?

I don't need it done for me, but I do need just a bit of help getting
going in the right direction. :-D

Thanks so much for the help and the great software!


something

\setuptitle[foo=bar]

\roottitleparameter{foo}

\titleparameter{foo}


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





--

-
  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] Fwd: Re: Fwd: (again) issue with lpath and conditional

2018-03-22 Thread Hans Hagen




 Forwarded Message 
Subject: Re: Fwd: [NTG-context] (again) issue with lpath and conditional
Date: Thu, 22 Mar 2018 17:56:54 +0100
From: Hans Hagen 
To: luigi scarso 

On 3/22/2018 9:40 AM, luigi scarso wrote:

-- Forwarded message --
From: Pablo Rodriguez 
Date: Wed, Mar 21, 2018 at 8:29 PM
Subject: [NTG-context] (again) issue with lpath and conditional
To: mailing list for ConTeXt users 


Dear list,

I have the following sample:

   \startbuffer[demo]
   
 
   
 a
   
 
 
   
 b
   
 
   
   \stopbuffer

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

   \xmlregistersetup{xml:initialize}

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

   \startxmlsetups xml:pre:code
 \xmlinfo{#1}
 \xmlpath{#1}
 \xmldoifelse{#1}{../pre[contains(@class,'fullwidth')]}
 %~ \xmldoifelse{#1}{{pre[class*="fullwidth"]}}
   {\startpar Full–width.\stoppar}
   {\startpar Another width.\stoppar}
   \stopxmlsetups

   \starttext
  \xmlprocessbuffer{main}{demo}{}
   \stoptext

It is beyond my kmowledge why the lpath
"{../pre[contains(@class,'fullwidth')]}" doesn’t return true, when
\xmlinfo shows "[code]" and \xmlpath is "doc/pre/code" (indices aren’t
relevant here).

Neither does the css selector work.

What am I missing in the lpath and the css selector?

\xmldoifelse {#1} {..[contains(@class,'fullwidth')]}


-
  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] Framed & before/after

2018-03-22 Thread Aditya Mahajan

On Thu, 22 Mar 2018, Henri Menke wrote:


On Wed, 2018-03-21 at 14:24 +0100, Procházka Lukáš Ing. wrote:

Hello,

does \framed recognize before and after keys, as mentioned here:

http://wiki.contextgarden.net/Command/defineframed
or: http://wiki.contextgarden.net/Command/setupframedtexts ?

In the following example it seems both keys are ignored:


Is this going to do what you need?

\defineframed[AddressBox][extras=\red]

\starttext
   \green A
   \AddressBox{\cldcontext{"Hele"}}
   B
\stoptext


Or the more direct

\defineframed[AddressBox][framecolor=red,foregroundcolor=red]

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
___

Re: [NTG-context] decomposed u umlaut

2018-03-22 Thread Hans Hagen

On 3/22/2018 10:34 AM, Ulrike Fischer wrote:

Am Tue, 20 Mar 2018 08:42:08 +0100 schrieb Henning Hraban Ramm:


I’ve one annoying problem with ConTeXt: all üs (small u umlauts)
seem to be encoded as decomposed unicode or something like that,
at least every ü breaks into u + garbage if I copy some text from
a ConTeXt PDF to an app that doesn’t really support Unicode.


This can depend on the font. I just looked for another question at
cambria and it e.g. uses char + accent for some of the Umlauts. So
concrete code is needed to test this.
btw, the same is true for ligature building (but i already explained 
that many times so i won't repeat myself)


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] Google Search in ConTeXt Garden

2018-03-22 Thread Mojca Miklavec
On 22 March 2018 at 10:51, Taco Hoekwater wrote:
>> On 22 Mar 2018, at 10:06, Mojca Miklavec wrote:
>>
>> I'm lost in those files and I'm not too eager to spend too much time
>> learning all that stuff from scratch.
>>
>> If there are any web technologies experts willing to take a look, I
>> can provide some source snippets offline.
>
> Same comment and offer from me. And I am possibly even more lost than Mojca …

If nothing else helps, we can of course always just put that simple
script that google suggests on the website and not bother about the
results ending up on a different-looking design.

It's still better to have an ugly result page than an error page.

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

Re: [NTG-context] Google Search in ConTeXt Garden

2018-03-22 Thread Taco Hoekwater


> On 22 Mar 2018, at 10:06, Mojca Miklavec  
> wrote:
> 
> I'm lost in those files and I'm not too eager to spend too much time
> learning all that stuff from scratch.
> 
> If there are any web technologies experts willing to take a look, I
> can provide some source snippets offline.

Same comment and offer from me. And I am possibly even more lost than Mojca …

Taco



___
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] decomposed u umlaut

2018-03-22 Thread Ulrike Fischer
Am Tue, 20 Mar 2018 08:42:08 +0100 schrieb Henning Hraban Ramm:

> I’ve one annoying problem with ConTeXt: all üs (small u umlauts)
> seem to be encoded as decomposed unicode or something like that,
> at least every ü breaks into u + garbage if I copy some text from
> a ConTeXt PDF to an app that doesn’t really support Unicode.

This can depend on the font. I just looked for another question at
cambria and it e.g. uses char + accent for some of the Umlauts. So
concrete code is needed to test this. 


-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
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] decomposed u umlaut

2018-03-22 Thread Mojca Miklavec
On 20 March 2018 at 08:42, Henning Hraban Ramm wrote:
> Ahoi,
>
> I’ve one annoying problem with ConTeXt: all üs (small u umlauts) seem to be 
> encoded as decomposed unicode or something like that, at least every ü breaks 
> into u + garbage if I copy some text from a ConTeXt PDF to an app that 
> doesn’t really support Unicode.

You are on macOS, right?

In my experience it was usually Apple's technology to blame. Perfectly
valid PDFs with proper accented characters would always end up with
decomposed characters when copy-pasting. Even pdftotext did a better
job.

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

Re: [NTG-context] Google Search in ConTeXt Garden

2018-03-22 Thread Mojca Miklavec
Hi,

On 18 March 2018 at 13:13, Pablo Rodriguez wrote:
> Dear list,
>
> when I use Google to search the wiki, such as in:
>
>   http://wiki.contextgarden.net/google/new2.html?q=xmldoifelseempty
>
> I get the following error message:
>
>   Unauthorized access to internal API. Please refer to
>   https://support.google.com/customsearch/answer/4542055
>
> Can anyone confirm this?

I hope that Taco will be able to check this.

The token is correct, but apparently the API changed in the meantime.
Google offers some code to copy-paste that can be used directly, but
our wiki uses some strange combination of php, our own skin (written
by Siep), standalone javascript files, some html pages with results to
avoid ending up on google directly etc.

I'm lost in those files and I'm not too eager to spend too much time
learning all that stuff from scratch.

If there are any web technologies experts willing to take a look, I
can provide some source snippets offline.

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

[NTG-context] Fwd: Re: Fwd: decomposed u umlaut

2018-03-22 Thread Hans Hagen




 Forwarded Message 
Subject: Re: Fwd: [NTG-context] decomposed u umlaut
Date: Thu, 22 Mar 2018 09:58:00 +0100
From: Hans Hagen 
To: luigi scarso 

On 3/22/2018 9:36 AM, luigi scarso wrote:

-- Forwarded message --
From: Henning Hraban Ramm 
Date: Tue, Mar 20, 2018 at 8:42 AM
Subject: [NTG-context] decomposed u umlaut
To: mailing list for ConTeXt users 


Ahoi,

I’ve one annoying problem with ConTeXt: all üs (small u umlauts) seem
to be encoded as decomposed unicode or something like that, at least
every ü breaks into u + garbage if I copy some text from a ConTeXt PDF
to an app that doesn’t really support Unicode.
All other characters within Latin-1, including umlauts, are no
problem, that’s why I think the problem might be in ConTeXt’s font
handling.



it depends on

(1) what the font does, some fonts decompose and overlay base and mark 
and some fonts don't have the right unicodes with the marks so then 
you're toast
(2) only a few viewers support proper cut/paste (i only trust acrobat in 
that although mupdf based viewers seem to be ok too)



(Actually, this is about my invoice addresses that I copy from PDF to
the German Post postage webshop. The site is quite new and I can’t
understand how a big company can buy such crappy software. I already
complained, there are more problems, but of course got only a template
answer.)

Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

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





--

-
  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] Fwd: Macro to write a vector (Metafun) is broken

2018-03-22 Thread Hans Hagen

-- Forwarded message --
From: Fabrice Couvreur 
Date: Tue, Mar 20, 2018 at 4:29 PM
Subject: [NTG-context] Macro to write a vector (Metafun) is broken
To: mailing list for ConTeXt users 


Hello Hans,
The macro you wrote to draw the arrows of the vectors does not seem to
work anymore.
Thank you
Fabrice


Did you check ou tthe latest meta-imp file? Alan and I added more and 
also changed the interface a little which might have consequences.



\useMPlibrary[mat]

% will be in meta-imp-mat.mkiv

\startMPextensions
  vardef math_stacker_arrow_shape =
  image (
  drawarrow
  (OverlayWidth,OverlayOffset) -- (0,OverlayOffset)
  withcolor
  OverlayLineColor ;
  setbounds currentpicture to boundingbox currentpicture
bottomenlarged (OverlayOffset/2) topenlarged (OverlayOffset/2) ;
  )
  enddef ;
  vardef math_stacker_leftarrow_shape =
  math_stacker_arrow_shape
  enddef ;
  vardef math_stacker_rightarrow_shape =
  math_stacker_arrow_shape rotated 180
  enddef ;
\stopMPextensions

\startuniqueMPgraphic{math:stacker:\number"2190}
  math_stacker_draw(math_stacker_leftarrow_shape) ;
\stopuniqueMPgraphic

\startuniqueMPgraphic{math:stacker:\number"2192}
  math_stacker_draw(math_stacker_rightarrow_shape) ;
\stopuniqueMPgraphic

% so far

\setupmathstackers
[both] % vfenced]
[color=darkred,
 alternative=mp]

\setupmathstackers
[top]
[color=darkred,
 alternative=mp]

\setupmathstackers
[bottom]
[color=darkred,
 alternative=mp]

\starttext

$\overbracket   {a+b+c+d} \quad \underbracket{a+b+c+d} \quad
\doublebracket{a+b+c+d}$ \blank
$\overparent{a+b+c+d} \quad \underparent {a+b+c+d} \quad
\doubleparent {a+b+c+d}$ \blank
$\overbrace {a+b+c+d} \quad \underbrace  {a+b+c+d} \quad
\doublebrace  {a+b+c+d}$ \blank
$\overbar   {a+b+c+d} \quad \underbar{a+b+c+d} \quad
\doublebar{a+b+c+d}$ \blank

$\overleftarrow  {a+b+c+d} \quad \overrightarrow  {a+b+c+d} $ \blank
$\underleftarrow {a+b+c+d} \quad \underrightarrow {a+b+c+d} $ \blank

\stoptext

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





--

-
  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] Fwd: Questions about creation of PDF's

2018-03-22 Thread Hans Hagen



Hi all,

I came across the following changes in behaviour of compilation. Using
this minimal example

\starttext
\pdfminorversion=3
Hello!
\stoptext

I found out that since TL2010 till TL2015, the output PDF is of the version 1.3
whereas TL2016 (which I do not use), TL2017 and current ConTeXt from the
garden produce PDF of version 1.7.

Is there any other (or new) way how to set the output version directly
on the source file?

Simultaneously, I found out that the produced PDF by older version -- since
TL2010 till TL2015 -- contains, e.g.,

"Creator:  ConTeXt - 2015.05.18 12:26"

whereas  TL2017 and current ConTeXt contains very short information

"Creator:  LuaTeX + ConTeXt MkIV"

Is possible to extend this information adding the date of the
ConTeXt, similarly to the older ones?

Many thanks in advance,

Tomáš

use something like:

\setupbackend
  [format=pdf/x-1a:2001]

\starttext

test

\stoptext

when a level is changed much more has to change and just flippign a low 
level counter is not enough then (most low level \pdf* commands are 
no-ops in mkiv, some have an implementation that hooks into other code)


in principle we can support pdf 2.0 too (luatex is already adapted) but 
we have no predefined 'formats' for that


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
___