[NTG-context] embedded sounds

2018-10-09 Thread Pablo Rodriguez
Hi Hans,

this is a lighter version from sound-001.tex from your test samples:

\definerenderingwindow
  [example]
  [width=0pt,height=0pt,frame=off]

\setupinteraction[state=start]

\useexternalrendering
  [mysound]
  [audio/x-mp3] % audio/x-mp3
  [sound.mp3]
  %~ [embed]

\definereference [StartSoundTrack] [StartRendering{mysound}]
\definereference [StopSoundTrack]  [StopRendering{mysound}]

\definelayer[resources][width=\paperwidth,height=\paperheight]

\setupbackgrounds[page][background=resources]

\setupbodyfont[100pt]

\starttext\bf\ss

\setlayer[resources]{\placerenderingwindow[example][mysound]}

\startTEXpage
\button{start}[StartSoundTrack]
\button{stop}[StopSoundTrack]
\stopTEXpage

\stoptext

As reported before
(https://mailman.ntg.nl/pipermail/ntg-context/2018/092327.html), sound
is played fine when not embedded. But it won’t play embedded files.

Without embedded sound, the relevant /Filespec reads:

7 0 obj
<<
  /F (sound.mp3)
  /Type /Filespec
>>
endobj

With an embedded sound, /Filespec and /EmbeddedFile read:

7 0 obj
<<
  /Subtype /audio#2Fx-mp3
  /Type /EmbeddedFile
  /Length 49006
>>
stream
endstream
endobj

8 0 obj
<<
  /EF <<
/F 7 0 R
  >>
  /F (sound.mp3)
  /Type /Filespec
  /UF (\376\377\000s\000o\000u\000n\000d\000.\000m\000p\0003)
>>
endobj

10 0 obj
    <<
  /EF 8 0 R
  /F (sound.mp3)
  /Type /Filespec
>>
endobj

I don’t know why there are two /Filespec objects, since they are duplicated.

In any case, the value for the /EF entry has to be a dictionary that
points to the /EmbeddedFile (such as in object 8).

I’m afraid that the code that generates the second /Filespec object
(object 10 in the code above) is wrong.

I attach a modified file fixing the issue from the PDF document
generated by ConTeXt.

I hope this help to fix the issue.

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk


embedded-mp3-sound.pdf
Description: Adobe PDF document
___
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] linking to an external PDF file

2018-10-08 Thread Pablo Rodriguez
On 10/8/18 10:09 AM, Hans van der Meer wrote:
> I am embedding links to an URL in my documents. Although it is used in
> XML-documents, you might be able to use the gist of this code that
> generates a clickable link. Perhaps you find it useful. 

Many thanks for your reply, dr. Hans van der Meer.

Sorry, but I’m afraid I don’t see the way of generating an URL to a
non-external document in your code.

After all, the document is embedded in the PDF document itself.

Pablo

> % Return the code when clicking the link.
> \def\URIReturnCode#1{\ctxlua{tex.print(hvdm.urireturncode("#1"))}}
> 
> — Some Lua code needed:
> -- Check URI
> 
> socket.http.TIMEOUT = 5-- set URI timeout in seconds
> hvdm.urireturncode = function (theuri)
> -- Differentiate between file and http protocols.
> local first,last = string.find(theuri, "file://")
> if first == nil then
> -- We have http to search for.
> local content, status, authinfo = socket.http.request{
> method = "HEAD",
> url = theuri,
> }
> return type(status) == "number" and status or "failure"
> else
> -- We must ascertain the existence of the file.
> local thefile = io.open(string.sub(theuri, last+1, -1), "r")
> if thefile then
> io.close(thefile)
> return "200"
> else
> return "404"
> end
> end
> end
> 
> % . Place an url link
> .
> 
> % BEWARE: spaces in file names must be %20 in the link !!!
> 
> % This global definition of the URLbase cannot be missed.
> \def\THEURLBASE{http://}
> 
> % Signal the occurence of timeout on URI search.
> \newif\ifURItimeout
> 
> \startxmlsetups xmlcommon:urlbase
> \edef\THEURLBASE{\xmlstrippednolines{#1}{.}}
> 
> % Reset the URI timeout for new URLbase.
> \global\URItimeoutfalse
> \stopxmlsetups
> 
> \startxmlsetups xmlcommon:url
> 
> % Define the full uri.
> \edef\theurl{\THEURLBASE\xmlatt{#1}{link}}
> 
> % File suffix should be one of the list.
> \doifelse{\FileSuffixList{\xmlatt{#1}{link}}
> {pdf,jpg,jpeg,html,png,tif,tiff}}{\empty}
> {\def\suffix{.impossible}}% no suffix from the list here
> {\def\suffix{\empty}}% one of the list is present
> 
> % First try link as given, beware of unreachable site.
> \ifURItimeout
> % For previously timeout on this site.
> \else
> \edef\returncode{\URIReturnCode{\theurl}}
> \doif{\returncode}{failure}
> {
> \global\URItimeouttrue
> \errorcall{#1}{url access fails for \THEURLBASE\xmlatt{#1}{link}}
> }
> \fi
> 
> % On URI timeout there is no hope to find the file.
> \ifURItimeout
> \else
> % When there is no suffix from the list, try several.
> \doifnot{\suffix}{\empty}
> {
> \scratchcounter=200\relax
> \ifnum\returncode=\scratchcounter\else
> \def\suffix{.pdf}
> \edef\returncode{\URIReturnCode{\theurl\suffix}}
> \fi
> \ifnum\returncode=\scratchcounter\else
> \def\suffix{.jpg}
> \edef\returncode{\URIReturnCode{\theurl\suffix}}
> \fi
> \ifnum\returncode=\scratchcounter\else
> \def\suffix{.jpeg}
> \edef\returncode{\URIReturnCode{\theurl\suffix}}
> \fi
> \ifnum\returncode=\scratchcounter\else
> \def\suffix{.html}
> \edef\returncode{\URIReturnCode{\theurl\suffix}}
> \fi
> \ifnum\returncode=\scratchcounter\else
> \def\suffix{.png}
> \edef\returncode{\URIReturnCode{\theurl\suffix}}
> \fi
> \ifnum\returncode=\scratchcounter\else
> \def\suffix{.tiff}
> \edef\returncode{\URIReturnCode{\theurl\suffix}}
> \fi
> \ifnum\returncode=\scratchcounter\else
> \def\suffix{.tif}
> \edef\returncode{\URIReturnCode{\theurl\suffix}}
> \fi
> }
> 
> % Give up if returncode other then 200.
> \ifnum\returncode=200\relax
> % Page number might be added.
> \doifelse{\xmlatt{#1}{page}}{\empty}
> {\let\thep\empty}
> {\edef\thep{\letterhash page=\xmlatt{#1}{page}}}
> 
> % Place the link, ref-attribute prevales in the presentation.
> \doifelse{\xmlatt{#1}{ref}}{\empty}
> {\edef\temp{\xmlatt{#1}{link}}}
> {\edef\temp{\xmlatt{#1}{ref}}}
> \goto
> {\FirstLastCharacters{\temp}{\xmlatt{#1}{maxsize}}}
> [url(\theurl\suffix\thep)]
> \else
> \errorcall{#1}
> {\THEURLBASE\xmlatt{#1}{link} not found (\returncode)}
> \fi
> 
> \fi% end of URItimeout
> \stopxmlsetups
> 
> 
>> On 8 Oct 2018, at 00:39, Hans Hagen > <mailto:j.ha...@xs4all.nl>> wrote:
>>
>> On 10/7/2018 8:41 PM, Pablo Rodriguez wrote:
>>> On 10/7/18 8:33 PM, Hans Hagen wrote:
>>>> On 10/7/2018 8:19 PM, Pablo Rodriguez wrote:
>>>>> [...]
>>>>> Is there a way to hyperlink to an attached document? I mean, no matter
>>>>> whether it has been generated by C

Re: [NTG-context] linking to an external PDF file

2018-10-08 Thread Hans van der Meer
I am embedding links to an UR in my documents. Although it is used in 
XML-documents, you might be able to use the gist of this code that generates a 
clickable link. Perhaps you find it useful. 

dr. Hans van der Meer

% Return the code when clicking the link.
\def\URIReturnCode#1{\ctxlua{tex.print(hvdm.urireturncode("#1"))}}

— Some Lua code needed:
-- Check URI

socket.http.TIMEOUT = 5 -- set URI 
timeout in seconds
hvdm.urireturncode = function (theuri)
-- Differentiate between file and http protocols.
local first,last = string.find(theuri, "file://")
if first == nil then
-- We have http to search for.
local content, status, authinfo = socket.http.request{
method = "HEAD",
url = theuri,
}
    return type(status) == "number" and status or "failure"
else
-- We must ascertain the existence of the file.
local thefile = io.open(string.sub(theuri, last+1, -1), 
"r")
if thefile then
io.close(thefile)
return "200"
else
return "404"
end
end
end

% . Place an url link .

% BEWARE: spaces in file names must be %20 in the link !!!

% This global definition of the URLbase cannot be missed.
\def\THEURLBASE{http://}

% Signal the occurence of timeout on URI search.
\newif\ifURItimeout

\startxmlsetups xmlcommon:urlbase
\edef\THEURLBASE{\xmlstrippednolines{#1}{.}}

% Reset the URI timeout for new URLbase.
\global\URItimeoutfalse
\stopxmlsetups

\startxmlsetups xmlcommon:url

% Define the full uri.
\edef\theurl{\THEURLBASE\xmlatt{#1}{link}}

 % File suffix should be one of the list.
\doifelse{\FileSuffixList{\xmlatt{#1}{link}}
{pdf,jpg,jpeg,html,png,tif,tiff}}{\empty}
{\def\suffix{.impossible}}% no suffix from the list here
{\def\suffix{\empty}}% one of the list is present

% First try link as given, beware of unreachable site.
\ifURItimeout
% For previously timeout on this site.
\else
\edef\returncode{\URIReturnCode{\theurl}}
\doif{\returncode}{failure}
{
\global\URItimeouttrue
\errorcall{#1}{url access fails for 
\THEURLBASE\xmlatt{#1}{link}}
}
\fi

% On URI timeout there is no hope to find the file.
\ifURItimeout
\else
% When there is no suffix from the list, try several.
\doifnot{\suffix}{\empty}
{
\scratchcounter=200\relax
\ifnum\returncode=\scratchcounter\else
\def\suffix{.pdf}
\edef\returncode{\URIReturnCode{\theurl\suffix}}
\fi
\ifnum\returncode=\scratchcounter\else
\def\suffix{.jpg}
\edef\returncode{\URIReturnCode{\theurl\suffix}}
\fi
\ifnum\returncode=\scratchcounter\else
\def\suffix{.jpeg}
\edef\returncode{\URIReturnCode{\theurl\suffix}}
\fi
\ifnum\returncode=\scratchcounter\else
\def\suffix{.html}
\edef\returncode{\URIReturnCode{\theurl\suffix}}
\fi
\ifnum\returncode=\scratchcounter\else
\def\suffix{.png}
\edef\returncode{\URIReturnCode{\theurl\suffix}}
\fi
\ifnum\returncode=\scratchcounter\else
\def\suffix{.tiff}
\edef\returncode{\URIReturnCode{\theurl\suffix}}
\fi
\ifnum\returncode=\scratchcounter\else
\def\suffix{.tif}
\edef\returncode{\URIReturnCode{\theurl\suffix}}
\fi
}

% Give up if returncode other then 200.
\ifnum\returncode=200\relax
% Page number might be added.
\doifelse{\xmlatt{#1}{page}}{\empty}
  

Re: [NTG-context] context and sqlite - here is the code

2018-10-07 Thread Hans Hagen

On 10/7/2018 9:35 AM, Jörg Hofmann wrote:

Hallo Hans,
hallo Luigi,

Am Samstag, den 06.10.2018, 20:01 +0200 schrieb Jörg Hofmann:

I've been trying to connect ConTeXt to sqlite for almost a week
but I have repeatedly failed. Neither the
"internal" variant according to the documentation, nor the attempt on
luasql
have worked. Above all, the Google request showed me that
not alone with this problem - how reassuring. ;-)

At the moment, concentrate I am accessing via swiglib and think my
problem lies here (from my log file):

sql> start loading method 'sqlite'
swiglib> unknown: 'swiglib.sqlite.core'
swiglib> unknown: 'swiglib.helpers.core'

Obviously, the appropriate modules are not found, but where
Can I get them and where do they belong? And maybe
also someone a working code example for me.
I'm working with Texlive 2017 on XUBUNTU 16.04.


Many thanks for your help. I have read both manuals but may not
understand it correctly. That's why I send my file and the log file.
the latest versions of context use ffi for mysql and sqlite interfacing 
so you just need the libraries


if you add \enabletrackers[*ffi*] to your file you get something

ffilib  > requiring library 'sqlite3' with version 'any'
ffilib  > tds path 1: .
ffilib  > tds path 2: 
c:/data/develop/tex-context/tex/texmf-win64/bin/lib/context/lua//
ffilib  > tds path 3: 
c:/data/develop/tex-context/tex/texmf-win64/bin/lib/luatex/lua//
ffilib  > tds path 4: 
c:/data/develop/tex-context/tex/texmf-win64/bin/lib//lua//

ffilib  > attemp 1, engine 'luatex'
ffilib  > checking tds lib paths strictly
ffilib  > checking with version: 'sqlite3.dll'
ffilib  > found: 
'c:/data/develop/tex-context/tex/texmf-win64/bin/lib/luatex/lua/copies/sqlite/sqlite3.dll'

ffilib  > stored library: 'sqlite3'
sql > loading method 'sqlite' done

anyway, best keep your libe in the tex tree because otherwise you get 
some random one that is found on your system


attached a better example file (hard to test without a database here so 
need to make one ... next time proviode a real mwe)


in util-sql-imp-sqlite.lua remove a pragma line so we get:

local f_preamble = formatters[ [[
ATTACH `%s` AS `%s` ;
PRAGMA `%s`.synchronous = normal ;
]] ]



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
\starttext

\enabletrackers[*ffi*]

\startluacode
require("util-sql")

local sql = utilities.sql

sql.setmethod("sqlite")

document.sqlpresets = {
database = "aufgaben",
id   = "aufgaben",
}

local template = [[
CREATE TABLE IF NOT EXISTS `aufgaben` (
`id`  INTEGER PRIMARY KEY AUTOINCREMENT,
`titel`   BLOB NOT NULL,
`sachverhalt` BLOB NOT NULL,
`auftraege`   BLOB NOT NULL
) ;
]]

function document.createdatabase()

return utilities.sql.execute {
presets   = document.sqlpresets,
template  = template,
}

end

local template = [[
INSERT INTO `aufgaben` (
`titel`,
`sachverhalt`,
`auftraege`
) VALUES (
'%titel%',
'%sachverhalt%',
'%auftraege%'
) ;
]]

function document.addtodatabase(t)

return utilities.sql.execute {
presets   = document.sqlpresets,
template  = template,
variables = {
titel   = t.titel,
sachverhalt = t.sachverhalt,
auftraege   = t.auftraege,
},
}

end

local template_id = [[
SELECT
*
FROM
`aufgaben`
WHERE
`id` = '%id%' ;
]]

document.sqlconverter = sql.makeconverter {
{ name = "id",  type = "number" },
{ name = "titel",   type = "string" },
{ name = "sachverhalt", type = "string" },
{ name = "auftraege",   type = "string" },
}

function document.getfromdatabase(t)

if t.id then

return utilities.sql.execute {
presets   = document.sqlpresets,
template  = template_id,
variables = { id = t.id },
 -- converter = document.sqlconverter,
}

end

end

\stopluacode

\startluacode

document.createdatabase()

local tufte = io.loaddata(resolvers.findfile("tufte.tex"))
local ward  = io.loaddata(resolvers.findfile("ward.tex"))
local knuth = io.loaddata(resolvers.findfile("knuth.tex"))

document.addtodatabase { titel = "aufgabe 1", sachverhalt = "one",   auftraege 
= tufte }
document.addtodatabase { titel = "aufgabe 2", sachverhalt = "two&quo

Re: [NTG-context] Need help with project: TeX capacity exceeded

2018-10-05 Thread Wolfgang Schuster


Taco Hoekwater schrieb am 04.10.18 um 09:27:

Hi,


On 4 Oct 2018, at 08:47, Axel Kielhorn  wrote:

Hello,

this is my second try to start with context and I can’t even do the first step.

I’m planing to convert a large but simple document to context.
The document consists of 3 Parts.
Each part has several chapters.

Thus I started to build a project with three products, see enclosed archive.

According to my understanding I should be able to
context c_01 to get one chapter
context prd_A to get one product
context project_ecm to get the whole book.

Any whole book should be a product, and the Parts should just be components.
The project level is only there to connect meta-info across a book series.
You are not supposed to run ‘context’ on the project file.

That said, it is definitely not your installation or understanding of the
wiki page that creates the circular inclusion. The same happens here. I
discovered it works OK if I move the \product to within the \startcomponent,
and I assume that is how it supposed to work:

   \startcomponent
   \product prd_1
…
   \stopcomponent

At a guess, I think the wiki page is wrong. But before editing that,
I would like to have confirmation of the above assumption.


The \product command is more or less useless because it provides only 
the information

of the main file of the document.

The real question is where you should put the \project or \environment 
commands.
When you put them before \startproduct you’re loading your fonts before 
the start
of the document and the Latin Modern fallback isn’t used but when you 
put them

after \startproduct you load your font after the Latin Modern fallback.

One advantage when you load the project/environment after \startproduct 
(or \startcomponent)
is that you can use the product or component modes in your environment 
file to set

different image or subpath folder dependant on which file type you typeset.

In the end it doesn’t matter whether you load your project/environment 
before or after

\startproduct because there is no difference.

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
___

[NTG-context] profile specification '{ISO Coated v2 300% (ECI)} ' not found in 'colorprofiles.xml, colorprofiles.lua'

2018-10-01 Thread Jan U. Hasecke
I get this error when I try to compile a pdf with:

\setupbackend[
  format=PDF/X-3:2003,
  intent={ISO Coated v2 300\letterpercent\space (ECI)}
  ]

In log:

backend > profiles > setting format to 'PDF/X-3:2003'
backend > profiles > forcing pdf version 1.4.0, compression
level 3, object compression disabled
colors  > defining > supported models: gray 'true', rgb 'true',
cmyk 'true', spot 'true'
transparencies  > support > transparency is not supported
viewerlayers> viewerlayers are not supported
backend > xmp > using file
'/home/juh/context/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'
backend > profiles > profile specification '{ISO Coated v2 300%
(ECI)} ' not found in 'colorprofiles.xml, colorprofiles.lua'

The profile is there:

~/context/tex/texmf-context/colors/icc/profiles$ ls
CoatedFOGRA39.iccProbev1_ICCv2.icc
default_cmyk.icc Probev1_ICCv4.icc
default_gray.icc Probev2_ICCv4.icc
default_rgb.icc  ps_cmyk.icc
ecirgb_v2.iccps_gray.icc
ecirgb_v2_iccv4.icc  ps_rgb.icc
GRACoL2006_Coated1v2.icc PSRgravureMF.icc
isocoated_v2_300_eci.icc PSR_LWC_PLUS_V2_PT.icc
ISOcoated_v2_300_eci.icc PSR_LWC_STD_V2_PT.icc
isocoated_v2_eci.icc PSR_SC_PLUS_V2_PT.icc
ISOcoated_v2_eci.icc PSR_SC_STD_V2_PT.icc
ISOnewspaper26v4_gr.icc  SC_paper_eci.icc
ISOnewspaper26v4.icc sgray.icc
ISOuncoated.icc  SNAP2007.icc
ISOuncoatedyellowish.icc srgb.icc
ISOwebcoated.icc srgb_v4_icc_preference.icc
JapanColor2001Coated.icc SWOP2006_Coated3v2.icc
JapanColor2002Newspaper.icc  SWOP2006_Coated5v2.icc
JapanWebCoated.icc   UncoatedFOGRA29.icc
lab.icc  WebCoatedFOGRA28.icc

The profile is also defined in colorporfiles.xml


ISOcoated_v2_300_eci.icc
CMYK
prtr
FOGRA39
ISO Coated v2 300% (ECI)
e14f5db955711d914d877df35ad7a1b5
2400
http://www.color.org
Offset printing, according to ISO
12647-2:2004/Amd 1, OFCOM, paper type 1 or 2 = coated art, 115 g/m2,
tone value increase curves A (CMY) and B (K)


Any hints?
juh
___
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] remapper change in luatex-basics-gen.lua

2018-09-29 Thread Hans Hagen

On 9/29/2018 11:38 PM, Ulrike Fischer wrote:

in luatex-basics-gen.lua
the remapper maps lua to "tex":

local remapper = {
 otf= "opentype fonts",
 ttf= "truetype fonts",
 ttc= "truetype fonts",
 cid= "cid maps",
 cidmap = "cid maps",
  -- fea= "font feature files", -- no longer supported
 pfb= "type1 fonts",-- needed for vector loading
 afm= "afm",
 enc= "enc files",
 lua= "tex", --<<<<<<

which is quite a while ago ...


The remapper is then used in resolvers.findfile.

The change has been imported in latex with the new luaotfload and
now broke the function  "pgf_lookup_and_require" in the pgf
graphdrawing library which in its code uses resolvers.findfile --
probably so that it works also as context library
(http://minimals.contextgarden.net/current/modules/t-tikz/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.code.tex)

Due to the mapping of lua to the tex type
resolvers.findfile("layered","lua") no longer finds layered.lua.

Apart from telling the pgf people not to use resolvers.findfile like
this when latex is used, is there anything one could do in the
generic fontloader?
hm, isn't latex using kpse ? in generic this resolver is just for fonts 
(and this one is for lua font files - some demos - with luatex-plain)


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
___

[NTG-context] remapper change in luatex-basics-gen.lua

2018-09-29 Thread Ulrike Fischer
in luatex-basics-gen.lua
the remapper maps lua to "tex":

local remapper = {
otf= "opentype fonts",
ttf= "truetype fonts",
ttc= "truetype fonts",
cid= "cid maps",
cidmap = "cid maps",
 -- fea= "font feature files", -- no longer supported
pfb= "type1 fonts",-- needed for vector loading
afm= "afm",
enc= "enc files",
lua= "tex", --<<<<<<http://minimals.contextgarden.net/current/modules/t-tikz/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.code.tex)

Due to the mapping of lua to the tex type
resolvers.findfile("layered","lua") no longer finds layered.lua.

Apart from telling the pgf people not to use resolvers.findfile like
this when latex is used, is there anything one could do in the
generic fontloader?




-- 
Ulrike Fischer 
https://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] open type feature "frac"

2018-09-28 Thread Hans Hagen

On 9/28/2018 10:56 PM, Ulrike Fischer wrote:

Due to a question on tex.sx
(https://tex.stackexchange.com/questions/452969/luatex-fontfeaturefractions-on-turns-first-digits-into-superscripts)
I looked again (see
https://www.mail-archive.com/ntg-context@ntg.nl/msg84822.html) at
the frac feature.

The output is still not really satisfactory. With mode=node numbers
with slash looks okay, but single numbers are rather odd: only the
last digit has the correct size:

\starttext

\font\test={file:linlibertine_r.otf:mode=node;script=latn;language=DFLT;+frac}
\test
787347 125


it all depends on the font and lookups i guess

the logic can be a combination of:

1 - replace digit when followed by digit or slash
2 - replace digit when preceded by slash
3 - replace digit when preceded by fract digit

so a last digit not preceded will not

in fact one can then as well replace all digits non contextual


1/7 1/2 3/4 5/6 7/8 9/10 11/12 31415/27182 1000/100

\font\test={file:linlibertine_r.otf:mode=base;script=latn;language=DFLT;+frac}
\test
787347 125

1/7 1/2 3/4 5/6 7/8 9/10 11/12 31415/27182 1000/100


forget about base mode ... dependent on how the font does frac single 
substitutions will be applied (maybe ligs)



\stoptext



(It could be a font bug, the output with xetex isn't good either).

fonts probably have a limited set of lookups

(the 5 and 7 suggests some inconsistency in the lookups)

i must admit that i've seen so many bad frac implementations that i 
never use it (and it's definitely something that should be applied very 
selectively, not on a whole text stream)


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
___

[NTG-context] open type feature "frac"

2018-09-28 Thread Ulrike Fischer
Due to a question on tex.sx
(https://tex.stackexchange.com/questions/452969/luatex-fontfeaturefractions-on-turns-first-digits-into-superscripts)
I looked again (see
https://www.mail-archive.com/ntg-context@ntg.nl/msg84822.html) at
the frac feature.

The output is still not really satisfactory. With mode=node numbers
with slash looks okay, but single numbers are rather odd: only the
last digit has the correct size:

\starttext

\font\test={file:linlibertine_r.otf:mode=node;script=latn;language=DFLT;+frac}
\test
787347 125

1/7 1/2 3/4 5/6 7/8 9/10 11/12 31415/27182 1000/100

\font\test={file:linlibertine_r.otf:mode=base;script=latn;language=DFLT;+frac}
\test
787347 125

1/7 1/2 3/4 5/6 7/8 9/10 11/12 31415/27182 1000/100

\stoptext


(It could be a font bug, the output with xetex isn't good either).
 

-- 
Ulrike Fischer 
https://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] tounicode mapping missing for locl-variants

2018-09-27 Thread luigi scarso
On Thu, Sep 27, 2018 at 9:42 AM Ulrike Fischer  wrote:

> Am Thu, 27 Sep 2018 09:14:01 +0200 schrieb luigi scarso:
>
> > On Wed, Sep 26, 2018 at 11:14 PM Ulrike Fischer 
> wrote:
> >
> >>
> >> When I compile the following document I see in the output localized
> >> variants for the various glyphs. But copy & paste works only for the
> >> last line. The first two gives notdef chars.
> >>
> >> In the pdf e.g. the first glyph has the numbers 2D0E, 2D0F, 2D0D in
> >> the three lines but only for the last there is a unicode mapping:
> >> <2D0D> <5203>.
> >>
> >> What can one do to get a mapping also for the other glyphs?
> >>
> >> The font can be downloaded here
> >>
> >>
> https://github.com/adobe-fonts/source-han-sans/blob/release/OTF/SourceHanSansJ.zip
> >> A related bug report is
> >> https://github.com/adobe-fonts/source-han-sans/issues/200
> >>
> >>
> >> \pdfvariable compresslevel 0
> >> \pdfvariable objcompresslevel 0
> >> \setupheader[state=stop]
> >>
> >
> >
> >
> >> \starttext
> >>
> >> \font\zhs=
> >>
> {file:SourceHanSans-Regular.otf:mode=node;script=hani;language=ZHS;+locl}
> >> \zhs 刃令毒骨縣誤
> >>
> >> \font\zht=
> >>
> {file:SourceHanSans-Regular.otf:mode=node;script=hani;language=ZHT;+locl}
> >> \zht 刃令毒骨縣誤
> >>
> >> \font\test=
> >> {file:SourceHanSans-Regular.otf:mode=node;script=hani;language=DFLT;}
> >> \test 刃令毒骨縣誤
> >>
> >> \stoptext
> >>
> >>
> >>
> > what does the trackers say  at your end ?
>
> > \enabletrackers[*]
> > \nopdfcompression
> > [...]
>
> a lot ;-)
>
> https://www.dropbox.com/s/jgwvytl7hi2doi5/test-utf8.log?dl=0
>
> One can see how the glyphs are replaced under locl:
>
> fonts   > otf direct > feature 'locl', type 'gsub_single',
> lookup 's_s_42': replacing U+5203 by single U+F0608
>
> but I can find nothing about tounicode/cmap or something like that.
>

ok, then you can see the font as seen by context
mtxrun --script fonts --convert SourceHanSans-Regular.otf
(keep track also of its output )

-- 
luigi
___
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] tounicode mapping missing for locl-variants

2018-09-27 Thread Ulrike Fischer
Am Thu, 27 Sep 2018 09:14:01 +0200 schrieb luigi scarso:

> On Wed, Sep 26, 2018 at 11:14 PM Ulrike Fischer  wrote:
> 
>>
>> When I compile the following document I see in the output localized
>> variants for the various glyphs. But copy & paste works only for the
>> last line. The first two gives notdef chars.
>>
>> In the pdf e.g. the first glyph has the numbers 2D0E, 2D0F, 2D0D in
>> the three lines but only for the last there is a unicode mapping:
>> <2D0D> <5203>.
>>
>> What can one do to get a mapping also for the other glyphs?
>>
>> The font can be downloaded here
>>
>> https://github.com/adobe-fonts/source-han-sans/blob/release/OTF/SourceHanSansJ.zip
>> A related bug report is
>> https://github.com/adobe-fonts/source-han-sans/issues/200
>>
>>
>> \pdfvariable compresslevel 0
>> \pdfvariable objcompresslevel 0
>> \setupheader[state=stop]
>>
> 
> 
> 
>> \starttext
>>
>> \font\zhs=
>> {file:SourceHanSans-Regular.otf:mode=node;script=hani;language=ZHS;+locl}
>> \zhs 刃令毒骨縣誤
>>
>> \font\zht=
>> {file:SourceHanSans-Regular.otf:mode=node;script=hani;language=ZHT;+locl}
>> \zht 刃令毒骨縣誤
>>
>> \font\test=
>> {file:SourceHanSans-Regular.otf:mode=node;script=hani;language=DFLT;}
>> \test 刃令毒骨縣誤
>>
>> \stoptext
>>
>>
>>
> what does the trackers say  at your end ?

> \enabletrackers[*]
> \nopdfcompression
> [...]

a lot ;-) 

https://www.dropbox.com/s/jgwvytl7hi2doi5/test-utf8.log?dl=0

One can see how the glyphs are replaced under locl:

fonts   > otf direct > feature 'locl', type 'gsub_single',
lookup 's_s_42': replacing U+5203 by single U+F0608

but I can find nothing about tounicode/cmap or something like that. 


-- 
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] Metafun: Finding intersection between characters

2018-09-26 Thread Hans Hagen

On 9/26/2018 2:14 PM, Jeong Dal wrote:

Dear Hans,

I tested for more characters and found an interesting fact.
If the first consonant and the vowels are connected in a glyph, then the 
outlining works OK, otherwise, it makes outline of the first consonant only.


you need to send a file not embedded .. otherwise the mail agent will 
apply magic to korean




Here is a MWE.

Thank you.
Best regards,

Dalyoung

%
\definefontfeature
  [korean-base]
  [goodies=hanbatanglvt,
   colorscheme=default,
   mode=node,
   script=hang,
   language=kor]

\definefont[KoreanFont][hanbatanglvt*korean-base]

\starttext

\startMPdefinitions
string KoreanColors[] ;

KoreanColors[1] := "darkred" ;
KoreanColors[2] := "darkgreen" ;
KoreanColors[3] := "darkblue" ;
KoreanColors[4] := "darkyellow" ;
KoreanColors[5] := "darkgray" ;

def KoreanOutline(expr txt) =
picture p ; p := outlinetext.p(txt) ;
numeric n ; n := 0 ;
string old, new ; old := "" ;
for i within p :
new := prescriptpart i ;
if (new = "") or (new <> old) :
old := new ;
n := n + 1 ;
if unknown KoreanColors[n] :
n := 1 ;
fi ;
fi ;
draw pathpart i
withpen pencircle scaled 1/10
withcolor KoreanColors[n] ;
endfor ;
enddef ;
\stopMPdefinitions
% entered as three characters: ᄅ  ᅡ  ᆺ (mail collapses)
\startMPpage
KoreanOutline("\KoreanFont 랏") ;
\stopMPpage
\startMPpage
KoreanOutline("\KoreanFont 논") ;
\stopMPpage
\startMPpage
KoreanOutline("\KoreanFont 왕") ;
\stopMPpage
\startMPpage
KoreanOutline("\KoreanFont 닭") ;
\stopMPpage
\startMPpage
KoreanOutline("\KoreanFont 박") ;
\stopMPpage
\startMPpage
KoreanOutline("\KoreanFont 서") ;
\stopMPpage

%


2018. 9. 26. 오후 7:10, Hans Hagen  작성:

On 9/26/2018 1:48 AM, Jeong Dal wrote:

Dear Hans,
First, it is great to know a new method of drawing an outlined font!
  I have applied it to Korean fonts. As you know, every Korean character is 
composed with “consonant+vowel(+consonant)” type. If consonant and vowel are 
connected (for example, “호”), then it draws correctly, otherwise (for example, 
“하”)  it draws only consonant.
Is there a way to count all the paths in a character(even if it is not 
connected)?

I assume that you want to identify the upto 3 snippets in a glyph so what you 
can do is loop over a picture.

\definefontfeature
  [korean-base]
  [goodies=hanbatanglvt,
   colorscheme=default,
   mode=node,
   script=hang,
   language=kor]

\definefont[KoreanFont][hanbatanglvt*korean-base]

\starttext

\startMPpage
string KoreanColors[] ;

KoreanColors[1] := "darkred" ;
KoreanColors[2] := "darkgreen" ;
KoreanColors[3] := "darkblue" ;
KoreanColors[4] := "darkyellow" ;
KoreanColors[5] := "darkgray" ;

def KoreanOutline(expr txt) =
picture p ; p := outlinetext.p(txt) ;
numeric n ; n := 0 ;
string old, new ; old := "" ;
for i within p :
new := prescriptpart i ;
if (new = "") or (new <> old) :
old := new ;
n := n + 1 ;
if unknown KoreanColors[n] :
n := 1 ;
fi ;
fi ;
draw pathpart i
withpen pencircle scaled 1/10
withcolor KoreanColors[n] ;
endfor ;
enddef ;

% entered as three characters: ᄅ  ᅡ  ᆺ (mail collapses)

KoreanOutline("\KoreanFont 랏") ;
\stopMPpage

\stoptext

The prescript will be set in a next beta so then you get better results for 
more complex shapes.

Loading the font takes a bit of time and memory because the first time the 
outlines are filtered and converted and saved. But I assume Koreans TeX users 
have fast computers with lots of memory.

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
-





--

-
  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

Re: [NTG-context] Metafun: Finding intersection between characters

2018-09-26 Thread Jeong Dal
Dear Hans,

I tested for more characters and found an interesting fact.
If the first consonant and the vowels are connected in a glyph, then the 
outlining works OK, otherwise, it makes outline of the first consonant only.

Here is a MWE.

Thank you.
Best regards,

Dalyoung

%
\definefontfeature
 [korean-base]
 [goodies=hanbatanglvt,
  colorscheme=default,
  mode=node,
  script=hang,
  language=kor]

\definefont[KoreanFont][hanbatanglvt*korean-base]

\starttext

\startMPdefinitions
   string KoreanColors[] ;

   KoreanColors[1] := "darkred" ;
   KoreanColors[2] := "darkgreen" ;
   KoreanColors[3] := "darkblue" ;
   KoreanColors[4] := "darkyellow" ;
   KoreanColors[5] := "darkgray" ;

   def KoreanOutline(expr txt) =
   picture p ; p := outlinetext.p(txt) ;
   numeric n ; n := 0 ;
   string old, new ; old := "" ;
   for i within p :
   new := prescriptpart i ;
   if (new = "") or (new <> old) :
   old := new ;
   n := n + 1 ;
   if unknown KoreanColors[n] :
   n := 1 ;
   fi ;
   fi ;
   draw pathpart i
   withpen pencircle scaled 1/10
   withcolor KoreanColors[n] ;
   endfor ;
   enddef ;
\stopMPdefinitions
   % entered as three characters: ᄅ  ᅡ  ᆺ (mail collapses)
\startMPpage
   KoreanOutline("\KoreanFont 랏") ;
\stopMPpage
\startMPpage
   KoreanOutline("\KoreanFont 논") ;
\stopMPpage
\startMPpage
   KoreanOutline("\KoreanFont 왕") ;
\stopMPpage
\startMPpage
   KoreanOutline("\KoreanFont 닭") ;
\stopMPpage
\startMPpage
   KoreanOutline("\KoreanFont 박") ;
\stopMPpage
\startMPpage
   KoreanOutline("\KoreanFont 서") ;
\stopMPpage

%

> 2018. 9. 26. 오후 7:10, Hans Hagen  작성:
> 
> On 9/26/2018 1:48 AM, Jeong Dal wrote:
>> Dear Hans,
>> First, it is great to know a new method of drawing an outlined font!
>>  I have applied it to Korean fonts. As you know, every Korean character is 
>> composed with “consonant+vowel(+consonant)” type. If consonant and vowel are 
>> connected (for example, “호”), then it draws correctly, otherwise (for 
>> example, “하”)  it draws only consonant.
>> Is there a way to count all the paths in a character(even if it is not 
>> connected)?
> I assume that you want to identify the upto 3 snippets in a glyph so what you 
> can do is loop over a picture.
> 
> \definefontfeature
>  [korean-base]
>  [goodies=hanbatanglvt,
>   colorscheme=default,
>   mode=node,
>   script=hang,
>   language=kor]
> 
> \definefont[KoreanFont][hanbatanglvt*korean-base]
> 
> \starttext
> 
> \startMPpage
>string KoreanColors[] ;
> 
>KoreanColors[1] := "darkred" ;
>KoreanColors[2] := "darkgreen" ;
>KoreanColors[3] := "darkblue" ;
>KoreanColors[4] := "darkyellow" ;
>KoreanColors[5] := "darkgray" ;
> 
>def KoreanOutline(expr txt) =
>picture p ; p := outlinetext.p(txt) ;
>numeric n ; n := 0 ;
>string old, new ; old := "" ;
>for i within p :
>new := prescriptpart i ;
>if (new = "") or (new <> old) :
>old := new ;
>n := n + 1 ;
>if unknown KoreanColors[n] :
>n := 1 ;
>fi ;
>fi ;
>draw pathpart i
>withpen pencircle scaled 1/10
>withcolor KoreanColors[n] ;
>endfor ;
>enddef ;
> 
>% entered as three characters: ᄅ  ᅡ  ᆺ (mail collapses)
> 
>KoreanOutline("\KoreanFont 랏") ;
> \stopMPpage
> 
> \stoptext
> 
> The prescript will be set in a next beta so then you get better results for 
> more complex shapes.
> 
> Loading the font takes a bit of time and memory because the first time the 
> outlines are filtered and converted and saved. But I assume Koreans TeX users 
> have fast computers with lots of memory.
> 
> 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] Metafun: Finding intersection between characters

2018-09-26 Thread Jeong Dal
Dear Hans,

I have tested using your code. I just replace “N”, “T” with Korean letters.

Here is an MWE which is a simplified version of your code.
I tested using two fonts, and the outputs are different.

Thank you for your concern.

Best regards,

Dalyoung

%%%
\usetypescriptfile[type-hcrlvt]
\usetypescript[HcrFont] 
\setupbodyfont[Myface, rm, 12pt]
%\setupbodyfont[unfonts, rm, 12pt]

\startMPdefinitions
def filloutlinetext(expr o) =
draw image (
save n, m ; numeric n, m ; n := m := 0 ;
for i within o :
n := n + 1 ;
endfor ;
for i within o :
m := m + 1 ;
if n = m :
eofill
else :
nofill
fi pathpart i ;
endfor ;
)
enddef ;

def drawoutlinetext(expr o) =
draw image (
% nicer for properties
for i within o :
draw pathpart i ;
endfor ;
)
enddef ;

def outlinetexttopath(text o, p, n) =
scantokens("numeric " & str n &   ";") ;
scantokens("path "& str p & "[];") ;
n := 0 ;
for i within o : p[incr(n)] := pathpart i ; endfor ;
enddef ;

\stopMPdefinitions

\startbuffer[ho]
picture first  ; first  := outlinetext.p("호") ; first  := first scaled 
10 ;
filloutlinetext(first ) withcolor .5[blue,white] ;
drawoutlinetext(first ) ;
\stopbuffer
\startbuffer[ha]
picture first  ; first  := outlinetext.p("하") ; first  := first scaled 
10 ;
filloutlinetext(first ) withcolor .5[blue,white] ;
drawoutlinetext(first ) ;
\stopbuffer
\startbuffer[wang]
picture first  ; first  := outlinetext.p("왕") ; first  := first scaled 
10 ;
filloutlinetext(first ) withcolor .5[blue,white] ;
drawoutlinetext(first ) ;
\stopbuffer

\starttext

\processMPbuffer[ho]
\processMPbuffer[ha]
\processMPbuffer[wang]

\stoptext
%%%



type-hcrlvt.mkiv
Description: Binary data


___
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: Finding intersection between characters

2018-09-26 Thread Hans Hagen

On 9/26/2018 1:48 AM, Jeong Dal wrote:

Dear Hans,

First, it is great to know a new method of drawing an outlined font!

  I have applied it to Korean fonts. As you know, every Korean character is 
composed with “consonant+vowel(+consonant)” type. If consonant and vowel are 
connected (for example, “호”), then it draws correctly, otherwise (for example, 
“하”)  it draws only consonant.
Is there a way to count all the paths in a character(even if it is not 
connected)?
I assume that you want to identify the upto 3 snippets in a glyph so 
what you can do is loop over a picture.


\definefontfeature
  [korean-base]
  [goodies=hanbatanglvt,
   colorscheme=default,
   mode=node,
   script=hang,
   language=kor]

\definefont[KoreanFont][hanbatanglvt*korean-base]

\starttext

\startMPpage
string KoreanColors[] ;

KoreanColors[1] := "darkred" ;
KoreanColors[2] := "darkgreen" ;
KoreanColors[3] := "darkblue" ;
KoreanColors[4] := "darkyellow" ;
KoreanColors[5] := "darkgray" ;

def KoreanOutline(expr txt) =
picture p ; p := outlinetext.p(txt) ;
numeric n ; n := 0 ;
string old, new ; old := "" ;
for i within p :
new := prescriptpart i ;
if (new = "") or (new <> old) :
old := new ;
n := n + 1 ;
if unknown KoreanColors[n] :
n := 1 ;
fi ;
fi ;
draw pathpart i
withpen pencircle scaled 1/10
withcolor KoreanColors[n] ;
endfor ;
enddef ;

% entered as three characters: ᄅ  ᅡ  ᆺ (mail collapses)

KoreanOutline("\KoreanFont 랏") ;
\stopMPpage

\stoptext

The prescript will be set in a next beta so then you get better results 
for more complex shapes.


Loading the font takes a bit of time and memory because the first time 
the outlines are filtered and converted and saved. But I assume Koreans 
TeX users have fast computers with lots of memory.


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] Metafun: Finding intersection between characters

2018-09-26 Thread Hans Hagen

On 9/26/2018 1:48 AM, Jeong Dal wrote:

Dear Hans,

First, it is great to know a new method of drawing an outlined font!

  I have applied it to Korean fonts. As you know, every Korean character is 
composed with “consonant+vowel(+consonant)” type. If consonant and vowel are 
connected (for example, “호”), then it draws correctly, otherwise (for example, 
“하”)  it draws only consonant.
Is there a way to count all the paths in a character(even if it is not 
connected)?

mwe ...

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] Metafun: Finding intersection between characters

2018-09-25 Thread Jeong Dal
Dear Hans,

First, it is great to know a new method of drawing an outlined font!

 I have applied it to Korean fonts. As you know, every Korean character is 
composed with “consonant+vowel(+consonant)” type. If consonant and vowel are 
connected (for example, “호”), then it draws correctly, otherwise (for example, 
“하”)  it draws only consonant.
Is there a way to count all the paths in a character(even if it is not 
connected)?

Thank you.
Best regards,

Dalyoung


> 
> \starttext
> 
> \startMPdefinitions
> 
> % will be added to metafun:
> 
> def filloutlinetext(expr o) =
> draw image (
> save n, m ; numeric n, m ; n := m := 0 ;
> for i within o :
> n := n + 1 ;
> endfor ;
> for i within o :
> m := m + 1 ;
> if n = m :
> eofill
> else :
> nofill
> fi pathpart i ;
> endfor ;
> )
> enddef ;
> 

___
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] xml in lua advice ?

2018-09-19 Thread mf
My 2 cents:

local xmlflush = lxml.flush

local function text_or_xml(...)
  for i,v in ipairs(arg) do
if "table" == type(v) then
  xmlflush(v)
else
  context(v)
end
  end
end

function xml.functions.heading(t)
  text_or_xml( "\\section{" , t , "}" )
end

Massimiliano

Il giorno mer, 19/09/2018 alle 15.56 +0200, Hans Hagen ha scritto:
> On 9/19/2018 2:50 PM, Taco Hoekwater wrote:
> > Hi,
> > 
> > Is there a more elegant way to feed an xml tree into a context()
> > command
> > that what I have below?
> > 
> > 
> > \startluacode
> > function xml.functions.heading(t)
> > context.section("{")
> > lxml.flush(t)
> > context("}")
> > end
> > \stopluacode
> > 
> > The subtree in ’t’ could have embedded xml tags that should be
> > processed,
> > so just stripping it clean will not do.
> > 
> > (this is not about \section as such, I just needed an example.
> > \startsection
> > would be more modern, but it would not help fix the issue )
> 
> it actually depends on what you do ... anyway here is some insight
> (as 
> xml-tex old-timer you'll probably recognize the madness)
> 
> % \enabletrackers[context*]
> 
> \starttext
> 
> % here is your missing mwe
> 
> \startbuffer[test]
> 
>  some bold title
> 
> \stopbuffer
> 
> % this will assume xml and relate some handlers
> 
> \setuphead[section]
>[coding=xml,
> xmlsetup=xml:flush]
> 
> \startxmlsetups xml:flush
>  \xmlflush{#1}
> \stopxmlsetups
> 
> % comment this one for your amusement
> 
> \startxmlsetups xml:b
>  {\bf \xmlflush{#1}}
> \stopxmlsetups
> 
> % here is the magic: you pass a reference
> 
> \startluacode
> function xml.finalizers.heading(t)
>  context.formatted.section("main::%i",t[1].ix)
> end
> \stopluacode
> 
> % this loads only (can happen at the lua end ... you can sort that
> out)
> 
> \xmlloadbuffer{main}{test}{}
> 
> % this indexes the nodes (the ix keys, basically all these #1
> argumehnts 
> in setups use that trickery)
> 
> \xmladdindex{main}
> 
> % to be sure
> 
> \xmlsetsetup{main}{b}{xml:b}
> 
> % now we filter / apply your finalizer
> 
> \xmlfilter{main}{section/heading()}
> 
> % done
> 
> \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] Using the source han sans fonts fails

2018-09-19 Thread Hans Hagen

On 9/19/2018 11:17 AM, Ulrike Fischer wrote:

Am Wed, 19 Sep 2018 10:54:08 +0200 schrieb Hans Hagen:


On 9/19/2018 10:24 AM, Ulrike Fischer wrote:


Because of a question on tex.sx I tried to use the source han sans
fonts. I installed (in windows 10) the fonts from this zip-file:

https://github.com/adobe-fonts/source-han-sans/blob/release/OTF/SourceHanSansJ.zip

Trying to use them with latex/luaotfload failed with a memory
exhausted error while trying to write the lua-file. In context

\starttext
\font\test={name:sourcehansans}
\test abc
\stoptext

gave the error:

fonts   > otf loading > loading
'c:/windows/fonts/SourceHanSans-Regular.otf', hash
'sourcehansans-regular'
otf reader  > loading of table 'vorg' skipped
otf reader  > invalid index in single format 1: 65353 -> 67212
(max 65535)
otf reader  > rule 1 in gsub lookup 's_s_5' has empty lookups
fonts   > otf loading > loading failed due to read error
fonts   > defining > forced type 'otf' of
'c:/windows/fonts/SourceHanSans-Regular' not found
fonts   > defining > font with asked name
'c:/windows/fonts/SourceHanSans-Regular' is not found using lookup
'name'
fonts   > defining > unknown font
'c:/windows/fonts/SourceHanSans-Regular', loading aborted


xelatex had no problems to use the font.

Is this an error in the font or in the fontloader?

it works ok here with luatex

but ... do you use luajittex?


No (neither with lualatex).

The context log says at the end:

mkiv lua stats  > used platform: mswin, type: windows, binary
subtree: texmf-mswin
mkiv lua stats  > used engine: luatex version 1.09 with
functionality level 6930, banner: this is luatex, version 1.09.0
(tex live 2018/w32tex)
mkiv lua stats  > control sequences: 45351 of 65536 + 10
mkiv lua stats  > lua properties: engine: lua 5.3, used memory: 1519
MB (ctx: 1460 MB), hash type: lua, hash chars: min(32,40), symbol
mask: utf (τεχ)
mkiv lua stats  > runtime: 39.711 seconds

The fonts *are* large, and my computer is quite old, so it could be
a hardware problem, but I'm wondering a bit about the message


otf reader  > invalid index in single format 1: 65353 -> 67212
sure, but afaiks that's taken care of, but it still loads ... so given 
the computer maybe a memory issue? can you run with the task manager 
open? it does need some mem when serializing so maybe your virtual mem 
is not enough?


the first time caching takes some 23 sec on my (also not that new) 
machine but after that loading takes way less time (some .4 sec)


maybe use the ttc files instead: sourcehansans-normal.ttc

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] Using the source han sans fonts fails

2018-09-19 Thread Taco Hoekwater
Hi,

Here is what I get (ConTeXt  ver: 2018.09.13 17:41 MKIV beta, luatex 1.09):


fonts   > otf loading > loading 
'/Users/taco/context-maps/tex/texmf-fonts/fonts/data/SourceHanSans-Regular.otf',
 hash 'sourcehansans-regular'
otf reader  > loading of table 'vorg' skipped
otf reader  > invalid index in single format 1: 65353 -> 67212 (max 65535)
otf reader  > rule 1 in gsub lookup 's_s_5' has empty lookups
otf reader  > merging 3 steps of 'gpos_single' lookup 'p_s_0'
otf reader  > merging 2 steps of 'gpos_pair' lookup 'p_s_1'
otf reader  > turning pairs of step 1 of 'gpos_pair' lookup 'p_s_1' into 
kerns
otf reader  > merging 11 steps of 'gpos_single' lookup 'p_s_2'
otf reader  > merging 3 steps of 'gpos_single' lookup 'p_s_3'
otf reader  > merging 10 steps of 'gpos_single' lookup 'p_s_5'
otf reader  > 24 steps of 351 removed due to merging
otf reader  > 1 steps of 351 steps turned from pairs into kerns
otf reader  > duplicates: 33 : [null] @ I1 [soh] [stx] [etx] [eot] 
[enq] [ack] [bel] [bs] [ht] [lf] [vt] [ff] [cr] [so] [si] [dle] [dc1] [dc2] 
[dc3] [dc4] [nak] [syn] [etb] [can] [em] ...
otf reader  > duplicates: 1 :   (U+02002) @ I0F63F ᅠ (U+0FFA0)
… lots more duplicates


and a successful run despite all that. 

Note, however, that the luatex process tops out at nearly 3GB RAM
use while generating the cached version, which could be a problem
on 32-bit operating systems.

Best wishes,
Taco


> On 19 Sep 2018, at 11:21, luigi scarso  wrote:
> 
> 
> 
> On Wed, Sep 19, 2018 at 11:18 AM Ulrike Fischer  wrote:
> Am Wed, 19 Sep 2018 10:54:08 +0200 schrieb Hans Hagen:
> 
> > On 9/19/2018 10:24 AM, Ulrike Fischer wrote:
> >> 
> >> Because of a question on tex.sx I tried to use the source han sans
> >> fonts. I installed (in windows 10) the fonts from this zip-file:
> >> 
> >> https://github.com/adobe-fonts/source-han-sans/blob/release/OTF/SourceHanSansJ.zip
> >> 
> >> Trying to use them with latex/luaotfload failed with a memory
> >> exhausted error while trying to write the lua-file. In context
> >> 
> >> \starttext
> >> \font\test={name:sourcehansans}
> >> \test abc
> >> \stoptext
> >> 
> >> gave the error:
> >> 
> >> fonts   > otf loading > loading
> >> 'c:/windows/fonts/SourceHanSans-Regular.otf', hash
> >> 'sourcehansans-regular'
> >> otf reader  > loading of table 'vorg' skipped
> >> otf reader  > invalid index in single format 1: 65353 -> 67212
> >> (max 65535)
> >> otf reader  > rule 1 in gsub lookup 's_s_5' has empty lookups
> >> fonts   > otf loading > loading failed due to read error
> >> fonts   > defining > forced type 'otf' of
> >> 'c:/windows/fonts/SourceHanSans-Regular' not found
> >> fonts   > defining > font with asked name
> >> 'c:/windows/fonts/SourceHanSans-Regular' is not found using lookup
> >> 'name'
> >> fonts   > defining > unknown font
> >> 'c:/windows/fonts/SourceHanSans-Regular', loading aborted
> >> 
> >> 
> >> xelatex had no problems to use the font.
> >> 
> >> Is this an error in the font or in the fontloader?
> > it works ok here with luatex
> > 
> > but ... do you use luajittex? 
> 
> No (neither with lualatex). 
> 
> The context log says at the end:
> 
> mkiv lua stats  > used platform: mswin, type: windows, binary
> subtree: texmf-mswin
> mkiv lua stats  > used engine: luatex version 1.09 with
> functionality level 6930, banner: this is luatex, version 1.09.0
> (tex live 2018/w32tex)
> mkiv lua stats  > control sequences: 45351 of 65536 + 10
> mkiv lua stats  > lua properties: engine: lua 5.3, used memory: 1519
> MB (ctx: 1460 MB), hash type: lua, hash chars: min(32,40), symbol
> mask: utf (τεχ)
> mkiv lua stats  > runtime: 39.711 seconds
> 
> The fonts *are* large, and my computer is quite old, so it could be
> a hardware problem, but I'm wondering a bit about the message
> 
> > otf reader  > invalid index in single format 1: 65353 -> 67212
> 
> hm
> checking now 
> 
> -- 
> luigi
> ___
> 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
> ___

Taco Hoekwater
Elvenkind BV




___
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] Using the source han sans fonts fails

2018-09-19 Thread luigi scarso
On Wed, Sep 19, 2018 at 11:18 AM Ulrike Fischer  wrote:

> Am Wed, 19 Sep 2018 10:54:08 +0200 schrieb Hans Hagen:
>
> > On 9/19/2018 10:24 AM, Ulrike Fischer wrote:
> >>
> >> Because of a question on tex.sx I tried to use the source han sans
> >> fonts. I installed (in windows 10) the fonts from this zip-file:
> >>
> >>
> https://github.com/adobe-fonts/source-han-sans/blob/release/OTF/SourceHanSansJ.zip
> >>
> >> Trying to use them with latex/luaotfload failed with a memory
> >> exhausted error while trying to write the lua-file. In context
> >>
> >> \starttext
> >> \font\test={name:sourcehansans}
> >> \test abc
> >> \stoptext
> >>
> >> gave the error:
> >>
> >> fonts   > otf loading > loading
> >> 'c:/windows/fonts/SourceHanSans-Regular.otf', hash
> >> 'sourcehansans-regular'
> >> otf reader  > loading of table 'vorg' skipped
> >> otf reader  > invalid index in single format 1: 65353 -> 67212
> >> (max 65535)
> >> otf reader  > rule 1 in gsub lookup 's_s_5' has empty lookups
> >> fonts   > otf loading > loading failed due to read error
> >> fonts   > defining > forced type 'otf' of
> >> 'c:/windows/fonts/SourceHanSans-Regular' not found
> >> fonts   > defining > font with asked name
> >> 'c:/windows/fonts/SourceHanSans-Regular' is not found using lookup
> >> 'name'
> >> fonts   > defining > unknown font
> >> 'c:/windows/fonts/SourceHanSans-Regular', loading aborted
> >>
> >>
> >> xelatex had no problems to use the font.
> >>
> >> Is this an error in the font or in the fontloader?
> > it works ok here with luatex
> >
> > but ... do you use luajittex?
>
> No (neither with lualatex).
>
> The context log says at the end:
>
> mkiv lua stats  > used platform: mswin, type: windows, binary
> subtree: texmf-mswin
> mkiv lua stats  > used engine: luatex version 1.09 with
> functionality level 6930, banner: this is luatex, version 1.09.0
> (tex live 2018/w32tex)
> mkiv lua stats  > control sequences: 45351 of 65536 + 10
> mkiv lua stats  > lua properties: engine: lua 5.3, used memory: 1519
> MB (ctx: 1460 MB), hash type: lua, hash chars: min(32,40), symbol
> mask: utf (τεχ)
> mkiv lua stats  > runtime: 39.711 seconds
>
> The fonts *are* large, and my computer is quite old, so it could be
> a hardware problem, but I'm wondering a bit about the message
>
> > otf reader  > invalid index in single format 1: 65353 -> 67212
>
> hm
checking now

-- 
luigi
___
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] Using the source han sans fonts fails

2018-09-19 Thread Ulrike Fischer
Am Wed, 19 Sep 2018 10:54:08 +0200 schrieb Hans Hagen:

> On 9/19/2018 10:24 AM, Ulrike Fischer wrote:
>> 
>> Because of a question on tex.sx I tried to use the source han sans
>> fonts. I installed (in windows 10) the fonts from this zip-file:
>> 
>> https://github.com/adobe-fonts/source-han-sans/blob/release/OTF/SourceHanSansJ.zip
>> 
>> Trying to use them with latex/luaotfload failed with a memory
>> exhausted error while trying to write the lua-file. In context
>> 
>> \starttext
>> \font\test={name:sourcehansans}
>> \test abc
>> \stoptext
>> 
>> gave the error:
>> 
>> fonts   > otf loading > loading
>> 'c:/windows/fonts/SourceHanSans-Regular.otf', hash
>> 'sourcehansans-regular'
>> otf reader  > loading of table 'vorg' skipped
>> otf reader  > invalid index in single format 1: 65353 -> 67212
>> (max 65535)
>> otf reader  > rule 1 in gsub lookup 's_s_5' has empty lookups
>> fonts   > otf loading > loading failed due to read error
>> fonts   > defining > forced type 'otf' of
>> 'c:/windows/fonts/SourceHanSans-Regular' not found
>> fonts   > defining > font with asked name
>> 'c:/windows/fonts/SourceHanSans-Regular' is not found using lookup
>> 'name'
>> fonts   > defining > unknown font
>> 'c:/windows/fonts/SourceHanSans-Regular', loading aborted
>> 
>> 
>> xelatex had no problems to use the font.
>> 
>> Is this an error in the font or in the fontloader?
> it works ok here with luatex
> 
> but ... do you use luajittex? 

No (neither with lualatex). 

The context log says at the end:

mkiv lua stats  > used platform: mswin, type: windows, binary
subtree: texmf-mswin
mkiv lua stats  > used engine: luatex version 1.09 with
functionality level 6930, banner: this is luatex, version 1.09.0
(tex live 2018/w32tex)
mkiv lua stats  > control sequences: 45351 of 65536 + 10
mkiv lua stats  > lua properties: engine: lua 5.3, used memory: 1519
MB (ctx: 1460 MB), hash type: lua, hash chars: min(32,40), symbol
mask: utf (τεχ)
mkiv lua stats  > runtime: 39.711 seconds

The fonts *are* large, and my computer is quite old, so it could be
a hardware problem, but I'm wondering a bit about the message

> otf reader  > invalid index in single format 1: 65353 -> 67212




-- 
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] Using the source han sans fonts fails

2018-09-19 Thread Hans Hagen

On 9/19/2018 10:24 AM, Ulrike Fischer wrote:


Because of a question on tex.sx I tried to use the source han sans
fonts. I installed (in windows 10) the fonts from this zip-file:

https://github.com/adobe-fonts/source-han-sans/blob/release/OTF/SourceHanSansJ.zip

Trying to use them with latex/luaotfload failed with a memory
exhausted error while trying to write the lua-file. In context

\starttext
\font\test={name:sourcehansans}
\test abc
\stoptext

gave the error:

fonts   > otf loading > loading
'c:/windows/fonts/SourceHanSans-Regular.otf', hash
'sourcehansans-regular'
otf reader  > loading of table 'vorg' skipped
otf reader  > invalid index in single format 1: 65353 -> 67212
(max 65535)
otf reader  > rule 1 in gsub lookup 's_s_5' has empty lookups
fonts   > otf loading > loading failed due to read error
fonts   > defining > forced type 'otf' of
'c:/windows/fonts/SourceHanSans-Regular' not found
fonts   > defining > font with asked name
'c:/windows/fonts/SourceHanSans-Regular' is not found using lookup
'name'
fonts   > defining > unknown font
'c:/windows/fonts/SourceHanSans-Regular', loading aborted


xelatex had no problems to use the font.

Is this an error in the font or in the fontloader?

it works ok here with luatex

but ... do you use luajittex? if so, forget about it as luajit has some 
limitations wrr memory and loading tables from stack (adapting the code 
to deal with that will make it a mess and we can't even be sure how long 
luajit will be around and supported in luatex anyway)


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
___

[NTG-context] Using the source han sans fonts fails

2018-09-19 Thread Ulrike Fischer

Because of a question on tex.sx I tried to use the source han sans
fonts. I installed (in windows 10) the fonts from this zip-file:

https://github.com/adobe-fonts/source-han-sans/blob/release/OTF/SourceHanSansJ.zip

Trying to use them with latex/luaotfload failed with a memory
exhausted error while trying to write the lua-file. In context 

\starttext
\font\test={name:sourcehansans}
\test abc
\stoptext 

gave the error:

fonts   > otf loading > loading
'c:/windows/fonts/SourceHanSans-Regular.otf', hash
'sourcehansans-regular'
otf reader  > loading of table 'vorg' skipped
otf reader  > invalid index in single format 1: 65353 -> 67212
(max 65535)
otf reader  > rule 1 in gsub lookup 's_s_5' has empty lookups
fonts   > otf loading > loading failed due to read error
fonts   > defining > forced type 'otf' of
'c:/windows/fonts/SourceHanSans-Regular' not found
fonts   > defining > font with asked name
'c:/windows/fonts/SourceHanSans-Regular' is not found using lookup
'name'
fonts   > defining > unknown font
'c:/windows/fonts/SourceHanSans-Regular', loading aborted


xelatex had no problems to use the font. 

Is this an error in the font or in the fontloader?

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

[NTG-context] Error message: Invalid UTF-8 sequence (sometimes since update in last 3-4 weeks)

2018-09-17 Thread Jacqui Coosner

Good day

Disclaimer: I am a beginner, and I apologise upfront if there is a 
simple answer to this question that I should have known.


Today I tried to compile an existing .tex file, and I received the 
following error message:


/tex error on line 6 in file /Users/jjc/wrk/ctx/brx-test.pdf: ! String 
contains an invalid utf-8 sequence/


It's been about 3 weeks since I last experimented with ConTeXt. I am 
running on MacOS High Sierra 10.13.6, and I have not had an OS update 
since I last ran ConTeXt.


I tried the following:

1) I tried to compile another file, which previously compiled 
successfully, and I had the same problem.


2) I then created a very simple .tex file (\starttext Hello World   
\stoptext ), and again I had the same problem.


3) I checked the format of my .tex file in 2 different editors to ensure 
that it is utf-8. (I normally use MacVim and it is clearly displaying 
the file format as utf-8 at the bottom of the editor)


4) I updated my ConTeXt installation, restarted my Mac and tried again. 
The only difference was that some of the output stream was displayed 
after the error message.


5) I checked the log file for my simple file, but could not find any 
information to help me. The log file looks as follows:


/open source > level 1, order 1, name 
'/Users/jjc/ctx/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'

system  >
system  > ConTeXt  ver: 2018.09.13 17:41 MKIV beta fmt: 
2018.9.17  int: english/english

system  >
system  > 'cont-new.mkiv' loaded
open source > level 2, order 2, name 
'/Users/jjc/ctx/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'

system  > beware: some patches loaded from cont-new.mkiv
close source    > level 2, order 2, name 
'/Users/jjc/ctx/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'

system  > files > jobname 'tmp', input './tmp.pdf', result 'tmp'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 2, order 3, name '/Users/jjc/wrk/ctx/tmp.pdf'

tex error   > tex error on line 6 in file 
/Users/jjc/wrk/ctx/tmp.pdf: ! String contains an invalid utf-8 sequence x^=
 ;Â@@=/y?-$êíí--TÜ¿%xâô й йàËÓËÓÓ((ÇUUH'3ñ¤q/q/ 
!MUS8Ø[[LJãI×I...


 1 %PDF-1.7
 2 %ÌÕÁÔÅØÐÄÆ
 3 9 0 obj
 4 << /Filter /FlateDecode /Length 122 >>
 5 stream
 6 >>  x^=Œ;Â@û=…/€yö®?‘¢-$êí-TÜ¿% xšâô йàËÓ(ÇUH„'3ñ¤q/² 
!M°U‡S8Ø[LJãI×0í·qù›N

 7 (×l&?­.@U å>“~¨j[ ¤§¼C8öW×OtåÅc!±
 8     endstream
 9 endobj
10 13 0 obj
11 << /Subtype /XML /Type /Metadata /Length 2016 >>
12 stream
13 id="W5M0MpCehiHzreSzNTczkc9d"?>xmlns:x="adobe:ns:meta/">xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#;>rdf:about="" 
xmlns:dc="http://purl.org/dc/elements/1.1/;>application/pdfxml:lang="x-default"/>xml:lang="x-default"/>xml:lang="x-default">tmprdf:about="" xmlns:pdfx="http://ns.adobe.com/pdfx/1.3/;>tmp | 
2018-09-17T10:36:11+02:00tmp2018-09-17 
10:36www.pragma-ade.comcontextgarden.net2018.09.13 
17:41tug.org1.0969305.3osx-64rdf:about="" 
xmlns:xmp="http://ns.adobe.com/xap/1.0/;>2018-09-17T10:36:11+02:00LuaTeX 
1.09 6930 + ConTeXt MkIV 2018.09.13 
17:412018-09-17T10:36:11+02:002018-09-17T10:36:11+02:00rdf:about="" 
xmlns:pdf="http://ns.adobe.com/pdf/1.3/;>LuaTeX-1.09Falserdf:about="" 
xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/;>uuid:b3de9df0-4961-b363-350b-5ad87c38575cuuid:05361f45-44fe-8816-3e28-0accb69e9eecend="w"?>

14 endstream
15 endobj
16 16 0 obj
?
tex error   > tex error on line 6 in file 
/Users/jjc/wrk/ctx/tmp.pdf: ! Interruption

 /

I would appreciate any help or advice.


--
Kind regards
Jacqui Coosner
Cell: 083-252-7483

___
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] Attempt to call a nil value

2018-09-08 Thread Lars
Thank you very much Wolfgang. You were a big help, as usual. It never 
came to my mind, that the Textadept lexer file /context.lua/ in my 
working directory could interfere with /mtxmrun/, which is located 
elsewhere. I should also have tried to process files from another 
directory instead of trying it from another PC. But since on my tablet 
PC I only have one single TeX directory, it didn't come to my mind to 
try another one. So again, thank you.


Cheers, Lars.

P. S.: From what I read so far you're a real TeX genius. It's always a 
pleasure to write with you.


P. P. S.: Some people really should learn from you, not only when it 
comes to TeX.



Am 08/09/2018 um 18:42 schrieb Wolfgang Schuster:
mtxrun loads the wrong lua file, while it should load mtx-context.lua 
it actually uses context.lua.


Since there is no context.lua in the distribution I guess context.lua 
is one of your files you put in the text directory, remove this file 
(or put it in a different folder) and ConTeXt should work again.


Wolfgang


Lars schrieb am 08.09.18 um 18:00:


Hello list,

since one of the last beta updates (now I have 2018.09.01) I can't 
use ConTeXt on my Win 10 32bit tablet anymore. I can't make PDFs 
because I get an error message. In fact, with CTX in my system path 
of course, even when I type the following into my command prompt, I 
get the same error:


mtxrun --script context

./context.lua:11: attempt to call a nil value (method 'add_rule')

This could have to do with the last adaption to Textadept 10. On my 
Win 10 x64 PC there is no problem. Any clues?


Cheers and thanks, Lars.



___
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] Attempt to call a nil value

2018-09-08 Thread Wolfgang Schuster
mtxrun loads the wrong lua file, while it should load mtx-context.lua it 
actually uses context.lua.


Since there is no context.lua in the distribution I guess context.lua is 
one of your files you put in the text directory, remove this file (or 
put it in a different folder) and ConTeXt should work again.


Wolfgang


Lars schrieb am 08.09.18 um 18:00:


Hello list,

since one of the last beta updates (now I have 2018.09.01) I can't use 
ConTeXt on my Win 10 32bit tablet anymore. I can't make PDFs because I 
get an error message. In fact, with CTX in my system path of course, 
even when I type the following into my command prompt, I get the same 
error:


mtxrun --script context

./context.lua:11: attempt to call a nil value (method 'add_rule')

This could have to do with the last adaption to Textadept 10. On my 
Win 10 x64 PC there is no problem. Any clues?


Cheers and thanks, Lars.



___
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] Attempt to call a nil value

2018-09-08 Thread Lars

Hello list,

since one of the last beta updates (now I have 2018.09.01) I can't use 
ConTeXt on my Win 10 32bit tablet anymore. I can't make PDFs because I 
get an error message. In fact, with CTX in my system path of course, 
even when I type the following into my command prompt, I get the same error:


mtxrun --script context

./context.lua:11: attempt to call a nil value (method 'add_rule')

This could have to do with the last adaption to Textadept 10. On my Win 
10 x64 PC there is no problem. Any clues?


Cheers and thanks, Lars.

___
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] ConTeXt ignores crop in some pdf graphics

2018-09-05 Thread Mari Voipio
Hello Pablo,

thank you for digging up all of that. What I found out today is that
while a graphic outputted from an old Corel (output e.g. pdf 1.3) has
all that extra whitespace, a graphic outputted from my newish Corel
2017 (pdf 1.7) seems to have  a working cropbox as does the old
graphic recropped with Acrobat as Hraban's Save As trick). I've
included an old graphic (fm.pdf), the same outputted today
(fm_corel_2017) and the old one after recropping it (I reset old
cropbox and cropped again) (fm_cropped), if somebody feels like
investigating further.

While the cropbox problem meant that I had to spend a few hours today
fixing problematic graphics in my big old file, the fact that output
from my current Corel works means that any future graphics will be
fine and I don't have to change my workflows. This reduces the problem
into the level of minor annoyance, assuming it can't be fixed.

Thank you everybody for your help,

Mari
On Wed, Sep 5, 2018 at 5:40 PM Pablo Rodriguez  wrote:
>
> On 09/04/2018 10:40 PM, Henning Hraban Ramm wrote:
> > [...]
> > Hans investigated and could trace my problem to an Acrobat bug (or at
> > least it doesn't adhere to the PDF specs): I had my logo exported from
> > Illustrator and changed the boxes in Acrobat Pro 9, then saved. But if
> > you don't "save as", Acrobat creates a XForm inside a page, but doesn't
> > set the boxes correctly for the page (CropBox missing, Artbox was what I
> > needed).
>
> Hi Hraban,
>
> the document sent by Mari (ex.pdf) contains the following information:
>
> 4 0 obj
>
> <<
>
>   /CropBox [ 265.961 392.102 329.315 445.535 ]
>
>   /Parent 2 0 R
>
>   /Contents 5 0 R
>
>   /BleedBox [ 265.961 392.102 329.315 445.535 ]
>
>   /MediaBox [ -9 -9 604.276 850.89 ]
>
>   /TrimBox [ 265.961 392.102 329.315 445.535 ]
>
>   /Resources <<
>
> /ProcSet [ /PDF ]
>
> /ExtGState <<
>
>   /GS6 6 0 R
>
> >>
>
>   >>
>
>   /Type /Page
>
> >>
>
> endobj
>
>
> I would say, that in the following sample:
>
> \starttext
>
> \externalfigure[ex.pdf][size=crop]
>
> \stoptext
>
>
> the option "size" doesn’t seem to work.
>
> Or is the original ex.pdf document flawed?
>
> 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
> ___


fm.pdf
Description: Adobe PDF document


fm_corel_2017.pdf
Description: Adobe PDF document


fm_cropped.pdf
Description: Adobe PDF document


fm_test.tex
Description: Binary data
___
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] ConTeXt ignores crop in some pdf graphics

2018-09-05 Thread luigi scarso
On Wed, Sep 5, 2018 at 4:37 PM Pablo Rodriguez  wrote:

> On 09/04/2018 10:40 PM, Henning Hraban Ramm wrote:
> > [...]
> > Hans investigated and could trace my problem to an Acrobat bug (or at
> > least it doesn't adhere to the PDF specs): I had my logo exported from
> > Illustrator and changed the boxes in Acrobat Pro 9, then saved. But if
> > you don't "save as", Acrobat creates a XForm inside a page, but doesn't
> > set the boxes correctly for the page (CropBox missing, Artbox was what I
> > needed).
>
> Hi Hraban,
>
> the document sent by Mari (ex.pdf) contains the following information:
>
> 4 0 obj
>
> <<
>
>   /CropBox [ 265.961 392.102 329.315 445.535 ]
>
>   /Parent 2 0 R
>
>   /Contents 5 0 R
>
>   /BleedBox [ 265.961 392.102 329.315 445.535 ]
>
>   /MediaBox [ -9 -9 604.276 850.89 ]
>
>   /TrimBox [ 265.961 392.102 329.315 445.535 ]
>
>   /Resources <<
>
> /ProcSet [ /PDF ]
>
> /ExtGState <<
>
>   /GS6 6 0 R
>
> >>
>
>   >>
>
>   /Type /Page
>
> >>
>
> endobj
>
>
> I would say, that in the following sample:
>
> \starttext
>
> \externalfigure[ex.pdf][size=crop]
>
> \stoptext
>
>
> the option "size" doesn’t seem to work.
>
> Or is the original ex.pdf document flawed?
>

we are working to extend luatex to manage these situations.


-- 
luigi
___
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] ConTeXt ignores crop in some pdf graphics

2018-09-05 Thread Pablo Rodriguez
On 09/04/2018 10:40 PM, Henning Hraban Ramm wrote:
> [...]
> Hans investigated and could trace my problem to an Acrobat bug (or at
> least it doesn't adhere to the PDF specs): I had my logo exported from
> Illustrator and changed the boxes in Acrobat Pro 9, then saved. But if
> you don't "save as", Acrobat creates a XForm inside a page, but doesn't
> set the boxes correctly for the page (CropBox missing, Artbox was what I
> needed).

Hi Hraban,

the document sent by Mari (ex.pdf) contains the following information:

4 0 obj

<<

  /CropBox [ 265.961 392.102 329.315 445.535 ]

  /Parent 2 0 R

  /Contents 5 0 R

  /BleedBox [ 265.961 392.102 329.315 445.535 ]

  /MediaBox [ -9 -9 604.276 850.89 ]

  /TrimBox [ 265.961 392.102 329.315 445.535 ]

  /Resources <<

/ProcSet [ /PDF ]

/ExtGState <<

  /GS6 6 0 R

>>

  >>

  /Type /Page

>>

endobj


I would say, that in the following sample:

\starttext

\externalfigure[ex.pdf][size=crop]

\stoptext


the option "size" doesn’t seem to work.

Or is the original ex.pdf document flawed?

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] Errors while processing xml file

2018-09-03 Thread Jan U. Hasecke
Hi all,

some time ago I started a project to learn more about xml processing.
I thought it would be nice to typeset texts from the German Text Archive.

So I setup an environment to do this.
https://github.com/juh2/tei-style-dta-context

It's a very poor project, because most of the code is taken from
https://github.com/ousia/from-pandoc-to-context

I started to get an idea how xml processing works. Now after some
upgrades of context I get an error message that confuses me,

It's in the attached zip file.

As you can see I had to type enter a few times, but the file finally
processes to the end.

The error message seems to point to commented lines, and I don't
understand this.

Do you have any hints?

juh
<>
___
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] Emacs + latest beta

2018-08-30 Thread Fabrice Couvreur
in modern fonts (second stage)
> > fonts   > 'fallback modern-designsize rm 12pt' is loaded
> > structure   > sectioning > chapter @ level 2 : 0.1 -> First chapter
> > metapost> initializing instance 'metafun:1' using format
> 'metafun'
> > and method 'default'
> > metapost> loading 'metafun' as
> >
> '/home/aragorn/context/tex/texmf-context/metapost/context/base/mpiv/metafun.mpiv'
> > using method 'default'
> > metapost> initializing number mode 'scaled'
> > open source > level 3, order 4, name
> >
> '/home/aragorn/context/tex/texmf-context/tex/context/sample/common/ward.tex'
> > close source> level 3, order 4, name
> >
> '/home/aragorn/context/tex/texmf-context/tex/context/sample/common/ward.tex'
> > backend > xmp > using file
> >
> '/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'
> > pages   > flushing realpage 1, userpage 1, subpage 1
> > close source> level 2, order 4, name '/home/aragorn/vladimir.tex'
> > close source> level 1, order 4, name
> >
> '/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
> >
> > mkiv lua stats  > used config file:
> selfautoparent:/texmf/web2c/texmfcnf.lua
> > mkiv lua stats  > used cache path:
> >
> /home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
> > mkiv lua stats  > resource resolver: loadtime 0.008 seconds, 1 scans with
> > scantime 0.000 seconds, 0 shared scans, 31 found files, scanned paths:
> > /home/aragorn/texmf
> > mkiv lua stats  > stored bytecode data: 437 modules (0.227 sec), 93
> tables
> > (0.015 sec), 530 chunks (0.241 sec)
> > mkiv lua stats  > traced context: maxstack: 1328, freed: 5, unreachable:
> > 1323
> > mkiv lua stats  > cleaned up reserved nodes: 58 nodes, 9 lists of 455
> > mkiv lua stats  > node memory usage: 2 glue, 2 kern, 2 penalty, 14
> > attribute, 50 glue_spec, 4 attribute_list, 2 temp, 2 user_defined
> > mkiv lua stats  > node list callback tasks: 8 unique task lists, 6
> > instances (re)created, 55 calls
> > mkiv lua stats  > synctex tracing: 2 referenced files, 5 files ignored, 3
> > objects flushed, logfile: vladimir.synctex
> > mkiv lua stats  > used backend: pdf (backend for directly generating pdf
> > output)
> > mkiv lua stats  > jobdata time: 0.001 seconds saving, 0.000 seconds
> loading
> > mkiv lua stats  > callbacks: internal: 177, file: 180, direct: 2, late:
> 2,
> > function 534, total: 895
> > mkiv lua stats  > loaded patterns: en::2, load time: 0.000
> > mkiv lua stats  > result saved in file: vladimir.pdf, compresslevel 3,
> > objectcompresslevel 3
> > mkiv lua stats  > loaded fonts: 4 files: latinmodern-math.otf,
> > lmroman10-bold.otf, lmroman10-regular.otf, lmroman12-regular.otf
> > mkiv lua stats  > font engine: otf 3.104, afm 1.513, tfm 1.000, 9
> > instances, 3 shared in backend, 3 common vectors, 0 common hashes, load
> > time 0.216 seconds
> > mkiv lua stats  > metapost: 0.001 seconds, loading: 0.017, execution:
> > 0.001, n: 1, average: 0.019, instances: 1, luacalls: 8, memory: 2.635 M
> > mkiv lua stats  > used platform: linux-64, type: unix, binary subtree:
> > texmf-linux-64
> > mkiv lua stats  > used engine: luatex version 1.08 with functionality
> level
> > 6731, banner: this is luatex, version 1.08.0 (tex live 2018)
> > mkiv lua stats  > control sequences: 46537 of 65536 + 10
> > mkiv lua stats  > lua properties: engine: lua 5.3, used memory: 81 MB
> (ctx:
> > 81 MB), hash type: lua, hash chars: min(64,40), symbol mask: utf (τεχ)
> > mkiv lua stats  > runtime: 0.538 seconds, 1 processed pages, 1 shipped
> > pages, 1.859 pages/second
> > mtx-context | run 2: luatex
> >
> --fmt="/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en"
> > --jobname="vladimir"
> >
> --lua="/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui"
> > --no-parse-first-line --c:currentrun=2 --c:fulljobname="./vladimir"
> > --c:input="./vladimir" --c:kindofrun=2 --c:maxnofruns=9 --c:purgeall
> > "cont-yes.mkiv"
> >
> > This is LuaTeX, Version 1.08.0 (TeX Live 2018)
> >  system commands enabled.
> >
> > resolvers   > trees > analyzing 'home:texmf'
> > open source > level 1, order 1,

Re: [NTG-context] Emacs + latest beta

2018-08-29 Thread Vladimir Lomov
ase/mkiv/cont-yes.mkiv'
> 
> mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
> mkiv lua stats  > used cache path:
> /home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
> mkiv lua stats  > resource resolver: loadtime 0.008 seconds, 1 scans with
> scantime 0.000 seconds, 0 shared scans, 31 found files, scanned paths:
> /home/aragorn/texmf
> mkiv lua stats  > stored bytecode data: 437 modules (0.227 sec), 93 tables
> (0.015 sec), 530 chunks (0.241 sec)
> mkiv lua stats  > traced context: maxstack: 1328, freed: 5, unreachable:
> 1323
> mkiv lua stats  > cleaned up reserved nodes: 58 nodes, 9 lists of 455
> mkiv lua stats  > node memory usage: 2 glue, 2 kern, 2 penalty, 14
> attribute, 50 glue_spec, 4 attribute_list, 2 temp, 2 user_defined
> mkiv lua stats  > node list callback tasks: 8 unique task lists, 6
> instances (re)created, 55 calls
> mkiv lua stats  > synctex tracing: 2 referenced files, 5 files ignored, 3
> objects flushed, logfile: vladimir.synctex
> mkiv lua stats  > used backend: pdf (backend for directly generating pdf
> output)
> mkiv lua stats  > jobdata time: 0.001 seconds saving, 0.000 seconds loading
> mkiv lua stats  > callbacks: internal: 177, file: 180, direct: 2, late: 2,
> function 534, total: 895
> mkiv lua stats  > loaded patterns: en::2, load time: 0.000
> mkiv lua stats  > result saved in file: vladimir.pdf, compresslevel 3,
> objectcompresslevel 3
> mkiv lua stats  > loaded fonts: 4 files: latinmodern-math.otf,
> lmroman10-bold.otf, lmroman10-regular.otf, lmroman12-regular.otf
> mkiv lua stats  > font engine: otf 3.104, afm 1.513, tfm 1.000, 9
> instances, 3 shared in backend, 3 common vectors, 0 common hashes, load
> time 0.216 seconds
> mkiv lua stats  > metapost: 0.001 seconds, loading: 0.017, execution:
> 0.001, n: 1, average: 0.019, instances: 1, luacalls: 8, memory: 2.635 M
> mkiv lua stats  > used platform: linux-64, type: unix, binary subtree:
> texmf-linux-64
> mkiv lua stats  > used engine: luatex version 1.08 with functionality level
> 6731, banner: this is luatex, version 1.08.0 (tex live 2018)
> mkiv lua stats  > control sequences: 46537 of 65536 + 10
> mkiv lua stats  > lua properties: engine: lua 5.3, used memory: 81 MB (ctx:
> 81 MB), hash type: lua, hash chars: min(64,40), symbol mask: utf (τεχ)
> mkiv lua stats  > runtime: 0.538 seconds, 1 processed pages, 1 shipped
> pages, 1.859 pages/second
> mtx-context | run 2: luatex
> --fmt="/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en"
> --jobname="vladimir"
> --lua="/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui"
> --no-parse-first-line --c:currentrun=2 --c:fulljobname="./vladimir"
> --c:input="./vladimir" --c:kindofrun=2 --c:maxnofruns=9 --c:purgeall
> "cont-yes.mkiv"
> 
> This is LuaTeX, Version 1.08.0 (TeX Live 2018)
>  system commands enabled.
> 
> resolvers   > trees > analyzing 'home:texmf'
> open source > level 1, order 1, name
> '/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
> system  >
> system  > ConTeXt  ver: 2018.08.25 10:04 MKIV beta  fmt: 2018.8.25
> int: english/english
> system  >
> system  > 'cont-new.mkiv' loaded
> open source > level 2, order 2, name
> '/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
> system  > beware: some patches loaded from cont-new.mkiv
> close source> level 2, order 2, name
> '/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
> system  > files > jobname 'vladimir', input './vladimir', result
> 'vladimir'
> fonts   > latin modern fonts are not preloaded
> languages   > language 'en' is active
> open source > level 2, order 3, name '/home/aragorn/vladimir.tex'
> system  > synctex functionality is enabled, expect 5-10 pct runtime
> overhead!
> fonts   > preloading latin modern fonts (second stage)
> fonts   > 'fallback modern-designsize rm 12pt' is loaded
> structure   > sectioning > chapter @ level 2 : 0.1 -> First chapter
> metapost> initializing instance 'metafun:1' using format 'metafun'
> and method 'default'
> metapost> loading 'metafun' as
> '/home/aragorn/context/tex/texmf-context/metapost/context/base/mpiv/metafun.mpiv'
> using method 'default'
> metapost> initializing number mode 'scaled'
> open source >

Re: [NTG-context] Emacs + latest beta

2018-08-29 Thread Fabrice Couvreur
erenced files, 5 files ignored, 3
objects flushed, logfile: vladimir.synctex
mkiv lua stats  > used backend: pdf (backend for directly generating pdf
output)
mkiv lua stats  > jobdata time: 0.001 seconds saving, 0.000 seconds loading
mkiv lua stats  > callbacks: internal: 177, file: 180, direct: 2, late: 2,
function 534, total: 895
mkiv lua stats  > loaded patterns: en::2, load time: 0.000
mkiv lua stats  > result saved in file: vladimir.pdf, compresslevel 3,
objectcompresslevel 3
mkiv lua stats  > loaded fonts: 4 files: latinmodern-math.otf,
lmroman10-bold.otf, lmroman10-regular.otf, lmroman12-regular.otf
mkiv lua stats  > font engine: otf 3.104, afm 1.513, tfm 1.000, 9
instances, 3 shared in backend, 3 common vectors, 0 common hashes, load
time 0.216 seconds
mkiv lua stats  > metapost: 0.001 seconds, loading: 0.017, execution:
0.001, n: 1, average: 0.019, instances: 1, luacalls: 8, memory: 2.635 M
mkiv lua stats  > used platform: linux-64, type: unix, binary subtree:
texmf-linux-64
mkiv lua stats  > used engine: luatex version 1.08 with functionality level
6731, banner: this is luatex, version 1.08.0 (tex live 2018)
mkiv lua stats  > control sequences: 46537 of 65536 + 10
mkiv lua stats  > lua properties: engine: lua 5.3, used memory: 81 MB (ctx:
81 MB), hash type: lua, hash chars: min(64,40), symbol mask: utf (τεχ)
mkiv lua stats  > runtime: 0.538 seconds, 1 processed pages, 1 shipped
pages, 1.859 pages/second
mtx-context | run 2: luatex
--fmt="/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en"
--jobname="vladimir"
--lua="/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui"
--no-parse-first-line --c:currentrun=2 --c:fulljobname="./vladimir"
--c:input="./vladimir" --c:kindofrun=2 --c:maxnofruns=9 --c:purgeall
"cont-yes.mkiv"

This is LuaTeX, Version 1.08.0 (TeX Live 2018)
 system commands enabled.

resolvers   > trees > analyzing 'home:texmf'
open source > level 1, order 1, name
'/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
system  >
system  > ConTeXt  ver: 2018.08.25 10:04 MKIV beta  fmt: 2018.8.25
int: english/english
system  >
system  > 'cont-new.mkiv' loaded
open source > level 2, order 2, name
'/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 2, order 2, name
'/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system  > files > jobname 'vladimir', input './vladimir', result
'vladimir'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 2, order 3, name '/home/aragorn/vladimir.tex'
system  > synctex functionality is enabled, expect 5-10 pct runtime
overhead!
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
structure   > sectioning > chapter @ level 2 : 0.1 -> First chapter
metapost> initializing instance 'metafun:1' using format 'metafun'
and method 'default'
metapost> loading 'metafun' as
'/home/aragorn/context/tex/texmf-context/metapost/context/base/mpiv/metafun.mpiv'
using method 'default'
metapost> initializing number mode 'scaled'
open source > level 3, order 4, name
'/home/aragorn/context/tex/texmf-context/tex/context/sample/common/ward.tex'
close source> level 3, order 4, name
'/home/aragorn/context/tex/texmf-context/tex/context/sample/common/ward.tex'
backend > xmp > using file
'/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'
pages   > flushing realpage 1, userpage 1, subpage 1
close source> level 2, order 4, name '/home/aragorn/vladimir.tex'
close source> level 1, order 4, name
'/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'

mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path:
/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.008 seconds, 1 scans with
scantime 0.001 seconds, 0 shared scans, 31 found files, scanned paths:
/home/aragorn/texmf
mkiv lua stats  > stored bytecode data: 437 modules (0.238 sec), 93 tables
(0.015 sec), 530 chunks (0.253 sec)
mkiv lua stats  > traced context: maxstack: 1328, freed: 5, unreachable:
1323
mkiv lua stats  > cleaned up reserved nodes: 58 nodes, 9 lists of 455
mkiv lua stats  > node memory usage: 2 glue, 2 kern, 2 penalty, 14
attribute, 50 glue_spec, 4 attribute_

Re: [NTG-context] Emacs + latest beta

2018-08-24 Thread Fabrice Couvreur
conds, 1 scans with scantime 0.000 seconds, 0 shared scans, 30 found files, scanned paths: /home/aragorn/texmf
mkiv lua stats  > stored bytecode data: 410 modules (0.427 sec), 93 tables (0.013 sec), 503 chunks (0.440 sec)
mkiv lua stats  > traced context: maxstack: 1291, freed: 5, unreachable: 1286
mkiv lua stats  > cleaned up reserved nodes: 58 nodes, 9 lists of 453
mkiv lua stats  > node memory usage: 2 glue, 2 kern, 2 penalty, 13 attribute, 50 glue_spec, 4 attribute_list, 2 temp, 2 user_defined
mkiv lua stats  > node list callback tasks: 7 unique task lists, 6 instances (re)created, 57 calls
mkiv lua stats  > synctex tracing: 2 referenced files, 5 files ignored, 3 objects flushed, logfile: vladimir.synctex
mkiv lua stats  > used backend: pdf (backend for directly generating pdf output)
mkiv lua stats  > jobdata time: 0.001 seconds saving, 0.001 seconds loading
mkiv lua stats  > callbacks: internal: 338, file: 162, direct: 0, late: 0, function 0, total: 500
mkiv lua stats  > randomizer: resumed with value 0.74088713095565
mkiv lua stats  > loaded patterns: en::2, load time: 0.000
mkiv lua stats  > result saved in file: vladimir.pdf, compresslevel 3, objectcompresslevel 3
mkiv lua stats  > loaded fonts: 4 files: latinmodern-math.otf, lmroman10-bold.otf, lmroman10-regular.otf, lmroman12-regular.otf
mkiv lua stats  > font engine: otf 3.103, afm 1.513, tfm 1.000, 6 instances, load time 0.140 seconds 
mkiv lua stats  > metapost processing time: 0.001 seconds, loading: 0.017, execution: 0.001, n: 1, average: 0.018, instances: 1, memory: 2.525 M
mkiv lua stats  > used platform: linux-64, type: unix, binary subtree: bin
mkiv lua stats  > used engine: luatex version 1.07 with functionality level 6686, banner: this is luatex, version 1.07.0 (tex live 2018)
mkiv lua stats  > control sequences: 46423 of 65536 + 10
mkiv lua stats  > lua properties: engine: lua 5.2, used memory: 151 MB (ctx: 151 MB), hash type: lua, hash chars: min(64,40), symbol mask: utf (τεχ)
mkiv lua stats  > runtime: 0.666 seconds, 1 processed pages, 1 shipped pages, 1.502 pages/second

___
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] Emacs + latest beta

2018-08-23 Thread Wolfgang Schuster
ats  > used cache path: 
/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.007 seconds, 1 scans 
with scantime 0.000 seconds, 0 shared scans, 31 found files, scanned 
paths: /home/aragorn/texmf
mkiv lua stats  > stored bytecode data: 437 modules (0.226 sec), 93 
tables (0.015 sec), 530 chunks (0.241 sec)
mkiv lua stats  > traced context: maxstack: 1328, freed: 5, 
unreachable: 1323

mkiv lua stats  > cleaned up reserved nodes: 58 nodes, 9 lists of 455
mkiv lua stats  > node memory usage: 2 glue, 2 kern, 2 penalty, 14 
attribute, 50 glue_spec, 4 attribute_list, 2 temp, 2 user_defined
mkiv lua stats  > node list callback tasks: 8 unique task lists, 6 
instances (re)created, 55 calls
mkiv lua stats  > used backend: pdf (backend for directly generating 
pdf output)mkiv lua stats  > jobdata time: 0.001 seconds saving, 0.000 
seconds loading
mkiv lua stats  > callbacks: internal: 179, file: 180, direct: 2, 
late: 1, function 529, total: 891

mkiv lua stats  > loaded patterns: en::2, load time: 0.000
mkiv lua stats  > result saved in file: pouf.pdf, compresslevel 3, 
objectcompresslevel 3
mkiv lua stats  > loaded fonts: 4 files: latinmodern-math.otf, 
lmroman10-bold.otf, lmroman10-regular.otf, lmroman12-regular.otf
mkiv lua stats  > font engine: otf 3.104, afm 1.513, tfm 1.000, 9 
instances, 3 shared in backend, 3 common vectors, 0 common hashes, 
load time 0.238 seconds
mkiv lua stats  > metapost: 0.001 seconds, loading: 0.018, execution: 
0.000, n: 1, average: 0.019, instances: 1, luacalls: 7, memory: 2.608 M
mkiv lua stats  > used platform: linux-64, type: unix, binary subtree: 
texmf-linux-64
mkiv lua stats  > used engine: luatex version 1.08 with functionality 
level 6731, banner: this is luatex, version 1.08.0 (tex live 2018)

mkiv lua stats  > control sequences: 46533 of 65536 + 10
mkiv lua stats  > lua properties: engine: lua 5.3, used memory: 61 MB 
(ctx: 61 MB), hash type: lua, hash chars: min(64,40), symbol mask: utf 
(τεχ)
mkiv lua stats  > runtime: 0.613 seconds, 1 processed pages, 1 shipped 
pages, 1.631 pages/second

mtx-context | fatal error: return code: 1

TeX Output exited abnormally with code 1 at Wed Aug 22 13:01:54


test.tex


\startusableMPgraphic{NumberHead}
draw outlinetext.f
 ("\bf\namedheadnumber{chapter}")
(withcolor "lightgray")
  ysized 50pt ;
\stopusableMPgraphic

\unexpanded\def\processMPheadnumber#1%
{\useMPgraphic{NumberHead}}

\setuphead
   [chapter]
[command=\HeadTitle,
headstyle=\ss,
numbercommand=\processMPheadnumber,
   ]


\unexpanded\def\HeadTitle#1#2%
{\framed
[frame=off,
 bottomframe=on,
width=broad,
 align={broad,nothyphenated,left}]
{#1\blank[nowhite]#2}}

  \starttext
\startchapter[title=First chapter]
\input ward
  \stopchapter
\stoptext

Thanks
Fabrice


___
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] Emacs + latest beta

2018-08-22 Thread Fabrice Couvreur
mkiv lua stats  > resource resolver: loadtime 0.007 seconds, 1 scans with
scantime 0.000 seconds, 0 shared scans, 31 found files, scanned paths:
/home/aragorn/texmf
mkiv lua stats  > stored bytecode data: 437 modules (0.226 sec), 93 tables
(0.015 sec), 530 chunks (0.241 sec)
mkiv lua stats  > traced context: maxstack: 1328, freed: 5, unreachable:
1323
mkiv lua stats  > cleaned up reserved nodes: 58 nodes, 9 lists of 455
mkiv lua stats  > node memory usage: 2 glue, 2 kern, 2 penalty, 14
attribute, 50 glue_spec, 4 attribute_list, 2 temp, 2 user_defined
mkiv lua stats  > node list callback tasks: 8 unique task lists, 6
instances (re)created, 55 calls
mkiv lua stats  > used backend: pdf (backend for directly generating pdf
output)mkiv lua stats  > jobdata time: 0.001 seconds saving, 0.000 seconds
loading
mkiv lua stats  > callbacks: internal: 179, file: 180, direct: 2, late: 1,
function 529, total: 891
mkiv lua stats  > loaded patterns: en::2, load time: 0.000
mkiv lua stats  > result saved in file: pouf.pdf, compresslevel 3,
objectcompresslevel 3
mkiv lua stats  > loaded fonts: 4 files: latinmodern-math.otf,
lmroman10-bold.otf, lmroman10-regular.otf, lmroman12-regular.otf
mkiv lua stats  > font engine: otf 3.104, afm 1.513, tfm 1.000, 9
instances, 3 shared in backend, 3 common vectors, 0 common hashes, load
time 0.238 seconds
mkiv lua stats  > metapost: 0.001 seconds, loading: 0.018, execution:
0.000, n: 1, average: 0.019, instances: 1, luacalls: 7, memory: 2.608 M
mkiv lua stats  > used platform: linux-64, type: unix, binary subtree:
texmf-linux-64
mkiv lua stats  > used engine: luatex version 1.08 with functionality level
6731, banner: this is luatex, version 1.08.0 (tex live 2018)
mkiv lua stats  > control sequences: 46533 of 65536 + 10
mkiv lua stats  > lua properties: engine: lua 5.3, used memory: 61 MB (ctx:
61 MB), hash type: lua, hash chars: min(64,40), symbol mask: utf (τεχ)
mkiv lua stats  > runtime: 0.613 seconds, 1 processed pages, 1 shipped
pages, 1.631 pages/second
mtx-context | fatal error: return code: 1

TeX Output exited abnormally with code 1 at Wed Aug 22 13:01:54


test.tex


\startusableMPgraphic{NumberHead}
 draw outlinetext.f
 ("\bf\namedheadnumber{chapter}")
 (withcolor "lightgray")
  ysized 50pt ;
\stopusableMPgraphic

\unexpanded\def\processMPheadnumber#1%
  {\useMPgraphic{NumberHead}}

\setuphead
   [chapter]
   [command=\HeadTitle,
headstyle=\ss,
numbercommand=\processMPheadnumber,
   ]


\unexpanded\def\HeadTitle#1#2%
  {\framed
[frame=off,
 bottomframe=on,
 width=broad,
 align={broad,nothyphenated,left}]
{#1\blank[nowhite]#2}}

  \starttext
  \startchapter[title=First chapter]
\input ward
  \stopchapter
  \stoptext

Thanks
Fabrice
___
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] Latest beta

2018-08-20 Thread Fabrice Couvreur
   ("\bf\namedheadnumber{chapter}")
 8  (withcolor "lightgray")
 9  ysized 50pt ;
10 >>  \stopusableMPgraphic
11
12 \unexpanded\def\processMPheadnumber#1%
13   {\useMPgraphic{NumberHead}}
14
15 \setuphead
16[chapter]
17[command=\HeadTitle,
18 headstyle=\ss,
19 numbercommand=\processMPheadnumber,
20]


pages   > flushing realpage 2, userpage 2
close source> level 2, order 3, name '/home/aragorn/Test.tex'
close source> level 1, order 3, name
'/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'

mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path:
/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.007 seconds, 1 scans with
scantime 0.001 seconds, 0 shared scans, 31 found files, scanned paths:
/home/aragorn/texmf
mkiv lua stats  > stored bytecode data: 437 modules (0.256 sec), 93 tables
(0.015 sec), 530 chunks (0.271 sec)
mkiv lua stats  > traced context: maxstack: 1328, freed: 5, unreachable:
1323
mkiv lua stats  > cleaned up reserved nodes: 58 nodes, 9 lists of 455
mkiv lua stats  > node memory usage: 2 glue, 2 kern, 2 penalty, 14
attribute, 50 glue_spec, 4 attribute_list, 2 temp, 2 user_defined
mkiv lua stats  > node list callback tasks: 8 unique task lists, 6
instances (re)created, 122 calls
mkiv lua stats  > used backend: pdf (backend for directly generating pdf
output)mkiv lua stats  > jobdata time: 0.001 seconds saving, 0.001 seconds
loading
mkiv lua stats  > callbacks: internal: 349, file: 219, direct: 2, late: 4,
function 612, total: 1186 (1186 per page)
mkiv lua stats  > loaded patterns: en::2, load time: 0.000
mkiv lua stats  > result saved in file: Test.pdf, compresslevel 3,
objectcompresslevel 3
mkiv lua stats  > loaded fonts: 5 files: latinmodern-math.otf,
lmroman10-bold.otf, lmroman10-regular.otf, lmroman12-bold.otf,
lmroman12-regular.otf
mkiv lua stats  > font engine: otf 3.104, afm 1.513, tfm 1.000, 11
instances, 4 shared in backend, 3 common vectors, 1 common hashes, load
time 0.226 seconds
mkiv lua stats  > metapost: 0.002 seconds, loading: 0.019, execution:
0.001, n: 3, average: 0.007, instances: 1, luacalls: 14, memory: 2.609 M
mkiv lua stats  > used platform: linux-64, type: unix, binary subtree:
texmf-linux-64
mkiv lua stats  > used engine: luatex version 1.08 with functionality level
6731, banner: this is luatex, version 1.08.0 (tex live 2018)
mkiv lua stats  > control sequences: 46548 of 65536 + 10
mkiv lua stats  > lua properties: engine: lua 5.3, used memory: 57 MB (ctx:
56 MB), hash type: lua, hash chars: min(64,40), symbol mask: utf (τεχ)
mkiv lua stats  > runtime: 0.675 seconds, 2 processed pages, 2 shipped
pages, 2.963 pages/second
mtx-context | fatal error: return code: 1

TeX Output exited abnormally with code 1 at Tue Aug 21 01:30:10
___
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] structures.lists.ordered empty in latest beta

2018-08-18 Thread Wolfgang Schuster
ndname=/Users/wolf/context/beta/tex/texmf-context/tex/context/base/mkiv/lang-exc.lua
 
fullname=/Users/wolf/context/beta/tex/texmf-context/tex/context/base/mkiv/lang-exc.lua
 usedmethod=database
system  >6: filename=lang-us.lua filetype=scripts 
foundname=/Users/wolf/context/beta/tex/texmf-context/tex/context/patterns/mkiv/lang-us.lua
 
fullname=/Users/wolf/context/beta/tex/texmf-context/tex/context/patterns/mkiv/lang-us.lua
 usedmethod=database
system  >7: filename=/Users/wolf/Dropbox/tex/test/test.tex 
foundname=/Users/wolf/Dropbox/tex/test/test.tex 
fullname=/Users/wolf/Dropbox/tex/test/test.tex usedmethod=direct
system  >8: filename=lmmonoltcond10-regular.otf filetype=otf 
format=otf 
foundname=/Users/wolf/context/beta/tex/texmf/fonts/opentype/public/lm/lmmonoltcond10-regular.otf
 
fullname=/Users/wolf/context/beta/tex/texmf/fonts/opentype/public/lm/lmmonoltcond10-regular.otf
 usedmethod=database
system  >9: filename=lm.lfg filetype=tex 
foundname=/Users/wolf/context/beta/tex/texmf-context/tex/context/fonts/mkiv/lm.lfg
 
fullname=/Users/wolf/context/beta/tex/texmf-context/tex/context/fonts/mkiv/lm.lfg
 usedmethod=database
system  >   10: filename=lmroman12-regular filetype=otf format=otf 
foundname=/Users/wolf/context/beta/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf
 
fullname=/Users/wolf/context/beta/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf
 usedmethod=database
system  >   11: filename=latinmodern-math.otf filetype=opentypefonts 
foundname=/Users/wolf/context/beta/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf
 
fullname=/Users/wolf/context/beta/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf
 usedmethod=database
system  >   12: filename=lmroman10-regular filetype=otf format=otf 
foundname=/Users/wolf/context/beta/tex/texmf/fonts/opentype/public/lm/lmroman10-regular.otf
 
fullname=/Users/wolf/context/beta/tex/texmf/fonts/opentype/public/lm/lmroman10-regular.otf
 usedmethod=database
system  >   13: filename=lpdf-pdx.xml filetype=tex 
foundname=/Users/wolf/context/beta/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml
 
fullname=/Users/wolf/context/beta/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml
 usedmethod=database

system  > stop used files


system  > start commandline options

system  > currentrun="3"
system  > fulljobname="./test.tex"
system  > input="./test.tex"
system  > kindofrun="2"
system  > maxnofruns="9"
system  > no-parse-first-line="true"

system  > stop commandline options


system  > start commandline files

system  >1: ./test.tex

system  > stop commandline files


modules > start used modules


modules > stop used modules


mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: 
/Users/wolf/context/beta/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.108 seconds, 1 scans with 
scantime 0.096 seconds, 0 shared scans, 13 found files, scanned paths: 
/Users/wolf/texmf
mkiv lua stats  > stored bytecode data: 437 modules (0.519 sec), 93 tables 
(0.025 sec), 530 chunks (0.544 sec)
mkiv lua stats  > traced context: maxstack: 1324, freed: 1, unreachable: 1323
mkiv lua stats  > cleaned up reserved nodes: 62 nodes, 9 lists of 455
mkiv lua stats  > node memory usage: 2 glue, 2 kern, 2 penalty, 17 attribute, 
50 glue_spec, 4 attribute_list, 2 temp, 2 user_defined, 2 pdf_literal
mkiv lua stats  > node list callback tasks: 8 unique task lists, 6 instances 
(re)created, 324 calls
mkiv lua stats  > used backend: pdf (backend for directly generating pdf output)
mkiv lua stats  > jobdata time: 0.005 seconds saving, 0.001 seconds loading
mkiv lua stats  > callbacks: internal: 688, file: 152, direct: 2, late: 20, 
function 795, total: 1657 (1657 per page)
mkiv lua stats  > randomizer: resumed with value 0.37914100335911
mkiv lua stats  > loaded patterns: en::2, load time: 0.000
mkiv lua stats  > result saved in file: test.pdf, compresslevel 3, 
objectcompresslevel 3
mkiv lua stats  > loaded fonts: 4 files: latinmodern-math.otf, 
lmmonoltcond10-regular.otf, lmroman10-regular.otf, lmroman12-regular.otf
mkiv lua stats  > font engine: otf 3.104, afm 1.513, tfm 1.000, 9 instances, 3 
shared in backend, 3 common vectors, 0 common hashes, load time nil
mkiv lua stats  > visualization time: 0.002 seconds
mkiv lua stats  > page group warning: transparencies are used but no 
pagecolormodel is set
mkiv lua stats  > used platform: osx-64, type: unix, binary subtree: 
texmf-osx-64
mkiv lua stats  > used engine: luatex version 1.08 with functi

Re: [NTG-context] fontloader fails with "bad argument #1 to 'for iterator"

2018-08-18 Thread Ulrike Fischer
Am Sat, 18 Aug 2018 13:47:32 +0200 schrieb Hans Hagen:

>> On the luaotfload tracker was a bug report that the loading of a
>> font failed if too many character variant were requested
>> 
>> https://github.com/lualatex/luaotfload/issues/424
>> 
>> I wanted to check if the problem still exist with a current
>> fontloader. Here (both context and latex) the loading of this fonts
>> fails even if no character variants at all are requested:
 
> What are character variants? Anyway, if it's "features" there is no 
> relation between choosing features and loading a font.

As far as I got it they are open type features to select variants of
characters and are used as any other open type feature:

;+cv01=0;+cv02=0;+cv03=0;+cv04=0;+cv05=0;+cv06=0;...

In the bug report the problem seemed to be that the user used so
many of this features that some string got too long. 

But due to the other error I couldn't look at it yet.


>> it is in the 07-iosevka-type-slab-2.0.0.zip.
> Hm, another of these N x M instance fonts generated from a common 
> source? I can catch the bad coverage table but it will never render okay.

Thanks. And I will forwared the warning ;-).

-- 
Ulrike Fischer 
https://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] fontloader fails with "bad argument #1 to 'for iterator"

2018-08-18 Thread Hans Hagen

On 8/18/2018 1:17 PM, Ulrike Fischer wrote:


On the luaotfload tracker was a bug report that the loading of a
font failed if too many character variant were requested

https://github.com/lualatex/luaotfload/issues/424

I wanted to check if the problem still exist with a current
fontloader. Here (both context and latex) the loading of this fonts
fails even if no character variants at all are requested:


What are character variants? Anyway, if it's "features" there is no 
relation between choosing features and loading a font.



\starttext

\font\x={file:iosevka-type-slab-regular.ttf}
\x

ablub
\stoptext


gives
...ext/tex/texmf-context/tex/context/base/mkiv/font-oup.lua:2137:
bad argument #1 to 'for iterator' (table expected, got nil)


The font can be get from

https://github.com/be5invis/Iosevka/releases

it is in the 07-iosevka-type-slab-2.0.0.zip.
Hm, another of these N x M instance fonts generated from a common 
source? I can catch the bad coverage table but it will never render okay.


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
___

[NTG-context] fontloader fails with "bad argument #1 to 'for iterator"

2018-08-18 Thread Ulrike Fischer

On the luaotfload tracker was a bug report that the loading of a
font failed if too many character variant were requested

https://github.com/lualatex/luaotfload/issues/424

I wanted to check if the problem still exist with a current
fontloader. Here (both context and latex) the loading of this fonts
fails even if no character variants at all are requested:

\starttext

\font\x={file:iosevka-type-slab-regular.ttf}
\x

ablub
\stoptext 


gives 
...ext/tex/texmf-context/tex/context/base/mkiv/font-oup.lua:2137:
bad argument #1 to 'for iterator' (table expected, got nil)


The font can be get from 

https://github.com/be5invis/Iosevka/releases

it is in the 07-iosevka-type-slab-2.0.0.zip.



-- 
Ulrike Fischer 
https://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] XML to ConTeXt: converting date attribute from ISO date

2018-08-15 Thread Hans Hagen

On 8/15/2018 12:27 PM, Mike O'Connor wrote:

G’Day,

Having a first go at converting TEI XML to ConTeXt.

Steep learning curve, but easier (for me) than XSLT, and first results 
were amazing.  Using 
http://www.pragma-ade.com/general/manuals/xml-mkiv.pdf as a guide.


Currently stuck on converting an ISO format date (eg. 1908-01-10) into 
something more readable (eg. 10 January 1908) in the output.  I presume 
I should create a function (?luacode) that can take any ISO value and 
output the readable form.  The following works but seems to me inefficient.


Grateful for any pointers.

Mike

Here is my MWE:

\startbuffer[demo]

     
         
             
                 
                     type="divDate">10.I.08

                 
                 
19 Mar '08
                 
             
         
     

\stopbuffer

\startxmlsetups xml:initialize
\xmlsetsetup{#1}{date}{xml:date}
\stopxmlsetups
\xmlregistersetup{xml:initialize}

\startxmlsetups xml:date
\xmldoifelse {#1}{.[@type='divDate']} {
\def\docdate{\ctxlua{
local tyear = string.sub('\xmlatt{#1}{when-iso}',1,4)
local tmonth = string.sub('\xmlatt{#1}{when-iso}',6,7)
local tday = string.sub('\xmlatt{#1}{when-iso}',9,10)
context.date{d = tday, m = tmonth, y = tyear}
}}
\docdate[day,month,year] = Document Date \par
     } {
\def\docdate{\ctxlua{
local tyear = string.sub('\xmlatt{#1}{when-iso}',1,4)
local tmonth = string.sub('\xmlatt{#1}{when-iso}',6,7)
local tday = string.sub('\xmlatt{#1}{when-iso}',9,10)
context.date{d = tday, m = tmonth, y = tyear}
}}
\docdate[day,month,year] = Event Date\par
}
\stopxmlsetups

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

Can be wikified ...

\startluacode
function xml.finalizers.tex.MyDate(e,what,how)
local t = string.split(e[1].at[what],"-")
context.date(
{ y = t[1], m = t[2], d = t[3] },
{ how }
)
end
\stopluacode

\startxmlsetups xml:date

    \xmldoifelse {#1}{.[@type='divDate']} {
\xmlfilter{#1}{./MyDate("when-iso","day,month,year")}\
Document Date \par
} {
\xmlfilter{#1}{./MyDate("when-iso","day,month,year")}\
Event Date\par

}
\stopxmlsetups

-
  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] XML to ConTeXt: converting date attribute from ISO date

2018-08-15 Thread Mike O'Connor
G’Day,

Having a first go at converting TEI XML to ConTeXt.  

Steep learning curve, but easier (for me) than XSLT, and first results were 
amazing.  Using http://www.pragma-ade.com/general/manuals/xml-mkiv.pdf 
<http://www.pragma-ade.com/general/manuals/xml-mkiv.pdf> as a guide.

Currently stuck on converting an ISO format date (eg. 1908-01-10) into 
something more readable (eg. 10 January 1908) in the output.  I presume I 
should create a function (?luacode) that can take any ISO value and output the 
readable form.  The following works but seems to me inefficient.

Grateful for any pointers.

Mike

Here is my MWE:

\startbuffer[demo]





10.I.08


19 Mar 
'08





\stopbuffer

\startxmlsetups xml:initialize
\xmlsetsetup{#1}{date}{xml:date}
\stopxmlsetups

\xmlregistersetup{xml:initialize}

\startxmlsetups xml:date

\xmldoifelse {#1}{.[@type='divDate']} {
\def\docdate{\ctxlua{
local tyear = string.sub('\xmlatt{#1}{when-iso}',1,4)
local tmonth = string.sub('\xmlatt{#1}{when-iso}',6,7)
local tday = string.sub('\xmlatt{#1}{when-iso}',9,10)
context.date{d = tday, m = tmonth, y = tyear}
}}

\docdate[day,month,year] = Document Date \par
} {
\def\docdate{\ctxlua{
local tyear = string.sub('\xmlatt{#1}{when-iso}',1,4)
local tmonth = string.sub('\xmlatt{#1}{when-iso}',6,7)
local tday = string.sub('\xmlatt{#1}{when-iso}',9,10)
context.date{d = tday, m = tmonth, y = tyear}
}}

\docdate[day,month,year] = Event Date\par
}
\stopxmlsetups

\starttext
\xmlprocessbuffer{main}{demo}{}
\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
___

Re: [NTG-context] embedded sounds aren’t played

2018-08-14 Thread Hans Hagen

On 8/14/2018 5:38 PM, Pablo Rodriguez wrote:

Dear list,

this is sounds-001.tex from the examples:

 \definerenderingwindow
   [example]
   [width=0pt,height=0pt,frame=off]

 \setupinteraction[state=start]

 \useexternalrendering
   [mysound]
   [audio/mpeg] % audio/x-mp3
   [akkerman.mp3]
   [embed]

 \definereference [StartSoundTrack] [StartRendering{mysound}]
 \definereference [StopSoundTrack]  [StopRendering{mysound}]

 \definelayer[resources][width=\paperwidth,height=\paperheight]

 \setupbackgrounds[page][background=resources]

 \starttext
 \setlayer[resources]{\placerenderingwindow[example][mysound]}
 \startTEXpage
 \button{start}[StartSoundTrack]
 \button{stop}[StopSoundTrack]
 \stopTEXpage
 \startTEXpage
 \button{start}[StartSoundTrack]
 \button{stop}[StopSoundTrack]
 \stopTEXpage
 \stoptext

I added the option to embed the file. I’m attaching the result.

As I cannot check it myself with Acrobat for Linux (it seems to lack a
player for MP3 files), I asked at the Spanish TeX mailing list whether
they can play the MP3 file embedded in the PDF file.


I have no clue. But these interactive media features in pdf are such a 
mess. Embedding a simple sound file or video has become a pain and 
changed over time. I think that the modern way is to create a bunch of 
useless objects, embed a shockwave (soon obsolete flash) player etc etc 
and who knows what in a few years.


While all we want is to embed a sound file (afaik the old easy ways are 
obsolete).


One can only use acrobat to check. My most recent version is 10.1 and 
i'm not going to subscribe to some lock-in pro version for 20 euro per 
month in order to check if code still works. Having the file in the sam 
epaths seems to work so maybe something is missing. One problem i 
remember is that when one adds too many key/values one suddenly gets 
sounds mentioned in side bars and so.


If you need it you can spend some time on deciphering the latest spec 
and tell me what is missing.



A MacOS X user (with Acrobat 9.5) told me that the program reports that
the file "akkerman.mp3" is missing. Although the file is indeed
embedded, the /Filespec points to the external file.

Decompressing the PDF file, I see that there are two similar objects:


\nopdfcompression save you that step



 8 0 obj
 <<
   /EF <<
 /F 7 0 R
   >>
   /F (akkerman.mp3)
   /Type /Filespec
   /UF
(\376\377\000a\000k\000k\000e\000r\000m\000a\000n\000.\000m\000p\0003)
 >>
 endobj

 10 0 obj
 <<
   /EF 8 0 R
   /F (akkerman.mp3)
   /Type /Filespec
 >>
 endobj

This object contains a strange dictionary (an indirect reference to the
same object it contains it?):

 13 0 obj
 <<
   /Type /Annot
   /A <<
 /AN 13 0 R
 /OP 0
 /R 12 0 R
 /S /Rendition
   >>
   /Border [ 0 0 0 ]
   /P 14 0 R
   /Subtype /Screen
   /Rect [ 0 14.416 0 14.416 ]
 >>
 endobj

I mean, the object already exists:

 15 0 obj
 <<
   /AN 13 0 R
   /OP 0
   /R 12 0 R
   /S /Rendition
 >>
 endobj

Could anyone tell me what I’m doing wrong so that the embedded file
isn’t played?

Many thanks for your help,

Pablo



___
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] embedded sounds aren’t played

2018-08-14 Thread Pablo Rodriguez
Dear list,

this is sounds-001.tex from the examples:

\definerenderingwindow
  [example]
  [width=0pt,height=0pt,frame=off]

\setupinteraction[state=start]

\useexternalrendering
  [mysound]
  [audio/mpeg] % audio/x-mp3
  [akkerman.mp3]
  [embed]

\definereference [StartSoundTrack] [StartRendering{mysound}]
\definereference [StopSoundTrack]  [StopRendering{mysound}]

\definelayer[resources][width=\paperwidth,height=\paperheight]

\setupbackgrounds[page][background=resources]

\starttext
\setlayer[resources]{\placerenderingwindow[example][mysound]}
\startTEXpage
\button{start}[StartSoundTrack]
\button{stop}[StopSoundTrack]
\stopTEXpage
\startTEXpage
\button{start}[StartSoundTrack]
\button{stop}[StopSoundTrack]
\stopTEXpage
\stoptext

I added the option to embed the file. I’m attaching the result.

As I cannot check it myself with Acrobat for Linux (it seems to lack a
player for MP3 files), I asked at the Spanish TeX mailing list whether
they can play the MP3 file embedded in the PDF file.

A MacOS X user (with Acrobat 9.5) told me that the program reports that
the file "akkerman.mp3" is missing. Although the file is indeed
embedded, the /Filespec points to the external file.

Decompressing the PDF file, I see that there are two similar objects:

8 0 obj
<<
  /EF <<
/F 7 0 R
  >>
      /F (akkerman.mp3)
  /Type /Filespec
  /UF
(\376\377\000a\000k\000k\000e\000r\000m\000a\000n\000.\000m\000p\0003)
>>
endobj

10 0 obj
<<
  /EF 8 0 R
  /F (akkerman.mp3)
  /Type /Filespec
>>
endobj

This object contains a strange dictionary (an indirect reference to the
same object it contains it?):

13 0 obj
<<
  /Type /Annot
  /A <<
/AN 13 0 R
/OP 0
/R 12 0 R
/S /Rendition
  >>
  /Border [ 0 0 0 ]
  /P 14 0 R
  /Subtype /Screen
  /Rect [ 0 14.416 0 14.416 ]
>>
endobj

I mean, the object already exists:

15 0 obj
<<
  /AN 13 0 R
  /OP 0
  /R 12 0 R
  /S /Rendition
>>
endobj

Could anyone tell me what I’m doing wrong so that the embedded file
isn’t played?

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk


mediaclip-sound.pdf
Description: Adobe PDF document
___
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] How can I remove a blank leading line from a buffer

2018-08-13 Thread Rik Kabel

On 8/13/2018 13:46, Wolfgang Schuster wrote:


\starttext

\BeforePar{\dontleavehmode\llap{? }}\GotoPar

\input knuth

\startnarrower

\BeforePar{\dontleavehmode\llap{? }}\GotoPar

\input knuth

\stopnarrower

\stoptext

Wolfgang


I am applying it incorrectly, or it does not work with the buffers 
created by \grabbufferdata:


   \setupwhitespace[none]
   \setupindenting[none]
   \starttexdefinition unexpanded startBufTest
  \bgroup
  \dosingleempty\dostartBufTest
   \stoptexdefinition
   \starttexdefinition dostartBufTest [#SETUPS]
  \getrawparameters[BufTest][xx=yy,#SETUPS]
  \grabbufferdata[TestBuffer][startBufTest][stopBufTest]
   \stoptexdefinition
   \starttexdefinition stopBufTest
  \startnarrower[left,right]
  \startparagraph
    \BeforePar{\dontleavehmode\llap{? }}\GotoPar
    \inlinebuffer[TestBuffer]
  \stopparagraph
  \stopnarrower
  \egroup
   \stoptexdefinition

   \starttext

   \startBufTest
  Buffer without blank lines.
   \stopBufTest

   \startBufTest

  Buffer with blank lines.

   \stopBufTest

   \startBufTest[key=value]

  Buffer with \type{[key=value]}.

   \stopBufTest

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

Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-13 Thread Rik Kabel

On 8/13/2018 03:01, Hans Hagen wrote:

On 8/13/2018 5:18 AM, Rik Kabel wrote:

%% How can one remove blank lines at the start of a buffer so that
%%   commands that grab a buffer can be used in the same way as, for
%%   example, \startparagraph...\stopparagraph, which allow blank
%%   lines around the content?
%%
%% The problem appears when an optional argument is allowed but none
%%   is provided. Adding \relax does not help; adding empty brackets
%%   does. I see no way to distinguish between a buffer without
%%   leading blank lines and a buffer that was created when brackets
%%   are provided.
%%
%% \inlinebuffer handles the leading blank lines when there is
%%   nothing prepended, but I need to prepend. (It also handles the
%%   unwanted trailing line, but that is not an issue here).
%%
%% How can I unpack the buffer, apply the equivalent functions of
%%   ignorespaspaces and removeunwantedspaces to it, and repack it?
%%   The buffer may contain internal blank lines and macros, and
%%   those should be retained. Or, is there already a function to
%%   strip a buffer in the manner that string.strip does a string?

\setupwhitespace[none]
\setupindenting[none]
\define\Mark{\color[middlegray]{\itb¿\ }}
\define\First{nothing yet}
\define\Arg{nothing yet}
\setuplanguage[en][spacing=packed]

\starttexdefinition unexpanded startBufTest
   \bgroup
   \dosingleempty\dostartBufTest
\stoptexdefinition

\starttexdefinition dostartBufTest [#SETUPS]
   \doifsomethingelse{#{SETUPS}}
 {\define\Arg{yes}}
 {\define\Arg{no}}
   \iffirstargument
 \define\First{yes}
   \else
 \define\First{no}
   \fi
   \relax
   \getrawparameters[BufTest][xx=yy,#SETUPS]
   \grabbufferdata[TestBuffer][startBufTest][stopBufTest]
\stoptexdefinition

\starttexdefinition stopBufTest

   \startparagraph

 \dontleavehmode\llap{\Mark}\inlinebuffer[TestBuffer]
 \ (first: \First, arg: \Arg)

   \stopparagraph

   \egroup
\stoptexdefinition

\starttext

\startparagraph

   A starting paragraph.

\stopparagraph

\startBufTest
   Buffer without blank lines.
\stopBufTest

\startparagraph

   An intervening paragraph.

\stopparagraph

\startBufTest

   Buffer with blank lines.

\stopBufTest

\startparagraph

   An intervening paragraph.

\stopparagraph

\startBufTest\relax

   Buffer with \tex{relax}.

\stopBufTest

\startparagraph

   An intervening paragraph.

\stopparagraph

\startBufTest[]

   Buffer with \type{[]}.

\stopBufTest

\startparagraph

   An intervening paragraph.

\stopparagraph

\startBufTest[key=value]

   Buffer with \type{[key=value]}.

\stopBufTest

\startparagraph

   A closing paragraph.

\stopparagraph

\stoptext


  \startparagraph

% \dontleavehmode\llap{\Mark}\inlinebuffer[TestBuffer]
% \ (first: \First, arg: \Arg)

    \margintext{\Mark}

    \setupparagraphintro[first][(first: \First, arg: \Arg)]
   %\setupparagraphintro[next][(first: \First, arg: \Arg)]

    \getbuffer[TestBuffer]

  \stopparagraph 


Hans,

That works for the over-simplified case here, but fails in practice. For 
a \startnarrower[left] paragraph, the mark is still in the main margin, 
not the 'margin' of the narrowed paragraph. Also, the placement of the 
text in the margin is wrong and not easily controlled as with \llap and 
\rlap. The code started out more like:


   \define\Mark{\color[middlegray]{\hskip.6cm\itb¿\ }}
   \setwidthof{\Mark}\to\MarkWidth
   ...
   \starttexdefinition stopBufTest
  \startluacode
   buffers.prepend("TestBuffer","\\dontleavehmode\\llap{\\Mark}")
  \stopluacode
  \setupnarrower[left=\MarkWidth]
  \startnarrower[left,right]
  \startparagraph
    \inlinebuffer[TestBuffer]
  \stopparagraph
  \stopnarrower
  \egroup
   \stoptexdefinition


So I am still looking for a way to do this. Meanwhile I am trying to 
understand Aditya's examples.


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

Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-13 Thread Hans Hagen

On 8/13/2018 5:18 AM, Rik Kabel wrote:

%% How can one remove blank lines at the start of a buffer so that
%%   commands that grab a buffer can be used in the same way as, for
%%   example, \startparagraph...\stopparagraph, which allow blank
%%   lines around the content?
%%
%% The problem appears when an optional argument is allowed but none
%%   is provided. Adding \relax does not help; adding empty brackets
%%   does. I see no way to distinguish between a buffer without
%%   leading blank lines and a buffer that was created when brackets
%%   are provided.
%%
%% \inlinebuffer handles the leading blank lines when there is
%%   nothing prepended, but I need to prepend. (It also handles the
%%   unwanted trailing line, but that is not an issue here).
%%
%% How can I unpack the buffer, apply the equivalent functions of
%%   ignorespaspaces and removeunwantedspaces to it, and repack it?
%%   The buffer may contain internal blank lines and macros, and
%%   those should be retained. Or, is there already a function to
%%   strip a buffer in the manner that string.strip does a string?

\setupwhitespace[none]
\setupindenting[none]
\define\Mark{\color[middlegray]{\itb¿\ }}
\define\First{nothing yet}
\define\Arg{nothing yet}
\setuplanguage[en][spacing=packed]

\starttexdefinition unexpanded startBufTest
   \bgroup
   \dosingleempty\dostartBufTest
\stoptexdefinition

\starttexdefinition dostartBufTest [#SETUPS]
   \doifsomethingelse{#{SETUPS}}
     {\define\Arg{yes}}
     {\define\Arg{no}}
   \iffirstargument
     \define\First{yes}
   \else
     \define\First{no}
   \fi
   \relax
   \getrawparameters[BufTest][xx=yy,#SETUPS]
   \grabbufferdata[TestBuffer][startBufTest][stopBufTest]
\stoptexdefinition

\starttexdefinition stopBufTest

   \startparagraph

     \dontleavehmode\llap{\Mark}\inlinebuffer[TestBuffer]
     \ (first: \First, arg: \Arg)

   \stopparagraph

   \egroup
\stoptexdefinition

\starttext

\startparagraph

   A starting paragraph.

\stopparagraph

\startBufTest
   Buffer without blank lines.
\stopBufTest

\startparagraph

   An intervening paragraph.

\stopparagraph

\startBufTest

   Buffer with blank lines.

\stopBufTest

\startparagraph

   An intervening paragraph.

\stopparagraph

\startBufTest\relax

   Buffer with \tex{relax}.

\stopBufTest

\startparagraph

   An intervening paragraph.

\stopparagraph

\startBufTest[]

   Buffer with \type{[]}.

\stopBufTest

\startparagraph

   An intervening paragraph.

\stopparagraph

\startBufTest[key=value]

   Buffer with \type{[key=value]}.

\stopBufTest

\startparagraph

   A closing paragraph.

\stopparagraph

\stoptext


  \startparagraph

% \dontleavehmode\llap{\Mark}\inlinebuffer[TestBuffer]
% \ (first: \First, arg: \Arg)

\margintext{\Mark}

\setupparagraphintro[first][(first: \First, arg: \Arg)]
   %\setupparagraphintro[next][(first: \First, arg: \Arg)]

\getbuffer[TestBuffer]

  \stopparagraph
-
  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] How can I remove a blank leading line from a buffer

2018-08-12 Thread Henri Menke



On 13/08/18 15:18, Rik Kabel wrote:

%% How can one remove blank lines at the start of a buffer so that
%%   commands that grab a buffer can be used in the same way as, for
%%   example, \startparagraph...\stopparagraph, which allow blank
%%   lines around the content?
%%
%% The problem appears when an optional argument is allowed but none
%%   is provided. Adding \relax does not help; adding empty brackets
%%   does. I see no way to distinguish between a buffer without
%%   leading blank lines and a buffer that was created when brackets
%%   are provided.
%%
%% \inlinebuffer handles the leading blank lines when there is
%%   nothing prepended, but I need to prepend. (It also handles the
%%   unwanted trailing line, but that is not an issue here).
%%
%% How can I unpack the buffer, apply the equivalent functions of
%%   ignorespaspaces and removeunwantedspaces to it, and repack it?
%%   The buffer may contain internal blank lines and macros, and
%%   those should be retained. Or, is there already a function to
%%   strip a buffer in the manner that string.strip does a string?

\setupwhitespace[none]
\setupindenting[none]
\define\Mark{\color[middlegray]{\itb¿\ }}
\define\First{nothing yet}
\define\Arg{nothing yet}
\setuplanguage[en][spacing=packed]

\starttexdefinition unexpanded startBufTest
   \bgroup
   \dosingleempty\dostartBufTest
\stoptexdefinition

\starttexdefinition dostartBufTest [#SETUPS]
   \doifsomethingelse{#{SETUPS}}
     {\define\Arg{yes}}
     {\define\Arg{no}}
   \iffirstargument
     \define\First{yes}
   \else
     \define\First{no}
   \fi
   \relax
   \getrawparameters[BufTest][xx=yy,#SETUPS]
   \grabbufferdata[TestBuffer][startBufTest][stopBufTest]
\stoptexdefinition

\starttexdefinition stopBufTest

   \startparagraph



% Ignore first \par
\def\par{\let\par\normalpar}


     \dontleavehmode\llap{\Mark}\inlinebuffer[TestBuffer]
     \ (first: \First, arg: \Arg)

   \stopparagraph

   \egroup
\stoptexdefinition

\starttext

\startparagraph

   A starting paragraph.

\stopparagraph

\startBufTest
   Buffer without blank lines.
\stopBufTest

\startparagraph

   An intervening paragraph.

\stopparagraph

\startBufTest

   Buffer with blank lines.

\stopBufTest

\startparagraph

   An intervening paragraph.

\stopparagraph

\startBufTest\relax

   Buffer with \tex{relax}.

\stopBufTest

\startparagraph

   An intervening paragraph.

\stopparagraph

\startBufTest[]

   Buffer with \type{[]}.

\stopBufTest

\startparagraph

   An intervening paragraph.

\stopparagraph

\startBufTest[key=value]

   Buffer with \type{[key=value]}.

\stopBufTest

\startparagraph

   A closing paragraph.

\stopparagraph

\stoptext

\stopmode

%% --
%% Rik Kabel

___ 

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] How can I remove a blank leading line from a buffer

2018-08-12 Thread Aditya Mahajan

On Sun, 12 Aug 2018, Rik Kabel wrote:


%% How can one remove blank lines at the start of a buffer so that
%%   commands that grab a buffer can be used in the same way as, for
%%   example, \startparagraph...\stopparagraph, which allow blank
%%   lines around the content?
%%
%% The problem appears when an optional argument is allowed but none
%%   is provided. Adding \relax does not help; adding empty brackets
%%   does. I see no way to distinguish between a buffer without
%%   leading blank lines and a buffer that was created when brackets
%%   are provided.
%%
%% \inlinebuffer handles the leading blank lines when there is
%%   nothing prepended, but I need to prepend. (It also handles the
%%   unwanted trailing line, but that is not an issue here).
%%
%% How can I unpack the buffer, apply the equivalent functions of
%%   ignorespaspaces and removeunwantedspaces to it, and repack it?
%%   The buffer may contain internal blank lines and macros, and
%%   those should be retained. Or, is there already a function to
%%   strip a buffer in the manner that string.strip does a string?

\setupwhitespace[none]
\setupindenting[none]
\define\Mark{\color[middlegray]{\itb¿\ }}
\define\First{nothing yet}
\define\Arg{nothing yet}
\setuplanguage[en][spacing=packed]

\starttexdefinition unexpanded startBufTest
  \bgroup
  \dosingleempty\dostartBufTest
\stoptexdefinition

\starttexdefinition dostartBufTest [#SETUPS]
  \doifsomethingelse{#{SETUPS}}
{\define\Arg{yes}}
{\define\Arg{no}}
  \iffirstargument
\define\First{yes}
  \else
\define\First{no}
  \fi
  \relax
  \getrawparameters[BufTest][xx=yy,#SETUPS]
  \grabbufferdata[TestBuffer][startBufTest][stopBufTest]
\stoptexdefinition

\starttexdefinition stopBufTest

  \startparagraph

\dontleavehmode\llap{\Mark}\inlinebuffer[TestBuffer]
\ (first: \First, arg: \Arg)

  \stopparagraph

  \egroup
\stoptexdefinition

\starttext

\startparagraph

  A starting paragraph.

\stopparagraph

\startBufTest
  Buffer without blank lines.
\stopBufTest

\startparagraph

  An intervening paragraph.

\stopparagraph

\startBufTest

  Buffer with blank lines.

\stopBufTest

\startparagraph

  An intervening paragraph.

\stopparagraph

\startBufTest\relax

  Buffer with \tex{relax}.

\stopBufTest

\startparagraph

  An intervening paragraph.

\stopparagraph

\startBufTest[]

  Buffer with \type{[]}.

\stopBufTest

\startparagraph

  An intervening paragraph.

\stopparagraph

\startBufTest[key=value]

  Buffer with \type{[key=value]}.

\stopBufTest

\startparagraph

  A closing paragraph.

\stopparagraph

\stoptext

\stopmode


Perhaps \ignorespaces might work, but I often find that the conceptually 
simplest solution is to post-process the buffer at the lua end. See

http://wiki.contextgarden.net/Programming_in_LuaTeX#Manipulating_verbatim_text
for an example.

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] How can I remove a blank leading line from a buffer

2018-08-12 Thread Rik Kabel

%% How can one remove blank lines at the start of a buffer so that
%%   commands that grab a buffer can be used in the same way as, for
%%   example, \startparagraph...\stopparagraph, which allow blank
%%   lines around the content?
%%
%% The problem appears when an optional argument is allowed but none
%%   is provided. Adding \relax does not help; adding empty brackets
%%   does. I see no way to distinguish between a buffer without
%%   leading blank lines and a buffer that was created when brackets
%%   are provided.
%%
%% \inlinebuffer handles the leading blank lines when there is
%%   nothing prepended, but I need to prepend. (It also handles the
%%   unwanted trailing line, but that is not an issue here).
%%
%% How can I unpack the buffer, apply the equivalent functions of
%%   ignorespaspaces and removeunwantedspaces to it, and repack it?
%%   The buffer may contain internal blank lines and macros, and
%%   those should be retained. Or, is there already a function to
%%   strip a buffer in the manner that string.strip does a string?

\setupwhitespace[none]
\setupindenting[none]
\define\Mark{\color[middlegray]{\itb¿\ }}
\define\First{nothing yet}
\define\Arg{nothing yet}
\setuplanguage[en][spacing=packed]

\starttexdefinition unexpanded startBufTest
  \bgroup
  \dosingleempty\dostartBufTest
\stoptexdefinition

\starttexdefinition dostartBufTest [#SETUPS]
  \doifsomethingelse{#{SETUPS}}
{\define\Arg{yes}}
{\define\Arg{no}}
  \iffirstargument
\define\First{yes}
  \else
\define\First{no}
  \fi
  \relax
  \getrawparameters[BufTest][xx=yy,#SETUPS]
  \grabbufferdata[TestBuffer][startBufTest][stopBufTest]
\stoptexdefinition

\starttexdefinition stopBufTest

  \startparagraph

\dontleavehmode\llap{\Mark}\inlinebuffer[TestBuffer]
\ (first: \First, arg: \Arg)

  \stopparagraph

  \egroup
\stoptexdefinition

\starttext

\startparagraph

  A starting paragraph.

\stopparagraph

\startBufTest
  Buffer without blank lines.
\stopBufTest

\startparagraph

  An intervening paragraph.

\stopparagraph

\startBufTest

  Buffer with blank lines.

\stopBufTest

\startparagraph

  An intervening paragraph.

\stopparagraph

\startBufTest\relax

  Buffer with \tex{relax}.

\stopBufTest

\startparagraph

  An intervening paragraph.

\stopparagraph

\startBufTest[]

  Buffer with \type{[]}.

\stopBufTest

\startparagraph

  An intervening paragraph.

\stopparagraph

\startBufTest[key=value]

  Buffer with \type{[key=value]}.

\stopBufTest

\startparagraph

  A closing paragraph.

\stopparagraph

\stoptext

\stopmode

%% --
%% Rik Kabel

___
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] stix2-mathscr with ConTeXt

2018-08-09 Thread Wolfgang Schuster

You can find the values for the stylealternative key in stix-two-math.lfg.


\setupbodyfont[stixtwo]

\starttext

\m{\mathscript C}

\setupmathematics[stylealternative=calligraphic]

\m{\mathscript C}

\stoptext


Wolfgang


Fabrice Couvreur schrieb am 10.08.18 um 02:27:

Hello,
Is it possible to get this type of letter with ConTeXt ?
Thank you
Fabrice


mathscr.png


___
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] stix2-mathscr with ConTeXt

2018-08-09 Thread Fabrice Couvreur
Hello,
Is it possible to get this type of letter with ConTeXt ?
Thank you
Fabrice


[image: mathscr.png]
___
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] integer displayed as .0 float in Lua-5.3

2018-08-09 Thread Wolfgang Schuster

Use tonumber.

%%
\starttext

\cldcontext{\lastpage + 1}

\cldcontext{"\lastpage" + 1}

\cldcontext{tonumber("\lastpage") + 1}

\stoptext
%%

Wolfgang


Pablo Rodriguez schrieb am 09.08.18 um 20:02:

Dear list,

I have the following sample

 \starttext
 \startTEXpage[offset=1em]
 Pages: \ctxlua{context([[\lastpage]])}.

 Next page: \ctxlua{context([[\lastpage]] + 1)}.

 (Lua \luaversion)
 \stopTEXpage
 \stoptext

With Lua-5.2 (ConTeXt with JIT), I get the expected results. But with
Lua-5.3 (standard ConTeXt), I get 2.0 as the value for the next page.

I’m afraid that there is a bug here. I was told that the integer type
has been introduced in Lua-5.3.

I had experienced the same issue with the handlecsv module. In my very
limited understanding of the issue, integers are displayed as .0 floats.
I wonder which would be the way to fix it.

Is this a real bug or am I missing something?

Many thanks for your help,

Pablo


___
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] integer displayed as .0 float in Lua-5.3

2018-08-09 Thread Pablo Rodriguez
Dear list,

I have the following sample

\starttext
\startTEXpage[offset=1em]
Pages: \ctxlua{context([[\lastpage]])}.

Next page: \ctxlua{context([[\lastpage]] + 1)}.

(Lua \luaversion)
\stopTEXpage
\stoptext

With Lua-5.2 (ConTeXt with JIT), I get the expected results. But with
Lua-5.3 (standard ConTeXt), I get 2.0 as the value for the next page.

I’m afraid that there is a bug here. I was told that the integer type
has been introduced in Lua-5.3.

I had experienced the same issue with the handlecsv module. In my very
limited understanding of the issue, integers are displayed as .0 floats.
I wonder which would be the way to fix it.

Is this a real bug or am I missing something?

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] Fwd: Problem of compiling a file with Emacs

2018-08-01 Thread Fabrice Couvreur
level 4 : 0.1.0.2 ->
> Événements
> > pages   > flushing realpage 2, userpage 2
> > close source> level 2, order 3, name '/home/aragorn/Test.tex'
> > close source> level 1, order 3, name
> > '/home/aragorn/context/tex/texmf-context/tex/context/base/
> mkiv/cont-yes.mkiv'
> >
> > mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/te
> xmfcnf.lua
> > mkiv lua stats  > used cache path:
> > /home/aragorn/context/tex/texmf-cache/luatex-cache/context/5
> fe67e0bfe781ce0dde776fb1556f32e
> > mkiv lua stats  > resource resolver: loadtime 0.007 seconds, 1 scans
> > with scantime 0.000 seconds, 0 shared scans, 29 found files, scanned
> > paths: /home/aragorn/texmf
> > mkiv lua stats  > stored bytecode data: 429 modules (0.228 sec), 93
> > tables (0.014 sec), 522 chunks (0.242 sec)
> > mkiv lua stats  > traced context: maxstack: 1325, freed: 4, unreachable:
> > 1321
> > mkiv lua stats  > cleaned up reserved nodes: 58 nodes, 9 lists of 455
> > mkiv lua stats  > node memory usage: 2 glue, 2 kern, 3 penalty, 14
> > attribute, 50 glue_spec, 4 attribute_list, 2 temp, 2 user_defined
> > mkiv lua stats  > node list callback tasks: 8 unique task lists, 6
> > instances (re)created, 114 calls
> > mkiv lua stats  > used backend: pdf (backend for directly generating pdf
> > output)mkiv lua stats  > jobdata time: 0.001 seconds saving, 0.000
> > seconds loading
> > mkiv lua stats  > callbacks: internal: 332, file: 200, direct: 2, late:
> > 4, function 577, total: 1115 (1115 per page)
> > mkiv lua stats  > loaded patterns: en::2, load time: 0.000
> > mkiv lua stats  > result saved in file: Test.pdf, compresslevel 3,
> > objectcompresslevel 3
> > mkiv lua stats  > loaded fonts: 3 files: latinmodern-math.otf,
> > lmroman10-regular.otf, lmroman12-regular.otf
> > mkiv lua stats  > font engine: otf 3.104, afm 1.513, tfm 1.000, 9
> > instances, 4 shared in backend, 3 common vectors, 1 common hashes, load
> > time 0.307 seconds
> > mkiv lua stats  > metapost: 0.001 seconds, loading: 0.101, execution:
> > 0.000, n: 1, average: 0.102, instances: 1, luacalls: 4, memory: 2.602 M
> > mkiv lua stats  > used platform: linux-64, type: unix, binary subtree:
> > texmf-linux-64
> > mkiv lua stats  > used engine: luatex version 1.08 with functionality
> > level 6731, banner: this is luatex, version 1.08.0 (tex live 2018)
> > mkiv lua stats  > control sequences: 46515 of 65536 + 10
> > mkiv lua stats  > lua properties: engine: lua 5.3, used memory: 96 MB
> > (ctx: 96 MB), hash type: lua, hash chars: min(64,40), symbol mask: utf
> (τεχ)
> > mkiv lua stats  > runtime: 0.81 seconds, 2 processed pages, 2 shipped
> > pages, 2.469 pages/second
> > system  | total runtime: 1.166 seconds
> >
> >
> > TeX Output finished at Tue Jul 31 23:45:34
> >
> >
> > Fabrice
> >
> > 2018-07-31 19:04 GMT+02:00 Lizardo M. Reyna Bowen  > <mailto:far...@disroot.org>>:
> >
> > I tested the file and conTeXt works well from emacs. The problem
> > seems to be related with your conTeXt standalone installation. when
> > the file is compiled, emacs create a log buffer  *... output*.  You
> > could post that information to look the possible error.
> >
> > Have you tried reinstalling conTeXt?
> >
> > attached test.pdf
> >
> >
> > On 07/31/2018 04:43 AM, Fabrice Couvreur wrote:
> >> With (setenv "PATH"
> >> "/home/aragorn/texlive/2018/bin/x86_64-linux/context:$PATH" t)  It
> >> works properly with C-c C-c
> >>
> >>
> >> With (setenv "PATH"
> >> "/home/aragorn/context/tex/texmf-linux-64/bin:$PATH" t) It does
> >> not work with C-c C-c
> >>
> >> The compilation is however correct by using a terminal without
> >> Emacs from the standalone version
> >> Fabrice
> >>
> >> 2018-07-31 10:18 GMT+02:00 Fabrice Couvreur
> >> mailto:fabrice1.couvr...@gmail.com>>:
> >>
> >> Hello,
> >> I did the same thing as you, but nothing changes. Have you
> >> tested the file? The expected result is to have the title of
> >> the chapter with the chapter number in large and light gray
> >> color. All compiles except the macro that allows to have the
> >> chapter number; I get a small rectangle instead.
> >> Fabrice

Re: [NTG-context] Problem of compiling a file with Emacs

2018-08-01 Thread Lizardo Reyna
 pdf (backend for directly generating pdf
> output)mkiv lua stats  > jobdata time: 0.001 seconds saving, 0.000
> seconds loading
> mkiv lua stats  > callbacks: internal: 332, file: 200, direct: 2, late:
> 4, function 577, total: 1115 (1115 per page)
> mkiv lua stats  > loaded patterns: en::2, load time: 0.000
> mkiv lua stats  > result saved in file: Test.pdf, compresslevel 3,
> objectcompresslevel 3
> mkiv lua stats  > loaded fonts: 3 files: latinmodern-math.otf,
> lmroman10-regular.otf, lmroman12-regular.otf
> mkiv lua stats  > font engine: otf 3.104, afm 1.513, tfm 1.000, 9
> instances, 4 shared in backend, 3 common vectors, 1 common hashes, load
> time 0.307 seconds
> mkiv lua stats  > metapost: 0.001 seconds, loading: 0.101, execution:
> 0.000, n: 1, average: 0.102, instances: 1, luacalls: 4, memory: 2.602 M
> mkiv lua stats  > used platform: linux-64, type: unix, binary subtree:
> texmf-linux-64
> mkiv lua stats  > used engine: luatex version 1.08 with functionality
> level 6731, banner: this is luatex, version 1.08.0 (tex live 2018)
> mkiv lua stats  > control sequences: 46515 of 65536 + 10
> mkiv lua stats  > lua properties: engine: lua 5.3, used memory: 96 MB
> (ctx: 96 MB), hash type: lua, hash chars: min(64,40), symbol mask: utf (τεχ)
> mkiv lua stats  > runtime: 0.81 seconds, 2 processed pages, 2 shipped
> pages, 2.469 pages/second
> system  | total runtime: 1.166 seconds
> 
> 
> TeX Output finished at Tue Jul 31 23:45:34
> 
> 
> Fabrice
> 
> 2018-07-31 19:04 GMT+02:00 Lizardo M. Reyna Bowen  <mailto:far...@disroot.org>>:
> 
> I tested the file and conTeXt works well from emacs. The problem
> seems to be related with your conTeXt standalone installation. when
> the file is compiled, emacs create a log buffer  *... output*.  You
> could post that information to look the possible error.
> 
> Have you tried reinstalling conTeXt?
> 
> attached test.pdf
> 
> 
> On 07/31/2018 04:43 AM, Fabrice Couvreur wrote:
>> With (setenv "PATH"
>> "/home/aragorn/texlive/2018/bin/x86_64-linux/context:$PATH" t)  It
>> works properly with C-c C-c
>>
>>
>> With (setenv "PATH"
>> "/home/aragorn/context/tex/texmf-linux-64/bin:$PATH" t) It does
>> not work with C-c C-c
>>
>> The compilation is however correct by using a terminal without
>> Emacs from the standalone version
>> Fabrice
>>
>> 2018-07-31 10:18 GMT+02:00 Fabrice Couvreur
>> mailto:fabrice1.couvr...@gmail.com>>:
>>
>> Hello,
>> I did the same thing as you, but nothing changes. Have you
>> tested the file? The expected result is to have the title of
>> the chapter with the chapter number in large and light gray
>> color. All compiles except the macro that allows to have the
>> chapter number; I get a small rectangle instead.
>> Fabrice
>>
>> 2018-07-30 16:02 GMT+02:00 Lizardo Reyna > <mailto:far...@disroot.org>>:
>>
>>
>> I had a similar issue in emacs few months ago. I use an
>> Ubuntu based
>> GNU/Linux distribution.
>>
>>  My solution was start a new terminal to execute the
>> commands in .bashrc
>> file. When it works, a message will appear in the top of
>> the terminal.
>> "Setting "/home/farliz/context/tex" as ConTeXt root."
>>
>> Then execute emacs from that terminal typing  $ emacs &.
>> This was the
>> only way I got run conTeXt from emacs.
>>
>> I'm not advanced GNU/Linux  user, but there are three
>> configuration
>> files when login; .bashrc, .bash_profile, and .profile. I
>> don't know why
>> this files were not execute automatically when I login, so
>> the path to
>> conTeXt bin is not added and setuptex file is not execute.
>> For this
>> reason it was necessary to start a new terminal.
>>
>> I have my system upgraded and now I don't have problem
>> with that.
>>
>> Regards
>>
>>
>> On 30/07/18 05:45, Fabrice Couvreur wrote:
>> > Hi,
>> > I made the changes that you recommend, but it does not work
>> >
>> > ./emacs
>>   

Re: [NTG-context] Problem of compiling a file with Emacs

2018-07-31 Thread Lizardo M. Reyna Bowen
I tested the file and conTeXt works well from emacs. The problem seems
to be related with your conTeXt standalone installation. when the file
is compiled, emacs create a log buffer  *... output*.  You could post
that information to look the possible error.

Have you tried reinstalling conTeXt?

attached test.pdf


On 07/31/2018 04:43 AM, Fabrice Couvreur wrote:
> With (setenv "PATH"
> "/home/aragorn/texlive/2018/bin/x86_64-linux/context:$PATH" t)  It
> works properly with C-c C-c
>
>
> With (setenv "PATH"
> "/home/aragorn/context/tex/texmf-linux-64/bin:$PATH" t) It does not
> work with C-c C-c
>
> The compilation is however correct by using a terminal without Emacs
> from the standalone version
> Fabrice
>
> 2018-07-31 10:18 GMT+02:00 Fabrice Couvreur
> mailto:fabrice1.couvr...@gmail.com>>:
>
> Hello,
> I did the same thing as you, but nothing changes. Have you tested
> the file? The expected result is to have the title of the chapter
> with the chapter number in large and light gray color. All
> compiles except the macro that allows to have the chapter number;
> I get a small rectangle instead.
> Fabrice
>
> 2018-07-30 16:02 GMT+02:00 Lizardo Reyna  <mailto:far...@disroot.org>>:
>
>
> I had a similar issue in emacs few months ago. I use an Ubuntu
> based
> GNU/Linux distribution.
>
>  My solution was start a new terminal to execute the commands
> in .bashrc
> file. When it works, a message will appear in the top of the
> terminal.
> "Setting "/home/farliz/context/tex" as ConTeXt root."
>
> Then execute emacs from that terminal typing  $ emacs &. This
> was the
> only way I got run conTeXt from emacs.
>
> I'm not advanced GNU/Linux  user, but there are three
> configuration
> files when login; .bashrc, .bash_profile, and .profile. I
> don't know why
> this files were not execute automatically when I login, so the
> path to
> conTeXt bin is not added and setuptex file is not execute. For
> this
> reason it was necessary to start a new terminal.
>
> I have my system upgraded and now I don't have problem with that.
>
> Regards
>
>
> On 30/07/18 05:45, Fabrice Couvreur wrote:
> > Hi,
> > I made the changes that you recommend, but it does not work
> >
> > ./emacs
> >
> >
> > (custom-set-variables
> >  ;; custom-set-variables was added by Custom.
> >  ;; If you edit it by hand, you could mess it up, so be careful.
> >  ;; Your init file should contain only one such instance.
> >  ;; If there is more than one, they won't work right.
> >  '(ConTeXt-Mark-version "IV")
> >  '(ConTeXt-engine "luatex")
> >  '(custom-enabled-themes (quote (leuven)))
> >  '(package-selected-packages (quote (nova-theme auctex
> > (custom-set-faces
> >  ;; custom-set-faces was added by Custom.
> >  ;; If you edit it by hand, you could mess it up, so be careful.
> >  ;; Your init file should contain only one such instance.
> >  ;; If there is more than one, they won't work right.
> >  )
> >
> > ;; SERVER Download (MELPA):
> > (when (>= emacs-major-version 24)
> >   (require 'package)
> >   (add-to-list
> >    'package-archives
> >    '("melpa" . "http://melpa.org/packages/;)
> >    t)
> >   (package-initialize))
> >
> > ;;(setenv "PATH"
> "/home/aragorn/context/tex/texmf-linux-64/bin/:$PATH" t)
> >
> >
> > (setq ConTeXt-mode-hook
> >   (lambda () (setq TeX-command-extra-options "--purgeall")))
> >
> > (setq-default cursor-type 'bar)
> >
> > (set-cursor-color "#ff")
> >
> >
> > (setq TeX-view-program-list '(("Evince" "evince %o"))
> >   TeX-view-program-selection '((output-pdf "Evince")))
> >
> > (setq make-backup-files nil) ; stop creating backup~ files
> > (setq auto-save-default nil) ; stop creating #autosave# files
> >
> > ;; auto close bracket insertion. New in emac

Re: [NTG-context] unable to define 'texgyrepagella-regula' error etc.

2018-07-26 Thread Jeong Dal
Dear Hans,

> 
> 
> (1) wipe the cache
> (2) mtxrun —script --reload -force
> 

Do you mean “wipe cache” as  delete “luatex-cache/context/5fe67…f32e/fonts” 
folder? 

I open the terminal and run “mtxrun —script — reload -force”, then I got

mtxrun  | ConTeXt TDS Runner Tool 1.32
mtxrun  |
mtxrun  | no script name given, known scripts:
mtxrun  |
mtxrun  | babel 1.20  Babel Input To UTF Conversion
mtxrun  | base  1.35  ConTeXt TDS Management Tool (aka luatools)
mtxrun  | bibtex  bibtex helpers
…….
mtxrun  | evohome   1.00  Evohome Fetcher
mtxrun  | fcd   1.00  Fast Directory Change
mtxrun  | flac  0.10  ConTeXt Flac Helpers
mtxrun  | fonts 0.21  ConTeXt Font Database Management
mtxrun  | grep  0.10  Simple Grepper
……
……
mtxrun  | watch 1.00  ConTeXt Request Watchdog
mtxrun  | youless   1.10  YouLess Fetcher

Do you mean “mtxrun —script —reload —force fonts”?

> Better use type-imp-.mkiv i.e. “-imp-“ in the name for such specific 
> implementation files
> 
I will change the name.

Thank you again.

Best regards,

Dalyoung

___
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 define 'texgyrepagella-regula' error etc.

2018-07-26 Thread Hans Hagen

On 7/26/2018 2:49 AM, Jeong Dal wrote:

Dear all,

Yesterday, I asked about a font problem without a mwe.

Here is a MWE.
%
\setuplanguage[kr][patterns=us]
\mainlanguage[kr]
\setscript[hangul]

\usetypescriptfile[type-hcrlvt]
\usetypescript[HcrFont]
\definefontfeature[kr][script=hang,language=kor,mode=node,analyze=yes]
\setupbodyfont[Myface, rm, 11pt]

\starttext
This is a test file.  %이것은 시험 파일입니다.

{\bf This is a test file for font.}%{\bf 이것은 시험 파일입니다.}

{\sl This is a test file for font.}%{\sl 이것은 시험 파일입니다.}

\stoptext


Here is a part of log file of the first run.

mtx-context     | run 1: luatex 
--fmt="/Users/graph/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en" 
--jobname="test" 
--lua="/Users/graph/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui" 
--no-parse-first-line --c:currentrun=1 --c:fulljobname="./test.tex" 
--c:input="./test.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:purgeall 
"cont-yes.mkiv"


This is LuaTeX, Version 1.08.0 (TeX Live 2018)
  system commands enabled.
open source     > level 1, order 1, name 
'/Users/graph/ConTeXt/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'

system          >
system          > ConTeXt  ver: 2018.07.20 21:20 MKIV beta  fmt: 
2018.7.24  int: english/english

system          >
system          > 'cont-new.mkiv' loaded
open source     > level 2, order 2, name 
'/Users/graph/ConTeXt/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'

system          > beware: some patches loaded from cont-new.mkiv
close source    > level 2, order 2, name 
'/Users/graph/ConTeXt/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'

system          > files > jobname 'test', input './test', result 'test'
fonts           > latin modern fonts are not preloaded
languages       > language 'en' is active
open source     > level 2, order 3, name 
'/Users/graph/Documents/TeXfiles/test.tex'
open source     > level 3, order 4, name 
'/Users/graph/ConTeXt/tex/texmf-local/context/type-hcrlvt.mkiv'
open source     > level 4, order 5, name 
'/Users/graph/ConTeXt/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv'
close source    > level 4, order 5, name 
'/Users/graph/ConTeXt/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv'
close source    > level 3, order 5, name 
'/Users/graph/ConTeXt/tex/texmf-local/context/type-hcrlvt.mkiv'
fonts           > defining > font with asked name 
'texgyrepagella-regular' is not found using lookup 'file'
fonts           > defining > unknown font 'texgyrepagella-regular', 
loading aborted
fonts           > defining > unable to define 'texgyrepagella-regular' 
as 'dummy--0'
fonts           > defining > font with asked name 'texgyrepagella-bold' 
is not found using lookup 'file'
fonts           > defining > unknown font 'texgyrepagella-bold', loading 
aborted
fonts           > defining > unable to define 'texgyrepagella-bold' as 
'dummy--0'
fonts           > defining > font with asked name 
'texgyrepagella-regular' is not found using lookup 'file'
fonts           > defining > unknown font 'texgyrepagella-regular', 
loading aborted
fonts           > defining > unable to define 'texgyrepagella-regular' 
as 'dummy--0'
backend         > xmp > using file 
'/Users/graph/ConTeXt/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'

pages           > flushing realpage 1, userpage 1, subpage 1
close source    > level 2, order 5, name 
'/Users/graph/Documents/TeXfiles/test.tex'
close source    > level 1, order 5, name 
'/Users/graph/ConTeXt/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'


mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: 
/Users/graph/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.006 seconds, 0 scans 
with scantime 0.000 seconds, 0 shared scans, 14 found files, scanned 
paths: 
mkiv lua stats  > stored bytecode data: 428 modules (0.208 sec), 93 
tables (0.013 sec), 521 chunks (0.220 sec)
mkiv lua stats  > traced context: maxstack: 1309, freed: 0, unreachable: 
1309

mkiv lua stats  > cleaned up reserved nodes: 58 nodes, 9 lists of 455
mkiv lua stats  > node memory usage: 2 glue, 2 kern, 2 penalty, 13 
attribute, 50 glue_spec, 4 attribute_list, 2 temp, 2 user_defined
mkiv lua stats  > node list callback tasks: 8 unique task lists, 6 
instances (re)created, 43 calls
mkiv lua stats  > used backend: pdf (backend for directly generating pdf 
output)

mkiv lua stats  > jobdata time: 0.001 seconds saving, 0.000 seconds loading
mkiv lua stats  > callbacks: internal: 146, file: 617, direct: 2, late: 
0, function 868, total: 1633

mkiv lua stats  

[NTG-context] unable to define 'texgyrepagella-regula' error etc.

2018-07-25 Thread Jeong Dal
Dear all,Yesterday, I asked about a font problem without a mwe.Here is a MWE.%\setuplanguage[kr][patterns=us]\mainlanguage[kr]\setscript[hangul]\usetypescriptfile[type-hcrlvt]\usetypescript[HcrFont] \definefontfeature[kr][script=hang,language=kor,mode=node,analyze=yes]\setupbodyfont[Myface, rm, 11pt]\starttextThis is a test file.  %이것은 시험 파일입니다.{\bf This is a test file for font.}%{\bf 이것은 시험 파일입니다.}{\sl This is a test file for font.}%{\sl 이것은 시험 파일입니다.}\stoptextHere is a part of log file of the first run.mtx-context     | run 1: luatex --fmt="/Users/graph/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en" --jobname="test" --lua="/Users/graph/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui" --no-parse-first-line --c:currentrun=1 --c:fulljobname="./test.tex" --c:input="./test.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:purgeall "cont-yes.mkiv"This is LuaTeX, Version 1.08.0 (TeX Live 2018)  system commands enabled.open source     > level 1, order 1, name '/Users/graph/ConTeXt/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'system          > system          > ConTeXt  ver: 2018.07.20 21:20 MKIV beta  fmt: 2018.7.24  int: english/englishsystem          > system          > 'cont-new.mkiv' loadedopen source     > level 2, order 2, name '/Users/graph/ConTeXt/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'system          > beware: some patches loaded from cont-new.mkivclose source    > level 2, order 2, name '/Users/graph/ConTeXt/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'system          > files > jobname 'test', input './test', result 'test'fonts           > latin modern fonts are not preloadedlanguages       > language 'en' is activeopen source     > level 2, order 3, name '/Users/graph/Documents/TeXfiles/test.tex'open source     > level 3, order 4, name '/Users/graph/ConTeXt/tex/texmf-local/context/type-hcrlvt.mkiv'open source     > level 4, order 5, name '/Users/graph/ConTeXt/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv'close source    > level 4, order 5, name '/Users/graph/ConTeXt/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv'close source    > level 3, order 5, name '/Users/graph/ConTeXt/tex/texmf-local/context/type-hcrlvt.mkiv'fonts           > defining > font with asked name 'texgyrepagella-regular' is not found using lookup 'file'fonts           > defining > unknown font 'texgyrepagella-regular', loading abortedfonts           > defining > unable to define 'texgyrepagella-regular' as 'dummy--0'fonts           > defining > font with asked name 'texgyrepagella-bold' is not found using lookup 'file'fonts           > defining > unknown font 'texgyrepagella-bold', loading abortedfonts           > defining > unable to define 'texgyrepagella-bold' as 'dummy--0'fonts           > defining > font with asked name 'texgyrepagella-regular' is not found using lookup 'file'fonts           > defining > unknown font 'texgyrepagella-regular', loading abortedfonts           > defining > unable to define 'texgyrepagella-regular' as 'dummy--0'backend         > xmp > using file '/Users/graph/ConTeXt/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'pages           > flushing realpage 1, userpage 1, subpage 1close source    > level 2, order 5, name '/Users/graph/Documents/TeXfiles/test.tex'close source    > level 1, order 5, name '/Users/graph/ConTeXt/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.luamkiv lua stats  > used cache path: /Users/graph/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32emkiv lua stats  > resource resolver: loadtime 0.006 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 14 found files, scanned paths: mkiv lua stats  > stored bytecode data: 428 modules (0.208 sec), 93 tables (0.013 sec), 521 chunks (0.220 sec)mkiv lua stats  > traced context: maxstack: 1309, freed: 0, unreachable: 1309mkiv lua stats  > cleaned up reserved nodes: 58 nodes, 9 lists of 455mkiv lua stats  > node memory usage: 2 glue, 2 kern, 2 penalty, 13 attribute, 50 glue_spec, 4 attribute_list, 2 temp, 2 user_definedmkiv lua stats  > node list callback tasks: 8 unique task lists, 6 instances (re)created, 43 callsmkiv lua stats  > used backend: pdf (backend for directly generating pdf output)mkiv lua stats  > jobdata time: 0.001 seconds saving, 0.000 seconds loadingmkiv lua stats  > callbacks: internal: 146, file: 617, direct: 2, late: 0, function 868, total: 1633mkiv lua stats  > loaded patterns: en::2 kr::51, load time: 0.000mkiv lua stats  > result saved in file: test.pdf, compresslevel 3, objectcompresslevel 3mkiv lua sta

Re: [NTG-context] Problem with pagella font (beta)

2018-07-23 Thread Fabrice Couvreur
Hi Wolgang,
I followed your explanations, and it works perfectly. Thank you very much !
Fabrice

2018-07-23 12:39 GMT+02:00 Wolfgang Schuster :

> Hi Fabrice,
>
> you can download the fonts from the GUST [1] website (the flat package is
> enough because you need only the opentype files) and put them in your local
> tex directory in your home folder, e.g.
>
> ~/texmf/fonts/data/texgyre/
>
> or you put them in your tex installation, e.g.
>
> texmf-fonts/fonts/data/texgyre/
>
> [1] http://www.gust.org.pl/projects/e-foundry/tex-gyre/whole
>
> Wolfgang
>
> Fabrice Couvreur 
> 23. Juli 2018 um 11:37
> Hello,
> I only use the standalone version of ConteXt with Emacs. I can not use
> the pagella font anymore because the text is in bold type. Wolfgang told
> me a discussion about this problem that still does not seem to be resolved. By
> cons, no problem with ConteXt of Texlive 2018.
> Thank you
> Fabrice
> 
> ___
> 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
> 
> ___
>
___
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] Problem with pagella font (beta)

2018-07-23 Thread Wolfgang Schuster

Hi Fabrice,

you can download the fonts from the GUST [1] website (the flat package 
is enough because you need only the opentype files) and put them in your 
local tex directory in your home folder, e.g.


~/texmf/fonts/data/texgyre/

or you put them in your tex installation, e.g.

texmf-fonts/fonts/data/texgyre/

[1] http://www.gust.org.pl/projects/e-foundry/tex-gyre/whole

Wolfgang

Fabrice Couvreur <mailto:fabrice1.couvr...@gmail.com>
23. Juli 2018 um 11:37
Hello,
I only use the standalone version of ConteXt with Emacs. I can not use 
the pagella font anymore because the text is in bold type. Wolfgang 
told me a discussion about this problem that still does not seem to be 
resolved. By cons, no problem with ConteXt of Texlive 2018.

Thank you
Fabrice
___
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] Problem with pagella font (beta)

2018-07-23 Thread Fabrice Couvreur
Hello,
I only use the standalone version of ConteXt with Emacs. I can not use the
pagella font anymore because the text is in bold type. Wolfgang told me a
discussion about this problem that still does not seem to be resolved. By
cons, no problem with ConteXt of Texlive 2018.
Thank you
Fabrice
___
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] issues with \comment

2018-07-06 Thread Pablo Rodriguez
On 07/06/2018 11:34 AM, Wolfgang Schuster wrote:
>> Pablo Rodriguez 6. Juli 2018 um 11:14
>> [...]
>> Locations for leftedge, rightedge and text don’t seem to work (in
>> Acrobat Reader, SumatraPDF and Evince).
> 
> By default the leftedge and rightedge areas are disabled because
> they have a width of 0pt and even when you enable them you won’t see
> them because they are outside of the visible area.

Many thanks for your reply, Wolfgang.

Using your approach, I see what the problem is:

\setuppapersize[A5][A4]
\setuplayout[location=middle]
\showframe
\setupinteraction[state=start]
\starttext
\comment[location=leftmargin,space=yes,buffer=abc]{}
\type{\comment[location=leftmargin,space=yes,buffer=abc]{}}
\blank[2*big]

\comment[location=rightmargin,space=yes,buffer=abc]{}
\type{\comment[location=rightmargin,space=yes,buffer=abc]{}}
\blank[2*big]
\stoptext

leftmarging places the icon over the text (at least, in Acrobat Reader
and Evince), since the width of the icon isn’t considered in the icon
placemement. I think this should be improved.

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] issues with \comment

2018-07-06 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\setupinteraction[state=start]
\setupcomment[location=inmargin, color=darkred]
\showframe
\startbuffer[abc]
\input zapf
\stopbuffer
\setuptype[option=tex]
\starttext
\comment[space=yes,buffer=abc]{}
\type{\comment[space=yes,buffer=abc]{}}
\blank[2*big]

\comment[location=leftmargin,space=yes,buffer=abc]{}
\type{\comment[location=leftmargin,space=yes,buffer=abc]{}}
\blank[2*big]

\comment[location=rightmargin,space=yes,buffer=abc]{}
\type{\comment[location=rightmargin,space=yes,buffer=abc]{}}
\blank[2*big]

\comment[location=inmargin,space=yes,buffer=abc]{}
\type{\comment[location=inmargin,space=yes,buffer=abc]{}}
\blank[2*big]

\comment[location=leftedge,space=yes,buffer=abc]{}
\type{\comment[location=leftedge,space=yes,buffer=abc]{}}
\blank[2*big]

\type{\comment[location=rightedge,space=yes,buffer=abc]{}}
\blank[2*big]

\comment[location=text,space=yes,buffer=abc]{}
\type{\comment[location=text,space=yes,buffer=abc]{}}
\blank[2*big]

\comment[space=yes,buffer=abc]{}
\type{\comment[space=yes,buffer=abc]{}}
\blank[2*big]

\comment[location=high,space=yes,buffer=abc]{}
\type{\comment[location=high,space=yes,buffer=abc]{}}
\blank[2*big]
\stoptext

I’m afraid buffer contents aren’t expanded in \comment.

Locations for leftedge, rightedge and text don’t seem to work (in
Acrobat Reader, SumatraPDF and Evince).

Default value for location seems to depend on the value of last comment
(even if a default value has been set in \setupcomment).

Am I missing something or have I hit a bug?

Many thanks for your replies,

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] The best command for parallel texts

2018-07-04 Thread Hans Hagen

On 7/3/2018 11:30 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:

Hi Martin, Wolfgang,

On Mon, 02 Jul 2018 14:41:31 -0600, Wolfgang Schuster 
 wrote:



Martin Hasoň <mailto:martin.ha...@gmail.com>
1. Juli 2018 um 12:18
Hi all,

I need to type parallel text on double columns. I've tried paragraphs,
tabulate, table and column environments.The best result of these
options gives the tabulate.Unfortunately, it does not respect
alignment - many \hbox errors in all environments except columns
:(.What should I use and set up?


None of the table environments use the global alignment settings and
you have to set them again to get better results for the content.


Martin, have you tried streams?

http://wiki.contextgarden.net/Columns#Streams

Under the examples you will find an example of a columnar, aligned 
streams setup - by Wolfgang.
There are a few half-finished mechanisms. There's also one based on 
parallel figures etc that Thomas and I still need to finish.


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] The best command for parallel texts

2018-07-03 Thread Idris Samawi Hamid ادريس سماوي حامد
On Tue, 03 Jul 2018 15:30:18 -0600, Idris Samawi Hamid ادريس سماوي حامد  
 wrote:



Hi Martin, Wolfgang,

On Mon, 02 Jul 2018 14:41:31 -0600, Wolfgang Schuster  
 wrote:



Martin Hasoň <mailto:martin.ha...@gmail.com>
1. Juli 2018 um 12:18
Hi all,

I need to type parallel text on double columns. I've tried paragraphs,
tabulate, table and column environments.The best result of these
options gives the tabulate.Unfortunately, it does not respect
alignment - many \hbox errors in all environments except columns
:(.What should I use and set up?


None of the table environments use the global alignment settings and
you have to set them again to get better results for the content.


Martin, have you tried streams?

http://wiki.contextgarden.net/Columns#Streams

Under the examples you will find an example of a columnar, aligned  
streams setup - by Wolfgang.


Ok, needed a break from work, so for fun and for learning something new:

==
\setuppapersize[A4][A4]
\defineparagraphs[TwoLang][n=2]
\setuptabulate[split=yes]
\setupalign[verytolerant,stretch]

\starttext
\showframe

\startoutputstream[one]
   \setupalign[flushleft]
   \framedtext[width=17.4em,align=verytolerant,stretch,frame=on,offset=overlay]
   {\input lorem }
   \hfill
   \par
\stopoutputstream

\startoutputstream[two]
   \setupalign[flushright]
   \hfill
   \framedtext[width=17.4em,align=verytolerant,stretch,frame=on,offset=overlay]
   {\input davis }
   \par
\stopoutputstream

\synchronizestreams[one,two]

\startoverlay
   {\raise2\strutdp\outputstreambox[one]}
   {\raise0\strutdp\outputstreambox[two]}
\stopoverlay
\startTwoLang
\input lorem
\nextTwoLang
\input davis
\stopTwoLang

\starttabulate[|p|p|]
\NC\input lorem
\NC\input davis
\NC\NR
\stoptabulate

\bTABLE[frame=off,align=yes,split=yes]
\bTR
\bTD[roffset=2mm]\input lorem\eTD
\bTD[loffset=2mm]\input davis\eTD
\eTR
\eTABLE

\startcolumns[n=2]
\input lorem
\column
\input davis
\stopcolumns

\stoptext
==

The \raise2\strutdp etc. feels like a hack, Wolfgang knows better why it's  
needed, as as how and why the value for one stream affects the other..


Idris
--
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512

scratch.pdf
Description: Adobe PDF document


scratch.tex
Description: TeX document
___
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] The best command for parallel texts

2018-07-03 Thread Idris Samawi Hamid ادريس سماوي حامد

Hi Martin, Wolfgang,

On Mon, 02 Jul 2018 14:41:31 -0600, Wolfgang Schuster  
 wrote:



Martin Hasoň <mailto:martin.ha...@gmail.com>
1. Juli 2018 um 12:18
Hi all,

I need to type parallel text on double columns. I've tried paragraphs,
tabulate, table and column environments.The best result of these
options gives the tabulate.Unfortunately, it does not respect
alignment - many \hbox errors in all environments except columns
:(.What should I use and set up?


None of the table environments use the global alignment settings and
you have to set them again to get better results for the content.


Martin, have you tried streams?

http://wiki.contextgarden.net/Columns#Streams

Under the examples you will find an example of a columnar, aligned streams  
setup - by Wolfgang.


Best wishes
Idris
--
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512
___
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] The best command for parallel texts

2018-07-02 Thread Wolfgang Schuster



Martin Hasoň <mailto:martin.ha...@gmail.com>
1. Juli 2018 um 12:18
Hi all,

I need to type parallel text on double columns. I've tried paragraphs, 
tabulate, table and column environments.The best result of these 
options gives the tabulate.Unfortunately, it does not respect 
alignment - many \hbox errors in all environments except columns 
:(.What should I use and set up?


None of the table environments use the global alignment settings and
you have to set them again to get better results for the content.

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
___

[NTG-context] The best command for parallel texts

2018-07-01 Thread Martin Hasoň
Hi all,

I need to type parallel text on double columns. I've tried paragraphs,
tabulate, table and column environments. The best result of these options
gives the tabulate. Unfortunately, it does not respect alignment - many
\hbox errors in all environments except columns :(. What should I use and
set up?

\setuppapersize[A6][A6]
\defineparagraphs[TwoLang][n=2]
\setuptabulate[split=yes]
\setupalign[verytolerant,stretch]

\starttext

\startTwoLang
\input lorem
\nextTwoLang
\input davis
\stopTwoLang

\starttabulate[|p|p|]
\NC\input lorem
\NC\input davis
\NC\NR
\stoptabulate

\bTABLE[frame=off,align=yes,split=yes]
\bTR
\bTD[roffset=2mm]\input lorem\eTD
\bTD[loffset=2mm]\input davis\eTD
\eTR
\eTABLE

\startcolumns[n=2]
\input lorem
\column
\input davis
\stopcolumns

\stoptext

Best regards
Martin Hasoň
___
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] referencing and stoppers

2018-06-30 Thread Idris Samawi Hamid ادريس سماوي حامد
On Sat, 30 Jun 2018 04:20:57 -0600, Wolfgang Schuster  
 wrote:



You can use the \setupreferencestructureprefix command set a different
value for
the stopper but you have to ensure the key takes a value because a empty
argument is ignored. Instead of the argument I used in my example
(\symbol[none])
you can also use a unicode character without width, e.g. \zerowidthspace.


\setupreferencestructureprefix [section] [default]
[prefixstopper={\symbol[none]}]
%\setupreferencestructureprefix [section] [default]
[prefixstopper=\zerowidthspace]

   1. Argument: section name -> section == \section / \startsection
   2. Argument: reference type -> default == \in
   3. Argument: settings which differ from \setuphead


Many thanks, this is exactly what was needed!

Your replies and pointers are appreciated and not taken for granted.

Best wishes
Idris


Idris Samawi Hamid ادريس سماوي حامد <mailto:idris.ha...@colostate.edu>
29. Juni 2018 um 16:22
Dear gang,

For, e.g., \setuphead[...][alternative=text], one often wants the
stopper to appear in the main text sectioning but not in the
references to those sections. For example (attached and below):

===
\setuphead[chapter]   [alternative=normal]
\setuphead[subsection][alternative=text]
\setuphead[subsection][distance=0em,
   textdistance=0.7em,
   sectionstopper=.,
   criterium=local]
\setupwhitespace[big]
\starttext

\startchapter[title={First},reference={}]
\startsubsection[title={},reference={reference1}]
\input ward

See \in{Sections}[reference3] and \in{Section}[reference4].
\stopsubsection
\startsubsection[title={},reference={reference2}]
\input ward
\stopsubsection
\stopchapter

\startchapter[title={Second}]
\startsubsection[title={},reference={reference3}]
\input ward
\stopsubsection
\startsubsection[title={},reference={reference4}]
\input ward

See \in{Sections}[reference1] and \in{Section}[reference2].
\stopsubsection
\stopchapter
\stoptext
===

See Sections 2.1. and Section 2.2..
See Sections 1.1. and Section 1.2..

SHOULD BE

See Sections 2.1 and Section 2.2.
See Sections 1.1 and Section 1.2.

Is there a straightforward way to remove the stopper from the \in
reference while maintaining it in the main sectioning but removing it
in the referencing?

If there is no straightforward way, what is the best workaround?

As mentioned at the outset, this is not an uncommon scenario. If there
is no straightforward way, would like to make it a feature request.

Thank you in advance for your help.

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





--
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512
___
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] referencing and stoppers

2018-06-30 Thread Wolfgang Schuster
You can use the \setupreferencestructureprefix command set a different 
value for

the stopper but you have to ensure the key takes a value because a empty
argument is ignored. Instead of the argument I used in my example 
(\symbol[none])

you can also use a unicode character without width, e.g. \zerowidthspace.


\setupreferencestructureprefix [section] [default] 
[prefixstopper={\symbol[none]}]
%\setupreferencestructureprefix [section] [default] 
[prefixstopper=\zerowidthspace]


  1. Argument: section name -> section == \section / \startsection
  2. Argument: reference type -> default == \in
  3. Argument: settings which differ from \setuphead


Wolfgang

Idris Samawi Hamid ادريس سماوي حامد <mailto:idris.ha...@colostate.edu>
29. Juni 2018 um 16:22
Dear gang,

For, e.g., \setuphead[...][alternative=text], one often wants the 
stopper to appear in the main text sectioning but not in the 
references to those sections. For example (attached and below):


===
\setuphead[chapter]   [alternative=normal]
\setuphead[subsection][alternative=text]
\setuphead[subsection][distance=0em,
   textdistance=0.7em,
   sectionstopper=.,
   criterium=local]
\setupwhitespace[big]
\starttext

\startchapter[title={First},reference={}]
\startsubsection[title={},reference={reference1}]
\input ward

See \in{Sections}[reference3] and \in{Section}[reference4].
\stopsubsection
\startsubsection[title={},reference={reference2}]
\input ward
\stopsubsection
\stopchapter

\startchapter[title={Second}]
\startsubsection[title={},reference={reference3}]
\input ward
\stopsubsection
\startsubsection[title={},reference={reference4}]
\input ward

See \in{Sections}[reference1] and \in{Section}[reference2].
\stopsubsection
\stopchapter
\stoptext
===

See Sections 2.1. and Section 2.2..
See Sections 1.1. and Section 1.2..

SHOULD BE

See Sections 2.1 and Section 2.2.
See Sections 1.1 and Section 1.2.

Is there a straightforward way to remove the stopper from the \in 
reference while maintaining it in the main sectioning but removing it 
in the referencing?


If there is no straightforward way, what is the best workaround?

As mentioned at the outset, this is not an uncommon scenario. If there 
is no straightforward way, would like to make it a feature request.


Thank you in advance for your help.

Idris
___
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] Commands \inmargin and \inouter not working

2018-06-04 Thread Pablo Rodriguez
On 06/04/2018 02:25 AM, Marcus Vinicius Mesquita wrote:
> Dear list,
> 
> After updating ConTeXt, commands \inmargin and \inouter do not work anymore.

Hi Marcus Vinicius,

I’m using latest beta (from 2018.06.04 12:18) and both commands work
fine. I’m on linux-64 too.

My previous beta is from 2018.05.24 15:49 and both commands work fine there.

I guess you should try to update to latest beta. If that doesn’t work,
check the minimal working sample with a clean install.

I hope it helps,

Pablo


> MWE:
> 
> \starttext
> This is an example of a simple margin note set in the slanted font
> of the document. If used correctly, the note \inmargin{Here is a
> simple margin note.} should print on the side with the command
> \type {\inmargin} placed in the text. You will of course want to
> adjust your margins to accommodate the type.
> 
> This is an example of a simple margin note set in the slanted font
> of the document. If used correctly, the note \inouter{Here is a
> simple margin note.} should print on the side with the command
> \type {\inouter} placed in the text. You will of course want to
> adjust your margins to accommodate the type.
> 
> \stoptext
> 
> 
> My ConTeXt version:
> 
> mkiv lua stats > used platform: linux-64, type: unix, binary subtree:
> texmf-linux-64
> mkiv lua stats > used engine: luatex version 1.08 with functionality
> level 6731, banner: this is luatex, version 1.08.0 (tex live 2018)
> mkiv lua stats > lua properties: engine: lua 5.3, used memory: 79 MB
> (ctx: 79 MB), hash type: lua, hash chars: min(64,40), symbol mask: utf (τεχ)
> 
> Marcus Vinicius 
> 
> 
> ___
> 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
> ___
> 


-- 
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] Commands \inmargin and \inouter not working

2018-06-03 Thread Marcus Vinicius Mesquita
Dear list,

After updating ConTeXt, commands \inmargin and \inouter do not work anymore.

MWE:

\starttext
This is an example of a simple margin note set in the slanted font
of the document. If used correctly, the note \inmargin{Here is a
simple margin note.} should print on the side with the command
\type {\inmargin} placed in the text. You will of course want to
adjust your margins to accommodate the type.

This is an example of a simple margin note set in the slanted font
of the document. If used correctly, the note \inouter{Here is a
simple margin note.} should print on the side with the command
\type {\inouter} placed in the text. You will of course want to
adjust your margins to accommodate the type.

\stoptext


My ConTeXt version:

mkiv lua stats > used platform: linux-64, type: unix, binary subtree:
texmf-linux-64
mkiv lua stats > used engine: luatex version 1.08 with functionality level
6731, banner: this is luatex, version 1.08.0 (tex live 2018)
mkiv lua stats > lua properties: engine: lua 5.3, used memory: 79 MB (ctx:
79 MB), hash type: lua, hash chars: min(64,40), symbol mask: utf (τεχ)

Marcus Vinicius


mwe.pdf
Description: Adobe PDF document
___
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] Defining command with optional and mandatory arguments

2018-05-24 Thread Christoph Reller
On Wed, 23 May 2018 17:54:39 +0200, Henning Hraban Ramm <te...@fiee.net> wrote:
> Date: Wed, 23 May 2018 17:54:39 +0200
> From: Henning Hraban Ramm <te...@fiee.net>
> To: mailing list for ConTeXt users <ntg-context@ntg.nl>
> Subject: Re: [NTG-context] Defining command with optional and
> mandatory   arguments
> Message-ID: <a21d40d2-e607-47a4-bab0-c437dc915...@fiee.net>
> Content-Type: text/plain; charset=windows-1252
>
> Am 2018-05-23 um 16:01 schrieb Hans Hagen <j.ha...@xs4all.nl>:
>
>> On 5/23/2018 3:39 PM, Christoph Reller wrote:
>>> Hi,
>>> What is the right way to define a command with both mandatory and
>>> optional arguments, e.g:
>> i'm not sure wht happens at your end but this is the best way:
>
> Also, there’s documentation at
> http://wiki.contextgarden.net/Commands_with_optional_arguments
>
> If there’s something wrong, please fix it yourself or come back to this list 
> ;)
>

Thank you Hraban for pointing me to the wiki. I was aware of this page
but it contains only the case of mandatory arguments in curly braces
{} not in brackets [].

Cheers,

Christoph
___
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] \showgrid not working right

2018-05-23 Thread Marcus Vinicius Mesquita
Dear list,

The frame around text area is appearing way below where it should be.
​​


Minimal working example:

\setuplayout[grid=yes]
\showgrid

\starttext
\input knuth.tex
\stoptext


My context version:

mtx-context | current version: 2018.05.19 21:46
mkiv lua stats  > used platform: linux-64, type: unix, binary subtree:
texmf-linux-64
mkiv lua stats  > used engine: luatex version 1.08 with functionality level
6731, banner: this is luatex, version 1.08.0 (tex live 2018)

Marcus Vinicius


mwe.pdf
Description: Adobe PDF document
___
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] Fonts and equations

2018-05-18 Thread Lance Larsen
Henri,

Thanks for the suggestion. I tried to add the additional fonts, but this
did not seem to make a difference. The math equations render fine, but a
search performed for terms in an equation still does not work when I
specify the font. When I remove the font specification, it works fine.
There must be some difference in the font that is used even if I don't
specify a math font. Any other thoughts about why the math font changes or
how to get a math font that is searchable, or get back to the default math
font?

-Lance


--
>
> Message: 4
> Date: Fri, 18 May 2018 18:55:14 +1200
> From: Henri Menke <henrime...@gmail.com>
> To: ntg-context@ntg.nl
> Subject: Re: [NTG-context] Fonts and equations
> Message-ID: <12743277-ebd0-67c7-2393-fe33e97bf...@gmail.com>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
>
>
> On 17/05/18 23:19, Lance Larsen wrote:
> > I have a context document with several equations. One really nice
> > feature with equations is that by default you can search for variable
> > names in equation in a PDF reader like acrobat. However, I needed to
> > configure the document to use arial for the text. Once I do this, the
> > equations are no longer searchable. I assume something happened to the
> > mathematics font. How to I change the font for the document text, but
> > keep the math equations searchable? Is there a way to change the
> > document font, but not affect the math font? Here is a sample of how I
> > configured the font. The equations are no longer searchable.
> >
> > % Load the Arial font values for regular, italics, bold, etc.
> > \starttypescript [serif] [arial]
> >\definefontsynonym [Serif]   [name:arial]
> >\definefontsynonym [SerifBold]   [name:arialbold]
> >\definefontsynonym [SerifItalic] [name:arialitalic]
> >\definefontsynonym [SerifSlanted][name:arialitalic]
> >\definefontsynonym [SerifBoldItalic] [name:arialbolditalic]
> >\definefontsynonym [SerifBoldSlanted][name:arialbolditalic]
> >\definefontsynonym [SerifCaps]   [name:arial]
> > \stoptypescript
> >
> > % Now we define the 'arial' font as an available option
> > \definetypeface [arial][rm] [serif] [arial]
>
> The typeface "arial" you defined has no math font (and no sans and no
> mono font).  Add those and you should be fine:
>
> \definetypeface [arial] [rm] [serif] [arial]
> \definetypeface [arial] [ss] [sans]  [modern]
> \definetypeface [arial] [tt] [mono]  [modern]
> \definetypeface [arial] [mm] [math]  [modern]
>
> >
> > % Set 'arial' 10pt as the default font for the document
> > \setupbodyfont [arial,rm,10pt]
> >
> > \starttext
> >
> > $z_1 = x_1 + y_1$
> >
> > $a = b + c$
> >
> > \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
___

Re: [NTG-context] roadmap

2018-05-15 Thread Hans Hagen

On 5/15/2018 8:15 AM, Christoph Reller wrote:

On Tue, May 15, 2018 at 12:53 AM, <ntg-context-requ...@ntg.nl> wrote:



Message: 3
Date: Mon, 14 May 2018 23:26:28 +0200
From: Hans Hagen <j.ha...@xs4all.nl>
To: Henning Hraban Ramm <te...@fiee.net>, mailing list for ConTeXt
 users <ntg-context@ntg.nl>
Subject: Re: [NTG-context] roadmap
Message-ID: <c504ea08-a021--4eba-c2894d72d...@xs4all.nl>
Content-Type: text/plain; charset=utf-8; format=flowed

On 5/14/2018 9:36 PM, Henning Hraban Ramm wrote:

Hi Hans, thank you so much!


Keep up the good work!


* PDF/* (X, A, UA - probably only reasonable with external tools, but it seems 
like there’s not a lot that’s usable)


we support various formats (to some extend the backend even adapts to
it) ... tagged pdf ... already there for quite a while but i never had
any demand for it so i never really check the current state (also
because imo it's a it weird feature ... only there because publishers
don't want to distribute sources that are suitable for rendering
variations ... so we're stuck with some pseudo structure related to
visuals)

(i might upgrade tagging and exports as they closely relate but it's not
easy to get motivated for something that one has no real use for so at
most it will cold winter evening stuff)


To us, tagged PDF is important. Specifically, for PDF/A with
compliance level a, tagging is mandatory. ConTeXt is the only (!)
TeX-based PDF creation suite that can produce correct and reliable
tagging.

Our company is producing (and weekly updating) 67 manuals and
technical documents from more than 900 ConTeXt source files for our
software products. The output PDFs are converted to PDF/A-2a, which is
only possible due to ConTeXt's tagging.

 From what we hear of our customers, PDF/A level a and PDF/UA are
becoming increasingly important, be it because of archiving issues or
because of legislation requirements. So please, maintain this
invaluable feature!
Ah, it's good to hear that it's working ok. (Of course it is/will be 
maintained ... it's just that because I don't need it myself it's up to 
folks like you to check if it's ok.)


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] roadmap

2018-05-15 Thread Christoph Reller
On Tue, May 15, 2018 at 12:53 AM, <ntg-context-requ...@ntg.nl> wrote:
>
>
> Message: 3
> Date: Mon, 14 May 2018 23:26:28 +0200
> From: Hans Hagen <j.ha...@xs4all.nl>
> To: Henning Hraban Ramm <te...@fiee.net>, mailing list for ConTeXt
> users <ntg-context@ntg.nl>
> Subject: Re: [NTG-context] roadmap
> Message-ID: <c504ea08-a021--4eba-c2894d72d...@xs4all.nl>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
> On 5/14/2018 9:36 PM, Henning Hraban Ramm wrote:
> > Hi Hans, thank you so much!

Keep up the good work!

> > * PDF/* (X, A, UA - probably only reasonable with external tools, but it 
> > seems like there’s not a lot that’s usable)
>
> we support various formats (to some extend the backend even adapts to
> it) ... tagged pdf ... already there for quite a while but i never had
> any demand for it so i never really check the current state (also
> because imo it's a it weird feature ... only there because publishers
> don't want to distribute sources that are suitable for rendering
> variations ... so we're stuck with some pseudo structure related to
> visuals)
>
> (i might upgrade tagging and exports as they closely relate but it's not
> easy to get motivated for something that one has no real use for so at
> most it will cold winter evening stuff)

To us, tagged PDF is important. Specifically, for PDF/A with
compliance level a, tagging is mandatory. ConTeXt is the only (!)
TeX-based PDF creation suite that can produce correct and reliable
tagging.

Our company is producing (and weekly updating) 67 manuals and
technical documents from more than 900 ConTeXt source files for our
software products. The output PDFs are converted to PDF/A-2a, which is
only possible due to ConTeXt's tagging.

From what we hear of our customers, PDF/A level a and PDF/UA are
becoming increasingly important, be it because of archiving issues or
because of legislation requirements. So please, maintain this
invaluable feature!

Cheers, and thank you for all the effort.

Christoph
___
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] using lua fonts

2018-05-09 Thread Hans Hagen

On 5/9/2018 3:02 AM, Henri Menke wrote:

Dear list,

this is a follow-up on Ulrike's post, so I'm just hijacking the thread.

How can I use the Lua fonts in Plain?  It works fine if I just remove 
ConTeXt-specific actualtext bits but as soon as I add features to the 
font, the name resolution fails with something like


! Font 
\mainfont=file:fonts-demo-rule.lua:original=file:texgyrepagella-regular.

otf not loadable: metric data not found or bad.

MWE is below as always.


(1) This lua font stuff was mostly written for demonstration purposes so 
anything done like should really use the mechanisms available in the 
macro package used


(2) If you use plain and want to play with the font interface you can 
better use the plain code that comes with context because that is what I 
can run here (this plain version has always been present btw).


(3) Examples coming from the font manual can use feaures only present in 
context (for instance because it uses other code present in context or 
because i didn't bother to make in generic).


(4) File lookup is macro package specific.

So, say that you have:

\font\mainfont="file:fonts-demo-rule.lua":original=texgyrepagellaregular;

\mainfont

This code is stored in fonts-demo-rule.lua and we can load that font in 
the usual way, by specifying a filename.


\bye

and then in that lua file

if detail then
name = name .. ":" .. detail
end

watch how i replaced the * by : because only context has the * syntax 
while you use/want the xetex syntax


  mtxrun --script plain yourtexfile

should work gven that you made a format with

  mtxrun --script plain --make

(mtxrun --script font --reload --simple will make a plain database if 
needed)


It uses luatex-plain that ships with context as format (there's also a 
luatex-test file that shows some font stuff).


Fwiw, the latest version also supports font effects at the font level 
but one needs luatex 1.08 (which is the current garden version).



Cheers, Henri

--- test.tex ---

\input luaotfload.sty

\font\mainfont="file:fonts-demo-rule.lua":original=file:texgyrepagella-regular.otf 


\mainfont

This code is stored in fonts-demo-rule.lua and we can load that font in 
the usual way,

by specifying a filename.

\bye

--- fonts-demo-rule.lua ---

return function(specification)
     local features = specification.features.normal
     local name = features.original or "dejavu-serif"
     local option = features.option -- we only support "line"
     local size = specification.size -- always set
     local detail = specification.detail -- e.g. default
     if detail then
     name = name .. "*" .. detail
     end
     local f, id = fonts.constructors.readanddefine(name,size)
     if f then
     f.properties.name = specification.name
     f.properties.virtualized = true
     f.fonts = {
     { id = id },
     }
     for s in string.gmatch("aeuioy",".") do
     local n = utf.byte(s)
     local c = f.characters[n]
     if c then
     local w = c.width or 0
     local h = c.height or 0
     local d = c.depth or 0
     if option == "line" then
     f.characters[n].commands = {
     { "rule", option == "line" and size/10, w },
     }
     else
     f.characters[n].commands = {
     { "down", d },
     { "rule", h + d, w },
     }
     end
     else
     -- probably a real bad font
     end
     end
     end
     return f
end

On 04/05/18 06:26, Ulrike Fischer wrote:

I'm trying to run one of the examples of fonts-mkiv.pdf

I copied the code from 4.5 Lua fonts to a file
"fonts-demo-rule.lua". This lua file is in the same directory as my
test file.

Then I tried

\definefont
[MyRuleFont]
[file:fonts-demo-rule.lua*default sa 1]

\starttext

{\MyRuleFont So when we use it we get text }

\stoptext

but I get in the log

fonts > defining > forced type 'lua' of 'fonts-demo-rule' not found
fonts > defining > font with asked name 'fonts-demo-rule' is not
found using lookup 'file'
fonts > defining > unknown font 'fonts-demo-rule', loading aborted
fonts > defining > unable to define 'fonts-demo-rule.lua' as
'MyRuleFont--0'

The file itself is found (I can see its path later on). What is
going on here?

___ 

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

Re: [NTG-context] using lua fonts

2018-05-08 Thread Henri Menke

Dear list,

this is a follow-up on Ulrike's post, so I'm just hijacking the thread.

How can I use the Lua fonts in Plain?  It works fine if I just remove 
ConTeXt-specific actualtext bits but as soon as I add features to the 
font, the name resolution fails with something like


! Font 
\mainfont=file:fonts-demo-rule.lua:original=file:texgyrepagella-regular.

otf not loadable: metric data not found or bad.

MWE is below as always.

Cheers, Henri

--- test.tex ---

\input luaotfload.sty

\font\mainfont="file:fonts-demo-rule.lua":original=file:texgyrepagella-regular.otf
\mainfont

This code is stored in fonts-demo-rule.lua and we can load that font in 
the usual way,

by specifying a filename.

\bye

--- fonts-demo-rule.lua ---

return function(specification)
local features = specification.features.normal
local name = features.original or "dejavu-serif"
local option = features.option -- we only support "line"
local size = specification.size -- always set
local detail = specification.detail -- e.g. default
if detail then
name = name .. "*" .. detail
end
local f, id = fonts.constructors.readanddefine(name,size)
if f then
f.properties.name = specification.name
f.properties.virtualized = true
f.fonts = {
{ id = id },
}
for s in string.gmatch("aeuioy",".") do
local n = utf.byte(s)
local c = f.characters[n]
if c then
local w = c.width or 0
local h = c.height or 0
local d = c.depth or 0
if option == "line" then
f.characters[n].commands = {
{ "rule", option == "line" and size/10, w },
}
else
f.characters[n].commands = {
{ "down", d },
{ "rule", h + d, w },
}
end
else
-- probably a real bad font
end
end
end
return f
end

On 04/05/18 06:26, Ulrike Fischer wrote:

I'm trying to run one of the examples of fonts-mkiv.pdf

I copied the code from 4.5 Lua fonts to a file
"fonts-demo-rule.lua". This lua file is in the same directory as my
test file.

Then I tried

\definefont
[MyRuleFont]
[file:fonts-demo-rule.lua*default sa 1]

\starttext

{\MyRuleFont So when we use it we get text }

\stoptext

but I get in the log

fonts > defining > forced type 'lua' of 'fonts-demo-rule' not found
fonts > defining > font with asked name 'fonts-demo-rule' is not
found using lookup 'file'
fonts > defining > unknown font 'fonts-demo-rule', loading aborted
fonts > defining > unable to define 'fonts-demo-rule.lua' as
'MyRuleFont--0'

The file itself is found (I can see its path later on). What is
going on here?


___
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] using lua fonts

2018-05-08 Thread Ulrike Fischer
Am Thu, 3 May 2018 20:26:20 +0200 schrieb Ulrike Fischer:

> I'm trying to run one of the examples of fonts-mkiv.pdf
> 
> I copied the code from 4.5 Lua fonts to a file
> "fonts-demo-rule.lua". This lua file is in the same directory as my
> test file.
> 
...
> 
> but I get in the log
> 
> fonts > defining > forced type 'lua' of 'fonts-demo-rule' not found

For the record: It was a silly error. As the lua file is not in the
sources I had to copy & paste from the fonts-mkiv.pdf and overlooked
that the code has a last "end" on the next page. After adding it to
the lua everything worked as expected.

-- 
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] using lua fonts

2018-05-08 Thread Hans Hagen

On 5/3/2018 8:26 PM, Ulrike Fischer wrote:

I'm trying to run one of the examples of fonts-mkiv.pdf

I copied the code from 4.5 Lua fonts to a file
"fonts-demo-rule.lua". This lua file is in the same directory as my
test file.

Then I tried

\definefont
[MyRuleFont]
[file:fonts-demo-rule.lua*default sa 1]

\starttext

{\MyRuleFont So when we use it we get text }

\stoptext

but I get in the log

fonts > defining > forced type 'lua' of 'fonts-demo-rule' not found
fonts > defining > font with asked name 'fonts-demo-rule' is not
found using lookup 'file'
fonts > defining > unknown font 'fonts-demo-rule', loading aborted
fonts > defining > unable to define 'fonts-demo-rule.lua' as
'MyRuleFont--0'

The file itself is found (I can see its path later on). What is
going on here?

i have no clue as it works ok here

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
___

[NTG-context] using lua fonts

2018-05-03 Thread Ulrike Fischer
I'm trying to run one of the examples of fonts-mkiv.pdf

I copied the code from 4.5 Lua fonts to a file
"fonts-demo-rule.lua". This lua file is in the same directory as my
test file.

Then I tried

\definefont
[MyRuleFont]
[file:fonts-demo-rule.lua*default sa 1]

\starttext

{\MyRuleFont So when we use it we get text }

\stoptext

but I get in the log

fonts > defining > forced type 'lua' of 'fonts-demo-rule' not found
fonts > defining > font with asked name 'fonts-demo-rule' is not
found using lookup 'file'
fonts > defining > unknown font 'fonts-demo-rule', loading aborted
fonts > defining > unable to define 'fonts-demo-rule.lua' as
'MyRuleFont--0'

The file itself is found (I can see its path later on). What is
going on here?

-- 
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] Question to sectioning

2018-04-25 Thread Pablo Rodriguez
On 04/24/2018 12:59 AM, Tomas Hala wrote:
> Hi Wolfgang,
> 
> some deep error appeared, unfortunately. I tested it on TL2014--17. Did you
> use TL2018? It seems similarly as any other error related with the change of
> dimensions maintanance betweeen TL2017 and 2018.

Hi Tomáš,

both issues (the one from this thread and the question with hanging
punctuation) are fixed in latest beta.

You may install the latest beta from the ConTeXt Suite (aka ConTeXt
Standalone [http://wiki.contextgarden.net/ConTeXt_Standalone]) besides
your TeX Live installation.

The ConTeXt Suite is portable, so it won’t interfere with TeX Live. In
fact, I keep previous versions and I have fifteen different betas on my
computer (I only use the latest one, but it is wise to keep old versions
just in case some relevant functionality is compromised in latest version).

In the past, I was also reluctant to use beta versions. But after a
reply to one question of mine in this list, I realized that I may use
the latest beta version, besides TeX Live or the latest stable from the
ConTeXt Suite.

Instead of invoking:

  contextjit document.tex

I had to invoke:

  source path-to-context-beta/tex/setuptex && contextjit document.tex

The minor difference (I guess you don’t type the command) allows you to
use the latest version of ConTeXt.

After all, I guess this is much easier that trying to fix ConTeXt from
TeX Live 2017.

Just in case 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
___

[NTG-context] Loading units fails

2018-04-24 Thread Michael Guravage
no-parse-first-line="true"

system  > stop commandline options


system  > start commandline files

system  >1: ./testing.tex

system  > stop commandline files


modules > start used modules

modules > loaded : *-units

modules > stop used modules


mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: readable+writable: '/home/michael/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e'
mkiv lua stats  > resource resolver: loadtime 0.009 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 8 found files, scanned paths: 
mkiv lua stats  > stored bytecode data: 424 modules (0.195 sec), 93 tables (0.014 sec), 517 chunks (0.209 sec)
mkiv lua stats  > traced context: maxstack: 1295, freed: 0, unreachable: 1295
mkiv lua stats  > cleaned up reserved nodes: 55 nodes, 9 lists of 453
mkiv lua stats  > node memory usage: 1 dir, 2 kern, 2 attribute, 50 glue_spec, 1 attribute_list, 2 temp, 2 user_defined
mkiv lua stats  > used backend: pdf (backend for directly generating pdf output)
mkiv lua stats  > jobdata time: 0.000 seconds saving, 0.000 seconds loading
mkiv lua stats  > callbacks: internal: 32, file: 165, direct: 2, late: 0, function 57, total: 256
mkiv lua stats  > loaded tex modules: 1 requested, all found (*-units)
mkiv lua stats  > loaded patterns: en::2, load time: 0.000
mkiv lua stats  > result saved in file: testing.pdf, compresslevel 3, objectcompresslevel 3
mkiv lua stats  > font engine: otf 3.103, afm 1.513, tfm 1.000
mkiv lua stats  > used platform: linux-64, type: unix, binary subtree: texmf-linux-64
mkiv lua stats  > used engine: luatex version 1.08 with functionality level 6712, banner: this is luatex, version 1.08.0 (tex live 2018)
mkiv lua stats  > control sequences: 44733 of 65536 + 10
mkiv lua stats  > lua properties: engine: lua 5.3, used memory: 68 MB (ctx: 68 MB), hash type: lua, hash chars: min(64,40), symbol mask: utf (τεχ)
mkiv lua stats  > runtime: 308.891 seconds

___
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] problem with character entities in XML processing

2018-04-19 Thread Hans van der Meer
Indeed. I should have known better. Temporary attack of brain weakness, I 
suppose. For those who want to see for themselves, the minimal example below 
will do.

dr. Hans van der Meer

% test character entity.
\startxmlsetups demo:entity
\xmlsetsetup{#1}{root}{demo:entity:*}
\stopxmlsetups
\xmlregisterdocumentsetup{demo}{demo:entity}
\startxmlsetups demo:entity:root
\blank Start test:\crlf
flushing: \xmlflush{#1}\crlf
End test\blank
\stopxmlsetups
\startbuffer[demo]

amp =  and #38 = 
\stopbuffer
\starttext
\currentdate-\currenttime\quad\ConTeXt-version=\contextversion\blank
{\bf Testing use of character entities}\blank
These should produce the same result: \type{} and \type{} and indeed 
they do.\blank
\xmlprocessbuffer{demo}{demo}{}\blank
\stoptext



> On 19 Apr 2018, at 14:44, Hans Hagen <j.ha...@xs4all.nl> wrote:
> 
> On 4/19/2018 10:53 AM, Hans van der Meer wrote:
>> The following use of character entities  aborts in ConTeXt. That is of 
>> course because the # is seen as a parameter. Changing this to &\#xxx; or 
>> &\letterhash xxx; typesets  as is, but that is not the intention, 
>> because an ampersand should appear. So, how do I proceed here?
>> Minimal example:
>> % test character entity failure.
>> \startxmlsetups demo:entity
>> \xmlsetsetup{#1}{root}{demo:entity:*}
>> \stopxmlsetups
>> \xmlregisterdocumentsetup{demo}{demo:entity}
>> \startxmlsetups demo:entity:root
>> \blank Start test:\crlf
>> root:  = ""\crlf
>> root:  = "&\letterhash 038;”\crlf % &\#038; produces the same
>> End test\blank
>> \stopxmlsetups
> 
> you are tex mode there so & == &
> 
> 
>> \startbuffer[demo]
>> 
>> \stopbuffer
>> \starttext
>> \currentdate-\currenttime\quad\ConTeXt-version=\contextversion\blank
>> {\bf Testing use of character entities}\blank
>> These should produce the same result: \type{} and \type{}\blank
>> \xmlprocessbuffer{demo}{demo}{}\blank
>> \stoptext
>> dr. 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://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 <http://www.pragma-ade.nl/> | 
> www.pragma-pod.nl <http://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] problem with character entities in XML processing

2018-04-19 Thread Hans van der Meer
The following use of character entities  aborts in ConTeXt. That is of course because the # is seen as a parameter. Changing this to &\#xxx; or &\letterhash xxx; typesets  as is, but that is not the intention, because an ampersand should appear. So, how do I proceed here?Minimal example:% test character entity failure.\startxmlsetups demo:entity	\xmlsetsetup{#1}{root}{demo:entity:*}\stopxmlsetups\xmlregisterdocumentsetup{demo}{demo:entity}\startxmlsetups demo:entity:root	\blank Start test:\crlf	root:  = ""\crlf	root:  = "&\letterhash 038;”\crlf % &\#038; produces the same	End test\blank\stopxmlsetups\startbuffer[demo]\stopbuffer\starttext\currentdate-\currenttime\quad\ConTeXt-version=\contextversion\blank{\bf Testing use of character entities}\blankThese should produce the same result: \type{} and \type{}\blank\xmlprocessbuffer{demo}{demo}{}\blank\stoptext

xml-entity.pdf
Description: Adobe PDF document

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

Re: [NTG-context] ConTeXt Sources (MkII)

2018-04-18 Thread luigi scarso
On Wed, Apr 18, 2018 at 9:26 AM, Robert Zydenbos <cont...@zydenbos.net>
wrote:

> A question for the hardcore members. On http://wiki.contextgarden.net/
> Manuals I read:
>
> ConTeXt Sources (MkII)
> Apart from the manuals, the source files (especially, some of the old
> ones) contain excellent documentation and examples. If you want a pretty
> printed pdf of a source file, say core-rul.tex, you can type
>
>  texmfstart texexec --module kpse:core-rul.tex
>
>
> But this apparently doesn’t work any more (i.e., I simply entered that
> line in the Mac terminal and nothing happened). Am I doing something wrong?
>
> Robert
>

Do you really need mkii  ?



-- 
luigi
___
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] ConTeXt Sources (MkII)

2018-04-18 Thread Robert Zydenbos
A question for the hardcore members. On http://wiki.contextgarden.net/Manuals I 
read:

ConTeXt Sources (MkII)

Apart from the manuals, the source files (especially, some of the old ones) 
contain excellent documentation and examples. If you want a pretty printed pdf 
of a source file, say core-rul.tex, you can type
 texmfstart texexec --module kpse:core-rul.tex

But this apparently doesn’t work any more (i.e., I simply entered that line in 
the Mac terminal and nothing happened). Am I doing something wrong?

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

Re: [NTG-context] \replaceword with spaces

2018-04-15 Thread Hans Hagen

On 4/15/2018 1:30 PM, Pablo Rodriguez wrote:

Dear list,

I have the following sample:

 \replaceword[some][via ][Vía]
 \replaceword[some][calle ][c/ ]
 \replaceword[some][ calle][ Calle]
 \starttext
 \startTEXpage[offset=2em]
 This is what I get:

 \setreplacements[some]%
 calle via del viaducto de la calle

 \resetreplacements
 This is what I need:

 c/ Vía del viaducto de la Calle
 \stopTEXpage
 \stoptext

Is there any way to get spaces in the string to be replaced?
not with a lot of effort on my end which i'm not willing to invest in 
something that is just a hack for bad input ... tex has no spaces so 
then we need other magic


anyway, i added a bogus lookup to the font handler that will remove 
characters so in a next beta you can do this (some upbeat music in the 
background so i could convince myself)


\startluacode
 fonts.handlers.otf.addfeature {
 name= "crap",
     type= "chainsubstitution",
 prepend = true,
 lookups = {
 {
 type = "multiple",
 data = {
 ["v"] = { "V", "í", "a" },
     },
 },
 {
 type = "multiple",
 data = {
 ["c"] = { "c", "/" },
 },
 },
 {
 type = "substitution",
 data = {
 ["c"] = "C",
 },
 },
 },
 data = {
 rules = {
 {
 comment = "'via' => 'Vía'",
 current = { { "v" }, { "i" }, { "a" } },
 after   = { { " " } },
 lookups = { 1, 0, 0 },
 },
 {
 comment = "'calle ' => 'c/ '",
 current = { { "c" }, { "a" }, { "l" }, { "l" }, { 
"e" } },

 after   = { { " " } },
 lookups = { 2, 0, 0, 0, 0 },
 },
 {
 comment = "' calle' => ' Calle'",
 before  = { { " " } },
 current = { { "c" } },
 after   = { { "a" }, { "l" }, { "l" }, { "e" } },
 lookups = { 3 },
 },
 },
 },
 }
\stopluacode

\definefontfeature[default][default][crap=yes]

\starttext

\startTEXpage[offset=2em]
\type{text:} \type{calle via del viaducto de la calle}

\type{done:} calle via del viaducto via de la calle

\type{okay:} c/ Vía del viaducto Vía de la Calle
\stopTEXpage

\stoptext

one could make a constructor for this but would hide the weirdness of it 
... yet another obscure feature


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
___

[NTG-context] Problem with Filter Module in latent context beta

2018-04-14 Thread Lutz Haseloff
t/tex/context/patterns/mkiv/lang-us.lua
 
fullname=/usr/local/context/tex/texmf-context/tex/context/patterns/mkiv/lang-us.lua
 usedmethod=database
system  >7: filename=/home/filtertest.tex 
foundname=/home/filtertest.tex fullname=/home/filtertest.tex usedmethod=direct
system  >8: filename=t-filter.mkiv filetype=tex 
foundname=/usr/local/context/tex/texmf-modules/tex/context/third/filter/t-filter.mkiv
 
fullname=/usr/local/context/tex/texmf-modules/tex/context/third/filter/t-filter.mkiv
 usedmethod=database
system  >9: filename=t-module-catcodes.tex filetype=tex 
foundname=/usr/local/context/tex/texmf-modules/tex/context/third/filter/t-module-catcodes.tex
 
fullname=/usr/local/context/tex/texmf-modules/tex/context/third/filter/t-module-catcodes.tex
 usedmethod=database

system  > stop used files


system  > start commandline options

system  > currentrun="1"
system  > fulljobname="./filtertest.tex"
system  > input="./filtertest.tex"
system  > kindofrun="1"
system  > maxnofruns="9"
system  > no-parse-first-line="true"

system  > stop commandline options


system  > start commandline files

system  >1: ./filtertest.tex

system  > stop commandline files


modules > start used modules

modules > loaded : *-filter
modules > loaded : *-module-catcodes

modules > stop used modules


mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: 
/usr/local/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.046 seconds, 0 scans with 
scantime 0.000 seconds, 0 shared scans, 9 found files, scanned paths: 
mkiv lua stats  > stored bytecode data: 424 modules (0.815 sec), 93 tables 
(0.067 sec), 517 chunks (0.882 sec)
mkiv lua stats  > traced context: maxstack: 1292, freed: 0, unreachable: 1292
mkiv lua stats  > cleaned up reserved nodes: 55 nodes, 9 lists of 453
mkiv lua stats  > node memory usage: 1 dir, 2 kern, 2 attribute, 50 glue_spec, 
1 attribute_list, 2 temp, 1 if_stack, 2 user_defined
mkiv lua stats  > used backend: pdf (backend for directly generating pdf output)
mkiv lua stats  > jobdata time: 0.000 seconds saving, 0.000 seconds loading
mkiv lua stats  > callbacks: internal: 47, file: 235, direct: 6, late: 0, 
function 59, total: 347
mkiv lua stats  > loaded tex modules: 2 requested, all found (*-filter 
*-module-catcodes)
mkiv lua stats  > loaded patterns: en::2, load time: 0.000
mkiv lua stats  > result saved in file: filtertest.pdf, compresslevel 3, 
objectcompresslevel 3
mkiv lua stats  > font engine: otf 3.103, afm 1.513, tfm 1.000
mkiv lua stats  > used platform: unknown, type: unix, binary subtree: 
texmf-linux-armhf
mkiv lua stats  > used engine: luatex version 1.08 with functionality level 
6700, banner: this is luatex, version 1.08.0 (tex live 2018)
mkiv lua stats  > control sequences: 44709 of 65536 + 10
mkiv lua stats  > lua properties: engine: lua 5.3, used memory: 57 MB (ctx: 57 
MB), hash type: lua, hash chars: min(64,40), symbol mask: utf (τεχ)
mkiv lua stats  > runtime: 11.096 seconds

___
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] Installing fonts in a ConTeXt Docker (texfont tool missing?)

2018-04-13 Thread Rodzis, Michelle
Dear Mojca,


obviously I have forgotten to add an important detail - the fonts I want to 
install are TrueType fonts. My bad and apologies!


For installing ttf I've used 
http://tug.org/pracjourn/2005-2/schmitz/schmitz.pdf (also mentioned in wiki) so 
far, and it worked every time.

Best, Michelle


Von: ntg-context <ntg-context-boun...@ntg.nl> im Auftrag von Mojca Miklavec 
<mojca.miklavec.li...@gmail.com>
Gesendet: Freitag, 13. April 2018 10:54
An: mailing list for ConTeXt users
Betreff: Re: [NTG-context] Installing fonts in a ConTeXt Docker (texfont tool 
missing?)

On 13 April 2018 at 10:16, Rodzis, Michelle wrote:
> Dear list,
>
> currently I work on a customized Docker container based on Ubuntu 16.04
> where I run ConTeXt standalone. To install ConTeXt, I use the approach
> described in the wiki:
>
>
> RUN wget http://minimals.contextgarden.net/setup/first-setup.sh &&\
> sh ./first-setup.sh --modules=all
>
> After setting ConTeXt root everything works fine and as expected. However,
> the texfont tool seems to be missing which means I cannot install new fonts
> in my container.

Nowadays texfont is the wrong tool to use. It doesn't actually install
fonts, it merely converts them from, say, Type 1, to a zillion of
8-bit files (meaning that you won't even be able to use more than a
couple accented characters in that font). This was useful before TeX
supported OpenType fonts, but is a complete waste of time and
resources to go through that painful route nowadays.

You can just copy your own OpenType font files to, say,
texmf-fonts/data (and probably update the font database after that
with mtxrun).

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
___
___
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] Installing fonts in a ConTeXt Docker (texfont tool missing?)

2018-04-13 Thread Mojca Miklavec
On 13 April 2018 at 10:16, Rodzis, Michelle wrote:
> Dear list,
>
> currently I work on a customized Docker container based on Ubuntu 16.04
> where I run ConTeXt standalone. To install ConTeXt, I use the approach
> described in the wiki:
>
>
> RUN wget http://minimals.contextgarden.net/setup/first-setup.sh &&\
> sh ./first-setup.sh --modules=all
>
> After setting ConTeXt root everything works fine and as expected. However,
> the texfont tool seems to be missing which means I cannot install new fonts
> in my container.

Nowadays texfont is the wrong tool to use. It doesn't actually install
fonts, it merely converts them from, say, Type 1, to a zillion of
8-bit files (meaning that you won't even be able to use more than a
couple accented characters in that font). This was useful before TeX
supported OpenType fonts, but is a complete waste of time and
resources to go through that painful route nowadays.

You can just copy your own OpenType font files to, say,
texmf-fonts/data (and probably update the font database after that
with mtxrun).

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] texdoc in ConTeXt standalone

2018-04-04 Thread Hans Hagen

On 4/5/2018 1:28 AM, Henri Menke wrote:

On Thu, 2018-04-05 at 01:18 +0200, Hans Hagen wrote:

On 4/5/2018 12:43 AM, Henri Menke wrote:


Dear list,

I'm sure you aware of the very useful "texdoc" command line utility in TeX
live
which brings up the PDF documentation for packages.  ConTeXt standalone also
comes with documentation in

      /opt/context/tex/texmf-context/doc/context

However, I find it tedious to always search for the correct subfolder to get
to
the document I need.  It would be great if there was something like

      mtxrun --script doc metafun

which would open the MetaFun manual.  Similarly "mtxrun --script doc
gnuplot"
would open the manual of the gnuplot module, etc.

this is one of these magic features that suddenly is available on your
system

mtxrun --launch metafun*.pdf
mtxrun --launch cld-mkiv.pdf
mtxrun --all --launch "*-mkiv.pdf"


Hm, that requires that I know enough about the name of the document.  A list
would be quite nice in the sense that I could just type "metafun" and then
select from "metafun-p.pdf" and "metafun-s.pdf" instead of opening both
documents.


on my machine opening the lot is fast enough but anyway it's a trivial 
extension, so i've added --list


>mtxrun --launch --list *-mkiv.pdf
mtxrun  |   1:  charts-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |   2:  cld-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |   3:  colors-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |   4:  epub-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |   5:  fonts-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/fonts
mtxrun  |   6:  languages-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |   7:  libraries-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |   8:  lua-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |   9:  mag--mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/magazines
mtxrun  |  10:  mag-0002-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/magazines
mtxrun  |  11:  mag-0006-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/magazines
mtxrun  |  12:  mag-0007-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/magazines
mtxrun  |  13:  mag-0010-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/magazines
mtxrun  |  14:  mag-1101-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/magazines
mtxrun  |  15:  mag-1102-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/magazines
mtxrun  |  16:  mag-1103-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/magazines
mtxrun  |  17:  math-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |  18:  rules-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |  19:  spacing-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |  20:  spreadsheets-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |  21:  sql-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |  22:  steps-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |  23:  swiglib-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |  24:  templates-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |  25:  tools-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |  26:  units-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |  27:  workflows-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |  28:  xml-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |  29:  xtables-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals



[select number]

>

Re: [NTG-context] texdoc in ConTeXt standalone

2018-04-04 Thread Hans Hagen

On 4/5/2018 1:28 AM, Henri Menke wrote:

On Thu, 2018-04-05 at 01:18 +0200, Hans Hagen wrote:

On 4/5/2018 12:43 AM, Henri Menke wrote:


Dear list,

I'm sure you aware of the very useful "texdoc" command line utility in TeX
live
which brings up the PDF documentation for packages.  ConTeXt standalone also
comes with documentation in

      /opt/context/tex/texmf-context/doc/context

However, I find it tedious to always search for the correct subfolder to get
to
the document I need.  It would be great if there was something like

      mtxrun --script doc metafun

which would open the MetaFun manual.  Similarly "mtxrun --script doc
gnuplot"
would open the manual of the gnuplot module, etc.

this is one of these magic features that suddenly is available on your
system

mtxrun --launch metafun*.pdf
mtxrun --launch cld-mkiv.pdf
mtxrun --all --launch "*-mkiv.pdf"


Hm, that requires that I know enough about the name of the document.  A list
would be quite nice in the sense that I could just type "metafun" and then
select from "metafun-p.pdf" and "metafun-s.pdf" instead of opening both
documents.



features like that have always been present in the context suite of
programs (i bet even before texdoc) but it might be that i don't call
the right thing on todays linux:

local launchers={
    windows="start %s",
    macosx="open %s",
    unix="$BROWSER %s &> /dev/null &",
}


I'm quite sure it should be xdg-open (or $PDFVIEWER if it is set and the file is
PDF) on Linux.  For me $BROWSER is unset.
https://linux.die.net/man/1/xdg-open


can you check that in mtxrun?

btw, context itself provides --autopdf which is handy when you run from 
an editor



$ mtxrun --launch metafun*.pdf
resolvers   | resolving | forcing filetype 'tex'
resolvers   | resolving | checking wildcard 'metafun*.pdf'
resolvers   | methods | resolving, method 'concatinators', how 'tag', tag
'file'
resolvers   | methods | resolving, method 'concatinators', how 'tag', tag
'file'
mtxrun  | launching /opt/context/tex/texmf-
context/doc/context/documents/general/manuals/metafun-p.pdf
sh: 1: /opt/context/tex/texmf-
context/doc/context/documents/general/manuals/metafun-p.pdf: Permission denied


there's also

mtxrun --edit kpse:cld-mkiv.tex

we can of course extend this feature with some listing but then i'd
rather consult the descriptive files xml but i'm not sure if i
distribute them yet

btw, there are all kind of gimmicks like

mtxrun --script grep doifelse /data/context/**.mkiv

which works with lua patterns and

mtxrun --script fcd --scan /data
mtxrun --script fcd mkiv

for fast directory switching (which i use a lot)

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
___

<    7   8   9   10   11   12   13   14   15   16   >