Re: [NTG-context] Layer for Letterhead( minimum example)

2014-11-17 Thread Otared Kavian
Hi,

The key you have to use is 
state=repeat
in the definition of your layer:

\definelayer[Logo][state=repeat]
\starttext
\setlayer[Logo][x=75mm,y=13mm]
{ \bTABLE[frame=off]
 \bTR  \bTD Company Name \eTD  \eTR
 \bTR  \bTD Address. \eTD  \eTR
 \eTABLE
 } 

\setupbackgrounds[page][background=Logo]

\title{Hello Mr. Smith}

I do hope that all is going well for you.

\dorecurse{5}{\input knuth \par}
\stoptext

Best regards: OK

 On 17 Nov 2014, at 08:56, jdh dhen...@gmail.com wrote:
 
 
 SORRY I forgot to attach a minimum example. I'll attach it.
 It is a plain text file wit an .mkiv file extension.
 
 I have created a letterhead layer, which works well for the first page
 of a multi-page document.  I want it to be repeated for each page of a
 document.
 
 How can that be done or does anyone have any pointers or tips on how I
 can do that?
 
 Thank You
 
 
 minimum-example.mkiv___
 If your question is of interest to others as well, please add an 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] Support of PDF Optional Content Groups (Layers)

2014-11-17 Thread Christoph Reller
On Sun, 16 Nov 2014 15:29:20 Hans Hagen wrote:
 On 11/16/2014 9:52 PM, Wolfgang Schuster wrote:
  Am 16.11.2014 um 20:47 schrieb Christoph Reller
  
   Hi,
  
   Has ConTeXt any support for producing a PDF with optional content
   groups (OCGs)?
  
   In Adobe's jargon OCGs are also known as layers (not to confuse with
   layers in ConTeXt). See Section 4.10.2 Making Graphical Content
   Optional in the PDF Reference 1.7 available at
  
http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/pdf_reference_1-7.pdf
  
   I cannot find anything on the Wiki nor in the ntg-context emails and
   grepping through the source code for ocg does not give reasonable
   results.
 
  You have to look for \defineviewerlayer and \startviewerlayer.

 A quick test if your pdf viewer supports is is:

 \showlayoutcomponents

 \starttext
 \input tufte
 \stoptext

Many thanks to all of you Hans, Wolfgang, and Pablo!

\definelayer and \startviewerlayer is a nice interface to basic OCGs
construction.

Is there any way to construct Set-OCG-State Actions with ConTeXt? (See
Section 8.5 Actions in the PDF Reference.) I admit that this is an advanced
feature of PDF and that most viewers apart from the Adobe Reader are not
capable of handling OCGs correctly.

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

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

Re: [NTG-context] Support of PDF Optional Content Groups (Layers)

2014-11-17 Thread Hans Hagen

On 11/17/2014 11:51 AM, Christoph Reller wrote:

On Sun, 16 Nov 2014 15:29:20 Hans Hagen wrote:
  On 11/16/2014 9:52 PM, Wolfgang Schuster wrote:
   Am 16.11.2014 um 20:47 schrieb Christoph Reller
   
Hi,
   
Has ConTeXt any support for producing a PDF with optional content
groups (OCGs)?
   
In Adobe's jargon OCGs are also known as layers (not to confuse
with
layers in ConTeXt). See Section 4.10.2 Making Graphical Content
Optional in the PDF Reference 1.7 available at
   
http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/pdf_reference_1-7.pdf
   
I cannot find anything on the Wiki nor in the ntg-context emails and
grepping through the source code for ocg does not give reasonable
results.
  
   You have to look for \defineviewerlayer and \startviewerlayer.
 
  A quick test if your pdf viewer supports is is:
 
  \showlayoutcomponents
 
  \starttext
  \input tufte
  \stoptext

Many thanks to all of you Hans, Wolfgang, and Pablo!

\definelayer and \startviewerlayer is a nice interface to basic OCGs
construction.

Is there any way to construct Set-OCG-State Actions with ConTeXt? (See
Section 8.5 Actions in the PDF Reference.) I admit that this is an
advanced feature of PDF and that most viewers apart from the Adobe
Reader are not capable of handling OCGs correctly.


I'm not sure what you mean but with the \goto command you can do a lot, 
including sequences of actions that enable/disable layers and so (often 
these things are done via javascript actions).


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] aligning \placetable with bidi

2014-11-17 Thread Hans Hagen

On 11/16/2014 8:53 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:

Dear gang,

In the following, we middle align both \placetable's:


\setupbodyfont[tt]
\definefont[ALM][file:almfixed.otf*arabic at 12pt]
\setupdirections[bidi=global]

\setupxtable[width=1in]

\showframe

\starttext
\startalignment[middle]
\ALM
\placetable[middle,none]{}
{\startxtable
  \startxrow
  \startxcell Text 1 \stopxcell
  \startxcell[align=r2l] النص ١ \stopxcell
  \stopxrow
\stopxtable}

\placetable[middle,none]{}
{\righttoleft \startxtable
  \startxrow
  \startxcell[align=r2l] النص ١ \stopxcell
  \startxcell Text 1 \stopxcell
  \stopxrow
\stopxtable}
\stopalignment
\stoptext


Only the first \placetable is aligned correctly; how do we get the
second one -- \righttoleft table -- middle aligned? See attached.


i can fix the funny lap but still we need to have some concept of cells 
running from l2r or r2l ..


-
  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] enumeration with the Spanish alphabet

2014-11-17 Thread Hans Hagen

On 11/15/2014 11:36 AM, Pablo Rodriguez wrote:

On 11/14/2014 12:28 AM, Hans Hagen wrote:

On 11/13/2014 7:39 PM, Pablo Rodriguez wrote:

Many thanks for the fix, Hans.


It's more a new feature than a fix .. so that means that you have to
wikify it


Hans,

I have wikified it for http://wiki.contextgarden.net/Enumerations:

 When the selected language is Slovenian or Spanish, items are
 numbered using their proper alphabets (the Slovenian enumeration
 includes č, š and ž; the Spanish enumeration includes ñ). You
 can  change to the international enumeration with alphabetic,
 Alphabetic.

With \definestructureconversionset, the options seem to be the
following:

 a uses ñ in text, TOC, but not in bookmarks.

 alphabeticuses ñ in text, but not in TOC or in bookmarks.

 charactersuses ñ in text, TOC and bookmarks.
   (It doesn’t seem to work in Slovenian [no č in
   bookmarks].)

Wouldn’t it be possible that the each conversion set uses the same
letter series in all text, TOC and bookmarks? (Sorry, but I’m afraid
that the current behavior is not consistent.)

I’m happy to wikify also title numbering, but first I would like to
be sure that I’m not missing anything.

Many thanks for your help again,


first make an example showing this so that we can see what is wrong

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] enumeration with the Spanish alphabet

2014-11-17 Thread Pablo Rodriguez
On 11/17/2014 07:06 PM, Hans Hagen wrote:
 On 11/15/2014 11:36 AM, Pablo Rodriguez wrote:
 [...]
 I’m happy to wikify also title numbering, but first I would like to
 be sure that I’m not missing anything.
 
 first make an example showing this so that we can see what is wrong

Hans,

here you have the samples for Slovenian:

\mainlanguage[sl]
\definestructureconversionset[sectionnumbers]
[characters,a,alphabetic][n]
\setupinteraction[state=start]
\placebookmarks[part,chapter,section]
[part,chapter,section]
\setupinteractionscreen[option=bookmark]
\setupheads[sectionconversionset=sectionnumbers]
\setuphead[part][placehead=yes, page=]
\setuphead[chapter][page=]
\starttext
\dorecurse{5}{\part{Part \recurselevel}}
\dorecurse{5}{\chapter{Chapter \recurselevel}}
\dorecurse{5}{\section{Section \recurselevel}}
\startitemize[a, packed][start=3]
\dorecurse{3}{\item test\endgraf}
\stopitemize
\stoptext

and Spanish:

\mainlanguage[es]
\definestructureconversionset[sectionnumbers]
[characters,a,alphabetic][n]
\setupinteraction[state=start]
\placebookmarks[part,chapter,section]
[part,chapter,section]
\setupinteractionscreen[option=bookmark]
\setupheads[sectionconversionset=sectionnumbers]
\setuphead[part][placehead=yes, page=]
\setuphead[chapter][page=]
\starttext
\setupheadnumber[part][13]
\setupheadnumber[chapter][13]
\setupheadnumber[section][13]
\dorecurse{3}{\part{Part \recurselevel}}
\dorecurse{3}{\chapter{Chapter \recurselevel}}
\dorecurse{3}{\section{Section \recurselevel}}
\startitemize[a, packed][start=3]
\dorecurse{3}{\item test\endgraf}
\stopitemize
\stoptext

Their behaviors aren’t exactly the same. This is the reason I send two
samples.

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