Re: [NTG-context] Table of Contents

2016-03-10 Thread Pablo Rodriguez
On 03/10/2016 09:45 PM, Aidan Nichol wrote:
> I’m using using pandoc and ConTeXt to generate pdf documentation from
> markdown.
> 
> I started with the option to use latex (xetex) and swapped to
> ConTeXt, letting pandoc create the conTeXt file and invoke ConTeXt on
> it.C Both produce a table of contents active links etc. which is
> pretty much identical but the xetex version in my various pdf readers
> can show it in side panel referred to as Table of Contents or
> outline. This is really nice because it makes it just a click or
> swipe away.
> 
> Following advice from Pablo I’ve swapped over to generating XHTML and
> using the XML mapping ability to generate ConTeXt and the PDF. Using
> this route the TOC looks the same but it’s no longer there in the
> outline panel.
> 
> What do I need in addition to 
> \completecontent
> to get this feature to work?

Hi Aidan,

if I’m getting your point, you have to add to your .tex file:

  \setupinteraction[state=start]%
   % color=, style=, contrastcolor=, focus=standard %these may help too
  \placebookmarks
[part,chapter,section] %written outlines
[part,chapter] %open outlines

I hope it helps,


Pablo
-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Diamond, and Unicode math symbols

2016-03-10 Thread Nicola

I'm looking for a symbol similar to \lozenge, but squarer (like
\Diamond in some LaTeX packages, see The Comprehensive Symbol List,
p. 112). Any idea how I may typeset it in ConTeXt (MKIV)? \diamond
is too small. I am using TeX Gyre Pagella Math if that matters.

I also have a couple of questions about \showmathfontcharacters:

1) does that list show all and only the symbols available in the
current font, or a predefined list of symbols?

2) The list shows a Unicode point for each symbol, but not the
corresponding TeX command (if it exists). Say I need U+02B31
(three leftwards arrows), and I don't want to bother searching
TCSL above.  May I use the Unicode code point to define a control
sequence in ConTeXt that prints the symbol? If so, how?

Nicola


___
If your question is of interest to others as well, please add an 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] Table of Contents

2016-03-10 Thread Aidan Nichol
I’m using using pandoc and ConTeXt to generate pdf documentation from markdown.

I started with the option to use latex (xetex) and swapped to ConTeXt, letting 
pandoc create the conTeXt file and invoke ConTeXt on it.C
Both produce a table of contents active links etc. which is pretty much 
identical but the xetex version in my various pdf readers can show it in side 
panel referred to as Table of Contents or outline. This is really nice because 
it makes it just a click or swipe away.

Following advice from Pablo I’ve swapped over to generating XHTML and using the 
XML mapping ability to generate ConTeXt and the PDF. Using this route the TOC 
looks the same but it’s no longer there in the outline panel.

What do I need in addition to 
\completecontent
to get this feature to work?

Aidan

___
If your question is of interest to others as well, please add an 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] Greek letter fall back for math

2016-03-10 Thread Alan Bowen
Thanks, Mikael, the minunderstanding was mine. I was not aware of the need
for \setupmathematics. A great tip!

Best, Alan



On Thu, Mar 10, 2016 at 10:56 AM, Mikael P. Sundqvist 
wrote:

> On Thu, Mar 10, 2016 at 4:21 PM, Alan Bowen  wrote:
> > Thanks, Mikael. That works nicely. Note: I changed
> >
> > \definefallbackfamily [mainface] [mm] [Brill]
> > [preset=math:lowercasegreeknormal]
> >
> > to
> >
> > \definefallbackfamily [mainface] [mm] [Brill]
> > [preset=math:uppercasegreeknormal], since Knuth/TeX sets Greek capital
> > letters upright.
> >
> > Alan
> >
> > On Thu, Mar 10, 2016 at 9:56 AM, Mikael P. Sundqvist 
> > wrote:
> >>
> >> On Thu, Mar 10, 2016 at 3:34 PM, Alan Bowen 
> wrote:
> >> > Assuming that it is possible, I have been trying to substitute the
> Greek
> >> > letters of my main font for those used in the math font. (if it works,
> >> > it
> >> > should look better on the page than what I have now.)
> >> >
> >> > So, what have I missed/messed up in the following?
> >> >
> >> > \definefontfamily[mainface][serif][Brill][
> >> > [protrusion=quality,
> >> > expansion=quality,
> >> > mode=node,
> >> > force=yes,
> >> > ]
> >> >
> >> > \definefallbackfamily[mainface][mm][TeX Gyre
> >> > Pagella][preset=math:digitsnormal,features=f:oldstyle]
> >> >
> >> > \definefallbackfamily[mainface][mm][Brill][range=0391-03A9,03B1-03C9]
> >> >
> >> > \definefontfamily[mainface][mm][TeXGyre Termes Math]
> >> >
> >> > \setupbodyfont[mainface,36pt]
> >> >
> >> > \starttext
> >> >
> >> > \emph{λ α μ β δ α}
> >> >
> >> > \m{λαμβδα}
> >> >
> >> > 0123456780
> >> >
> >> > \m{0123456780}
> >> >
> >> >
> >> > \stoptext
> >> >
> >> > 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
> >> >
> >> >
> ___
> >>
> >> What if you change
> >>
> >> \definefallbackfamily[mainface][mm][Brill][range=0391-03A9,03B1-03C9]
> >>
> >> to
> >>
> >> \definefallbackfamily [mainface] [mm] [Brill]
> >> [preset=math:lowercasegreeknormal]
> >> \definefallbackfamily [mainface] [mm] [Brill]
> >> [preset=math:lowercasegreekitalic]
> >>
> >> That seems to work here with your example. By the way, I have not seen
> >> the Brill font before. It was very nice!
> >>
> >> /Mikael
> >>
> >>
> ___
> >> If your question is of interest to others as well, please add an 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
> >
> ___
>
>
> Hi!
>
> I think there might be a small piece of misunderstanding (either on
> your side or on mine). Try the document
>
> \definefontfamily[mainface][serif][Brill][
> [protrusion=quality,
> expansion=quality,
> mode=node,
> force=yes,
> ]
>
>
> \definefallbackfamily [mainface] [mm] [Brill]
> [preset=math:lowercasegreeknormal]
> \definefallbackfamily [mainface] [mm] [Brill]
> [preset=math:lowercasegreekitalic]
> \definefallbackfamily [mainface] [mm] [Brill]
> [preset=math:uppercasegreeknormal]
> \definefallbackfamily [mainface] [mm] [Brill]
> [preset=math:uppercasegreekitalic]
>
>
>
> \definefontfamily[mainface][mm][TeX Gyre Termes Math]
>
> \setupbodyfont[mainface,10pt]
>
> \setuppagenumbering[state=stop]
>
> \starttext
> αβΓΔ{\em αβΓΔ}$\alpha\beta\Gamma\Delta$ (default, upper case greek is
> upright)
>
> \setupmathematics[
> ucgreek=italic,
> ]
>
>
> αβΓΔ{\em αβΓΔ}$\alpha\beta\Gamma\Delta$ (now uppercase greek is in italic)
>
> \setupmathematics[
> ucgreek=normal,
> lcgreek=normal,
> 

Re: [NTG-context] Greek letter fall back for math

2016-03-10 Thread Mikael P. Sundqvist
On Thu, Mar 10, 2016 at 4:21 PM, Alan Bowen  wrote:
> Thanks, Mikael. That works nicely. Note: I changed
>
> \definefallbackfamily [mainface] [mm] [Brill]
> [preset=math:lowercasegreeknormal]
>
> to
>
> \definefallbackfamily [mainface] [mm] [Brill]
> [preset=math:uppercasegreeknormal], since Knuth/TeX sets Greek capital
> letters upright.
>
> Alan
>
> On Thu, Mar 10, 2016 at 9:56 AM, Mikael P. Sundqvist 
> wrote:
>>
>> On Thu, Mar 10, 2016 at 3:34 PM, Alan Bowen  wrote:
>> > Assuming that it is possible, I have been trying to substitute the Greek
>> > letters of my main font for those used in the math font. (if it works,
>> > it
>> > should look better on the page than what I have now.)
>> >
>> > So, what have I missed/messed up in the following?
>> >
>> > \definefontfamily[mainface][serif][Brill][
>> > [protrusion=quality,
>> > expansion=quality,
>> > mode=node,
>> > force=yes,
>> > ]
>> >
>> > \definefallbackfamily[mainface][mm][TeX Gyre
>> > Pagella][preset=math:digitsnormal,features=f:oldstyle]
>> >
>> > \definefallbackfamily[mainface][mm][Brill][range=0391-03A9,03B1-03C9]
>> >
>> > \definefontfamily[mainface][mm][TeXGyre Termes Math]
>> >
>> > \setupbodyfont[mainface,36pt]
>> >
>> > \starttext
>> >
>> > \emph{λ α μ β δ α}
>> >
>> > \m{λαμβδα}
>> >
>> > 0123456780
>> >
>> > \m{0123456780}
>> >
>> >
>> > \stoptext
>> >
>> > 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
>> >
>> > ___
>>
>> What if you change
>>
>> \definefallbackfamily[mainface][mm][Brill][range=0391-03A9,03B1-03C9]
>>
>> to
>>
>> \definefallbackfamily [mainface] [mm] [Brill]
>> [preset=math:lowercasegreeknormal]
>> \definefallbackfamily [mainface] [mm] [Brill]
>> [preset=math:lowercasegreekitalic]
>>
>> That seems to work here with your example. By the way, I have not seen
>> the Brill font before. It was very nice!
>>
>> /Mikael
>>
>> ___
>> If your question is of interest to others as well, please add an 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
> ___


Hi!

I think there might be a small piece of misunderstanding (either on
your side or on mine). Try the document

\definefontfamily[mainface][serif][Brill][
[protrusion=quality,
expansion=quality,
mode=node,
force=yes,
]


\definefallbackfamily [mainface] [mm] [Brill] [preset=math:lowercasegreeknormal]
\definefallbackfamily [mainface] [mm] [Brill] [preset=math:lowercasegreekitalic]
\definefallbackfamily [mainface] [mm] [Brill] [preset=math:uppercasegreeknormal]
\definefallbackfamily [mainface] [mm] [Brill] [preset=math:uppercasegreekitalic]



\definefontfamily[mainface][mm][TeX Gyre Termes Math]

\setupbodyfont[mainface,10pt]

\setuppagenumbering[state=stop]

\starttext
αβΓΔ{\em αβΓΔ}$\alpha\beta\Gamma\Delta$ (default, upper case greek is upright)

\setupmathematics[
ucgreek=italic,
]


αβΓΔ{\em αβΓΔ}$\alpha\beta\Gamma\Delta$ (now uppercase greek is in italic)

\setupmathematics[
ucgreek=normal,
lcgreek=normal,
]

αβΓΔ{\em αβΓΔ}$\alpha\beta\Gamma\Delta$ (now both uppercase and
lowercase greek are in upright)

\stoptext

The definefallbackfamily commands do not set what kind of greek
letters we get, but only from what font the corresponding range comes
from. This is at elast how I understand it.

Best

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

maillist : ntg-context@ntg.nl / 

Re: [NTG-context] PDF Signature Fields

2016-03-10 Thread Hans Hagen

On 3/10/2016 11:04 AM, Andreas Schneider wrote:

Hello Hans,

after comparing eforms and the result of a document edited by Acrobat,
the relevant portions in the spec (PDF 32000-1:2008) are:
Section 12.7.4.5, with tables 232 and 233.

 From what I see it should be possible to add a field /FT /Sig with and
without a /Lock dictionary.
The /Lock dictionary created by Acrobat also specifies the optional
/Type /SigFieldLock (eforms doesn't, but when in doubt, I trust Adobe
more than eforms ;-))

Here is an example from the PDF stream of a document manually forged
with Acrobat:
%% Object stream: object 167, index 37; original object ID: 475
<<
   /AP <<
 /N 188 0 R
   >>
   /DA (/Helv 0 Tf 0 g)
   /F 4
   /FT /Sig
   /Lock 187 0 R
   /MK <<
   >>
   /P 196 0 R
   /Rect [
 253.965
 163.306
 525.056
 186.143
   ]
   /Subtype /Widget
   /T (Gehnehmiger Unterschrift)
   /Type /Annot



%% Object stream: object 187, index 57; original object ID: 495
<<
   /Action /Exclude
   /Fields [
 (Einrichter Name)
 (Einrichters Unterschrift)
   ]
   /Type /SigFieldLock




("Einrichter Name" is another Text Field --> /FT /Tx [...] /Subtype
/Widget [...] /T (Einrichter Name)
  "Einrichters Unterschrift" is another Signature Field)


next beta:

\setupinteraction[state=start]

\starttext

\definefield[x][signature]

\field[x]

\stoptext




Am 2016-03-09 16:16, schrieb Hans Hagen:

On 3/9/2016 2:11 PM, Andreas Schneider wrote:

Hello all,

is there currently any mechanism in ConTeXt similar to the LaTeX digsig
or eforms package?
I want to add a form field that can be digitally signed (which is now
already possible with Acrobat Reader, not just with Acrobat Pro).

Additionally (like the mentioned eforms package) it would be nice, if
you could specify other form fields that should be locked once the
signature field is actually signed (according to the PDF spec this is
simply set via a dictionary).


it's probably something trivial to implement so what are the relevant
fields (paragraphs/tables/dics/fields in the pdf spec) .. i'm not
going to reverse engineer some package but start from the spec


Anyway: can this currently be achieved with ConTeXt? If not: is there
any chance to get that feature added sometime? :-)


so far i never bothered with anything signature (i must say that i
never ran into such docs and it would not make them more valid to me
anyway)

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | 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
___



--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | 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] Greek letter fall back for math

2016-03-10 Thread Alan Bowen
Whoops! Thanks, Woffgang.

\definefallbackfamily[mainface][mm][Brill][range={0391-03A9,03B1-03C9}] still
does not work, however.
But
\definefallbackfamily [mainface] [mm] [Brill] [preset=math:…] does.

Bet, Alan


On Thu, Mar 10, 2016 at 9:59 AM, Wolfgang Schuster <
schuster.wolfg...@gmail.com> wrote:

> Alan Bowen 
> 10. März 2016 um 15:34
> Assuming that it is possible, I have been trying to substitute the Greek
> letters of my main font for those used in the math font. (if it works, it
> should look better on the page than what I have now.)
>
> So, what have I missed/messed up in the following?
>
> \definefontfamily[mainface][serif][Brill][
> [protrusion=quality,
> expansion=quality,
> mode=node,
> force=yes,
> ]
>
> \definefallbackfamily[mainface][mm][TeX Gyre
> Pagella][preset=math:digitsnormal,features=f:oldstyle]
>
> \definefallbackfamily[mainface][mm][Brill][range=0391-03A9,03B1-03C9]
>
> You need braces around the list, i.e.
>
>
> \definefallbackfamily[mainface][mm][Brill][range={0391-03A9,03B1-03C9}]
>
> or
>
>
> \definefallbackfamily[mainface][mm][Brill][range={lowercasegreeknormal,uppercasegreeknormal}]
>
> 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] Greek letter fall back for math

2016-03-10 Thread Alan Bowen
Thanks, Mikael. That works nicely. Note: I changed

\definefallbackfamily [mainface] [mm] [Brill] [preset=math:
lowercasegreeknormal]

to

\definefallbackfamily [mainface] [mm] [Brill]
[preset=math:uppercasegreeknormal],
since Knuth/TeX sets Greek capital letters upright.

Alan

On Thu, Mar 10, 2016 at 9:56 AM, Mikael P. Sundqvist 
wrote:

> On Thu, Mar 10, 2016 at 3:34 PM, Alan Bowen  wrote:
> > Assuming that it is possible, I have been trying to substitute the Greek
> > letters of my main font for those used in the math font. (if it works, it
> > should look better on the page than what I have now.)
> >
> > So, what have I missed/messed up in the following?
> >
> > \definefontfamily[mainface][serif][Brill][
> > [protrusion=quality,
> > expansion=quality,
> > mode=node,
> > force=yes,
> > ]
> >
> > \definefallbackfamily[mainface][mm][TeX Gyre
> > Pagella][preset=math:digitsnormal,features=f:oldstyle]
> >
> > \definefallbackfamily[mainface][mm][Brill][range=0391-03A9,03B1-03C9]
> >
> > \definefontfamily[mainface][mm][TeXGyre Termes Math]
> >
> > \setupbodyfont[mainface,36pt]
> >
> > \starttext
> >
> > \emph{λ α μ β δ α}
> >
> > \m{λαμβδα}
> >
> > 0123456780
> >
> > \m{0123456780}
> >
> >
> > \stoptext
> >
> > 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
> >
> ___
>
> What if you change
>
> \definefallbackfamily[mainface][mm][Brill][range=0391-03A9,03B1-03C9]
>
> to
>
> \definefallbackfamily [mainface] [mm] [Brill]
> [preset=math:lowercasegreeknormal]
> \definefallbackfamily [mainface] [mm] [Brill]
> [preset=math:lowercasegreekitalic]
>
> That seems to work here with your example. By the way, I have not seen
> the Brill font before. It was very nice!
>
> /Mikael
>
> ___
> If your question is of interest to others as well, please add an 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] Greek letter fall back for math

2016-03-10 Thread Wolfgang Schuster

Alan Bowen 
10. März 2016 um 15:34
Assuming that it is possible, I have been trying to substitute the 
Greek letters of my main font for those used in the math font. (if it 
works, it should look better on the page than what I have now.)


So, what have I missed/messed up in the following?

\definefontfamily[mainface][serif][Brill][
[protrusion=quality,
expansion=quality,
mode=node,
force=yes,
]

\definefallbackfamily[mainface][mm][TeX Gyre 
Pagella][preset=math:digitsnormal,features=f:oldstyle]


\definefallbackfamily[mainface][mm][Brill][range=0391-03A9,03B1-03C9]

You need braces around the list, i.e.

  
\definefallbackfamily[mainface][mm][Brill][range={0391-03A9,03B1-03C9}]


or


\definefallbackfamily[mainface][mm][Brill][range={lowercasegreeknormal,uppercasegreeknormal}]


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
___

Re: [NTG-context] Greek letter fall back for math

2016-03-10 Thread Mikael P. Sundqvist
On Thu, Mar 10, 2016 at 3:34 PM, Alan Bowen  wrote:
> Assuming that it is possible, I have been trying to substitute the Greek
> letters of my main font for those used in the math font. (if it works, it
> should look better on the page than what I have now.)
>
> So, what have I missed/messed up in the following?
>
> \definefontfamily[mainface][serif][Brill][
> [protrusion=quality,
> expansion=quality,
> mode=node,
> force=yes,
> ]
>
> \definefallbackfamily[mainface][mm][TeX Gyre
> Pagella][preset=math:digitsnormal,features=f:oldstyle]
>
> \definefallbackfamily[mainface][mm][Brill][range=0391-03A9,03B1-03C9]
>
> \definefontfamily[mainface][mm][TeXGyre Termes Math]
>
> \setupbodyfont[mainface,36pt]
>
> \starttext
>
> \emph{λ α μ β δ α}
>
> \m{λαμβδα}
>
> 0123456780
>
> \m{0123456780}
>
>
> \stoptext
>
> 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
> ___

What if you change

\definefallbackfamily[mainface][mm][Brill][range=0391-03A9,03B1-03C9]

to

\definefallbackfamily [mainface] [mm] [Brill] [preset=math:lowercasegreeknormal]
\definefallbackfamily [mainface] [mm] [Brill] [preset=math:lowercasegreekitalic]

That seems to work here with your example. By the way, I have not seen
the Brill font before. It was very nice!

/Mikael
___
If your question is of interest to others as well, please add an 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] Greek letter fall back for math

2016-03-10 Thread Alan Bowen
Assuming that it is possible, I have been trying to substitute the Greek
letters of my main font for those used in the math font. (if it works, it
should look better on the page than what I have now.)

So, what have I missed/messed up in the following?

\definefontfamily[mainface][serif][Brill][
[protrusion=quality,
expansion=quality,
mode=node,
force=yes,
]

\definefallbackfamily[mainface][mm][TeX Gyre
Pagella][preset=math:digitsnormal,features=f:oldstyle]

\definefallbackfamily[mainface][mm][Brill][range=0391-03A9,03B1-03C9]

\definefontfamily[mainface][mm][TeXGyre Termes Math]

\setupbodyfont[mainface,36pt]

\starttext

\emph{λ α μ β δ α}

\m{λαμβδα}

0123456780

\m{0123456780}


\stoptext

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
___

Re: [NTG-context] in next beta

2016-03-10 Thread Wolfgang Schuster

Procházka Lukáš Ing. 
10. März 2016 um 09:52
Hello,

I'm probably not getting what supposed;
my sample files are attached;
both were compiled with today's beta.

Could the intended product be placed somewhere to download?
I attached the result of the example and the defintion for the filler 
command (a interface for the leaders mechanism in TeX).


Wolfgang


listfiller.pdf
Description: Adobe PDF document


filler.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] Apply a start/stop command pair to certain subsections

2016-03-10 Thread Andreas Schneider

You could take a look at my fork of Pablo's pandoc-xhtml:
https://github.com/aksdb/pandoc-xhtml

The basic idea is to use another step in between the generation: Pandoc 
-> XML -> PDF (since ConTeXt can read XML natively, given the 
appropriate environment file).


As you can see in the example Makefile, you should use pandoc with 
--section-divs which will (in my fork of pandoc-xhtml, not in the 
original) cause the use of \startchapter...\stopchapter, 
\startsection...\stopsection etc.


Therefore you can then also use \setuphead[chapter][insidesection=..., 
aftersection=...] and similar setups.


Best regards
Andreas


Am 2016-03-10 12:08, schrieb Tom Harrop:

Hello,

I'm a new Context user, and I have a question about conditional
formatting of paragraphs.

I'm typsetting a CV. I am using pandoc to generate the .tex file from
Markdown before compiling the pdf with context. Because pandoc inserts
the body of the document from one variable ($body), I would like to
avoid using e.g. \startmycommand and then \stopmycommand to modify
individual subsections.

What I can do from Markdown is tag the headings, so that (for example)
the "Publications" subsection starts as
"\subsection[pubs]{Publications}". I would like to know if there is a
way to automatically apply a start/stop command pair to the "pubs"
subsection(s), or if it better to do this with an external script that
modifies the .tex file before I call context.

Below is an example where I can get the output I'm looking for
(paragraphs in the "pubs" subsection have a hanging indent) by
defining a start/stop command pair and manually applying it to the
"pubs" subsection.

If anyone has any tips to apply this automatically to the "pubs"
subsection(s) but not the "text" subsections, I'd appreciate it! I
have searched the wiki, read through the "Context: an excursion"
document and looked around in the mail archive and stackexchange, but
I didn't find exactly what I want.

Many thanks for reading,

Tom Harrop

---Example below---

\definestartstop [negindent] [
  before={%
\startnarrower[left]%
\setupindenting[-\leftskip,yes,first]%
\setuphead[subsection][indentnext=yes]%
  },
  after=\stopnarrower,
]

\starttext

\subsection[text]{Normal text}

I would like the text in this subsection to appear without indents.

In the following subsection I need hanging indents.

\startnegindent

\subsection[pubs]{Publications}

Jaynes, Julian. {\os 1990}. {\em The Origin of Consciousness in the
Breakdown of the Bicameral Mind}. New York City: Houghton Mifflin
Company.

Pye, David. {\os 1995}. {\em The Nature and Art of Workmanship}.
London: The Herbert Press.

Persson, Tomas. {\os 2008}. {\em Pictorial Primates: A Search for
Iconic Abilities in Great Apes}. Lund: Lund University Cognitive
Studies.

\stopnegindent

\subsection[text]{More text}

This subsection should be back to normal.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua.

\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] Apply a start/stop command pair to certain subsections

2016-03-10 Thread Tom Harrop

Hello,

I'm a new Context user, and I have a question about conditional 
formatting of paragraphs.


I'm typsetting a CV. I am using pandoc to generate the .tex file from 
Markdown before compiling the pdf with context. Because pandoc inserts 
the body of the document from one variable ($body), I would like to 
avoid using e.g. \startmycommand and then \stopmycommand to modify 
individual subsections.


What I can do from Markdown is tag the headings, so that (for example) 
the "Publications" subsection starts as 
"\subsection[pubs]{Publications}". I would like to know if there is a 
way to automatically apply a start/stop command pair to the "pubs" 
subsection(s), or if it better to do this with an external script that 
modifies the .tex file before I call context.


Below is an example where I can get the output I'm looking for 
(paragraphs in the "pubs" subsection have a hanging indent) by defining 
a start/stop command pair and manually applying it to the "pubs" 
subsection.


If anyone has any tips to apply this automatically to the "pubs" 
subsection(s) but not the "text" subsections, I'd appreciate it! I have 
searched the wiki, read through the "Context: an excursion" document and 
looked around in the mail archive and stackexchange, but I didn't find 
exactly what I want.


Many thanks for reading,

Tom Harrop

---Example below---

\definestartstop [negindent] [
  before={%
\startnarrower[left]%
\setupindenting[-\leftskip,yes,first]%
\setuphead[subsection][indentnext=yes]%
  },
  after=\stopnarrower,
]

\starttext

\subsection[text]{Normal text}

I would like the text in this subsection to appear without indents.

In the following subsection I need hanging indents.

\startnegindent

\subsection[pubs]{Publications}

Jaynes, Julian. {\os 1990}. {\em The Origin of Consciousness in the 
Breakdown of the Bicameral Mind}. New York City: Houghton Mifflin Company.


Pye, David. {\os 1995}. {\em The Nature and Art of Workmanship}. London: 
The Herbert Press.


Persson, Tomas. {\os 2008}. {\em Pictorial Primates: A Search for Iconic 
Abilities in Great Apes}. Lund: Lund University Cognitive Studies.


\stopnegindent

\subsection[text]{More text}

This subsection should be back to normal.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod 
tempor incididunt ut labore et dolore magna aliqua.


\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] PDF Signature Fields

2016-03-10 Thread Andreas Schneider

Hello Hans,

after comparing eforms and the result of a document edited by Acrobat, 
the relevant portions in the spec (PDF 32000-1:2008) are:

Section 12.7.4.5, with tables 232 and 233.

From what I see it should be possible to add a field /FT /Sig with and 
without a /Lock dictionary.
The /Lock dictionary created by Acrobat also specifies the optional 
/Type /SigFieldLock (eforms doesn't, but when in doubt, I trust Adobe 
more than eforms ;-))


Here is an example from the PDF stream of a document manually forged 
with Acrobat:

%% Object stream: object 167, index 37; original object ID: 475
<<
  /AP <<
/N 188 0 R
  >>
  /DA (/Helv 0 Tf 0 g)
  /F 4
  /FT /Sig
  /Lock 187 0 R
  /MK <<
  >>
  /P 196 0 R
  /Rect [
253.965
163.306
525.056
186.143
  ]
  /Subtype /Widget
  /T (Gehnehmiger Unterschrift)
  /Type /Annot



%% Object stream: object 187, index 57; original object ID: 495
<<
  /Action /Exclude
  /Fields [
(Einrichter Name)
(Einrichters Unterschrift)
  ]
  /Type /SigFieldLock




("Einrichter Name" is another Text Field --> /FT /Tx [...] /Subtype 
/Widget [...] /T (Einrichter Name)

 "Einrichters Unterschrift" is another Signature Field)

Best regards
Andreas


Am 2016-03-09 16:16, schrieb Hans Hagen:

On 3/9/2016 2:11 PM, Andreas Schneider wrote:

Hello all,

is there currently any mechanism in ConTeXt similar to the LaTeX 
digsig

or eforms package?
I want to add a form field that can be digitally signed (which is now
already possible with Acrobat Reader, not just with Acrobat Pro).

Additionally (like the mentioned eforms package) it would be nice, if
you could specify other form fields that should be locked once the
signature field is actually signed (according to the PDF spec this is
simply set via a dictionary).


it's probably something trivial to implement so what are the relevant
fields (paragraphs/tables/dics/fields in the pdf spec) .. i'm not
going to reverse engineer some package but start from the spec


Anyway: can this currently be achieved with ConTeXt? If not: is there
any chance to get that feature added sometime? :-)


so far i never bothered with anything signature (i must say that i
never ran into such docs and it would not make them more valid to me
anyway)

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | 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] in next beta

2016-03-10 Thread Procházka Lukáš Ing .

Hello,

I'm probably not getting what supposed;
my sample files are attached;
both were compiled with today's beta.

Could the intended product be placed somewhere to download?

Best regards,

Lukas


On Tue, 08 Mar 2016 11:22:50 +0100, Hans Hagen  wrote:


On 3/7/2016 9:59 PM, Wolfgang Schuster wrote:

Hans Hagen 
4. März 2016 um 12:01
\starttext

\setuplistalternative
  [c]
  [filler=symbol,
   symbol=\hbox to .25em{\periodcentered},
   symcolor=darkred,
   symstyle=\bf]

\startsubject[title=Contents]
\placelist[section][criterium=all,alternative=c]
\stopsubject

\startsection[title=D. Ward]
\input ward
\stopsection
\startsection[title=E.R. Tufte]
\input tufte
\stopsection

\stoptext

Is there a reason why you haven’t used the filler command from
spac-flr.mkiv?


well, i then need to extend that mechanism a bit with spread, color,
style and so .. you can check it in the next beta

\starttext

 \setuplistalternative[c][filler=sym]
\placelist[chapter][alternative=c]
 \setuplistalternative[c][filler=symbol]
\placelist[chapter][alternative=c]
 \setuplistalternative[c][filler=width]
\placelist[chapter][alternative=c]
 \setuplistalternative[c][filler=space]
\placelist[chapter][alternative=c]
 \setuplistalternative[c][filler=rule]
\placelist[chapter][alternative=c]

 \definefiller
   [whatever]
   [symbol]
   [filler=symbol,
symbol=\hbox to .25em{\periodcentered},
color=darkred,
style=\bf]

 \setuplistalternative[c][filler=whatever]
 \placelist[chapter][alternative=c]

 \chapter{test a}
 \chapter{test b}
 \chapter{test c}

\stoptext

Hans




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

Tel: +420 241 096 751
Fax: +420 244 461 038

ListSym.log
Description: Binary data


ListSym.mkiv
Description: Binary data


ListSym.pdf
Description: Adobe PDF document


ListSym2.log
Description: Binary data


ListSym2.mkiv
Description: Binary data


ListSym2.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] ConTeXt installation and configuration on Win 10 x64

2016-03-10 Thread Hans Hagen

On 3/10/2016 2:53 AM, L.S.-Soc wrote:

hey Pablo, thanks a lot for pointing some things out. i finally managed
to get mkiv working!!!

Am 09.03.2016 um 23:49 schrieb Pablo Rodriguez:

On 03/09/2016 10:57 PM, L.S.-Soc wrote:

in TeXnicCenter i added a new profile.
on (La)TeX register i have activated: Run LaTeX in this profile.

in the path to compiler field i entered:
F:\Sandbox\ConTeXt\tex\setuptex.bat &
F:\Sandbox\ConTeXt\tex\texmf-win64\bin\texmfstart.exe

question: do i need both entries?

I don’t think so. The second entry isn’t required at all.


almost! the first one wasn't required. *setuptex.bat* only initializes
the context folder sub-tree to the system. this is not necessary if
*...**\ConTeXt\tex\texmf-win64\bin\* has been added to the system path.
in case of TeXnicCenter it might be not necessary at all, unless
*context.exe* doesn't call any other executable or batch files. but even
then it would look in its own folder first. i will check that out in the
future.




in the command line field i entered:
texexec.rb --batch --nonstop --pdf --color "%bm" --synctex=-1

BibTeX is deactivated, MakeIndex isn't used either.

MakeIndex isn’t required in ConTeXt. (Indices aren’t generated using
MakeIndex in ConTeXt, afaIk.)

BibTeX may work, but there is a much better bibliographic module being
developed.


it's not that i would need any of these so i didn't bother about those
options being deactivated in the first place anyway. but thanks for
pointing out what those are there for.


well and it works. but not without ruby: why do i need ruby? i would use
mkiv only if i could. i also worked with Hex color codes but then
everything is black untill i add \setupcolor[hex] to the document. i
read that this line is only needed in mkiv, so again i am wondering why
i am obviously using mkii instead of mkiv...

The command line for MkIV should read "context source-file.tex". BTW,
ruby isn’t required for MkIV.


here's the point why it works now: TeXnicCenter has a location field and
a console command field.

this is what i entered in the compiler LOCATION field before:
F:\Sandbox\ConTeXt\tex\setuptex.bat &
F:\Sandbox\ConTeXt\tex\texmf-win64\bin\texmfstart.exe

like you pointed out before: *setuptex.bat* is not needed and the second
path with texmfstart.exe is for i don't know what!?! but it always used
mkii as compiler...
anyway this is from a tutorial from the contextgarden wiki:
http://wiki.contextgarden.net/TeXnicCenter
that's why i got frustrated. the article was last updated 2012 and
honestly i was quiet sure that's it's up to date.

so i simply changed the compiler location to
F:\Sandbox\ConTeXt\tex\texmf-win64\bin\context.exe
and as you also pointed out i had to tell context which file. and
therefor is the console command field. in my quotation above there is
the following command:

"%bm"


i didn't realize that %bm is TeXnicCenter specific to handle over the
name of the current project to the command line. it's that easy; one
just has to know...^^

so my location is now F:\Sandbox\ConTeXt\tex\texmf-win64\bin\context.exe
and command is%bm

and it finally works!!! so again Pablo thanks for taking me to this.




the last question for now is: how can i stop pdfTeX.exe from warning me
that no GlyphToUnicode entry has been inserted yet. i read somewhere
that this can be ignored but nobody explains what this is and how it
works. i just don't want to read this every time but fix it.
and what is meant with bad boxes? i read "Underfull \hbox (badness
1) in paragraph..." but don't know how to fix this.

Warnings fron pdftex will dissapear when you switch to MkIV :-).

"Underfull \hbox" may be caused by wrong hyphenation?

Would it be possible that you were compiling a German (or non-English text)?

In such case, please add "\mainlanguage[de]" in the first line of your
source document.

yes, i had \language in my document before but i also added
\mainlanguage too now. didn't know about this one, so thanks yet again.

and you were right, i now don't have any errors or warnings anymore. but
unfortunately now console also doesn't show the quantity of pages
compiled anymore. i tried before with *context.exe* compiler location
(the long described case above) but it always showed 0 pages so i
thought nothing got compiled.^^ i didn't bother anymore and changed back
to *texmfstart.exe*. maybe i should have checked the pdfs first. :D


context.exe is a stub (like mtxrun --script context) that loads a script 
mtx-context, initializes itself and then knows where to look for the 
rest so indeed you only need to set the path (which has a well defined 
place in the tex tree)



so yeah, i finally got ConTeXt mkiv up and running and can't wait to
continue learning this beast. thanks a bunch Pablo. you helped me a lot.

Greetings, Sebastian


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