Re: [NTG-context] lmtx: rotation problem with float numbers

2020-05-27 Thread Peter Rolf
Am 27.05.2020 um 17:46 schrieb Wolfgang Schuster:
> Hans Hagen schrieb am 27.05.2020 um 17:39:
>> On 5/27/2020 5:30 PM, Wolfgang Schuster wrote:
>>> Peter Rolf schrieb am 27.05.2020 um 16:38:
>>>> Hi,
>>>>
>>>> this used to work, but wants a dimension now
>>> In which way? Did you get the desired result or was there just no
>>> error message.
>>>> \starttext
>>>> \rotate[rotation=-0.2]{Rotation}
>>>> \stoptext
>>>>
>>>> No such problems with integer rotation numbers.
>>> ConTeXt expects a integer for the rotation value and decimals are
>>> only possible for a dimension.
>> can you test with:
>>
>>    \clf_analyzerotate % rather accurate
>>  \p_rotation_rotation\space
>>
>> in grph-trf.mkiv
> It works.
>

Thanks for the quick fix and the testing :)
___
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] lmtx: rotation problem with float numbers

2020-05-27 Thread Peter Rolf
Hi,

this used to work, but wants a dimension now

\starttext
\rotate[rotation=-0.2]{Rotation}
\stoptext

No such problems with integer rotation numbers.


Peter



T:\tmp>context --version
mtx-context | ConTeXt Process Management 1.03
mtx-context |
mtx-context | main context file:
V:/tmp/context/tex/texmf-context/tex/context/base/mkiv/context.mkiv
mtx-context | current version: 2020.05.25 23:39
mtx-context | main context file:
V:/tmp/context/tex/texmf-context/tex/context/base/mkiv/context.mkxl
mtx-context | current version: 2020.05.25 23:39
\starttext
\rotate[rotation=-0.2]{Rotation}
\stoptext
open source > level 1, order 1, name 'cont-yes.mkiv'
system  > 
system  > ConTeXt  ver: 2020.05.25 23:39 MKIV beta  fmt: 2020.5.27  
int: english/english
system  > 
system  > 'cont-new.mkiv' loaded
open source > level 2, order 2, name 
'V:/tmp/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 
'V:/tmp/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system  > files > jobname 'rotation', input './rotation', result 
'rotation'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 2, order 3, name './rotation.tex'
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded

tex error   > tex error on line 2 in file ./rotation.tex: ! Illegal unit of 
measure (pt inserted)

 
\relax 
\grph_rotate_finish_yes ...f_analyzerotate \numexpr \p_rotation_rotation \relax 

\d_grph_rotate_width \d_grph_rotate_height \d_grp...
\grph_rotate_finish_indeed ...h_rotate_finish_nop \else \grph_rotate_finish_yes 

\fi \egroup 
\syst_boxes_with_next_box ->\grph_rotate_finish_indeed 
   \egroup 
l.2 \rotate[rotation=-0.2]{Rotation}
  

1 \starttext
2 >>  \rotate[rotation=-0.2]{Rotation}
3 \stoptext
4 


Dimensions can be in units of em, ex, in, pt, pc, cm, mm, dd, cc, nd, nc, bp, or
sp; but yours is a new one! I'll assume that you meant to say pt, for printer's
points. two letters.


___
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] Color Profiles in lmtx

2020-02-13 Thread Peter Rolf
Am 12.02.2020 um 17:15 schrieb Jan U. Hasecke:
> Am 12.02.20 um 11:09 schrieb Peter Rolf:
>
>>> I get this in my logs
>>>
>>> backend > profiles > profile specification 'ISO Coated v2 300% 
>>> (ECI)' loaded from 
>>> '/home/juh/context-linux-64/tex/texmf-context/colors/icc/context/colorprofiles.xml'
>
> I just realized that the above output is the right output.
>
> Ok. But now I have another question
>
> I want to install a new profile I downloaded from eci.org
>
> I extended colorprofiles.xml putting it in
> texmf-local/colors/icc/context/ with this additional xml:
>
> 
> PSO_Uncoated_ISO12647_eci.icc
> CMYK
> prtr
> Custom
> PSO Uncoated ISO12647 ECI
> ae81087e1c54c6fdda2f93bd2d47cfaf
> 200
> http://www.eci.org
> Commercial and specialty offset, paper type 4,
> uncoated white paper, positive plates, tone value increase curves C
> (CMY) and D (K), white backing.
> 
> 
>
> I generated the md5 checksum from the file PSO_Uncoated_ISO12647_eci.icc.
>
> But the file in texmf-local is not found
>
> backend > profiles > profile specification 'PSO Uncoated
> ISO12647 ECI' not found in 'colorprofiles.xml, colorprofiles.lua'
>
> How can I make context aware of the files?
>

Just tried to do the same and after some fiddling it worked.
I used this settings for the profile (slightly modified)


PSO_Uncoated_ISO12647_eci.icc
CMYK
prtr
Fogra47L
PSO Uncoated ISO12647 (ECI)
ae81087e1c54c6fdda2f93bd2d47cfaf
200
http://www.eci.org
Commercial and specialty offset, paper type 4,
uncoated white paper, positive plates, tone value increase curves C
(CMY) and D (K), white backing.




Copy the icc-profile into the same folder as the shipped profiles. Call
"context --make" to make a new format, update the file database.


%--
\enabletrackers[backend.pdfx]

\setupbackend[
   format=PDF/X-3:2003,
   intent={PSO Uncoated ISO12647 (ECI)},
   ]

\setupcolors[cmyk=yes,rgb=no]

\nopdfcompression
\starttext
foo
\stoptext
%---

The produced PDF has a size of 1.7MB. Tested with

context --version
mtx-context | ConTeXt Process Management 1.03
mtx-context |
mtx-context | main context file:
r:/tex/texmf-context/tex/context/base/mkiv/context.mkiv
mtx-context | current version: 2020.01.26 18:34
mtx-context | main context file:
r:/tex/texmf-context/tex/context/base/mkiv/context.mkxl
mtx-context | current version: 2020.01.26 18:34


___
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] Color Profiles in lmtx

2020-02-12 Thread Peter Rolf
Am 12.02.2020 um 09:41 schrieb juh:
> Hi all,
>
> again I have a question concerning color profiles.
>
> I have this to load the ISO Coated v2 300% profile.
>
> \setupbackend[
>format=PDF/X-3:2003,
>intent={ISO Coated v2 300\letterpercent\space (ECI)},
>]
>
> \setupcolors[cmyk=yes,rgb=no,]
>
> But is this profile part of the new lmtx version?
>
> I get this in my logs
>
> backend > profiles > profile specification 'ISO Coated v2 300% (ECI)' 
> loaded from 
> '/home/juh/context-linux-64/tex/texmf-context/colors/icc/context/colorprofiles.xml'
>
> But I am not sure whether the profile is really loaded.
>
> In the old context distribution I had to put the profile in texmf-local.
>
> There is this in lmtx:
>
> ~/context-linux-64/tex/texmf-context/colors/icc/profiles$ ls -l
> insgesamt 3652
> -rw-r--r-- 1 juh juh 416 Jan  6 16:32 default_gray.icc
> -rw-r--r-- 1 juh juh1992 Jan  6 16:32 ecirgb_v2.icc
> -rw-r--r-- 1 juh juh 700 Jan  6 16:32 ecirgb_v2_iccv4.icc
> -rw-r--r-- 1 juh juh 1829093 Jan  6 16:32 isocoated_v2_300_eci.icc
> -rw-r--r-- 1 juh juh 1829077 Jan  6 16:32 isocoated_v2_eci.icc
> -rw-r--r-- 1 juh juh3144 Jan  6 16:32 srgb.icc
> -rw-r--r-- 1 juh juh   60960 Jan  6 16:32 srgb_v4_icc_preference.icc
>
> I am not sure if the file name matches as in profiles.xml we have this with
> mixed upper and lower cases:
>
>  
> 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)
> 
>
> Is there a linux tool to test if the correct profile is part of the pdf?
>
> Any hints?
> TIA
> juh
>

Hi juh,

I guess the problem are the file names of the profiles. On Windows it
doesn't matter if you use upper or lower case letters. AFAIK Linux
handles that differently.
In the end the  entries in
  "[..]/texmf-context/colors/icc/context/colorprofiles.xml"
and the real file names must be "equal" for all OS.

Add

\enabletrackers[backend.pdfx]

to your document to get more info about the profile inclusion.
Not sure if this is the correct tracker though... no time to check, as I
have to make lunch now.


Hope that helps,

Peter
___
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 \attachment when specifying name

2020-02-08 Thread Peter Rolf
Am 08.02.2020 um 09:31 schrieb Pablo Rodriguez:
> Hi Peter,
>
> here you have a minimal sample with file name changed inside the
> attachment command:
>
>\setupinteraction[state=start]
> \starttext
> an attachment\attachment[file=secret-name.pdf,
> type={application/pdf},
> %~ method=hidden,
> name=other-name]
> \stoptext
>
> If method is hidden (no annotation), /EmbeddedFiles doesn’t honor the
> "name" option.
>
> If method is normal (generating an annotation), /T in /FileAttachment
> doesn’t "honor the "name" option.
>
> Would it be possible that both cases contain the value from the name
> "option" instead of file?
>
> Many thanks for checking this,
>
> 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
> ___
>

Hi Pablo,

my first thought was: how can you rename something that isn't showing up
(as text) in the PDF anywhere?
On a second thought this makes sense, if you want to hide the original
file name in the PDF code. Shouldn't be to hard to make this work even
for hidden attachments.

But it can also be argued that this feature gives the user a false sense
of security. Any attachment with metadata may contain additional
information that makes the prior name change useless.
And in the end the author of the document is responsible for it. In my
opinion renaming a file before embedding it, is acceptable in this
security context. But maybe I'm wrong here...


Peter
___
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] attachments working again (issue with /EmbeddedFiles)

2020-02-08 Thread Peter Rolf
Am 07.02.2020 um 22:37 schrieb Hans Hagen:
> On 2/7/2020 9:55 PM, Pablo Rodriguez wrote:
>> On 2/7/20 9:19 PM, Rik Kabel wrote:
>>>
>>> On 2/7/2020 14:46, Pablo Rodriguez wrote:
 many thanks for having fixed the issues with attachments (in latest
 beta
 from 2020.02.07 18:36). I haven’t tested attachments with PDF/A-3a.

>>> PDF/A-3a attachments still fail validation with the same issues.
>>
>> Hi Rik,
>>
>> it has way less issues, at least using verapdf-1.5.18 and the following
>> sample:
>>
>>  \setuptagging[state=start]
>>
>>  \setupbodyfont[30pt]
>>
>>  \setupbackend
>>    [format=PDF/A-3a,
>>     intent=sRGB IEC61966-2.1,
>>     profile={sRGB.icc,default_gray.icc},
>>     level=0]
>>
>>  \setupcolors[pagecolormodel=auto]
>>
>>  \setupinteraction[state=start]
>>  \starttext
>>  \startTEXpage[offset=1em]
>>  an attachment\attachment[file=xml-mkiv.pdf,
>>  type={application/pdf}]
>>  \stopTEXpage
>>  \stoptext
>>
>> With "method=hidden" (no attachment annotation) it has no issue.
>>
>> Both issues are related to annotations in general:
>>
>> - If the flag annotation is present (/F key), it should be set to print
>> and disable everything else.
>> - Annotations need an appearance dictionary (unless their /Rect is one
>> and the same point, or /Popup or /Link annotations).
>>
>> Actual value of the annotation flag key is "/F null". I wonder whether
>> this is a bug (for having wanted to avoid the presence of /F at all).
>>
>> Otherwise, I don’t think that setting all embedded file annotations to
>> printable is a good default.
>>
>> Just in case it helps to the discussion,
> Peter is stepwise looking into all these issues but we decided to also
> see how that checking and standards evolve in cases where it's a
> confusing mess. And these 'appearance dicts' are an example of a mess.
> On the one hand there's predefined appearances and on the other hand
> enforced renderings which gives some chicken-egg issue. It smells a lot
> like bugs became features (standards) or 'acrobat behaviour' made the
> standard or ... (like the zero rect thing, which, given t e plenty of
> flags there are and verbosity there is in pdfm is pretty weird and
> actually can make viewers bark. Irr the current approach we follow is
> kind of a compromis.
>
> Now, of course we can play safe and *always* have some fake appearance
> (we could basically choose whatever funny shape we like as over time
> people will interpret hard codes symbols for attachments differently)
> and drop support for standardized renderings (that could adapt over time).
>
> So ... no changes etc till Peter gives his blessing as he is testing all
> this in the framework we've set up for it.
>
> Hans
>

As Hans stated, we are working on it and two of the three validation
problems are already solved (needs more testing though). The only
remaining problem is this

https://github.com/veraPDF/veraPDF-validation-profiles/wiki/PDFA-Parts-2-and-3-rules#rule-633-1

I attached the current code, so you and Rik are able to test it if you
want (creating a new format is required). Best contact me off-list if
you run into new problems.


Peter



lpdf-wid.7z
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
___


[NTG-context] overlay problem (beta 31.12.2019)

2020-01-02 Thread Peter Rolf
Hi Hans

There is a small problem with overlays.

%-
\starttext
\defineoverlay[foo][{\blackrule[color=black,width=20mm,height=20mm]}]%
\framed[background=foo,strut=no,offset=overlay]%{\blackrule[color=white,width=16mm,height=16mm]}
\stoptext
%-

The inner square should be centered.


Peter
___
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] Transparency in PNGs becomes black in PDF/X

2019-12-20 Thread Peter Rolf
Hi Hraban,

PDF/X-1a:2001 doesn't support transparency. You have to use PDF/X-4(p)
for that (the first X variant that supports transparency).
PDF/A-2|3 may also be an option. These formats also support transparency.


Peter


Am 19.12.2019 um 21:49 schrieb Henning Hraban Ramm:
> I think this is the same problem that I had in Bassenge:
> The transparent part of PNGs like the attached one becomes black if I
> try to make an PDF/X.
>
> I hope that is solvable...
>
> \setupbackend[format=PDF/X-1a:2001]
>
> \starttext
> \externalfigure[kinder/esel_kl]
> \stoptext
>
>
> Best, Hraban
>
> ___
> 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] PDF/A-3a attachment support query

2019-12-07 Thread Peter Rolf
Am 06.12.2019 um 16:56 schrieb Hans Hagen:
> On 12/6/2019 4:21 PM, Peter Rolf wrote:
>> Hi Rik,
>>
>> I guess it's not supported yet.
>>
>> In "lpdf-fmt.lua" it says:
>> [..]
>>     ["pdf/a-3a"] = { -- untested; NEW: any type of attachment is
>> allowed
>> [..]
>>
>> I remember adding the "a-2a" and "a-3a" versions back when Hans and I
>> added experimental support for "PDF/UA-1" (which is based on "PDF/A-3a",
>> but much more limited). This all lies back a few years, can't remember
>> the details.
>>
>> So we have only basic support for "PDF/A-3a", the more advanced features
>> of that format are not supported yet. The main problem here is the
>> lacking PDF/A documentation (ISO pay wall). I guess there is currently
>> no real reason to use that format at all (?).
> indeed (and to be honest, i never need these options myself)
>
> anyway, i happily wait till you come up with an entry for it
>
> (i have no clue what 'advanced' features mean here, something we need to
> implement or just something that needs a flag)
>

@Hans:
I'll look into it. Give me some days to read the documentation (not that
much anyway) and to play around with it.
All the "new" features are already implemented as building blocks for
the PDF/X variants, so I guess it's mostly just adding some new table
entries ('b|u' variants). Attachments seem to need several extra PDF
entries. Will report back to you and Luigi.


@Luigi: mh, that really looks like a lot of fun
https://docs.verapdf.org/validation/pdfa-parts-2-and-3/

@Pablo, Rik:
We can put you in cc if you volunteer for testing. Just say aye :D



Peter
___
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] PDF/A-3a attachment support query

2019-12-06 Thread Peter Rolf
Hi Rik,

I guess it's not supported yet.

In "lpdf-fmt.lua" it says:
[..]
   ["pdf/a-3a"] = { -- untested; NEW: any type of attachment is allowed
[..]

I remember adding the "a-2a" and "a-3a" versions back when Hans and I
added experimental support for "PDF/UA-1" (which is based on "PDF/A-3a",
but much more limited). This all lies back a few years, can't remember
the details.

So we have only basic support for "PDF/A-3a", the more advanced features
of that format are not supported yet. The main problem here is the
lacking PDF/A documentation (ISO pay wall). I guess there is currently
no real reason to use that format at all (?).


Best wishes,

Peter



Am 06.12.2019 um 03:11 schrieb Rik Kabel:
> Hello list,
>
> The following document fails PDF/A-3a validation. It passes without the
> attachment.
>
> \setuplanguage   [en]
> \setuptagging    [state=start]
> \setupinteraction    [state=start]
> \setupbackend    [format={pdf/a-3a},profile={default_gray.icc},
>   intent={ISO coated v2 300\letterpercent\space
> (ECI)}]
> \setupstructure  [state=start,method=auto]
> \setupcolors [pagecolormodel=auto,start=yes,rgb=no,cmyk=no]
> \setupbodyfont   [Palatino,10pt]
> \starttext
>
>   Attaching a plain text file.
>
> % \attachment    [file=test.tex,
> % type={text/plain;charset=UTF-8}]
> % The \ConTeXt\ source code for this document is attached here.
>   \attachment    [file=testa.pdf,
>   type={application/pdf}]
>   A successfully validated pdf/a-3a file is attached here.
>
> \stoptext
>
> pdf-online reports:
>
> Validating file "test.pdf" for conformance level pdfa-3a
> The key F is required but missing.
> The appearance dictionary doesn't contain an entry.
> File specification 'testa.pdf' not associated with an object.
> The document does not conform to the requested standard.
> The document doesn't conform to the PDF reference (missing required
> entries, wrong value types, etc.).
> The document contains hidden, invisible, non-viewable or
> non-printable annotations.
> The document contains annotations or form fields with ambigous or
> without appropriate appearances.
> The document does not conform to the PDF/A-3a standard.
> Done.
>
> My understanding is that 3-a should support both pdf and non-pdf
> attachments. This fails in a similar manner with both pdf/a-3a-validated
> files and with plain text files. I also tested with verapdf, and it also
> rejected the document with an attachment.
>
> Is this my error, or is it not yet supported?
>
> --
> 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] issue with JavaScript in Acrobat

2019-10-07 Thread Peter Rolf
Hi Pablo

Nearly no experience with JavaScript, no working Acrobat version
installed (no testing possible). So take the following with a grain of
salt...

I guess it's just the too small call interval of the "step_clock"
function. Calling it a thousand times per second doesn't seem to work.
If the function is called a hundred times per second only, your clock
counter is also incremented only a hundred times.

I would use a system clock value instead (difference between start time
and current time), so you can limit the call interval to a more
reasonable value (1/10s).


Regards, Peter


Am 06.10.2019 um 21:13 schrieb Pablo Rodriguez:
> Dear list,
>
> I have this minimal sample:
>
> \setupinteraction[state=start]
> \setupinteractionscreen[option=max]
> \startJSpreamble {varia} used now
> var transitions = [1000,
> 2000,
> 3000,
> 4000,
> 5000,
> 6000,
> 7000,
> 8000,
> 9000];
>
> var msecs = 0;
>
> function step_clock() {
> try { ++msecs ;
> if ((msecs >= (transitions[this.pageNum]/10)) && ( this.pageNum
> < this.numPages )) { ++this.pageNum; };
> } catch (e) {}
> }
>
> advance = app.setInterval ("step_clock()", 1);
> advance.count = 0;
> \stopJSpreamble
> \starttext
> \dorecurse{10}{\startTEXpage[pagestate=start, offset=1em]
> \pagenumber
> \stopTEXpage}
> \stoptext
>
> Acrobat is required. And I have an issue with it
>
> Each slide takes a full second (1000 milliseconds). But the conditional
> in step_clock() needs to divide the elements from transitions array by
> ten. Otherwise it is ten times slower.
>
> Am I missing something here? Or why is "step_clock()" ten times slower
> than it should be?
>
> 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
> ___
>

___
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] background problem with layers

2019-07-23 Thread Peter Rolf
Am 22.07.2019 um 19:00 schrieb Wolfgang Schuster:
> Peter Rolf schrieb am 22.07.2019 um 13:32:
>> Hi,
>>
>> I have a problem with a not printed color background when using layers.
>> Small test file is attached.
> Below is a simpler example of your problem.
>
> The frame disappears when you repeat the layer which change how the content
> if flushed, in the example below you can test it by changing
> \box\scratchbox
> to \copy\scratchbox.
>
> \starttext
>
> \setbox\scratchbox\hbox{\frule width 6cm height 4cm \relax}
>
> \dontleavehmode
> \box\scratchbox % works
> %\copy\scratchbox % fails
>
> \stoptext
>
> Wolfgang
>
>

I see. Thanks for the info. I have to adapt my code then.

Peter
___
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] background problem with layers

2019-07-22 Thread Peter Rolf
Hi,

I have a problem with a not printed color background when using layers.
Small test file is attached.

ConTeXt version: 2019.07.16 18:23


Peter


test.pdf
Description: Adobe PDF document
\defineframed[framedclass][
foregroundcolor=black,  foregroundstyle=\bfa,
backgroundcolor=darkgray, background=color,
backgroundoffset=1mm,
backgroundcorner=round, backgroundradius=1mm,
frame=on, framecolor=black,
]

\definelayer[foo][width=\the\paperwidth, height=\the\paperheight, state=repeat]
\setlayer[foo][x=70mm, y=40mm]
{\framedclass{no style here}}

\setupbackgrounds[paper][background={foo}]


\starttext
\framedclass{works fine}
\setlayer[foo][x=40mm, y=70mm]
{\framedclass{no background here}}
\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] reference containing parentheses causes trouble

2019-07-11 Thread Peter Rolf
Am 10.07.2019 um 21:29 schrieb Wolfgang Schuster:
> Sanjoy Mahajan schrieb am 10.07.2019 um 04:15:
>> Dear List,
>>
>> Warning: The following may be a bug or feature or just my
>> misunderstanding!  It seems that parentheses cause trouble in
>> references.
> Braces are used for the argument of reference actions.
>
> \setupinteraction[state=start]
>
> \starttext
>
> \goto{Second page}[page(2)]
>
> \page
>
> \goto{ConTeXt garden}[url(http://wiki.contextgarden.net)]
>
> \stoptext
>
> Wolfgang
>

I see. Thanks for clearifying.


Peter
___
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] [DKIM Failure] Re: reference containing parentheses causes trouble

2019-07-10 Thread Peter Rolf
Am 10.07.2019 um 13:36 schrieb Sanjoy Mahajan:
> On 2019-07-10 13:04, Peter Rolf  wrote:
>
>> Hi Sanjoy,
>>
>> I think it's just the 'normal' limitations you have when setting a
>> variable/id name. Special characters, like parenthesis, are not allowed
>> here.
>
> Peter,
>
> I think that's right, but there are small differences.  For example,
> variables in most languages don't allow hyphens, because they are
> interpreted as minus signs.  But ConTeXt references do allow them (and I
> use them all the time).  That may be why I expected free reign to use
> any characters in the reference (except, as you say, for whitespace!)
> and wrote my script accordingly to turn problem titles into references
> (by replacing whitespace with a hyphen).
>

I agree (I always use the underscore instead of space). In general it's
best to avoid problems if you can.
If you use messy third party data as reference things are totally
different. In my current project I have one dead link out of 1275 (also
caused by parenthesis). Not enough to make me write some extra code to
deal with it.

Peter
___
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] reference containing parentheses causes trouble

2019-07-10 Thread Peter Rolf
Hi Sanjoy,

I think it's just the 'normal' limitations you have when setting a
variable/id name. Special characters, like parenthesis, are not allowed
here.

Even whitespace can be problematic. Yesterday I had a problem with a
reference (data driven) that has a trailing space (obviously a typo).
This space was 'eaten' by TeX, resulting in a broken link. Embracing the
argument helped here, but I haven't tested what happens, if you use
multiple spaces in a row...


Greetings,  Peter


Am 10.07.2019 um 04:15 schrieb Sanjoy Mahajan:
> Dear List,
>
> Warning: The following may be a bug or feature or just my
> misunderstanding!  It seems that parentheses cause trouble in
> references. MNWE:
>
>   \starttext
>   \section[sec:one(two)]{One}
>
>   As you see in sec.~\in[sec:one(two)],
>
>   \stoptext
>
> The "in sec.~\in[sec:one(two)]" typesets as "in sec. ??" and the log
> shows:
>
>   references  > start missing references
>
>   references  >1  [][sec:one(two)]
>
>   references  > stop missing references
>
> (It all works fine upon deleting "(two)" throughout.)
>
> Is this behavior known and expected?  If it is, I'll add a note to the
> "References" page on the wiki.
>
> -Sanjoy
> ___
> 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] Fwd: Re: Already new binaries?

2019-04-14 Thread Peter Rolf
Am 14.04.2019 um 15:44 schrieb Hans Hagen:
> Hi,
>
> Forwarded ... gmx.* mail accounts bounce here (always have) so i cc to
> the list.
>
>
>  Forwarded Message 
> Subject: Re: Already new binaries?
> Date: Sun, 14 Apr 2019 15:25:02 +0200
> From: Hans Hagen 
> To: Peter Rolf 
>
> On 4/14/2019 2:13 PM, Peter Rolf wrote:
>> Hi Hans,
>>
>> does the latest version (2019.04.13 17:01) already contain the binaries
>> with increased stack size? I can see that the binaries are new, but the
>> crash still occurs at the same page. Before I waste my time in bug
>> hunting, I just want to make sure that the binaries are already adjusted.
>
> Akira was talking of his windows binaries. The lmtx ones are cross
> compiled by me. I do nothing with sizes.
>
>> In the meantime I have tested all the included PDF (exported from
>> Inkscape) with an online validator. No problems found.
>>
>> Thanks for all the help so far (also to Luigi and Akira).
>
> You can try
>
> \showusage
>
> and see what mem values you have to change.
>
> Hans
>

Thanks for the quick reply. I have to wait for Akira then or install
Linux in a VM and cross compile from the sources. I guess I will wait a
bit more...

I'll test \showusage later on.

Peter
___
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] luatex crash around page 1000

2019-04-12 Thread Peter Rolf
Am 12.04.2019 um 07:36 schrieb Akira Kakuto:
>> mtx-context | fatal error: return code: -1073741571
>
> I suspect that may be a limitation in 32bit binary.
> Try to install 64bit ConTeXt if you are using 32bit one
> and your OS is 64bit.
>

I'm already on 64bit, so that won't help here.

The event manager says, that it is a stack exhaustion (0xc0fd,
STATUS_STACK_OVERFLOW).
The PDF is data driven and I need to call a lot of functions per page to
collect all components and values for a complete 'Mech. This seems to
sum up and I just run out of stack memory after around 1000 pages.

Screenshots from the event manager (application error), Process Explorer
(peak memory values) and an outdated version of the PDF can be found here

https://spideroak.com/browse/share/indiego/public/RogueTech/


Peter
___
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] luatex crash around page 1000

2019-04-11 Thread Peter Rolf
Hi,

I have a compilation problem with a data driven document.
This is what I get after around 12min (first run)...

[..]
pages   > flushing realpage 991, userpage 970, subpage 991
pages   > flushing realpage 992, userpage 971, subpage 992
pages   > flushing realpage 993, userpage 972, subpage 993
mtx-context | fatal error: return code: -1073741571


It compiles fine if I just use the first or second "half" of the data.
But as soon as I reach a certain amount of pages, it crashes.
An older version compiled fine with 958 users pages (977 total). Seems
that the data has reached a dimension that causes a resource problem.

Any advice? I looked into "texmf.cnf" and "texmfcnf.lua" for possible
bottlenecks, but I lack the knowledge what to change. And it simply
takes too much (run)time to just play around with some values.


Peter


>context --version
mtx-context | ConTeXt Process Management 1.02
mtx-context |
mtx-context | main context file:
r:/tex/texmf-context/tex/context/base/mkiv/context.mkiv
mtx-context | current version: 2019.04.04 13:31

>luatex --version
This is LuaTeX, Version 1.10.0 (TeX Live 2019/W32TeX)
___
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] Drops Module

2018-12-13 Thread Peter Rolf
Hi Aditya,

thanks for the hint. I run into the same problem some time ago (also
uploaded a new version). Sadly no final fix, because I had a naming
problem (number part) with luajit some days later. The current (local)
version works so far, but is a bit hackish (no time for a clean
solution). I'll look into it on the weekend.


Peter


Am 10.12.2018 um 18:47 schrieb Aditya Mahajan:
> Hi Peter,
> 
> I noticed that the drops module recently stopping running with the error:
> 
> /home/adityam/texmf/tex/context/third/drops/t-drops.lua:1098: bad
> argument #3 to 'format' (number has no integer representation)
> stack traceback:
>     [C]: in function 'string.format'
>     /home/adityam/texmf/tex/context/third/drops/t-drops.lua:1098: in
> upvalue 'get_IM_paths'
>     /home/adityam/texmf/tex/context/third/drops/t-drops.lua:1380: in
> field 'shadow'
>     [ctxlua]:1: in main chunk
> 
> This is due to the change in Lua5.3 with respect to floating point
> numbers. The simplest solution is to change '%d' to '%.0f' at
> appropriate places.
> 
> Thanks,
> Aditya
> ___
> 
> If your question is of interest to others as well, please add an entry
> to the Wiki!
> 
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Issues with RGB to CMYK conversion with color profiles (was: Colormanagement)

2018-11-14 Thread Peter Rolf
Am 2018-11-14 um 15:36 schrieb Jan U. Hasecke:
> Thanks a lot, Peter.
> 
> Am 14.11.18 um 14:58 schrieb Peter Rolf:
>> Hi Jan,
>>
>> I donno if things have changed (ConTeXt is a fast moving target), so
>> take my answers with a grain of salt.
>>
>> (1)
>> AFAIK there is no ACTIVE color management in ConTeXt in the sense that
>> there is an automatic color conversion from one profiled(!) colorspace
>> into another profiled color space. This means that all given colors
>> (objects) have to be in the correct (profiled) color space already!
>>
>> Objects with embedded color profiles (e.g. a PDF bitmap graphic with icc
>> profile) will use those. Objects without a profile will use the
>> corresponding "default" color space profiles. These default color space
>> profiles can be defined via "profile" in \setupbackend.
>> This way every color in the PDF is defined properly.
> 
> This would clarify some of the issues.
> 
> When I define rgb colors AND use not-print-modus I get the right rgb
> colors in the pdf.
> 
> When I define cmyk colors AND use print modus I get colors that might be
> correct (tested next week)
> 
> But obviously it is not possible to define both color spaces in
> \definecolor because I don't get the same colors in the pdf as with the
> cmyk-only defined file.
> 
> Maybe I misunderstood this, I've got a hint here, that I could define
> rgb and cmyk in the same \definecolor and choose the right color space
> in \setupcolors.
> 
> The correct method of defining rgb AND cmyk in the same file would be to
> put the definecolor command inside a startstopmode-environment.
> 
> Can someone confirm this?
>

Should work (the other part is invisible for ConTeXt).


>>
>> (2)
>>
>> I think so. Can't test, because my Windows 10 is beyond repair after
>> three "upgrades" and Acrobat is not working properly anymore.
>>
>> (3)
>>
>> Judging from the size of the final PDF, the icc profile is not embedded.
>> The profiles have to be installed in "the right place" (this includes
>> ConTeXt but also the PDF viewer software).
>>
>> See "ICC profiles" section at
>>
>> https://wiki.contextgarden.net/PDFX
>>
> 
> With --mode=print (which uses the color profiles) the pdf get bigger.
>> 10.000 compared to 8.000 without the mode. So I would guess that they
> are included.
>


Mh, the file size of "ISOcoated_v2_300_eci.icc" is around 1.7MB. I
highly doubt that ConTeXt can compress it into a 10KB PDF.

But I'm not so sure if PDF/X-3 needs embedding (there was an exception).
Never used it (only PDF/X-4p) and I can't remember the specifications
(all those stuff was added over 8 years ago).

I just assume you have installed the icc profiles properly (needs a
manual installation!) :D


> I hope I get this sorted out, because I want to print a series of
> folders and other print products with ConTeXt in the near future.
> 
> juh
> 
>> (5) see (1) and (3)
>>
>>
>>
>> Hope this helps,
>>
>>
>> Peter
>>
>>
>> Am 2018-11-14 um 11:39 schrieb Jan U. Hasecke:
>>> Hi all,
>>>
>>> attached you find my colormanagement tests and I need your help to
>>> understand and debug the situation.
>>>
>>> I am testing together with a friend of mine, a professional
>>> colormanager, who does not know ConTeXt.
>>>
>>>
>>> There are several files in the archive:
>>>
>>> The differences in the files are the color definition and the color
>>> profile used.
>>>
>>> - rgb-xxx.tex – colors are defined with RGB values only.
>>>
>>> - rgb-cmyk-xxx.tex – colors are defined with RGB and CMYK values.
>>>
>>>   The cmyk colors are derived from the rgb values using gimp and the
>>>   color profiles sRGB/ISOCoated
>>>
>>> - cmyk-xxx.tex – colors are defined with CMYK values only.
>>>
>>> The xxx stand for two color profiles: iso-coated and swop.
>>>
>>> What I see is this:
>>>
>>> Colors in pdfs are the same no matter what color profile I choose.
>>>
>>> With rgb values and rgb/cmyk values I get the same colors in pdf (the
>>> wrong ones).
>>>
>>> With cmyk values only I get other colors in pdf. Next week my friend
>>> will test if these are the right ones.
>>>
>>> I have many questions:
>>>
>>> 1. Is colormanagement working in ConTeXt at all?
>>> 2. Is my code correct?
>>> 3. Why d

Re: [NTG-context] Issues with RGB to CMYK conversion with color profiles (was: Colormanagement)

2018-11-14 Thread Peter Rolf
Hi Jan,

I donno if things have changed (ConTeXt is a fast moving target), so
take my answers with a grain of salt.

(1)
AFAIK there is no ACTIVE color management in ConTeXt in the sense that
there is an automatic color conversion from one profiled(!) colorspace
into another profiled color space. This means that all given colors
(objects) have to be in the correct (profiled) color space already!

Objects with embedded color profiles (e.g. a PDF bitmap graphic with icc
profile) will use those. Objects without a profile will use the
corresponding "default" color space profiles. These default color space
profiles can be defined via "profile" in \setupbackend.
This way every color in the PDF is defined properly.


(2)

I think so. Can't test, because my Windows 10 is beyond repair after
three "upgrades" and Acrobat is not working properly anymore.

(3)

Judging from the size of the final PDF, the icc profile is not embedded.
The profiles have to be installed in "the right place" (this includes
ConTeXt but also the PDF viewer software).

See "ICC profiles" section at

https://wiki.contextgarden.net/PDFX


(5) see (1) and (3)



Hope this helps,


Peter


Am 2018-11-14 um 11:39 schrieb Jan U. Hasecke:
> Hi all,
> 
> attached you find my colormanagement tests and I need your help to
> understand and debug the situation.
> 
> I am testing together with a friend of mine, a professional
> colormanager, who does not know ConTeXt.
> 
> 
> There are several files in the archive:
> 
> The differences in the files are the color definition and the color
> profile used.
> 
> - rgb-xxx.tex – colors are defined with RGB values only.
> 
> - rgb-cmyk-xxx.tex – colors are defined with RGB and CMYK values.
> 
>   The cmyk colors are derived from the rgb values using gimp and the
>   color profiles sRGB/ISOCoated
> 
> - cmyk-xxx.tex – colors are defined with CMYK values only.
> 
> The xxx stand for two color profiles: iso-coated and swop.
> 
> What I see is this:
> 
> Colors in pdfs are the same no matter what color profile I choose.
> 
> With rgb values and rgb/cmyk values I get the same colors in pdf (the
> wrong ones).
> 
> With cmyk values only I get other colors in pdf. Next week my friend
> will test if these are the right ones.
> 
> I have many questions:
> 
> 1. Is colormanagement working in ConTeXt at all?
> 2. Is my code correct?
> 3. Why do pdfs with different color profiles show the same colors?
> 4. Why does ConTeXt not take the cmyk colors from \definecolor when
> there are rgb values as well?
> 5. Where can I define a coresponding rgb profile? In Scribus you have to
> define two profiles (eg. sRGB and ISOCoated) to make colormanagement work.
> 
> TIA
> 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
> ___
> 

___
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] index problem with \setupcolumnset

2018-11-10 Thread Peter Rolf
Am 2018-11-10 um 13:00 schrieb Peter Rolf:
> Hi Wolfgang,
> 
> thanks for the info. I will download the new manual right now.
>

Mh, already on my RAM disk :D

I tend to ignore the shipped documentation. My bad.


> 
> Best wishes,  Peter
> 
> Am 2018-11-10 um 12:03 schrieb Wolfgang Schuster:
>> Hi Peter,
>>
>> the new columnset mechanism accepts only two arguments for the
>> \setupcolumnset command but you can load the old code with
>> \usemodule[old-columnsets].
>>
>> How you can apply backgrounds per column with the new code is shown in a
>> example in the manual.
>>
>> Wolfgang
>>
>>
>> Peter Rolf schrieb am 09.11.18 um 17:23:
>>> Hi,
>>>
>>> I run into this error after updating my ConTeXt version.
>>> Small (but not minimal) example attached.
>>>
>>> mtx-context | current version: 2018.10.18 00:07
>>>
>>>
>>> Peter
>>>
>>>
>>> ___
>>> 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] index problem with \setupcolumnset

2018-11-10 Thread Peter Rolf
Hi Wolfgang,

thanks for the info. I will download the new manual right now.


Best wishes,  Peter

Am 2018-11-10 um 12:03 schrieb Wolfgang Schuster:
> Hi Peter,
> 
> the new columnset mechanism accepts only two arguments for the
> \setupcolumnset command but you can load the old code with
> \usemodule[old-columnsets].
> 
> How you can apply backgrounds per column with the new code is shown in a
> example in the manual.
> 
> Wolfgang
> 
> 
> Peter Rolf schrieb am 09.11.18 um 17:23:
>> Hi,
>>
>> I run into this error after updating my ConTeXt version.
>> Small (but not minimal) example attached.
>>
>> mtx-context | current version: 2018.10.18 00:07
>>
>>
>> Peter
>>
>>
>> ___
>> 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] index problem with \setupcolumnset

2018-11-09 Thread Peter Rolf
Hi,

I run into this error after updating my ConTeXt version.
Small (but not minimal) example attached.

mtx-context | current version: 2018.10.18 00:07


Peter
\startuniqueMPgraphic{column:bg}
fill OverlayBox withcolor yellow;
\stopuniqueMPgraphic
\defineoverlay[columnbg][\uniqueMPgraphic{column:bg}]


\definecolumnset[TOC][n=4]
%\setupcolumnset[TOC][background=columnbg]% works ok
\setupcolumnset[TOC][1][background=columnbg]% any indexed setup fails
% in my real world example the complete third argument is printed instead


\starttext
\startcolumnset[TOC]
\input tufte.tex
\stopcolumnset
\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] issue with external image and PDF/A-3a

2017-10-10 Thread Peter Rolf
Am 05.10.2017 um 22:40 schrieb Pablo Rodriguez:
> On 10/05/2017 09:05 PM, luigi scarso wrote:
>> On Thu, Oct 5, 2017 at 8:18 PM, Pablo Rodriguez wrote:
>>> [...]
>>> Well, this is a minimal sample, but my real document is much bigger. Is
>>> there any way to convert the stream to something that ConTeXt can handle
>>> directly?
>>
>> hm, the only reliable way that I know w is to convert it to a flattened png
> 
> Many thanks for your reply, Luigi.
> 
> The real graphic is a vector logo and I need to keep it as a vector
> image. I converted it from a SVG source into a PDF document (years ago).
> 
> I cannot remember if the vector image contains transparency. If needed,
> I would remove it from the image.
> 
> The way to convert it may be using Inkscape into a PostScript document
> and then to MetaPost using pstoedit (as I have just discovered).
>

Just a hint:

pstoedit seems to be incompatible (uses a deprecated option) with the
actual gs (v9.22). I tested it with v9.18 and all worked fine. Of course
the transparency was removed in the process of the eps export. Not a
real problem with the metapost code at hand.

pstoedit -v -ssp -f "mpost:" transparent.eps transparent.mp

Tested on Windows 10 (1703), Inkscape v0.92.2, gs v9.18, pstoedit v3.70;
all 64bit

> Is that right or could something get lost in the translation?
> 
All unsupported features (like transparency).

> Many thanks for your help,
> 
> Pablo
> 

Best wishes,  Peter
___
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] ICC profiles in the ConTeXt Suite?

2017-08-27 Thread Peter Rolf
Am 27.08.2017 um 21:49 schrieb Pablo Rodriguez:
> On 08/27/2017 08:23 PM, Peter Rolf wrote:
>> Am 27.08.2017 um 19:24 schrieb Pablo Rodriguez:
>>> [...]
>>> Since we have ICC profiles in the ConTeXt Garden
>>> (http://wiki.contextgarden.net/PDFX#ICC_profiles,
>>> http://dl.contextgarden.net/misc/iccprofiles/complete_ICC_profiles.zip),
>>> I wonder why they aren’t part of the ConTeXt Suite.
>>
>> Because they are hardly used (simply judging from feedback). Not enough
>> to justify a file size increase of 26.2 MByte.
> 
> Hi Peter,
> 
> how about limiting the number of profiles to the basic ones? Or how
> about an option in first-setup.sh named --icc-profiles?
>

Different locations need different profiles. That's why there are also
the region related archives (Europe, India, Japan and USA).
You can't divide it any further than that.

>> In theory you can use the environment variable $OSCOLORDIR, but it was
>> dropped years ago. There were no complains or error reports about that,
>> so no changes were made.
> 
> Either I don’t get your point, or $OSCOLORDIR won’t work in practice.
>

Exactly, it doesn't work. It's still mentioned in the partly outdated
information on the garden, but there is no 'OSCOLORDIR' string anywhere
in the context tree.

>> Would still be the cleanest solution though. Copy the icc files once in
>> the corresponding directory of your OS (so that all apps can make use of
>> them), set the environment variable manually, and done.
> 
> I would have to do that with thirty computers. And probably I would have
> to ask for permissions to copy the profiles (and set system-wide
> environment variables). When a computer would have a full OS reinstall
> (something far beyond my control), I would have to do that again for
> that computer.
>
> As far as I maintain ConTeXt in a common server and we use it for very
> specific tasks, we only have the ConTeXt Suite installed once.
> 
> Sorry, but this isn’t practical for me (we’d only use the profiles with
> ConTeXt).
>

I see. Still no love for 'OSCOLORDIR'. R.I.P. :D

> Many thanks for your help,
>

No problem, you are welcome. Looks to me like you are solving the
problem by yourself. I guess a module is a good idea.


> Pablo
> 

Peter

___
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] ICC profiles in the ConTeXt Suite?

2017-08-27 Thread Peter Rolf
Hi Pablo,

Am 27.08.2017 um 19:24 schrieb Pablo Rodriguez:
> Dear Mojca,
>
> [I beg your pardon, if you aren’t the maintainer of the ConTeXt Suite
> distribution. In that case I address this message to whom it might
> concern :-).]
> 
> After reading some messages about PDF/A and PDF/X, I remembered that all
> my work documents should be PDF/A.
> 
> Since we have ICC profiles in the ConTeXt Garden
> (http://wiki.contextgarden.net/PDFX#ICC_profiles,
> http://dl.contextgarden.net/misc/iccprofiles/complete_ICC_profiles.zip),
> I wonder why they aren’t part of the ConTeXt Suite.
>

Because they are hardly used (simply judging from feedback). Not enough
to justify a file size increase of 26.2 MByte.

> This would make things easier to create some kinds of PDF documents.
> 
> In my personal case, I cannot update the ConTeXt Suite at work. I have
> to download it at home and replace the directory. Having to add the ICC
> profiles each time is something I’d rather avoid.
>
> If there is something I can do to add those files to the ConTeXt Suite,
> please tell me and I will do it.
>

In theory you can use the environment variable $OSCOLORDIR, but it was
dropped years ago. There were no complains or error reports about that,
so no changes were made.

Would still be the cleanest solution though. Copy the icc files once in
the corresponding directory of your OS (so that all apps can make use of
them), set the environment variable manually, and done.

http://www.colourmanagement.net/advice/where-are-my-icc-profiles


> Many thanks for your help,
> 
> Pablo
> 

Peter
___
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] PDF/X-1a(2001) ourput.

2017-08-26 Thread Peter Rolf
Hi John,

Am 25.08.2017 um 23:47 schrieb John Culleton:
> I need to have context generate the above format. Any hints?
>

ConTeXt is also shipped with some PDF/A|X|UA test files. Written mainly
as a simple functionality test, but still all parameter in it.

\texmf-context\tex\context\test\mkiv\

--
% PDF/X-1a:2001
\enabletrackers[backend.format,backend.variables] % add logging

\setupbackend
  [format=PDF/X-1a:2001,
   intent=ISOcoated_v2_eci.icc]

\setupinteraction
  [title=TITLE,
   subtitle=SUBTITLE,
   author=AUTHOR,
   keyword={{KEYWORD1, KEYWORD2}, KEYWORD3}]

--
The color 'intent' depends on your printing house. The icc profiles can
be downloaded from the contextgarden (also info where to install them).

http://wiki.contextgarden.net/PDFX#ICC%20profiles


There are some more restriction for PDF/X-1a, but this is (apart from
the document color space) all you need for the ConTeXt part.
Let me know if this works for you.


Peter

  
>  
> John Culleton
>  
>  
> 
> 
> ___
> 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] XML export of a lua table

2017-02-23 Thread Peter Rolf
Am 23.02.2017 um 14:10 schrieb Hans Hagen:
> On 2/23/2017 1:50 PM, Peter Rolf wrote:
>> Hi,
>>
>> what is the easiest way to export a lua table (mostly key-value pairs)
>> into a XML file? I found 'lxml.save', but no luck with a converter
>> function. Any help welcome.
> 
> kind of obvious:
> 
> local t = { a = { b = 1 } }
> 
> inspect(table.toxml(t))
> 

Mhhh, tried that among others (always an empty XML document as result).
I guess I better start with only a small portion of the original table
(~560Kbyte as lua code).

Thanks for the pointer :D

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

[NTG-context] XML export of a lua table

2017-02-23 Thread Peter Rolf
Hi,

what is the easiest way to export a lua table (mostly key-value pairs)
into a XML file? I found 'lxml.save', but no luck with a converter
function. Any help welcome.


Peter

___
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] strange crash

2017-02-17 Thread Peter Rolf
Am 17.02.2017 um 14:30 schrieb luigi scarso:
> On Fri, Feb 17, 2017 at 11:45 AM, Peter Rolf <indi...@gmx.net> wrote:
>> There seems to be a problem with the latest beta (at least on my
>> Windows10 system). The synchronisation breaks right after the start.
>>
>> -
>> v:\tmp\context>first-setup.bat
>> receiving incremental file list
>>
>> sent 96 bytes  received 273 bytes  246.00 bytes/sec
>> total size is 12066614  speedup is 32700.85
>> v:\tmp\context\bin\mtxrun.lua:18237: attempt to index global 'sandbox'
>> (a nil value)
>> [..]
>> -
>> mtxrun.lua: 17.02.2017, 10:22
>>
> 
> the latest version: 2017.02.17 13:41
> 
> looks ok here.
> 

Same here. Thanks :D

___
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] strange crash

2017-02-17 Thread Peter Rolf
There seems to be a problem with the latest beta (at least on my
Windows10 system). The synchronisation breaks right after the start.

-
v:\tmp\context>first-setup.bat
receiving incremental file list

sent 96 bytes  received 273 bytes  246.00 bytes/sec
total size is 12066614  speedup is 32700.85
v:\tmp\context\bin\mtxrun.lua:18237: attempt to index global 'sandbox'
(a nil value)
[..]
-
mtxrun.lua: 17.02.2017, 10:22


Am 17.02.2017 um 10:28 schrieb Hans Hagen:
> i uploaded a beta so things should be in sync in a while
> 
> -
>   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] pdfboxes

2017-02-13 Thread Peter Rolf
Am 11.02.2017 um 01:25 schrieb Hans Hagen:
> On 2/10/2017 2:56 PM, Peter Rolf wrote:
>> Hi,
>>
>> I tried to set some PDF boxes properly, but no luck (setupcanvas).
>> After searching the mailing archive from 2015 I found this (broken)
>> example. Is this still the official method to set the crop|trim|bleed
>> boxes?
> 
> controlled by:
> 
> \setupinteractionscreen
>[width=max,height=max]
>

Thanks for the pointer. Kind of works now, but the height calculation
seems to be broken. The crop-|trimbox height is smaller than the defined
paper height. If I disable the mechanism (comment
\setupinteractionscreen) I get the correct sizes (paper on printpaper).

As always the real world example is too big and complex, I attached a
smaller one (but with the same sizes).


ps:

For all interested, here is the link to that table (best viewed on a UHD
monitor).
https://spideroak.com/browse/share/indiego/public/Titanfall2/

There's still a bug in the (combined) table header on page one, which
inserts an unwanted extra column. Checked the numbers several times, no
error found on my side. Currently I use the extra column as right frame,
wanted to add one anyway. First attempts to make a minimal example
failed, seems to be more complex (need to also add fonts, table
content?). Will report back when done.


> to be wikified
>

aye

>> -
>> \showframe
>>
>> \setuplayout
>>[location=middle,
>> width=middle,
>> height=middle,
>> cropoffset=auto,
>> trimoffset=1bp,
>> bleedoffset=2bp,
>> artoffset=2bp]
>>
>>  \setupbackend
>>[level=0]
>>
>> \starttext
>>
>> \definepapersize[TestA][width=100bp,height=200bp]
>> \definepapersize[TestB][width=150bp,height=250bp]
>>
>> \setuppapersize[TestA][TestB]
>>
>> test
>>
>> \stoptext
>> -
>>
>> ConTeXt version 2017.01.27 gives
>>
>> [..]
>> 10 0 obj
>> <> 250]/CropBox [ 0 0 150 250 ] /TrimBox [ 0 0 150 250 ]/Parent 13 0 R>>
>> endobj
>> [..]
>>
>>
>>
>> One additional note. The Mediabox precision seems to be 5 now (and not
>> 4). Taken from my latest table using TeXpage (/MediaBox[0 0 1655.39105
>> 969.22291]). The precision value for the other boxes should be adjusted
>> to avoid rounding problems (?Box < MediaBox).
>>
>> [lpdf-mis.lua]
>> [..]
>> -- temp hack: the mediabox is not under our control and has a precision
>> of 4 digits
>>
>> local factor  = number.dimenfactors.bp
>> local f_value = formatters["%0.4F"]
>> [..]
>>
>>
>> Not in a hurry, fix (or advice) is welcome at any time :D
>>
>>
>> Best wishes,  Peter
>>
>>
>>
>> ___
>>
>> 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
>> ___
>>
>>
> 
> 


% dimens are taken from the final tables (TEXpage)
\newdimen\tableAwidth
\newdimen\tableAheight
\tableAwidth= 1655.39105bp
\tableAheight= 969.22291bp
\definepapersize[tableA][width=\tableAwidth, height=\tableAheight]

\newdimen\tableBwidth
\newdimen\tableBheight
\tableBwidth= 698.65893bp
\tableBheight= 489.67048bp
\definepapersize[tableB][width=\tableBwidth, height=\tableBheight]
 

\definelayout[tableA]
  [location=middle,
   width=middle,
   height=middle,
   paper=tableA,
%   clipoffset=0mm,
%   horoffset=0mm,
%   veroffset=0mm,
   cropoffset=auto,
   trimoffset=2bp,
   bleedoffset=3mm,
   marking=on,
   backspace=0mm,
%   bottom=0mm,
%   bottomdistance=0mm,
   bottomspace=0mm,
   cutspace=0mm,
   footer=0mm,
   footerdistance=0mm,
   header=0mm,
   headerdistance=0mm,
   leftedge=0mm,
   leftedgedistance=0mm,
   leftmargin=0mm,
   leftmargindistance=0mm,
   margin=0mm,
   rightedge=0mm,
   rightedgedistance=0mm,
   rightmargin=0mm,
   rightmargindistance=0mm,
   textdistance=0mm,
   textmargin=0mm,
%   top=0mm,
%   topdistance=0mm,
   topspace=0mm,
  ]

\definelayout[tableB]
  [location=middle,
   width=middle,
   height=middle,
   paper=tableB,
   clipoffset=0bp,
   cropoffset=auto,
   trimoffset=2bp,
   bleedoffset=3mm,
   marking=on,
   backspace=0mm,
%   bottom=0mm,
%   bottomdistance=0mm,
   bottomspace=0mm,
   cutspace=0mm,
   footer=0mm,
   footerdistance=0mm,
   

[NTG-context] pdfboxes

2017-02-10 Thread Peter Rolf
Hi,

I tried to set some PDF boxes properly, but no luck (setupcanvas).
After searching the mailing archive from 2015 I found this (broken)
example. Is this still the official method to set the crop|trim|bleed boxes?

-
\showframe

\setuplayout
   [location=middle,
width=middle,
height=middle,
cropoffset=auto,
trimoffset=1bp,
bleedoffset=2bp,
artoffset=2bp]

 \setupbackend
   [level=0]

\starttext

\definepapersize[TestA][width=100bp,height=200bp]
\definepapersize[TestB][width=150bp,height=250bp]

\setuppapersize[TestA][TestB]

test

\stoptext
-

ConTeXt version 2017.01.27 gives

[..]
10 0 obj
<>
endobj
[..]



One additional note. The Mediabox precision seems to be 5 now (and not
4). Taken from my latest table using TeXpage (/MediaBox[0 0 1655.39105
969.22291]). The precision value for the other boxes should be adjusted
to avoid rounding problems (?Box < MediaBox).

[lpdf-mis.lua]
[..]
-- temp hack: the mediabox is not under our control and has a precision
of 4 digits

local factor  = number.dimenfactors.bp
local f_value = formatters["%0.4F"]
[..]


Not in a hurry, fix (or advice) is welcome at any time :D


Best wishes,  Peter

\showframe

\setuplayout
   [location=middle,
width=middle,
height=middle,
cropoffset=auto,
trimoffset=1bp,
bleedoffset=2bp,
artoffset=2bp]

 \setupbackend
   [level=0]
   
\starttext

\definepapersize[TestA][width=100bp,height=200bp]
\definepapersize[TestB][width=150bp,height=250bp]

\setuppapersize[TestA][TestB]

test

\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] nested colors problem

2017-01-21 Thread Peter Rolf
Am 21.01.2017 um 11:11 schrieb Hans Hagen:
> On 1/20/2017 9:42 PM, Peter Rolf wrote:
>> Hi,
>>
>> the nested color inherits the transparency from it's surrounding color.
>>
>> \definecolor[colA] [r=0,g=0,b=0.01,t=0.2,a=1] % transparent
>> \definecolor[colB] [r=.278431,g=.235294,b=.545098] % opaque
>>
>> \starttext
>>   \startcolor[colA]
>> \definedfont[SansBold at 96bp]Titanfall\,
>> \startcolor[colB]2\stopcolor
>>   \stopcolor
>> \stoptext
>>
>>
>> ConTeXt version: 2014.11.26 21:43
>>
>> Maybe intended behaviour, maybe a bug. Donno.
> 
> colorspace, color and transparency are different axis
> 
> \definecolor[colX] [r=.5]
> \definecolor[colY] [t=.5,a=1]
> 
> \starttext
> 
> \startbuffer
> \dontleavehmode
> \blackrule[color=colX,width=3cm]\hskip-1.5cm
> \blackrule[color=colY,width=3cm]
> \stopbuffer
> 
> \getbuffer \par \color[colY]{\getbuffer}
> 
> \setupcolors[rgb=no]
> 
> \getbuffer \par \color[colY]{\getbuffer}
> 
> \setupcolors[rgb=no,cmyk=no]
> 
> \getbuffer \par \color[colY]{\getbuffer}
> 
> \stoptext
> 
> it just happens that coming from mkii colors can have transparencies
> 
> as Alan says: they are different things (also in metafun)
> 
> \startMPcode
> fill fullcircle scaled 4cm
> withcolor "red" ;
> fill fullcircle scaled 3cm
> withtransparency (1,0.5) ;
> fill fullcircle scaled 2cm
> withcolor "green"
> withtransparency (1,0.5) ;
> \stopMPcode
> 
> 

Thanks for the clarification. Stupid me :D


___
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] nested colors problem

2017-01-20 Thread Peter Rolf
Am 20.01.2017 um 23:12 schrieb Henning Hraban Ramm:
> Am 2017-01-20 um 22:26 schrieb Peter Rolf <indi...@gmx.net>:
> 
>> Am 20.01.2017 um 21:54 schrieb Alan Braslau:
>>> On Fri, 20 Jan 2017 21:42:16 +0100
>>> Peter Rolf <indi...@gmx.net> wrote:
>>>
>>>> Maybe intended behaviour, maybe a bug. Donno.
>>>
>>> Not a bug: color and transparency are not the same thing.
>>>
>>
>> True, but you define and use them at once. How to separate them then?
> 
> Did you look at http://wiki.contextgarden.net/Color/Transparency ?
> 

Thanks for the pointer.

The simple solution is just to also define the parameters 't=1,a=1' for
the opaque color. Should be mentioned in the docs somewhere and sorry
for the noise ;)


> 
> Greetlings, Hraban
> ---
> http://www.fiee.net
> http://wiki.contextgarden.net
> GPG Key ID 1C9B22FD
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___
> 

___
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] nested colors problem

2017-01-20 Thread Peter Rolf
Am 20.01.2017 um 21:54 schrieb Alan Braslau:
> On Fri, 20 Jan 2017 21:42:16 +0100
> Peter Rolf <indi...@gmx.net> wrote:
> 
>> Maybe intended behaviour, maybe a bug. Donno.
> 
> Not a bug: color and transparency are not the same thing.
>

True, but you define and use them at once. How to separate them then?


___
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] nested colors problem

2017-01-20 Thread Peter Rolf
Hi,

the nested color inherits the transparency from it's surrounding color.

\definecolor[colA] [r=0,g=0,b=0.01,t=0.2,a=1] % transparent
\definecolor[colB] [r=.278431,g=.235294,b=.545098] % opaque

\starttext
  \startcolor[colA]
\definedfont[SansBold at 96bp]Titanfall\,
\startcolor[colB]2\stopcolor
  \stopcolor
\stoptext


ConTeXt version: 2014.11.26 21:43

Maybe intended behaviour, maybe a bug. Donno.


Best wishes,  Peter


\definecolor[colA] [r=0,g=0,b=0.01,t=0.2,a=1] % transparent
\definecolor[colB] [r=.278431,g=.235294,b=.545098] % opaque

\starttext 
  \startcolor[colA]
\definedfont[SansBold at 96bp]Titanfall\,
\startcolor[colB]2\stopcolor
  \stopcolor
\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] 'overprint' swallows leading number

2017-01-06 Thread Peter Rolf
Am 06.01.2017 um 20:01 schrieb Hans Hagen:
> On 1/6/2017 3:49 PM, Peter Rolf wrote:
>> Hi,
>>
>> title says it all.
> 
> \unexpanded\def\registercolorintent#1#2% \relax is needed !
> 
> {\setevalue{\??colorintent#1}{\attribute\colorintentattribute\clf_registercolorintent{#2}\relax}}
> 
>

Thanks, that fixed it. The overflow still occurs, will look deeper into it.

> 
>> (ConTeXt 2016.12.28 17:55)
>>
>> minimal example:
>> 
>> \starttext
>> \startluacode
>> local bCI,eCI = context.startcolorintent, context.stopcolorintent
>>
>> bCI({"overprint"})context("1.2345\\crlf")eCI() -- also no 'overprint'
>> for that text part in the PDF
>> bCI({"overprint"})context("First number is missing.\\crlf")eCI()
>>
>> \stopluacode
>> \stoptext
>> -
>>
>> I also get an overflow exception with one of my tables, but I could
>> 'fix' that with '\setupalign[nothyphenated]'. The table is complex (lua
>> generated), so no minimal example at hand. Anyhow, here the error
>> message (space-ali.mkiv).
>>
>> -
>> tex error   > tex error on line 13283 in file
>> g:/mydocs/TeX/dokumente/test/lua/titanfall2/titanfall2-weapons.mkiv: !
>> Arithmetic overflow
>>
>>
>> \setraggedness ...hsize /\dimexpr #1\relax \relax
>>   \fi
>> \spac_align_set_horizontal_center ...dness_middle
>>   \raggedstatus \plustwo
>> \at...
>> \raggedcommand ...pac_align_set_horizontal_center
>>   \relax
>> \spac_align_set_ver...
>> \next ...th \pack_framed_do_setups \raggedcommand
>>   \pack_framed_do_top
>> \bgrou...
>> \tabl_ntb_cell_process_b_c ...raltablelocalframed
>>   {\tabl_ntb_cell_start
>> #5\t...
>>  ...ass 1 34 \tabl_ntb_skip {6}\tabl_ntb_pass 1 40
>>   \tabl_ntb_plus
>> \tabl_ntb_p...
>> ...
>> l.249 ...x\vbox{\ctxlua{userdata.printweaponTABLE()}
>>   }%
>> -
>>
>> Maybe related to the prior bug (also overprinting numbers in the TABLE),
>> will check again later.
>>
>>
>> Best wishes,  Peter
>>
>> ___
>>
>> 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] 'overprint' swallows leading number

2017-01-06 Thread Peter Rolf
Hi,

title says it all.

(ConTeXt 2016.12.28 17:55)

minimal example:

\starttext
\startluacode
local bCI,eCI = context.startcolorintent, context.stopcolorintent

bCI({"overprint"})context("1.2345\\crlf")eCI() -- also no 'overprint'
for that text part in the PDF
bCI({"overprint"})context("First number is missing.\\crlf")eCI()

\stopluacode
\stoptext
-

I also get an overflow exception with one of my tables, but I could
'fix' that with '\setupalign[nothyphenated]'. The table is complex (lua
generated), so no minimal example at hand. Anyhow, here the error
message (space-ali.mkiv).

-
tex error   > tex error on line 13283 in file
g:/mydocs/TeX/dokumente/test/lua/titanfall2/titanfall2-weapons.mkiv: !
Arithmetic overflow


\setraggedness ...hsize /\dimexpr #1\relax \relax
  \fi
\spac_align_set_horizontal_center ...dness_middle
  \raggedstatus \plustwo
\at...
\raggedcommand ...pac_align_set_horizontal_center
  \relax
\spac_align_set_ver...
\next ...th \pack_framed_do_setups \raggedcommand
  \pack_framed_do_top
\bgrou...
\tabl_ntb_cell_process_b_c ...raltablelocalframed
  {\tabl_ntb_cell_start
#5\t...
 ...ass 1 34 \tabl_ntb_skip {6}\tabl_ntb_pass 1 40
  \tabl_ntb_plus
\tabl_ntb_p...
...
l.249 ...x\vbox{\ctxlua{userdata.printweaponTABLE()}
  }%
-

Maybe related to the prior bug (also overprinting numbers in the TABLE),
will check again later.


Best wishes,  Peter

___
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] PDF/A generation

2016-10-18 Thread Peter Rolf
Dear Henri,

the  is taken from a mail to Hans and Luigi.

Better be patient and wait for Hans to implement the changes (shouldn't
break your documents). But I donno if the previously RNG based 'id' (a
fixed value now!) is handled somewhere else in the code. Hans knows, I
don't. There were several changes in the past for a more constant PDF
output for test purposes and every random value would break that.



1. bad XMP 'id'

The XMP packet wrapper is kind of fixed ('7.3.2 XMP packet wrapper',
page 10 of XMPSpecificationsPart1.pdf from XMP-Toolkit-SDK-CC201607.zip)

http://download.macromedia.com/pub/developer/xmp/sdk/XMP-Toolkit-SDK-CC201607.zip



Had also fun times with a (bad) copy and pasted 'begin' attribute
(U+FEFF), until I entered it manually. Quite depressing... :D


2. missing 'pdfaSchema:valueType' entries (containing an empty )



Fixed files (lpdf-pda.xml, lpdf-xmp.lua) are attached ('base' dir).

Tested with all supported PDF/A variants (added test files for a2/a3
variants) and all passed.


Best wishes,  Peter


Am 18.10.2016 um 15:44 schrieb Henri Menke:
> Dear Peter,
> 
> thanks for the update.  Can you maybe tell what exactly has changed to fix 
> it?  I'm on the TL 2016 release and cannot update because I fear regressions 
> for my important document.
> 
> Cheers, Henri
> 
> On 10/18/2016 02:54 PM, Peter Rolf wrote:
>> Hi,
>>
>> just for the records. The problems were on ConTeXt's side (fixed now),
>> the online validator does a pretty good job.
>>
>> Peter
>>
>> Am 14.10.2016 um 17:10 schrieb Peter Rolf:
>>> Am 14.10.2016 um 14:16 schrieb luigi scarso:
>>>> On Fri, Oct 14, 2016 at 2:04 PM, Peter Rolf <indi...@gmx.net> wrote:
>>>>> Sigh.. I had high hopes on this one. Would be nice to have a free and
>>>>> working (in this combination) validator. I'll make some tests over the
>>>>> weekend and contact the author(s). No bug report, no fix.
>>>>
>>>> I have not said that it's wrong, only that it fails to validate the
>>>> pdf..the validator could be ok infact.
>>>
>>> True, that conclusion comes from my side. I'm pretty sure that all
>>> needed XMP entries are properly set, so chances are high, that the error
>>> is on their side. But we will (hopefully) see.
>>> Also: If Acrobat isn't right, what tools are left for validation?
>>>
>>>> Btw, as I can see from
>>>> http://www.pdfa.org/2016/08/slide-decks-and-video-recordings-of-the-pdf-days-europe-2016/
>>>> it seems that there is a bit of depression in validating pdf/a files 
>>>>
>>>
>>> Interesting, but better don't dig too deep... :D
>>>
>>> ___
>>> 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  : http://foundry.supelec.fr/projects/contextrev/
>>> 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
> ___
> 

___
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] PDF/A generation

2016-10-18 Thread Peter Rolf
Hi,

just for the records. The problems were on ConTeXt's side (fixed now),
the online validator does a pretty good job.

Peter

Am 14.10.2016 um 17:10 schrieb Peter Rolf:
> Am 14.10.2016 um 14:16 schrieb luigi scarso:
>> On Fri, Oct 14, 2016 at 2:04 PM, Peter Rolf <indi...@gmx.net> wrote:
>>> Sigh.. I had high hopes on this one. Would be nice to have a free and
>>> working (in this combination) validator. I'll make some tests over the
>>> weekend and contact the author(s). No bug report, no fix.
>>
>> I have not said that it's wrong, only that it fails to validate the
>> pdf..the validator could be ok infact.
> 
> True, that conclusion comes from my side. I'm pretty sure that all
> needed XMP entries are properly set, so chances are high, that the error
> is on their side. But we will (hopefully) see.
> Also: If Acrobat isn't right, what tools are left for validation?
> 
>> Btw, as I can see from
>> http://www.pdfa.org/2016/08/slide-decks-and-video-recordings-of-the-pdf-days-europe-2016/
>> it seems that there is a bit of depression in validating pdf/a files 
>>
> 
> Interesting, but better don't dig too deep... :D
> 
> ___
> 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  : http://foundry.supelec.fr/projects/contextrev/
> 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] PDF/A generation

2016-10-14 Thread Peter Rolf
Am 14.10.2016 um 14:16 schrieb luigi scarso:
> On Fri, Oct 14, 2016 at 2:04 PM, Peter Rolf <indi...@gmx.net> wrote:
>> Sigh.. I had high hopes on this one. Would be nice to have a free and
>> working (in this combination) validator. I'll make some tests over the
>> weekend and contact the author(s). No bug report, no fix.
> 
> I have not said that it's wrong, only that it fails to validate the
> pdf..the validator could be ok infact.

True, that conclusion comes from my side. I'm pretty sure that all
needed XMP entries are properly set, so chances are high, that the error
is on their side. But we will (hopefully) see.
Also: If Acrobat isn't right, what tools are left for validation?

> Btw, as I can see from
> http://www.pdfa.org/2016/08/slide-decks-and-video-recordings-of-the-pdf-days-europe-2016/
> it seems that there is a bit of depression in validating pdf/a files 
> 

Interesting, but better don't dig too deep... :D

___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] PDF/A generation

2016-10-14 Thread Peter Rolf
Am 14.10.2016 um 11:22 schrieb luigi scarso:
> On Thu, Oct 13, 2016 at 4:58 PM, Peter Rolf <indi...@gmx.net> wrote:
>> Meanwhile I stumpled over
>>
>> https://www.pdf-tools.com/pdf/validate-pdfa-online.aspx
>>
>> but haven't found the time (and mood!) to test it.
>>
> 
> it fails for pdf/a-1a with the test.pdf made by context
> Validating file "test.pdf" for conformance level pdfa-1a
> Invalid content of XMP packet header attribute 'id': 
> 'frpyaihfvjcmxbxoohwuhyjt'.
> pdfaExtension:schemas/*[0] :: Missing required field 'valueType' in
> value type 'Schema'.
> pdfaExtension:schemas/*[1] :: Missing required field 'valueType' in
> value type 'Schema'.
> pdfaExtension:schemas/*[2] :: Missing required field 'valueType' in
> value type 'Schema'.
> pdfaExtension:schemas/*[3] :: Missing required field 'valueType' in
> value type 'Schema'.
> pdfaExtension:schemas/*[4] :: Missing required field 'valueType' in
> value type 'Schema'.
> The document does not conform to the requested standard.
> The document's meta data is either missing or inconsistent or corrupt.
> Done.
> 
> while verapdf and acrobat
> (Preflight, 11.0.16 (120) Acrobat version: 11.018)  both say that the
> file is ok.
> 

Sigh.. I had high hopes on this one. Would be nice to have a free and
working (in this combination) validator. I'll make some tests over the
weekend and contact the author(s). No bug report, no fix.

Anyhow, thanks for testing ;)


Best wishes,

Peter
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] PDF/A generation

2016-10-13 Thread Peter Rolf
Am 13.10.2016 um 16:23 schrieb luigi scarso:
> On Thu, Oct 13, 2016 at 3:40 PM, Henri Menke  wrote:
>> Dear Luigi,
>>
>> thanks for the link.  I tried the validation with a little simplified 
>> example, which I show below.  VeraPDF reports some errors, see attached 
>> `test-result.xml`.  Unfortunately, VeraPDF cannot handle my production 
>> document and crashes during validation :( (see attached 
>> `production-result.xml`).  Also, it seems that leaving out `intent` does not 
>> make any difference.
>>
>> Cheers, Henri
>>
>> ---
>>
>> \setupinteraction
>>   [
>> title=TITLE,
>> subtitle=SUBTITLE,
>> author=AUTHOR,
>> keyword={KEYWORD1, KEYWORD2, KEYWORD3},
>>   ]
>>
>> \setupbackend
>>   [
>> format={pdf/a-2a},
>> profile={default_cmyk.icc,default_rgb.icc,default_gray.icc},
> currently 2a is not supported , you should use 1a
> format={pdf/a-1a:2005}, % or pdf/a-1a:2005

It's supported (along PDF/A-3a), but untested and undocumented. It was
just a prerequirement when adding PDF/UA-1. I couldn't find a validator
for it (only own Acrobat Pro 9) that time.

Meanwhile I stumpled over

https://www.pdf-tools.com/pdf/validate-pdfa-online.aspx

but haven't found the time (and mood!) to test it.


Peter
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] How to export to PDF-A?

2016-05-17 Thread Peter Rolf
Hi,

Am 16.05.2016 um 13:38 schrieb Matija Šuklje:
> Dear ConTeXt community,
> 
> There is a document I wrote in ConTeXt that I’m required to submit 
> in PDF-A.
> 
> I’ve already done my RTFM homework:
>   http://wiki.contextgarden.net/PDF/A
> including links in it,
> but can’t figure out how to apply it in practice.
> 

You should add

\enabletrackers[backend.format,backend.variables]

to get some more info (see if things go right or wrong).


> So far I’ve identified two possible issues:
> 
>  •I haven’t set it right in the source
>   https://gitlab.com/fla-llm-thesis/fla-llm-thesis/
>   https://gitlab.com/context-modules/pful
> 
>  •The ICC profiles aren’t in the right place – I can’t 
>   figure out where they should be on a Linux system.
>

see 'ICC profiles' at

http://wiki.contextgarden.net/PDFX

The ICC part should still be valid (where to put the profiles), but some
of the infos are outdated.


Q: does it have to be '1a'? '1b' is less restrictive

Q: what color profiles should be used? looks like gray only, so
default_gray.icc should be sufficient


quick PDF/A-1b:2005 preflight with my outdated Acrobat 9:

- color problems (probably the missing profiles)
- font problems (seems to be Type 1 related, I donno)
  Luigi mentions this in his article (8.pdf)
- both icons on page 2 contain transparency (which is not allowed)
- no interaction allowed (\setupinteraction[state=start,click=yes,...)
  no need to change links, references, etc.; just disable interaction in
general (state=stop)


Also: your ConTeXt version is from 2013; please update (but keep a copy
of the old version), as there is the possibility, that some of the
problems are already fixed

Just make some changes and report back. Problems are solved one by one ;)


Best wishes,

Peter

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

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

Re: [NTG-context] Undefined control sequence: \pdfpxdimen

2016-03-09 Thread Peter Rolf
Am 10.03.2016 um 00:03 schrieb Aditya Mahajan:
> The drops module uses the primitive \pdfpxdimen in a couple of places,
> but that is no longer defined in the current beta. What is the
> equivalent command now?
> 
> Examples of usage:
> 
> \pdfpxdimen1in\relax\divide\pdfpxdimen\numexpr\dropsparameter\c!
> resolution\relax % set actual pixel dimension
>

I have fixed that incompatibility some weeks ago and also posted the new
version on this list. Just look at the source for the details (changes
are minimal).

https://spideroak.com/browse/share/indiego/public/ConTeXt/drops/


Peter


> 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://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] drops module update

2016-01-26 Thread Peter Rolf
Hi,

just a small maintenance update (everything was broken) for the drops
module. Should be working again with the latest versions of ImageMagick
(6.9.2-0+) and ConTeXt (luatex 0.85.0+).

Files (version 2016-01-18) can be found here [the zip file also contains
the documentation (drops.pdf)]

https://spideroak.com/browse/share/indiego/public/ConTeXt/drops/



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

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

[NTG-context] (beta) missing /Shading entry in page /Resources

2016-01-13 Thread Peter Rolf
Hi,

I attached a minimal test file and the old (working) and new (broken)
PDF files. The '/Shading 4 0 R' entry is missing in the page /Resources
object ('10 0 obj <> endobj') of the 'new' version.


mtx-context | ConTeXt Process Management 0.63
mtx-context |
mtx-context | main context file:
v:/tmp/context/tex/texmf-context/tex/context/base/mkiv/context.mkiv
mtx-context | current version: 2016.01.13 09:42


Best wishes,  Peter


shading.7z
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] PDF/UA Support

2015-10-20 Thread Peter Rolf
Am 20.10.2015 um 20:03 schrieb Andrew Dunning:
> 
>> On 20 Oct 2015, at 9:26 AM, Peter Rolf <indi...@gmx.net> wrote:
>>
>> Will look into it (sorry, but I am kind of ignorant to new standards,
>> that I don't use myself) :D
> 
> That’s hugely appreciated; I am not much of a programmer, but let me know if 
> there is anything I can do to help.
>

You are the first user of this feature, so your job will be to test it
properly, once it's implemented. The programming work will exclusively
be done by Hans. All I do is find out the formal definitions of the
standard (needed XMP entries, supported PDF features, etc.). You and I
do the boring part and he has all the fun ;-)


> All best,
> 
> Andrew Dunning
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___
> 

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

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

Re: [NTG-context] PDF/UA Support

2015-10-20 Thread Peter Rolf
Am 20.10.2015 um 09:12 schrieb Hans Hagen:
> On 10/20/2015 4:35 AM, Andrew Dunning wrote:
>>
>>> On 19 Oct 2015, at 5:33 PM, Hans Hagen <pra...@wxs.nl> wrote:
>>>
>>> Indeed context supports tagged pdf already for a while, although only
>>> acrobat can do something with it. Making it default is not really an
>>> option as there is overhead involved (a bit more runtime and much
>>> larger filesize) that makes no sense when proofing documents and in
>>> workflows for print, but enabling is easy with
>>>
>>> \setuptagging[state=start]
>>
>> Thank you! Would it also be possible to have something to the effect
>> of `\setupbackend[format={pdf/ua:2014}` to set up the appropriate
>> options?
> 
> you have to discuss that with Peter Rolf as he is the one who keeps an
> eye on all possible combinations of settings for pdf standards (and
> checks with validators)
>

Will look into it (sorry, but I am kind of ignorant to new standards,
that I don't use myself) :D

I can only hope that the validator (@Luigi: thanks for the link) does a
good job, as my ancient Acrobat Pro 9 doesn't know the standard. It will
also take some time to gather the (free available) information, but I
don't see a general problem now. I'll report back in a few days.


>>> Btw, this feature relates to export to XML. Personally I wonder why
>>> this UA is such a hype, probably because publishers are reluctant to
>>> embed the document source in the pdf, which make much more sense when
>>> alternative rendering is needed.
>>
>> I agree that I would prefer to see PDFs given alongside good HTML, but
>> the reality is that this will not happen for some time to come, and in
>> the meantime PDFs remain inaccessible to anyone with a print
>> disability (and inconvenient for the rest of us). If we can improve
>> this situation, it is only right that we do so. If we can in the
>> process encourage wider adoption of ConTeXt, even better.
> 
> an interesting side track would be a set of alternative styles that can
> be used: b/w, larger sizes, opendyslectic fonts, etc ... so, to kind of
> set a standard of producing several versions of one document
> 
> Hans
> 
> -
>   Hans Hagen | PRAGMA ADE
>   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
>  | www.pragma-pod.nl
> -
> 

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

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

Re: [NTG-context] color (rendering) intent

2015-08-10 Thread Peter Rolf
Am 10.08.2015 um 18:58 schrieb Hans Hagen:
 On 8/10/2015 5:23 PM, Henning Hraban Ramm wrote:

 Am 2015-08-10 um 17:52 schrieb Hans Hagen pra...@wxs.nl:

 On 8/10/2015 10:28 AM, Henning Hraban Ramm wrote:
 Hi,
 in http://wiki.contextgarden.net/Context_2009.10.27#Data_files
 there’s:
 • new parameter for \setupcolors: intent=none|overprint|knockout

 I had \setupcolors[intent=overprint] in my environments, but since a
 few betas, I get „overprint“ printed on all pages, messing with the
 layout.

 fixed in beta

 Thank you! So I can document that key for \setupcolors? (Does it do
 anything? Different from \setupbackend?)
 
 it should add some group info in the pdf
 


If I remember correctly this sets the complete document (global) to
'overprint' (or 'knockout'). Only useful for grayscale only documents.
Don't set this parameter, if you want to use local overprinting (or
knockout)! There should be a warning about this in the documentation.

The \setupcolors setting is also far older than the PDF/A|X related
output 'intent' parameter in \setupbackend. No direct relation other
than that both parameters are prepress options.


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

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

[NTG-context] drops module release

2014-12-08 Thread Peter Rolf
Hi,

finally(!?) the release of the drops module for ConTeXt.
The module, the manual (also part of the module) and the example
documents can be downloaded here

https://spideroak.com/browse/share/indiego/public/ConTeXt/drops/

Feel free to copy the files to other servers.

Have fun,


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

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

Re: [NTG-context] drops: arbitrary path examples

2014-11-27 Thread Peter Rolf
Am 26.11.2014 um 20:17 schrieb Hans Hagen:
 On 11/26/2014 7:56 PM, Peter Rolf wrote:
 
 A 2-3 years old PC should be able to handle the examples in acceptable
 time (judging from my hardware). But not only hardware power is needed,
 the software can be crucial too.
 
 Indeed sumatra (mupdf) views them fast and I think also in good quality.
 Memory consumption is quite ok and fits into the 4 gig limits of 32 bit
 os's. (I use sumatra when possible, also on linux (wine)).
 
 Acrobat also views ok but memory will jump a few gig so it might be a
 virtual memory issue at your end. Indeed Acrobat Reader and Pro X are
 way slower (I have no newer acrobat than x to test).

Thanks for taking the time :-)

So the problem must be somewhere in my Acrobat installation. I already
started a repair installation, but no change. Maybe it's time for a
fresh installation, where I can test a 'auto update' batch file.
Otherwise 24 patches [1.5G], which is totally insane.

 Very nice drawings.

Thanks!


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

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

[NTG-context] drops: arbitrary path examples

2014-11-26 Thread Peter Rolf
Hi,

just two example documents I made while testing arbitrary paths with the
'drops' module. I plan to release the module soon, so this is not more
than an appetizer. The code is still messy and unfinished, but I
probably don't have the time to change that. Creating the examples took
away all my free time. Take it as it is or just wait two more years..

Now, before I write down the download link some

** SERIOUS WARNING!!! I MEAN SERIOUS!!! SOMEWHAT SERIOUS!!! **

   Both documents use a considerable number of graphics
   and can significantly slow down or even freeze your hardware.
   Open the examples at your own risk (especially with products
   from Adobe)!

[whew, just lost 87% of the viewers here]

A 2-3 years old PC should be able to handle the examples in acceptable
time (judging from my hardware). But not only hardware power is needed,
the software can be crucial too.

Viewers tested so far (rating in front), all on Windows 7.

[++] SumatraPDF:
 no problems, lightning speed and very good viewing quality
(love it!)

[+] PDFExchangeViewer:
 no problems, good speed (you can still watch how the graphics are
 stacked) and viewing quality (color management if off though)

[--] Adobe Acrobat 9 Pro:
 'out of memory' error after three pages (puddle), very slow speed,
 probably best viewing quality

A real shame that the only viewer with problems is from the inventor of
PDF. The 'pile' example from 2012 even crashed the viewer (v10), so this
is still an improvement. Just let me know if there are any general
problems. I will file a bug report then.

Finally, the download link (you have been warned) :-D

https://spideroak.com/browse/share/indiego/public/ConTeXt/drops/


Some technical info about the examples:
[sigh, lost all my viewers right here]

 leafs: 150 leafs (six different colored bitmaps), resolution = 300ppi
based on this graphic (thanks for sharing)
http://openclipart.org/detail/10517/leaf-by-yves_guillou-10517

puddle: 200 MP graphics, resolution = 600ppi


Only one shadow graphic is created for the main object (which is also
reused then). Variation comes from scaling/rotation.
The big 'drops' text in Copperplate is a MP graphic, but in theory it
should be possible to add shadows to glyph paths. We will see.

To ensure the readability of the few other text elements, both documents
use the drops module to lighten the underlying background. A simple
'boxshadow' with a bright shadowcolor and a proper radius (maybe plus
some offset) is all you need for that.
This is a feature that I always wanted, way better than editing/creating
the background areas by hand (correct position/size? a lot of try and
error, a real pita). All done on the fly now, which is nice (me lazy).
[OK.. all said, stopping now; so much text for a stupid link]

Have fun,

Peter

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

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

Re: [NTG-context] overlay

2014-11-24 Thread Peter Rolf
Am 22.11.2014 um 21:32 schrieb John Kitzmiller:
 Given rectangles with text:
 
 \starttext
 Before:\\
 \startMPcode
   draw unitsquare xscaled 2cm yscaled 1cm;  
 \stopMPcode
 \\
 After:\\
 \startMPcode
   for i=0 upto 1:
 draw unitsquare scaled 1cm xshifted i*cm;
   endfor;
 \stopMPcode
 \stoptext
 
 
 How can a line be drawn connecting the right edges of the rectangles? I
 have played with:
 
 \startuniqueMPgraphic{line}
   path a;
   a:=(0,0)--(0,3cm);
   draw a withpen pencircle scaled 3pt withcolor green;
 \stopuniqueMPgraphic
 
 \defineoverlay[line][{\uniqueMPgraphic{line}}]
 
 
 and using it in \framed, but placing the line correctly is elusive.
 
 
Just a quick and dirty solution. The trick is to draw the extra line as
part of the graphic and then fake the boundingbox. This is also limited
to a few centimeter, objects are cut off after you reach that
'invisible' border around the boundingbox.

I would use uniqueMPgraphic with proper parameters for the graphics.
Using overlays is also possible (urcorner OverlayBox), but I see no real
need or benefit to do so.


HTH,  Peter
\startMPinclusions
  numeric lw; lw:= 1;
  numeric n; n:= 8;
  numeric u; u:= 1cm;
\stopMPinclusions

\starttext
Before:\\
\startMPcode
  pickup pencircle scaled lw;
  draw unitsquare xyscaled (n*u,u);  
\stopMPcode
\\
After:\\
\startMPcode
  path p,q;
  pickup pencircle scaled lw;
  p:= unitsquare scaled u;
  for i=0 upto n-1:
  draw p xshifted i*u;
  endfor;
  q:= boundingbox currentpicture;
  draw (urcorner(q) shifted(-.5lw,-.5lw)) -- (urcorner(q) shifted(-.5lw,-.5lw +1.5u));
  setbounds currentpicture to q;
\stopMPcode
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] viewer magnification in full screen (/OpenAction)

2014-10-06 Thread Peter Rolf
Hi,

I want to open a document in 'full screen', showing the complete page at
maximal magnification. Couldn't find a proper way to set the
magnification though.


Peter


Example:

\setupinteraction[state=start]% openaction, focus
\setupinteractionscreen[option=max,height=fit]

\starttext
Full screen, all visible and at maximal possible magnification...
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] lpdf.checkedkey has problem with false values

2014-09-15 Thread Peter Rolf
Am 15.09.2014 um 16:14 schrieb Michail Vidiassov:
 Dear Developers and All,
 
 lpdf.checkedkey routine from lpdf-ini.lua has problems with accessing
 false boolean values, it returns them as nil. Is it by design or
 neglect?

More a lua design decision. 'nil' is equal to 'false' here, 'true' is
equal to all that is not 'nil'.

http://www.lua.org/pil/3.3.html

 (I vaguely remember stumbling on this problems before, so  there is a
 chance that I have already got the answer, but have forgotten it.)
 The minimal demo:
 \starttext
 \startluacode
 local function writebool(bv,text)
  if bv == true then

if bv then

   io.write(text,  true \n)
  elseif bv == nil then

else
(if not bv then)


HTH,   Peter


   io.write(text,  nil  \n)
  else
   io.write(text,  false\n)
  end
 end
 local a = {}
 a[x] = true
 a[y] = false
 a[z] = nil
 writebool(lpdf.checkedkey(a,x,boolean),lpdf.checkedkey(a,\x\,\boolean\))
 writebool(lpdf.checkedkey(a,y,boolean),lpdf.checkedkey(a,\y\,\boolean\))
 writebool(lpdf.checkedkey(a,z,boolean),lpdf.checkedkey(a,\z\,\boolean\))
 writebool(a.x,a.x)
 writebool(a.y,a.y)
 writebool(a.z,a.z)
 \stopluacode
 TEST
 \stoptext
 
 
 It results in the following relevant output
 
 lpdf.checkedkey(a,x,boolean) true
 lpdf.checkedkey(a,y,boolean) nil
 lpdf.checkedkey(a,z,boolean) nil
 a.x true
 a.y false
 a.z nil
 
 Note that false value was read by checkedkey as nil.
 
 Sincerely, MIchail
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___
 

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

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


Re: [NTG-context] Spurious pages in makeups

2014-09-04 Thread Peter Rolf
Hi Indris,

I guess the double sided setup is also true for your makeup definitions.
An additional doublesided=no in the makeup definition gives the wanted
result.

Best,  Peter

Am 04.09.2014 um 16:04 schrieb Idris Samawi Hamid ادريس سماوي حامد:
 Dear gang,
 
 For a doublesided book, I get spurious pages in this setup:
 
 ===
 \starttext
 \setuppagenumbering[alternative=doublesided]
 
 \definemakeup[title][align=middle]
 \definemakeup[copyright][align=flushleft]
 
 \setuphead[chapter][number=yes,page=left]
 
 \startmakeup[title]
 \tfd  Title Page
 \stopmakeup
 \page[left]
 \startmakeup[copyright]
 Author
 \crlf
 http://www.website.com/
 
 ISBN: 978-0-9907820-0-1
 
 \blank
 
 Copyright © 2014 Author
 
 \blank
 
 All rights reserved.
 
 \blank
 
 Front Range Press.
 
 \blank
 
 Printed in the United States of America.
 \stopmakeup
 
 \title{Table of Contents}
 \stoptext
 ===
 
 What we want: copyright page (left sided) immediately after title page
 (right sided), followed immediately by TOC (right sided). I.e.,
 Title+Copyright+TOC with no page breaks
 
 What we get: copyright page (right sided) two pages after title page
 (right sided), followed by a blank page, followed by TOC (right sided).
 See attached pdf.
 
 How do I suppress the spurious pages (2+1)? I need to keep doublesided
 for obvious reasons...
 
 I could force this without makeups but would like to take advantage of
 makeups if I can. Thanks in advance!
 
 Best wishes
 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://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___
 

\starttext
\setuppagenumbering[alternative=doublesided]

\definemakeup[title][align=middle,doublesided=no]
\definemakeup[copyright][align=flushleft,doublesided=no]

\startmakeup[title]
\tfd  Title Page
\stopmakeup
\page[left]
\startmakeup[copyright]
Author
\crlf
http://www.website.com/

ISBN: 978-0-9907820-0-1

\blank

Copyright © 2014 Author

\blank

All rights reserved. 

\blank

Front Range Press.

\blank

Printed in the United States of America.
\stopmakeup

\title{Table of Contents}
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] interaction (mailto) query

2014-07-16 Thread Peter Rolf
Hi Alan,

Am 16.07.2014 13:27, schrieb Alan Bowen:
 To open a new email message in the user’s email client, I have
 \useURL
 [xxx]
 [mailto:x...@yyy.org mailto:x...@yyy.org]

[mailto:x...@yyy.org?subject=foo]

There are also 'body=' for the mail text and 'cc=' / 'bcc='. All
worked well in a quick test.


Best wishes,

Peter

 []
 [{xxx}]
 
 \setupinteraction[state=start,color=blue]
 
 \starttext
 
 send email to \from[xxx]
 
 \stoptext
 
 This sets the address to which the message is to be sent. Is there a way
 to set the subject of this message as well?
 
 Alan
 
 
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___
 

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

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

Re: [NTG-context] blank overlay

2014-06-03 Thread Peter Rolf
Am 03.06.2014 16:27, schrieb john Culleton:
 
 I need a graphic (a thumbnail) on the right hand
 pages but not on the left hand pages. Following
 the instructions in the Metafun Manual page 168 I
 have assigned different pairs to the two
 overlays: 
 \startuseMPgraphic{right page}
 ...
 \stopuseMPgraphic
 
 and 
 \startuseMPgraphic{left page}
 \stopuseMPgraphic
 
 In the left hand area I want to just create a
 minimal structure that replaces the right hand
 graphic overlay.
 
 What is the minimal code I can use between the
 start and stop statements?
 

Not sure if I understand you right, but let's give it a try :-)

You can use 'Start|Stoppage' in combination with your icon, but you end
up with a graphic as big as the page (not visible and a small data
footprint, but still some kind of 'layer mess'). Probably not the best
way to do this in ConTeXt. Anyway...

StartPage;
draw something xyshifted(x,y); % shift to the desired position
StopPage;


Better alternative:

http://wiki.contextgarden.net/Layers

Example: placing a logo to the top right corner of the page

And for the different setup on left|right pages see

http://wiki.contextgarden.net/Alternating_backgrounds_and_repeating_layers

The latter link is also at the bottom of the layer related page.


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

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


Re: [NTG-context] Ctx goes into infinite loop?

2014-05-23 Thread Peter Rolf
Am 23.05.2014 13:50, schrieb Hans Hagen:
 On 5/23/2014 1:30 PM, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
 Hello,

 \input \HOME/Common/_Defs_.ctx

 at least put { } around the input name

 -- 
 \startluacode
local home = (os.getenv(HOME.ORG) or os.getenv(HOME) or
 ?):gsub(\\, /)

context.setvalue(HOME, home)
 \stopluacode

 \input{\HOME/Common/_Defs_.ctx}

 \starttext
Test
 \stoptext

 -- 

 similar failure:
 
 no loop, just a missing file ... i have no clue
 
 

The environment variables HOME and HOME.ORG are not predefined in a
windows shell. Just enter env and see what is available.

You can easily add HOME with this tool. A restart is required on older
Windows OS (XP)!

http://redmondlab.reachby.com/g2gz5/redmond-path-v-1-0


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

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

Re: [NTG-context] Ctx goes into infinite loop?

2014-05-23 Thread Peter Rolf
Am 23.05.2014 16:18, schrieb Peter Rolf:
 Am 23.05.2014 13:50, schrieb Hans Hagen:
 On 5/23/2014 1:30 PM, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
 Hello,

 \input \HOME/Common/_Defs_.ctx

 at least put { } around the input name

 -- 
 \startluacode
local home = (os.getenv(HOME.ORG) or os.getenv(HOME) or
 ?):gsub(\\, /)

context.setvalue(HOME, home)
 \stopluacode

 \input{\HOME/Common/_Defs_.ctx}

 \starttext
Test
 \stoptext

 -- 

 similar failure:

 no loop, just a missing file ... i have no clue


 
 The environment variables HOME and HOME.ORG are not predefined in a
 windows shell. Just enter env and see what is available.
 
 You can easily add HOME with this tool. A restart is required on older
 Windows OS (XP)!
 
 http://redmondlab.reachby.com/g2gz5/redmond-path-v-1-0
 

Sorry, wrong tool. This one is only for PATH, not for arbitrary variables.



 Peter
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___
 

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

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

Re: [NTG-context] pdf X/1-a:2001 format for print output.

2014-05-22 Thread Peter Rolf
Am 22.05.2014 16:07, schrieb john Culleton:
 The above format is required for pdf files
 containing color for many American printers. I am
 looking for the minimal case. In the wiki there
 is an example:
 
 \setupbackend
   [format=PDF/X-1a:2001,
intent=SWOP2006_Coated3v2.icc]
 
 Is this sufficient? Or must I also use this
 code:

They are not needed in PDF/X. But its good to be able to search PDF
documents for a specific author or a title. No metadata, no search
result pointing to your document.

 
 \setupinteraction
   [title=TITLE,
subtitle=SUBTITLE,
author=AUTHOR,
keyword={{KEYWORD1, KEYWORD2}, KEYWORD3}]
 
 I don't see the relationship of this last example
 to non-interactive pdf X/1-a:2001 output for
 print. 


Well, there is none. You set the metadata via '\setupinteraction'.
That's all.
Interactive features (like links) are even forbidden in PDF/X-1a. Also
no transparency and no RGB colors.


HTH,  Peter


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

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


Re: [NTG-context] pagecolormodel problem

2014-04-17 Thread Peter Rolf
Am 16.04.2014 01:15, schrieb Hans Hagen:
 On 4/16/2014 12:41 AM, Sanjoy Mahajan wrote:
 can someone confirm, that this code fails with a recent ConTeXt version?

 It fails for me with 2014.03.27 (luatex 0.78.2).
 
 will be fixed in next beta
 
Works with the beta from 2014-04-17. Thanks to Hans for fixing it and to
Sanjoy for taking the time to test :-)


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

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


[NTG-context] pagecolormodel problem

2014-04-15 Thread Peter Rolf
Hi,

can someone confirm, that this code fails with a recent ConTeXt version?
No such problems with version 2013.12.24.


\setupcolors[pagecolormodel=auto]
\starttext
FOO
\stoptext


This is what I get here...

output
D:\mydocs\TeX\dokumente\test\IMcontext test

mtx-context | warning: no (local) file './test', proceeding
mtx-context | run 1: luatex
--fmt=v:/tmp/context/tex/texmf-cache/luatex-cache/context/5fe67e0bf
e781ce0dde776fb1556f32e/formats/luatex/cont-en --jobname=test
--lua=v:/tmp/context/tex/texmf-cac
he/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui
--no-parse-firs
t-line --c:currentrun=1 --c:fulljobname=./test --c:input=./test
--c:kindofrun=1 --c:maxnofruns=8
 cont-yes.mkiv
This is LuaTeX, Version beta-0.79.1 (TeX Live 2014-04-01/W32TeX) (rev 4973)
 \write18 enabled.
open source  1  1 
v:/tmp/context/tex/texmf-context/tex/context/base/cont-yes.mkiv

ConTeXt  ver: 2014.04.07 13:00 MKIV beta  fmt: 2014.4.15  int:
english/english

system   'cont-new.mkiv' loaded
open source  2  2 
v:/tmp/context/tex/texmf-context/tex/context/base/cont-new.mkiv
close source 2  2 
v:/tmp/context/tex/texmf-context/tex/context/base/cont-new.mkiv
system   files  jobname 'test', input './test', result 'test'
fontslatin modern fonts are not preloaded
languageslanguage 'en' is active
open source  2  3  D:/mydocs/TeX/dokumente/test/IM/test.tex
colors   'rgb' color space is supported
colors   'cmyk' color space is supported
fontspreloading latin modern fonts (second stage)
fonts'fallback modern-designsize rm 12pt' is loaded
backend  xmp  using file
'v:/tmp/context/tex/texmf-context/tex/context/base/lpdf-pdx.xml'

lua errorerror on line 1 in file
D:/mydocs/TeX/dokumente/test/IM/test.tex:

.../context/tex/texmf-context/tex/context/base/lpdf-ini.lua:579:
pdf.immediateobj() can not be used
with \latelua

1   \setupcolors[pagecolormodel=auto]
2 \starttext
3 FOO
4 \stoptext
5


?
/output

ConTeXt version: 2014.04.07 13:00
LuaTeX version: beta-0.79.1


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

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


Re: [NTG-context] Metapost: I only need a little bit padding

2014-04-05 Thread Peter Rolf
Hi Jan,

Am 05.04.2014 15:48, schrieb Jan Heinen:
 \startuseMPgraphic{rotatedHeadline}
 % Text Headline in a box which is rotated
 draw btex {\strut\tfd Headline} etex;

setbounds currentpicture to boundingbox currentpicture enlarged 2mm;

The following code is based on the boundingbox, so just make it bigger
beforehand.

 
 % rectangle with rounded corners
 path p;
 p := llcorner currentpicture+(0mm,3mm){down}..{right}llcorner
 currentpicture+(3mm,0mm)--
 lrcorner currentpicture+(-3mm,0mm){right}..{up}lrcorner
 currentpicture+(0mm,3mm)--
 urcorner currentpicture+(0mm,-3mm){up}..{left}urcorner
 currentpicture+(-3mm,0mm)--
 ulcorner currentpicture+(3mm,0mm){left}..{down}ulcorner
 currentpicture+(0mm,-3mm)--cycle;
 pickup pencircle scaled 0.5pt;
 clip currentpicture to p;
 draw p;
 currentpicture := currentpicture rotated 90;
 \stopuseMPgraphic
 
 
 \starttext
 \useMPgraphic{rotatedHeadline}
 \stoptext

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

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


[NTG-context] MP bounding box

2014-03-12 Thread Peter Rolf
Hi,

I run into a problem with the bounding box calculation of a MP graphic.
Seems like very small values are represented in scientific notation and
MP can't handle those.

Example attached.

[..]
to be read again
e
to be read again e
 -
argument 6.103515625e-
 005
\setMPboundingbox #1#2#3#46-\global \MPllx #1
 \onebasepoint \global
\MPlly #2...
\startMPLIBtoPDF ...MPboundingbox {#1}{#2}{#3}{#4}
  \setbox \MPbox \vbox
\bgro...
l.13 }

...
l.50 \useMPgraphic{path:ivy}

!  == Fatal error occurred, no output PDF file produced!
mtx-context | fatal error: return code: 1
[fin]


Greetings,  Peter
\startuseMPgraphic{path:ivy}
%drawoptions (withcolor (0.792157,0.831373,0.654902));
linecap := butt;
linejoin := mitered;

path p;
p:= (176.858994,1.214840)..controls (166.410004,16.378901) and 
(164.914001,36.269501)..(152.785004,50.542999)
..controls (139.113007,74.707001) and 
(135.578003,102.433998)..(131.085999,129.313004)
..controls (125.551003,147.983994) and 
(134.164001,171.214996)..(120.188004,186.914001)
..controls (106.214996,204.207001) and 
(85.527298,188.098007)..(68.574203,192.397995)
..controls (50.648399,197.593994) and 
(33.652302,206.375000)..(16.855499,214.477005)
..controls (-2.886720,220.117004) and 
(-7.417970,244.410004)..(14.824200,250.953003)
..controls (32.433601,258.414001) and 
(47.558601,274.097992)..(67.972702,271.871002)
..controls (81.707001,271.468994) and 
(108.027000,276.070007)..(93.878899,294.792999)
..controls (88.523399,309.914001) and 
(81.296898,327.058990)..(87.390602,343.101990)
..controls (93.996101,355.484009) and 
(114.109001,346.003998)..(123.848000,339.429993)
..controls (139.315994,329.394989) and 
(156.770004,320.003998)..(163.925995,301.812988)
..controls (174.339996,292.378998) and 
(167.679993,267.875000)..(180.132996,264.121002)
..controls (184.688004,279.511993) and 
(183.315994,298.941010)..(196.539001,311.601990)
..controls (210.559006,328.757996) and 
(230.438004,338.562988)..(247.210999,352.546997)
..controls (257.906006,358.035004) and 
(266.890991,373.410004)..(270.281006,353.472992)
..controls (274.277008,332.484009) and 
(279.863007,308.898010)..(266.949005,289.789001)
..controls (254.492004,275.625000) and 
(267.703003,259.843994)..(281.632996,253.897995)
..controls (296.359009,246.020004) and 
(310.902008,235.281006)..(328.187988,231.324005)
..controls (347.582001,224.386993) and 
(355.777008,203.496002)..(372.128998,192.190994)
..controls (385.386993,185.054993) and 
(395.425995,157.820007)..(370.398010,163.953003)
..controls (344.117004,166.574005) and 
(317.691010,164.313004)..(291.351990,166.102005)
..controls (273.718994,160.414001) and 
(249.440994,182.781006)..(237.477005,164.309006)
..controls (229.477005,147.417999) and 
(230.983994,128.108994)..(224.882996,110.519997)
..controls (222.667999,92.656303) and 
(210.332001,79.105499)..(204.438004,62.742199)
..controls (205.897995,43.285198) and 
(196.070007,26.058599)..(185.50,10.480500)
..controls (183.128998,8.304690) and 
(181.695007,-3.820310)%..(176.858994,1.214840)
%   --cycle;
..cycle;

w:= xpart urcorner boundingbox p;
f:= 50mm/w; % lower then 60mm raises error
p:= p scaled f;

fill p;

passvariable(ivy,p);
setbounds currentpicture to boundingbox(p);
\stopuseMPgraphic


\starttext
\useMPgraphic{path:ivy}
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] MP bounding box

2014-03-12 Thread Peter Rolf
Am 12.03.2014 17:05, schrieb Hans Hagen:
 On 3/12/2014 2:38 PM, Peter Rolf wrote:
 Hi,

 I run into a problem with the bounding box calculation of a MP graphic.
 Seems like very small values are represented in scientific notation and
 MP can't handle those.

 Example attached.

 [..]
 to be read again
 e
 to be read again e
   -
 argument 6.103515625e-
   005
 \setMPboundingbox #1#2#3#46-\global \MPllx #1
   \onebasepoint \global
 \MPlly #2...
 \startMPLIBtoPDF ...MPboundingbox {#1}{#2}{#3}{#4}
\setbox \MPbox \vbox
 \bgro...
 l.13 }

 
 l.50 \useMPgraphic{path:ivy}

 !  == Fatal error occurred, no output PDF file produced!
 mtx-context | fatal error: return code: 1
 [fin]
 
 catched in next beta
 

Thanks. Time to update my antique version (12/2013).


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

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


Re: [NTG-context] MP bounding box

2014-03-12 Thread Peter Rolf
Am 12.03.2014 18:15, schrieb Hans Hagen:
 On 3/12/2014 5:25 PM, Peter Rolf wrote:
 Am 12.03.2014 17:05, schrieb Hans Hagen:
 On 3/12/2014 2:38 PM, Peter Rolf wrote:
 Hi,

 I run into a problem with the bounding box calculation of a MP graphic.
 Seems like very small values are represented in scientific notation and
 MP can't handle those.

 Example attached.

 [..]
 to be read again
 e
 to be read again e
-
 argument 6.103515625e-
005
 \setMPboundingbox #1#2#3#46-\global \MPllx #1
\onebasepoint \global
 \MPlly #2...
 \startMPLIBtoPDF ...MPboundingbox {#1}{#2}{#3}{#4}
 \setbox \MPbox
 \vbox
 \bgro...
 l.13 }

 
 l.50 \useMPgraphic{path:ivy}

 !  == Fatal error occurred, no output PDF file produced!
 mtx-context | fatal error: return code: 1
 [fin]

 catched in next beta


 Thanks. Time to update my antique version (12/2013).
 
 not yet uploaded
 

No real problem. My installed version is working very well so far, as I
rescale the graphics afterwards.

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

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


Re: [NTG-context] glyph path

2014-02-20 Thread Peter Rolf
Am 20.02.2014 09:58, schrieb Hans Hagen:
 On 2/19/2014 7:41 PM, Peter Rolf wrote:
 Forgot to tell why I need the glyph paths...
 I implemented multi path support in drops yesterday and now I want to
 test it with some glyphs. Currently I use Inkscape (export the glyph
 path as PDF) and pdftoedit to finally get a MP path. Time consuming and
 the result still needs a manual clean-up.
 
 % macros=mkvi
 
 \definefont[RatherBig][Mono at 60pt]
 
 \defineeffect [justone] [alternative=outer,rulethickness=1pt]
 \defineeffect [justtwo] [alternative=inner]
 
 \starttexdefinition example #font#line#text
 \hbox {
 \framed [offset=\dimexpr#line/2\relax,strut=no,frame=off] {
 \definedfont[#font]
 \defineeffect[bg][alternative=outer,rulethickness=#line]
 \defineeffect[fg][alternative=inner]
 \hsmash{\red \effect[bg]{#text}}
 \hbox  {\blue\effect[fg]{#text}}
 }
 }
 \stoptexdefinition
 
 \starttext
 
 {\effect[justone]{\RatherBig BIG}}
 
 {\effect[justtwo]{\RatherBig BIG}}
 
 \example{Mono at 60pt}{5pt}{BIG}
 
 \example{Mono at 80pt}{10pt}{BIG}
 
 \stoptext
 

Thanks for this nice example (I wasn't aware of this).
But this doesn't really help me with my problem. I guess my example had
too much irritating eye candy, so I made another one :-)

http://www.wuala.com/indiego/public/ConTeXt/pathtest2.pdf

The problem is, that I need direct access to the glyphs path(s), as I
must calculate the offset paths for the sub shadows (umbra/penumbra).
Inkscape has a similar function called inset/outset path, if I
remember right.
In the example I used a negative offset for the umbra shadow (udistance)
and a positive for the penumbra shadow (pdistance). The original path is
drawn as 'arrowpath'.
The path creating algorithm (based on the Tiller-Hanson alg.) works
quite good so far, but still needs a lot of tweaking. And glyphs have a
wide range of shapes, so they are nearly ideal for testing purposes.

Anyhow, it can't be helped, if 'glyph' is not working. I'll test some
ConTeXt generated PDF glyphs (MPpage) then and see if I can optimize the
manual path creation a little bit.

Best wishes,

Peter



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

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


[NTG-context] glyph path

2014-02-19 Thread Peter Rolf
Hi,

I tried the Dcaron example from the MetaPost manual (page 50) and it
works nicely when called with mpost.

% Dcaron.mp
fontmapfile=lm-ec.map;
beginfig(56);
picture q;
path p;
interim ahlength:=12bp;
interim ahangle:=25;
q:= glyph Dcaron of ec-lmr10 scaled .2;
for item within q:
p:= pathpart item;
drawarrow p withcolor(.6,.9,.6) withpen pencircle scaled 1.5;
for j=0 upto length p:
pickup pencircle scaled .7;
draw (point j of p -- precontrol j of p)
dashed evenly withcolor blue;
draw (point j of p -- postcontrol j of p)
dashed evenly withcolor blue;
pickup pencircle scaled 3;
draw precontrol j of p withcolor red;
draw postcontrol j of p withcolor red;
pickup pencircle scaled 2;
draw point j of p withcolor black;
endfor
endfor
endfig;
% ---

But how can I get the glyph path(s) with luatex (mplib)?

Minimal example (glyph.mkiv) and console output are attached (log is
empty). Looks like I can't use 'fontmapfile' and without it the glyphs
are not found.


Peter

mtx-context | run 1: luatex 
--fmt=R:/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en
 --jobname=glyph 
--lua=R:/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui
 --no-parse-first-line --c:currentrun=1 --c:fulljobname=./glyph.mkiv 
--c:input=./glyph.mkiv --c:kindofrun=1 --c:maxnofruns=8 cont-yes.mkiv
This is LuaTeX, Version beta-0.77.0-2013122323 (rev 4694) 
 \write18 enabled.
(R:/tex/texmf-context/tex/context/base/cont-yes.mkiv

ConTeXt  ver: 2013.12.24 17:52 MKIV beta  fmt: 2013.12.25  int: english/english

system   'cont-new.mkiv' loaded
(R:/tex/texmf-context/tex/context/base/cont-new.mkiv)
system   files  jobname 'glyph', input './glyph.mkiv', result 'glyph'
fontslatin modern fonts are not preloaded
languageslanguage 'en' is active
(d:/mydocs/TeX/dokumente/D3/glyph.mkiv{R:/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
fontspreloading latin modern fonts (second stage)
fontstypescripts  unknown library 'loc'
{R:/tex/texmf/fonts/map/dvips/lm/lm-math.map}{R:/tex/texmf/fonts/map/dvips/lm/lm-rm.map}
fonts'fallback modern rm 12pt' is loaded
metapost initializing instance 'metafun' using format 'metafun'
metapost loading 'metafun' as 
'R:/tex/texmf-context/metapost/context/base/metafun.mpiv' using method 'default'
metapost initializing number mode 'scaled'
metapost error: 
Warning: cannot open font map file mpost.map
{lm-ec.map
Out of memory!

metapost error: no-term
no-error
nil
backend  xmp  using file 
'R:/tex/texmf-context/tex/context/base/lpdf-pdx.xml'
pagesflushing realpage 1, userpage 1
 ) )R:/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf

mkiv lua stats   used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats   used cache path: 
R:/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats   resource resolver: loadtime 0.000 seconds, 0 scans with 
scantime 0.000 seconds, 0 shared scans, 29 found files, scanned paths: none
mkiv lua stats   stored bytecode data: 338 modules (0.094 sec), 69 tables 
(0.000 sec), 407 chunks (0.094 sec)
mkiv lua stats   cleaned up reserved nodes: 42 nodes, 9 lists of 442
mkiv lua stats   node memory usage: 2 glue, 2 penalty, 9 attribute, 28 
glue_spec, 3 attribute_list
mkiv lua stats   node list callback tasks: 6 unique task lists, 5 instances 
(re)created, 40 calls
mkiv lua stats   used backend: pdf (backend for directly generating pdf output)
mkiv lua stats   loaded patterns: en::2, load time: 0.000
mkiv lua stats   jobdata time: 0.000 seconds saving, 0.000 seconds loading
mkiv lua stats   callbacks: 141 direct, 196 indirect, 337 total
mkiv lua stats   result saved in file: glyph.pdf, compresslevel 3, 
objectcompreslevel 3
mkiv lua stats   loaded fonts: 2 files: latinmodern-math.otf, 
lmroman12-regular.otf
mkiv lua stats   fonts load time: 0.094 seconds for 4 fonts, 2 shared in 
backend, 2 common vectors, 0 common hashes
mkiv lua stats   used platform: win64, type: windows, binary subtree: 
texmf-win64
mkiv lua stats   luatex banner: this is luatex, version beta-0.77.0 (tex live 
2013/w32tex) (rev 4694)
mkiv lua stats   control sequences: 38342 of 65536 + 10
mkiv lua stats   current memory usage: 49 MB (ctx: 49 MB)
mkiv lua stats   runtime: 0.250 seconds, 1 processed pages, 1 shipped pages, 
4.000 pages/second

mtx-context | run 1: luatex 
--fmt=R:/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en
 --jobname=glyph 
--lua=R:/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui
 --no-parse-first-line --c:currentrun=2 

Re: [NTG-context] glyph path

2014-02-19 Thread Peter Rolf
Forgot to tell why I need the glyph paths...
I implemented multi path support in drops yesterday and now I want to
test it with some glyphs. Currently I use Inkscape (export the glyph
path as PDF) and pdftoedit to finally get a MP path. Time consuming and
the result still needs a manual clean-up.

Here is my current test example. Needless to say, that the path blew up
my code in the first run (a too low threshold value) :-D

http://www.wuala.com/indiego/public/ConTeXt/pathtest.pdf


Am 19.02.2014 13:25, schrieb Peter Rolf:
 Hi,
 
 I tried the Dcaron example from the MetaPost manual (page 50) and it
 works nicely when called with mpost.
 
 % Dcaron.mp
 fontmapfile=lm-ec.map;
 beginfig(56);
 picture q;
 path p;
 interim ahlength:=12bp;
 interim ahangle:=25;
 q:= glyph Dcaron of ec-lmr10 scaled .2;
 for item within q:
 p:= pathpart item;
 drawarrow p withcolor(.6,.9,.6) withpen pencircle scaled 1.5;
 for j=0 upto length p:
 pickup pencircle scaled .7;
 draw (point j of p -- precontrol j of p)
 dashed evenly withcolor blue;
 draw (point j of p -- postcontrol j of p)
 dashed evenly withcolor blue;
 pickup pencircle scaled 3;
 draw precontrol j of p withcolor red;
 draw postcontrol j of p withcolor red;
 pickup pencircle scaled 2;
 draw point j of p withcolor black;
 endfor
 endfor
 endfig;
 % ---
 
 But how can I get the glyph path(s) with luatex (mplib)?
 
 Minimal example (glyph.mkiv) and console output are attached (log is
 empty). Looks like I can't use 'fontmapfile' and without it the glyphs
 are not found.
 
 
 Peter
 
 
 
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___
 

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

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


Re: [NTG-context] runtime problem with metafun() code

2014-01-27 Thread Peter Rolf
Am 27.01.2014 13:12, schrieb Hans Hagen:
 On 1/25/2014 1:58 PM, Peter Rolf wrote:
 Am 25.01.2014 01:07, schrieb Hans Hagen:
 On 1/24/2014 7:41 PM, Peter Rolf wrote:
 Am 24.01.2014 14:45, schrieb Hans Hagen:
 On 1/24/2014 1:35 PM, Peter Rolf wrote:
 Hi,

 I try to create a Metapost path in lua and it works so far for the
 attached example. But a call of that function from another lua
 function
 sadly fails (no path visible after call). The code seems to be
 executed
 later (the output from 'show pid;' appears somewhere later in the
 log).

 How can I ensure that the code is executed at runtime?

 I don't understand the issue but isn't there a

   metafun(draw p;)

 missing then?

 Setting the bounding box has the same effect, as drawing something.
 Both methods avoid that the emtpy graphic is ignored by ConTeXt.

 Anyhow, the MP path is not available in metapost.variables after the
 function call. If there is no other way I have to call the function
 from
 the TeX side (like in the attached example). Will look into that
 tomorrow.

 %D We also provide an outputless run:

 \unexpanded\def\startMPcalculation

 I tried that command, but couldn't get it to work on the lua side.

 The first pure MP line after context.startMPcalculation() raises a lua
 error and a combination with metafun() is also not working. So how to
 use this in lua?


 Anyhow, the problem is the execution time of the MP graphic. I changed
 the attached example a bit, so that you can see it.
 The inspect() in drops.foo() gives an empty table, while the second
 inspect on the TeX side shows the path drops:foo.

 I need the path right after the call (it needs to be adapted to IM
 afterwards; mainly scaling and shifting). Is there a way to force the
 execution of the graphic without switching back to the TeX side?
 
 
 function drops.foo(id,width,height,radius)
 drops.generate_default_path(id,width,height,radius)
 context(function() inspect(metapost.variables) end) -- empty here
 end
 
 or
 
 function drops.bar()
 inspect(metapost.variables)
 end
 
 function drops.foo(id,width,height,radius)
 drops.generate_default_path(id,width,height,radius)
 context(drops.bar) -- empty here
 end
 
 
Ah, that's how it works. I'm still a luatex noob...
Many thanks, Hans!!


Peter


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

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


Re: [NTG-context] runtime problem with metafun() code

2014-01-25 Thread Peter Rolf
Am 25.01.2014 01:07, schrieb Hans Hagen:
 On 1/24/2014 7:41 PM, Peter Rolf wrote:
 Am 24.01.2014 14:45, schrieb Hans Hagen:
 On 1/24/2014 1:35 PM, Peter Rolf wrote:
 Hi,

 I try to create a Metapost path in lua and it works so far for the
 attached example. But a call of that function from another lua function
 sadly fails (no path visible after call). The code seems to be executed
 later (the output from 'show pid;' appears somewhere later in the log).

 How can I ensure that the code is executed at runtime?

 I don't understand the issue but isn't there a

  metafun(draw p;)

 missing then?

 Setting the bounding box has the same effect, as drawing something.
 Both methods avoid that the emtpy graphic is ignored by ConTeXt.

 Anyhow, the MP path is not available in metapost.variables after the
 function call. If there is no other way I have to call the function from
 the TeX side (like in the attached example). Will look into that
 tomorrow.
 
 %D We also provide an outputless run:
 
 \unexpanded\def\startMPcalculation

I tried that command, but couldn't get it to work on the lua side.

The first pure MP line after context.startMPcalculation() raises a lua
error and a combination with metafun() is also not working. So how to
use this in lua?


Anyhow, the problem is the execution time of the MP graphic. I changed
the attached example a bit, so that you can see it.
The inspect() in drops.foo() gives an empty table, while the second
inspect on the TeX side shows the path drops:foo.

I need the path right after the call (it needs to be adapted to IM
afterwards; mainly scaling and shifting). Is there a way to force the
execution of the graphic without switching back to the TeX side?


Peter


thirddata= thirddataor { }
thirddata.drops  = thirddata.drops  or { }

local drops = thirddata.drops

local metafun = context.metafun

local format,todimen = string.format, string.todimen
local floor = math.floor

-- http://lua-users.org/wiki/SimpleRound
local function round(num, idp)
local mult = 10^(idp or 0)
return floor(num * mult + 0.5) / mult
end

function drops.numberofpixels(n,idp)
local dimenfactor = 1/tex.pdfpxdimen
return round(todimen(n)*dimenfactor,idp)
end

local numberofpixels = drops.numberofpixels


function drops.generate_default_path(id,width,height,radius)

local w,h,r
w = numberofpixels(width); h = numberofpixels(height); r = numberofpixels(radius)

metafun.start()

metafun(save p,pid; path p; string pid;)

-- metafun(id := \drops:boxshadow_w%sh%sr%s\;,w,h,r)
metafun(pid := \%s\;,id)
--metafun(show pid;) -- ok
metafun(p:= unitsquare xyscaled(%s,%s) smoothed %s;,w,h,r)

metafun(passvariable(pid,p);)
metafun(setbounds currentpicture to boundingbox(p);) -- 'activator'; void graphics are ignored

metafun.stop()

end


function drops.foo(id,width,height,radius)
drops.generate_default_path(id,width,height,radius)
inspect(metapost.variables) -- empty here
end
\ctxloadluafile{mplua}{}


\starttext
\ctxlua{metapost.showlog = true}

%\ctxlua{thirddata.drops.generate_default_path(drops:boxshadow-w199h100r10,200pt,100pt,10pt)}
%\ctxlua{inspect(metapost.variables)}

\ctxlua{thirddata.drops.foo(drops:foo,200pt,100pt,10pt)}
\ctxlua{inspect(metapost.variables)} % ok here


\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] runtime problem with metafun() code

2014-01-24 Thread Peter Rolf
Hi,

I try to create a Metapost path in lua and it works so far for the
attached example. But a call of that function from another lua function
sadly fails (no path visible after call). The code seems to be executed
later (the output from 'show pid;' appears somewhere later in the log).

How can I ensure that the code is executed at runtime?


Peter
thirddata= thirddataor { }
thirddata.drops  = thirddata.drops  or { }

local drops = thirddata.drops

local metafun = context.metafun

local format,todimen = string.format, string.todimen
local floor = math.floor

-- http://lua-users.org/wiki/SimpleRound
local function round(num, idp)
local mult = 10^(idp or 0)
return floor(num * mult + 0.5) / mult
end

function drops.numberofpixels(n,idp)
local dimenfactor = 1/tex.pdfpxdimen
return round(todimen(n)*dimenfactor,idp)
end

local numberofpixels = drops.numberofpixels


function drops.generate_default_path(id,width,height,radius)
local w,h,r
w = numberofpixels(width); h = numberofpixels(height); r = numberofpixels(radius)

metafun.start()

metafun(save p,pid; path p; string pid;)

-- metafun(id := \drops:boxshadow_w%sh%sr%s\;,w,h,r)
metafun(pid := \%s\;,id)
--metafun(show pid;) -- ok
metafun(p:= unitsquare xyscaled(%s,%s) smoothed %s;,w,h,r)

metafun(passvariable(pid,p);)
metafun(setbounds currentpicture to boundingbox(p);) -- 'activator'; void graphics are ignored

metafun.stop()
end
\ctxloadluafile{mplua}{}


\starttext
\ctxlua{metapost.showlog = true}

\ctxlua{thirddata.drops.generate_default_path(drops:boxshadow-w199h100r10,200pt,100pt,10pt)}
\ctxlua{inspect(metapost.variables)}



\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] runtime problem with metafun() code

2014-01-24 Thread Peter Rolf
Am 24.01.2014 14:45, schrieb Hans Hagen:
 On 1/24/2014 1:35 PM, Peter Rolf wrote:
 Hi,

 I try to create a Metapost path in lua and it works so far for the
 attached example. But a call of that function from another lua function
 sadly fails (no path visible after call). The code seems to be executed
 later (the output from 'show pid;' appears somewhere later in the log).

 How can I ensure that the code is executed at runtime?
 
 I don't understand the issue but isn't there a
 
 metafun(draw p;)
 
 missing then?

Setting the bounding box has the same effect, as drawing something.
Both methods avoid that the emtpy graphic is ignored by ConTeXt.

Anyhow, the MP path is not available in metapost.variables after the
function call. If there is no other way I have to call the function from
the TeX side (like in the attached example). Will look into that tomorrow.


Peter


 -
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
  | www.pragma-pod.nl
 -
 ___
 
 If your question is of interest to others as well, please add an entry
 to the Wiki!
 
 maillist : ntg-context@ntg.nl /
 http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___
 
 

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

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


Re: [NTG-context] Include PDF Fails

2014-01-13 Thread Peter Rolf
Hi,

Am 13.01.2014 06:37, schrieb Thangalin:
 Hi,
 
 I am trying to include a single test page in my document. The
 following code fails to set the PDF as the background layer for the
 cover page. I've tried several variations
 (http://wiki.contextgarden.net/Including_pages_from_PDF_documents),
 but nothing works. It seems to be a problem with this specific PDF
 being included.
 
 The code:
 
 -- 8 --
 
 \def\PictureFrontCover{http://www.education.gov.yk.ca/pdf/pdf-test.pdf}
 

Mh, is there a resolver for http-adresses in ConTeXt? I guess if you use
a local file path, things should work as expected (not tested).


Peter


 
 \definelayer[page:CoverPicture][
   x=0mm,y=0mm,width=\paperwidth,height=\paperheight,
 ]
 
 % Set the layer content to be an image that is scaled to fit the page.
 \setlayer[page:CoverPicture]{%
   \externalfigure[\PictureFrontCover][
 width=\paperwidth,height=\paperheight,
   ]
 }
 
 \starttext
 \startfrontmatter
 \setupbackgrounds[page][background=page:CoverPicture]
 \startstandardmakeup
 \stopstandardmakeup
 \setupbackgrounds[page][background=]
 \stopfrontmatter
 
 \startbodymatter
   Hello world!
 \stopbodymatter
 \stoptext
 
 -- 8 --
 
 Thoughts?
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___
 

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

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


Re: [NTG-context] Include PDF Fails

2014-01-13 Thread Peter Rolf
Am 13.01.2014 13:29, schrieb Hans Hagen:
 On 1/13/2014 1:13 PM, Peter Rolf wrote:
 Hi,

 Am 13.01.2014 06:37, schrieb Thangalin:
 Hi,

 I am trying to include a single test page in my document. The
 following code fails to set the PDF as the background layer for the
 cover page. I've tried several variations
 (http://wiki.contextgarden.net/Including_pages_from_PDF_documents),
 but nothing works. It seems to be a problem with this specific PDF
 being included.

 The code:

 -- 8 --

 \def\PictureFrontCover{http://www.education.gov.yk.ca/pdf/pdf-test.pdf}
   

 Mh, is there a resolver for http-adresses in ConTeXt? I guess if you use
 a local file path, things should work as expected (not tested).
 
 sure there is ... already for many years

I see. Never tried, never needed it. But I guess I was naive to assume
the lack of such a feature..  ;-)


Peter

 (as luigi mentioned, the pdf is bugged so it depends on how good a pdf
 handler can recover)
 
 Hans
 
 
 -
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
  | www.pragma-pod.nl
 -
 ___
 
 If your question is of interest to others as well, please add an entry
 to the Wiki!
 
 maillist : ntg-context@ntg.nl /
 http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___
 
 

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

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


Re: [NTG-context] Request for metapost

2013-12-25 Thread Peter Rolf
Also thanks from my side. Just what I needed for further tests (graphics
with multiple paths).

Peter


Am 22.12.2013 19:10, schrieb Hans Hagen:
 \starttext
 
 % \enabletrackers[metapost.variables]
 
 \startMPcode
 numeric n[]   ; for i=1 upto 10: n[i] := 1/i ; endfor ;
 pathp[]   ; for i=1 upto 10: p[i] := fullcircle xyscaled
 (cm*i,cm/i) ; endfor ;
 numeric r[][] ; for i=1 upto 4 : for j=1 upto 3 : r[i][j] :=
 uniformdeviate(1) ; endfor ; endfor ;
 pairu[][] ; for i=1 step 0.5 until 4 : for j=1 step 0.1 until 2
 : u[i][j] := (i,j) ; endfor ; endfor ;
 
 passvariable(x,12345) ;
 passarrayvariable(n-array,n,1,7,1) ;
 passarrayvariable(p-array,p,1,7,1) ;
 passvariable(p,(1,1) .. (2,2)) ;
 
 startpassingvariable(b)
 startarray
 for i=1 upto 4 :
 startarray
 for j=1 upto 3 :
 value(r[i][j])
 endfor
 stoparray
 endfor
 stoparray
 stoppassingvariable ;
 
 startpassingvariable(a)
 starthash
 key(test 1)
 startarray
 value(123)
 value(456)
 stoparray
 key(test 2)
 startarray
 index(0)
 value(123)
 value(456)
 value(789)
 slot(999,987)
 stoparray
 key(test 3)
 starthash
 key(first) value(789)
 entry(second,987)
 stophash
 stophash
 stoppassingvariable ;
 
 startpassingvariable(c)
 startarray
 for i=1 step 0.5 until 4 :
 index(i)
 startarray
 for j=1 step 0.1 until 2 :
 slot(j,u[i][j])
 endfor
 stoparray
 endfor
 stoparray
 stoppassingvariable ;
 
 draw fullcircle scaled 1cm ;
 \stopMPcode
 
 \ctxluacode{inspect(metapost.variables)}
 
 \ctxcommand{mprunvar(x)}
 
 \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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] passvariable(); path problem

2013-10-07 Thread Peter Rolf
Am 06.10.2013 17:06, schrieb Hans Hagen:
 On 10/6/2013 3:05 PM, Peter Rolf wrote:
 
 Thanks for the explanation. I think I have understood the scheme (but I
 might be wrong, because this doesn't help me with my example).

 Where is the starting point['20 20'] in the returned example path? Same
 is true for the first control point ['20 190.34']. Either I'm missing
 something, or the returned path data is incomplete.
 
 you get just the value of the path variable in your mp code, not a ps or
 whatever representation and in mp a path has just points so the starting
 point is the x y of the first point


I tested several examples and the only time that the starting point was
part of the returned path was, when the path only consists of one point.
In all other cases it was missing.

This is a bit contrary to my definition of a (complete) path. Anyhow,
thanks for the pointer :-)

Peter

 -
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
  | www.pragma-pod.nl
 -
 ___
 
 If your question is of interest to others as well, please add an entry
 to the Wiki!
 
 maillist : ntg-context@ntg.nl /
 http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___
 
 

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

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


Re: [NTG-context] passvariable(); path problem

2013-10-07 Thread Peter Rolf
Am 07.10.2013 11:47, schrieb luigi scarso:
 
 
 
 On Mon, Oct 7, 2013 at 10:48 AM, Peter Rolf indi...@gmx.net
 mailto:indi...@gmx.net wrote:
 
 Am 06.10.2013 17:06, schrieb Hans Hagen:
  On 10/6/2013 3:05 PM, Peter Rolf wrote:
 
  Thanks for the explanation. I think I have understood the scheme
 (but I
  might be wrong, because this doesn't help me with my example).
 
  Where is the starting point['20 20'] in the returned example
 path? Same
  is true for the first control point ['20 190.34']. Either I'm missing
  something, or the returned path data is incomplete.
 
  you get just the value of the path variable in your mp code, not a
 ps or
  whatever representation and in mp a path has just points so the
 starting
  point is the x y of the first point
 
 
 I tested several examples and the only time that the starting point was
 part of the returned path was, when the path only consists of one point.
 In all other cases it was missing.
 
 This is a bit contrary to my definition of a (complete) path. Anyhow,
 thanks for the pointer :-)
 
 
 in mp-mlib.mpiv should be :
 vardef mfun_path_to_string(expr p) =
 mfun_point_to_string(p,0) for i=1 upto length(p) :
 mfun_point_to_string(p,i) endfor
 enddef ;
 
 
 (You can fix it and rebuild the format. To understand the output, is
 better to know that mfun_point_to_string is
 
  vardef mfun_point_to_string(expr p,i) =
 decimal xpart (point   i of p)
 decimal ypart (point   i of p)
 decimal xpart (precontrol  i of p)
 decimal ypart (precontrol  i of p)
 decimal xpart (postcontrol i of p)
 decimal ypart (postcontrol i of p)
 enddef ;
 
 )
 
 
 -- 
 luigi

@Luigi: thanks for the fix!

@Hans: quickanddirty sounds promising (bbox is needed anyway) :-D

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

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


Re: [NTG-context] passvariable(); path problem

2013-10-06 Thread Peter Rolf
Am 06.10.2013 00:37, schrieb Hans Hagen:
 On 10/5/2013 5:52 PM, Peter Rolf wrote:
 I played around with it, but I have problems to understand the format of
 the returned path.

 Example:
 % 
 \setuppagenumber[state=stop]

 \starttext
 \nopdfcompression

 \startMPpage
path p;
p:= (20,20){up} .. {down}(200,100);
passvariable(path,p);
draw p ;
 \stopMPpage

 \ctxlua{inspect{metapost.variables[path]}}
 \stoptext
 % ---

 The PDF code of the path is (mainly)

 20.00 20.00 m
 20.00 190.342880 200.00 184.016693 200.00 100.00 c

 path contains

 table={
   {
{ 200, 100, 200, 184.0167, 200, 100 },
   },
 }

 The end point and the second control point are the same, as in the PDF
 code. But how do I calculate the starting point and the first control
 point from the returned values?
 
 something
 
 local prev = nil
 for i=1,#path do
 local current = path[i]
 if not prev then
 print(current[1],current[2],m)
 else
 print(prev[5],prev[6],prev[3],prev[4],current[1],current[2],c)
 end
 prev = current
 end
 -- close last to first if needed
 
 And is the type of operation (line, curve,..) given by the number of
 values?
 
 by analyzing using thresholds (one can just use c always, as l is an
 optimization)
 
 Hans
 

Thanks for the explanation. I think I have understood the scheme (but I
might be wrong, because this doesn't help me with my example).

Where is the starting point['20 20'] in the returned example path? Same
is true for the first control point ['20 190.34']. Either I'm missing
something, or the returned path data is incomplete.


Peter

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

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


Re: [NTG-context] passvariable(); path problem

2013-10-05 Thread Peter Rolf
I played around with it, but I have problems to understand the format of
the returned path.

Example:
% 
\setuppagenumber[state=stop]

\starttext
\nopdfcompression

\startMPpage
  path p;
  p:= (20,20){up} .. {down}(200,100);
  passvariable(path,p);
  draw p ;
\stopMPpage

\ctxlua{inspect{metapost.variables[path]}}
\stoptext
% ---

The PDF code of the path is (mainly)

20.00 20.00 m
20.00 190.342880 200.00 184.016693 200.00 100.00 c

path contains

table={
 {
  { 200, 100, 200, 184.0167, 200, 100 },
 },
}

The end point and the second control point are the same, as in the PDF
code. But how do I calculate the starting point and the first control
point from the returned values?
And is the type of operation (line, curve,..) given by the number of values?


Peter

Am 04.10.2013 16:15, schrieb Hans Hagen:
 On 10/4/2013 2:52 PM, Peter Rolf wrote:
 Hi,

 I played around with the new passvariable() option and ran into errors
 when passing a path. Used the latest beta (01.10.2013). Can someone
 confirm this?
 
 in mp-mlib.mpiv:
 
 vardef mfun_path_to_string(expr p) =
 mfun_point_to_string(p,1) for i=2 upto length(p) :
 mfun_point_to_string(p,i) endfor
 enddef ;
 
 vardef mfun_boolean_to_string(expr b) =
 if b : true else : false fi
 enddef ;
 
 (i forgot to rename the argument when outlining the code)
 
 fwiw: in your case you still get an (empty) graphic, use
 \startMPcalculation ... when you don't want that
 
 Hans
 
 -
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
  | www.pragma-pod.nl
 -
 ___
 
 If your question is of interest to others as well, please add an entry
 to the Wiki!
 
 maillist : ntg-context@ntg.nl /
 http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___
 
 

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

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


[NTG-context] passvariable(); path problem

2013-10-04 Thread Peter Rolf
Hi,

I played around with the new passvariable() option and ran into errors
when passing a path. Used the latest beta (01.10.2013). Can someone
confirm this?

Peter
\starttext
\startMPcode
passvariable(path,fullcircle scaled 1cm) ;
\stopMPcode
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] brogue (OT) and a related question

2013-09-12 Thread Peter Rolf
Hi,

starting with the off topic...

A new Brogue (https://sites.google.com/site/broguegame/) version shipped
and I updated the table with the monster statistics.

For all interested [your chance to stop reading here], the link to the
final document (made with today's version).

http://www.wuala.com/indiego/public/brogue/1.7.3/


Now to the question:

I need to fill the table with some space to reach a specific dimension
(the used background graphic makes this necessary). Currently I have to
fiddle the dimension by hand.

Is there a way to use a fixed TABLE height on each page (for a multi
page table)?
Or is there a way to calculate the remaining space on the page inside
the TABLE?


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

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


[NTG-context] left bracket in string.format()

2013-08-26 Thread Peter Rolf
Hi,

Not sure if this is a bug or intended behaviour. I want to fill a TABLE
row with [number], but the leading left bracket causes some problems
here. I tried the syntax 'print(string.format([%d],10)' in pure lua
and the result is as desired.

%% --
\starttext

\startluacode
context.bTABLE{}
context.bTR()
for i = 1,8 do
context.bTH() context(string.format([%d],i)) context.eTH()
end
context.eTR()
context.eTABLE()
\stopluacode

\stoptext
%% --

gives

[..]
fonts'fallback modern rm 12pt' is loaded
setuperror in line 6, namespace '354', key '1'
setuperror in line 9, namespace '354', key '2'
setuperror in line 12, namespace '354', key '3'
setuperror in line 15, namespace '354', key '4'
setuperror in line 18, namespace '354', key '5'
setuperror in line 21, namespace '354', key '6'
setuperror in line 24, namespace '354', key '7'
setuperror in line 27, namespace '354', key '8'
[..]

and empty TABLE cells. Any help welcome.


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

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


Re: [NTG-context] left bracket in string.format()

2013-08-26 Thread Peter Rolf
Am 26.08.2013 17:40, schrieb Wolfgang Schuster:
 
 Am 26.08.2013 um 17:01 schrieb Peter Rolf indi...@gmx.net:
 
 Hi,

 Not sure if this is a bug or intended behaviour. I want to fill a TABLE
 row with [number], but the leading left bracket causes some problems
 here. I tried the syntax 'print(string.format([%d],10)' in pure lua
 and the result is as desired.

 %% --
 \starttext

 \startluacode
 context.bTABLE{}
 context.bTR()
for i = 1,8 do
context.bTH() context(string.format([%d],i)) context.eTH()
end
 context.eTR()
 context.eTABLE()
 \stopluacode

 \stoptext
 %% --

 gives

 [..]
 fonts'fallback modern rm 12pt' is loaded
 setuperror in line 6, namespace '354', key '1'
 setuperror in line 9, namespace '354', key '2'
 setuperror in line 12, namespace '354', key '3'
 setuperror in line 15, namespace '354', key '4'
 setuperror in line 18, namespace '354', key '5'
 setuperror in line 21, namespace '354', key '6'
 setuperror in line 24, namespace '354', key '7'
 setuperror in line 27, namespace '354', key '8'
 [..]

 and empty TABLE cells. Any help welcome.
 
 The \bTH command has a optional argument and when you print [number]
 context take this as argument for \bTH. There are different ways to fix this,
 one is to pass a empty argument to \bTH, e.g. context.bTH{} or you add 
 \relax
 after the command, e.g. context.bTH() context.relax().
 
 BTW: You don’t need string.format because “context([%d],i) is valid input.


Thanks Wolfgang for the detailed answer! :-)


 Wolfgang
 
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___
 

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

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

Re: [NTG-context] Tagged PDF

2013-08-15 Thread Peter Rolf
Am 15.08.2013 09:05, schrieb Aditya Mahajan:
 On Wed, 14 Aug 2013, D. K. wrote:
 
 Hi everyone,

 in my quest to generate tagged pdf's that meet nowaday's accessibility
 requirements (it seems to me that tags are the major hurdle when using
 tex), I came around context.

 There is a very interesting article on how to generate tagged pdf's with
 context mkiv.
 http://www.tug.org/TUGboat/tb31-3/tb99hagen.pdf

 A quick sample run of the examples shown in the above pdf with context
 however doesn't yield a nice result. Checking with the pdf accessibility
 checker
 http://www.access-for-all.ch/en/pdf-lab/pdf-accessibility-checker-pac.html

 for example, the generated pdf fails completely and is not considered
 to be
 tagged.

 Could someone point me in the right direction? Is there any kind of
 tutorial or minimal example from where I could work on? Are there any
 (hidden) options that need to be set in order to activate tagging
 support?
 
 Have you seen http://wiki.contextgarden.net/PDFX


Tagging is part of PDF/A, but the interface is the same.

pdf/a-1a:2005 and pdf/a-1b:2005 are the used 'format' names for
PDF/A. Never used it myself, so I can't tell much about it.

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

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


[NTG-context] 'math-rad.mkvi' missing

2013-07-19 Thread Peter Rolf
Hi,

I just started 'first-setup.bat' and the final compilation fails with

[..]
loading  ConTeXt Math Macros / Scripts
) (V:/tmp/context/tex/texmf-context/tex/context/base/math-int.mkiv
loading  ConTeXt Math Macros / Integrals
) (V:/tmp/context/tex/texmf-context/tex/context/base/math-del.mkiv
loading  ConTeXt Math Macros / Delimiters
) (V:/tmp/context/tex/texmf-context/tex/context/base/math-fen.mkiv
loading  ConTeXt Math Macros / Fences
)
! I can't find file `math-rad.mkvi'.
to be read again
\relax
l.433 \loadmkvifile{math-rad}

Please type another input file name:

---


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

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


Re: [NTG-context] Section in golden ratio?

2013-07-03 Thread Peter Rolf
Am 03.07.2013 16:10, schrieb Procházka Lukáš Ing. - Pontex s. r. o.:
 Hello,
 
 I'm trying to setup section to be placed vertically in the golden ratio
 of the page, i.e. cca 2 units above the section and 3 units bellow.
 
 How to achieve this?
 
 My code so far is:
 
 
 \setuplayout[page]
 
 \define\bef{\page\hbox to\textheight\bgroup\vfill\vfill\fi}

- use a \vbox (you need vertical mode here) instead of a \hbox
- remove the '\fi' (leftover from a test?)

Peter

 \define\aft{\vfill\vfill\vfill\egroup}
 
 \setuphead[section]
   [before=\bef,after=\aft,
%commandbefore=\cbef,commandafter=\caft,
alternative=middle,
   ]
 
 \starttext
   \section{AAA}
 \stoptext
 
 
 The position is quite OK, but there is error Too many }'s ... during
 compilation...
 
 What's the problem?
 
 Best regards,
 
 Lukas
 
 
 
 
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___
 

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

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

Re: [NTG-context] [***SPAM***] Float placement

2013-06-15 Thread Peter Rolf
Hi,

adding 'force' ([here,force]) should help 'here'. (sorry for the pun)

http://wiki.contextgarden.net/Command/placefloat


Peter


Am 15.06.2013 00:31, schrieb Tethys:
 
 I'm trying to typeset a book. It has two columns, and some floating
 diagrams. My problem is that the floats aren't going where I want
 them to and I can't work out how to fix it. My input source looks
 something like:
 
   \startcolumnset[foo]
   \subject{Blah}
 
         
 
   \placefigure[here]{First diagram}
   {\externalfigure[diagram1.jpg][width=2.3in]}
 
         
 
   \placefigure[here]{Second diagram}
   {\externalfigure[diagram2.jpg][width=2.3in]}
 
         
 
   \placefigure[here]{Third diagram}
   {\externalfigure[diagram3.jpg][width=2.3in]}
 
         
 
 What I expect to get out is a page something like this (excuse the
 ASCII graphics):
 
   +-+
   | |
   |  Blah       |
   |         |
   |     |
   |         |
   |       +--+  |
   |   |  |  |
   |   |  |  |
   |  +--+ |  |  |
   |  |  | |  |  |
   |  |  | |  |  |
   |  |  | |  |  |
   |  +--+ |  |  |
   |   First diagram   |  |  |
   |   +--+  |
   |         Third diagram   |
   |         |
   |             |
   |         |
   |  +--+       |
   |  |  |       |
   |  |  |       |
   |  |  |       |
   |  +--+   |
   |   Second diagram|
   | |
   |         |
   |         |
   | |
   +-+
 
 What I'm actually getting out is this:
 
   +-+
   | |
   |  Blah +--+  |
   |   |  |  |
   |   |  |  |
   |       |  |  |
   |       +--+  |
   |    Second diagram   |
   | |
   |  +--+ +--+  |
   |  |  | |  |  |
   |  |  | |  |  |
   |  |  | |  |  |
   |  +--+ |  |  |
   |   First diagram   |  |  |
   |   |  |  |
   |       |  |  |
   |       |  |  |
   |       +--+  |
   | Third diagram   |
   |         |
   |             |
   |             |
   |             |
   |         |
   | |
   |         |
   |         |
   |         |
   | |
   +-+
 
 Even though there is sufficient space in the first
 column, the second float is always being moved up
 to the top of the second column. I've tried pretty
 much every combination of here, force and always
 as the location keyword for the \placefloat, but
 it doesn't make any difference.
 
 Any idea what I can do to get the placement I
 want? The deadline for going to press is rapidly
 approaching and I'm getting a little concerned!
 
 Thanks,
 
 Tet
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net

Re: [NTG-context] Float placement

2013-06-15 Thread Peter Rolf
Am 15.06.2013 15:29, schrieb Tethys:
 
 Peter Rolf writes:
 
 adding 'force' ([here,force]) should help 'here'. (sorry for the pun)

 http://wiki.contextgarden.net/Command/placefloat
 
 Yes, it should. But I tried that and it didn't work.
 

Have you also tried 'force' alone?

If that doesn't work, please make a small (complete) example.


 Tet
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___
 

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

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


Re: [NTG-context] Mtxrun.exe in minimals not working.

2013-06-10 Thread Peter Rolf
Am 10.06.2013 10:40, schrieb Mojca Miklavec:
 On Mon, Jun 10, 2013 at 1:15 AM, DB wrote:
 I just downloaded the latest version of the standalone package (2013-06-08,
 09:15). When I run first-setup.bat, mtxrun.exe crashes just as it's about to
 start downloading the files. It's impossible to get any further.
 
 How exactly does it crash? Is some dll missing? An error in lua code?
 (I don't have windows at hand to try.)
 
Just tried to update and 'mtxrun.exe' crashes (APPCRASH) here too.

Event xmlns=http://schemas.microsoft.com/win/2004/08/events/event;
  System
Provider Name=Application Error /
EventID Qualifiers=01000/EventID
Level2/Level
Task100/Task
Keywords0x80/Keywords
TimeCreated SystemTime=2013-06-10T09:48:40.0Z /
EventRecordID15537/EventRecordID
ChannelApplication/Channel
Computerprivate/Computer
Security /
  /System
  EventData
Datamtxrun.exe/Data
Data0.0.0.0/Data
Data516d20ea/Data
Datantdll.dll/Data
Data6.1.7601.17725/Data
Data4ec49b8f/Data
Datac005/Data
Data000332a0/Data
Data6ec/Data
Data01ce65bfafebcc5c/Data
DataV:\tmp\context\bin\mtxrun.exe/Data
DataC:\Windows\SysWOW64\ntdll.dll/Data
Dataed9a62bc-d1b2-11e2-be40-902b343a8650/Data
  /EventData
/Event


Output on console:

V:\tmp\contextfirst-setup.bat
receiving incremental file list

sent 100 bytes  received 231 bytes  220.67 bytes/sec
total size is 7767905  speedup is 23467.99
ba-dah boom

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

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


Re: [NTG-context] Layers: corner, location

2013-06-07 Thread Peter Rolf
Am 07.06.2013 10:06, schrieb Procházka Lukáš Ing. - Pontex s. r. o.:
 Hello,
 
 On Fri, 07 Jun 2013 09:27:14 +0200, Hans Hagen pra...@wxs.nl wrote:
 
 On 6/7/2013 9:07 AM, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
 The working code is:

 
 \definelayer
[Logo]
[location={left,bottom},
 x=\paperwidth,
 y=0mm,
 hoffset=-5mm,
 voffset=5mm,
]

 \setlayer
[Logo]
{\framed[width=4cm,height=1cm]{LOGO}}

 \setupbackgrounds[page][background=Logo]

 \starttext
\input knuth
 \stoptext
 

 see end of pack-box.mkiv for relationship between corner and location;
 it has to do with matching reference points of content and position on
 layer
 
 Thanks for the trial to hint me - I'm no smarter from that .mkiv source.


The layer is divided into a 2x2 matrix of squares, where 'x' is the
center. This gets you a total of 3x3=9 different corners.

o---o---o
|   |   |
o---x---o
|   |   |
o---o---o

Now you choose one 'corner' (the reference point) for the placement. The
placement is done in relation to this point. The chosen 'corner' c is
our new 'center point' (only for placement) now.

With 'location' you define, where (in relation to 'corner') the content
is placed. Again you have nine different corners to choose from.

An example to make this clear.

'corner={top,right}, location={bottom,right}' will place content in the
area L (outside the original layer). Think about the 'corner' c as a
magnetic grid point, where the content snaps to. The 'location' l
defines, from which direction we approach the point c.

x = layer center point
c = corner 'top,right', d = location 'bottom right', L = location (area)

o---o---o
|   |   |
o---c---o
|   |   | L |
x---o---d
|   |   |
-



I hope I haven't mixed things up. Feel free to correct this and to
wikify the final version.


Peter

 You just inspired me so the code bellow works, too, and corner= and
 location= are more meaningful in this version:
 
 
 \definelayer
   [Logo]
   [width=\paperwidth,
corner={right,top},
location={left,bottom},
hoffset=5mm,
voffset=5mm,
state=repeat,
   ]
 
 
 Best regards,
 
 Lukas
 
 

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

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

[NTG-context] \getfiguredimensionsonly (mkiv)

2013-06-03 Thread Peter Rolf
Hi,

the macro \MPfigure in meta-fig.mkiv uses \getfig... , which seems to be
undefined for mkiv.

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

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


[NTG-context] typo in meta-pdf.lua (beta)

2013-05-22 Thread Peter Rolf
Hi,

I found a typo in the current beta (2013-05-21)

meta-pdf.lua, line 169

168  function mps.translate(tx,ty)
169  mpscode(f_translate(tx,ty)
170  end


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

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


[NTG-context] \smash broken (beta)

2013-05-22 Thread Peter Rolf
as the subject says... :-)


\starttext
\starttabulate[|l|l|]
\NC w   \NC \ruledhbox{\smash  [w]{This is some great smashing, isn't
it?}} \NC \NR
\NC h   \NC \ruledhbox{\smash  [h]{This is some great smashing, isn't
it?}} \NC \NR
\NC d   \NC \ruledhbox{\smash  [d]{This is some great smashing, isn't
it?}} \NC \NR
\NC tb  \NC \ruledhbox{\smash [tb]{This is some great smashing, isn't
it?}} \NC \NR
\NC whd \NC \ruledhbox{\smash[whd]{This is some great smashing, isn't
it?}} \NC \NR
\stoptabulate
\stoptext


mtx-context | current version: 2013.05.21 16:14 
This is LuaTeX, Version beta-0.77.0-2013051618  (TeX Live 2013/W32TeX)
(rev 4635)


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

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


Re: [NTG-context] \smash broken (beta)

2013-05-22 Thread Peter Rolf
Am 22.05.2013 18:44, schrieb Wolfgang Schuster:
 
 Am 22.05.2013 um 18:00 schrieb Peter Rolf indi...@gmx.net:
 
 as the subject says... :-)


 \starttext
 \starttabulate[|l|l|]
 \NC w   \NC \ruledhbox{\smash  [w]{This is some great smashing, isn't
 it?}} \NC \NR
 \NC h   \NC \ruledhbox{\smash  [h]{This is some great smashing, isn't
 it?}} \NC \NR
 \NC d   \NC \ruledhbox{\smash  [d]{This is some great smashing, isn't
 it?}} \NC \NR
 \NC tb  \NC \ruledhbox{\smash [tb]{This is some great smashing, isn't
 it?}} \NC \NR
 \NC whd \NC \ruledhbox{\smash[whd]{This is some great smashing, isn't
 it?}} \NC \NR
 \stoptabulate
 \stoptext
 
 supp-box.mkiv:
 
 \def\syst_boxes_smash_process_option#1%
   {\ifx#1\relax\else
 -\csname boxes_s_#1\endcsname
 +\csname syst_boxes_s_#1\endcsname
  \expandafter\syst_boxes_smash_process_option
\fi}


Thanks for the fast fix :-)

Peter


 Wolfgang
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___
 

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

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


  1   2   3   4   5   6   7   8   9   >