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

2014-11-16 Thread jdh


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


%
% Start of Context Document Example
\definelayer
  [Logo]  % name of the layer we are defining
  [
x=0mm, y=0mm,   % x,y coord where center of layer should be.? 
(=10,10)
hoffset=0mm,voffset=0mm, % offset from where?  left side? ndn topside?  
location={right,top}  % relative location withing a layer area
  ]


\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

%
% End of Context Document example
___
If your question is of interest to others as well, please add an 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] Use of a layer for a letterhead

2014-11-16 Thread jdh


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
___
If your question is of interest to others as well, please add an 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-16 Thread Hans Hagen

On 11/16/2014 9:52 PM, Wolfgang Schuster wrote:



Am 16.11.2014 um 20:47 schrieb Christoph Reller
mailto:christoph.rel...@gmail.com>>:

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

-
  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] Support of PDF Optional Content Groups (Layers)

2014-11-16 Thread Wolfgang Schuster

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

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] Support of PDF Optional Content Groups (Layers)

2014-11-16 Thread Pablo Rodriguez
On 11/16/2014 08:47 PM, Christoph Reller wrote:
> 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.

Hi Christoph,

I think ConTeXt has that feature, although I never used it.

http://www.ntg.nl/pipermail/ntg-context/2014/078701.html may be what you
need.

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

2014-11-16 Thread Idris Samawi Hamid ادريس سماوي حامد

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.


Best wishes
Idris
--
Idris Samawi Hamid
Professor of Philosophy
Colorado State University
Fort Collins, CO 80523

xtable-bidi.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
___

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

2014-11-16 Thread 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.

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

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

Re: [NTG-context] extra unwanted interline space in list

2014-11-16 Thread Pablo Rodriguez
On 11/16/2014 07:54 PM, Hans Hagen wrote:
> On 11/15/2014 11:40 AM, Pablo Rodriguez wrote:
>> Dear list,
>>
>> I have the following sample:
>>
>>  \starttext
>>  \startitemize[n]
>>  \item \input zapf
>>  \item \startitemize[a]
>>  \item \input knuth
>>  \stopitemize
>>  \stopitemize
>>  \stoptext
>>
>> For some strange reason, the first line from 2.a. has an extra interline
>> space after it.
>>
>> Is this a bug or am I missing something?
> 
> it's somewhat tricky to implement this in a robust way (i made a dirty 
> patch for the next beta) ... some day i need to check some of the luatex 
> code for some artifacts (+ fixes .. on my todo list)

Many thanks for the fix, Hans.

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
___

Re: [NTG-context] Macros in \start-stopTABLE

2014-11-16 Thread Idris Samawi Hamid ادريس سماوي حامد

On Sun, 16 Nov 2014 00:24:57 -0700, Pablo Rodriguez  wrote:


On 11/16/2014 05:50 AM, Idris Samawi Hamid ادريس سماوي حامد wrote:

Dear gang,

In the following, the first table works and the second one does not:
[...]
What do I need to do to get this macro right here?


Hi Idris,

I don’t know how you could make it work with TABLE, but your macro seems
to work with xtables:

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

\define\NCD{\stopxcell\startxcell\righttoleft}

\setupxtable[width=1in]

\starttext
\ALM
\placetable[right,none]{}
{\startxtable
\startxrow
\startxcell Text 2 \NCD النص 2 \stopxcell
 \stopxrow
\stopxtable}
\stoptext

Just in case it helps,


Very helpful, I'm switching to xtables. I hope we can get bidi-paragraph  
options for the cell commands built into the core so we needn't write out  
\righttoleft etc e.g.


\start-stopxcellR, \start-stopxcellL

Thanks a lot and

Best wishes
Idris
--
Idris Samawi Hamid
Professor of Philosophy
Colorado State University
Fort Collins, CO 80523
___
If your question is of interest to others as well, please add an 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] IMHO there is a bug in itemgrops

2014-11-16 Thread Hans Hagen

On 11/13/2014 2:41 PM, Vasiliy Chirkov wrote:

Minimal example:

\starttext
\defineitemgroup[Enum][levels=3]
\setupitemgroup[Enum][each][fit][symbol=n]
\setupitemgroup[Enum][1][stopper={}]
\setupitemgroup[Enum][2][stopper={***}]
\setupitemgroup[Enum][3][stopper={**}]

\startEnum
\item item 1
\startEnum
\item item 1.1
\startEnum
\item item 1.1.1
\item item 1.1.2
\stopEnum
\item item 1.2
\stopEnum
\item item 2
\stopEnum
\stoptext

When option 'fit' is used with nested lists, calculated max item widths are 
saved in reverse order. Maxitemwidths are saved at first pass in \stopitemgrup 
in reverse order, while are read at second pass in \startitem grpoup in 
sequental order.

Am i right?


yes, i'll fix it (i didn't assume nested fixed usage)

-
  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] \xmlinlineverbatim and \xmldisplayverbatim

2014-11-16 Thread Hans Hagen

On 11/16/2014 8:00 PM, Hans Hagen wrote:


What am I doing wrong here?


for the moment define this:

\unexpanded\def\startxmlinlineverbatim [#1]{}
\unexpanded\def\stopxmlinlineverbatim  {}


actually there is a wrong definition, you can put this in cont-new.mkiv:

\unexpanded\def\startxmlinlineverbatim[#1]%
  {\begingroup
   \edef\currenttype{xml:#1}%
   \let\stopxmlinlineverbatim\endgroup
   \doinitializeverbatim}



-
  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] \xmlinlineverbatim and \xmldisplayverbatim

2014-11-16 Thread Hans Hagen

On 11/15/2014 12:56 PM, Pablo Rodriguez wrote:

Dear list,

I’m totally new to processing XML with MkIV. I have read some examples
and documents from Thomas. And I have started  “Dealing with XML in
ConTeXt MkIV” from Hans.

 From the documentation, one could state that the (X)HTML tags  and
 are to be handled with \xmlinlineverbatim and \xmldisplayverbatim.

Well, this works fine (although with an undersired output):

\startxmlsetups xml:code
 \xmldisplayverbatim{#1}
\stopxmlsetups

But replacing \xmldisplayverbatim with \xmlinlineverbatim gives an
error. According to the information from
http://pragma-ade.com/general/manuals/xml-mkiv.pdf#page=19, it should work.

What am I doing wrong here?


for the moment define this:

\unexpanded\def\startxmlinlineverbatim [#1]{}
\unexpanded\def\stopxmlinlineverbatim  {}

(commented in the code, i'll uncomment it)


Many thanks for your help,

Pablo



XML file:

 code

Environment file:

 \startxmlsetups xml:test
 \xmlsetsetup{\xmldocument}{*}{-}
 \xmlsetsetup{\xmldocument}{code|}{xml:*}
 \stopxmlsetups

 \xmlregistersetup{xml:test}

 \startxmlsetups xml:code
 \xmlinlineerbatim{#1}


typo in macro call


 \stopxmlsetups




--

-
  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] extra unwanted interline space in list

2014-11-16 Thread Hans Hagen

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

Dear list,

I have the following sample:

 \starttext
 \startitemize[n]
 \item \input zapf
 \item \startitemize[a]
 \item \input knuth
 \stopitemize
 \stopitemize
 \stoptext

For some strange reason, the first line from 2.a. has an extra interline
space after it.

Is this a bug or am I missing something?


it's somewhat tricky to implement this in a robust way (i made a dirty 
patch for the next beta) ... some day i need to check some of the luatex 
code for some artifacts (+ fixes .. on my todo list)


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] Macros in \start-stopTABLE

2014-11-16 Thread Idris Samawi Hamid ادريس سماوي حامد

On Sun, 16 Nov 2014 06:18:02 -0700, Hans Hagen  wrote:


don't confuse starttable and startTABLE (used \bTR etc)


Ah.. looking at the code here:

http://wiki.contextgarden.net/TABLE#TABLEs_with_old_table_syntax

I guess it's not worth investing in the low-level trickery to force this;  
I'll try a different tables method.


Best wishes
Idris
--
Idris Samawi Hamid
Professor of Philosophy
Colorado State University
Fort Collins, CO 80523
___
If your question is of interest to others as well, please add an 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] Macros in \start-stopTABLE

2014-11-16 Thread Hans Hagen

On 11/16/2014 5:50 AM, Idris Samawi Hamid ادريس سماوي حامد wrote:

Dear gang,

In the following, the first table works and the second one does not:

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

\define\NCR{\NC \righttoleft \ }
\define\NCL{\NC \lefttoright \ }

\setupTABLE[c][each][width=1in]

\starttext
\ALM
\placetable[right,none]{}
{\startTABLE
\NC Text 1 \NC \righttoleft النص 1 \NC\NR
\stopTABLE}

\placetable[right,none]{}
{\startTABLE
\NC Text 2 \NCR النص 2 \NC\NR
\stopTABLE}
\stopalignment
=

gives

"I've run across a `}' that doesn't seem to match anything."

What do I need to do to get this macro right here?


don't confuse starttable and startTABLE (used \bTR etc)

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] Strange behavior of a macro with ConTeXt ver : 2014.11.12 9:46 p.m. MKIV beta

2014-11-16 Thread Fabrice

HiRik,
Sorry, I do not know how I could replace "b" with "B"!
I did not think to check because this macro worked very well so far
Thank you,
Fabrice
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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