[NTG-context] Layer for all pages and for specific pages

2013-05-06 Thread H. Özoguz

Hi,

I use a vertical line (realized as a layer) for a bilingual project. My 
question is:

1. How can I set this line on all pages?
2. How can I control, on which pages it is set, and on which not? I 
tried it with state=start/stop/repeat, but that did not work.


Here my try:

\definelayer[mybg]
[x=0mm, y=0mm,
 width=\paperwidth, height=\paperheight]
\setlayer[mybg]
[hoffset=10cm, voffset=4cm]
{\blackrule[width=1pt, height=\vsize, depth=0.5ex]}
\setupbackgrounds[page][background=mybg]
\setuptolerance[tolerant,stretch]

\starttext
\input knuth
\page
\input knuth
\stoptext

Thanks for help.
Huseyin
___
If your question is of interest to others as well, please add an 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] Issue with 2013.04.30 00:31

2013-05-06 Thread Kip Warner
Hey list,

I am experiencing two issues in compiling my document. The first is a
non-fatal warning during compilation of my book:

...
(/usr/share/texmf/tex/context/base/s-abr-02.tex
resolversmodules  'abr-01' is loaded
(/usr/share/texmf/tex/context/base/s-abr-01.tex))tr: invalid
option -- '
'
Try 'tr --help' for more information.

publications wrote a new auxiliary file \jobname.aux
This is BibTeX, Version 0.99d (TeX Live 2012/Debian)
The top-level auxiliary file: Handbook.aux
The style file: cont-au.bst
Database file #1: References/References.bib
(/usr/share/texmf/tex/context/bib/bibl-apa.tex)
...

The second issue is a fatal error:

...
references   unknown reference '[Leitmotifs][Resources For
Everyone]'
pagesflushing realpage 9, userpage 9, subpage 2
! LuaTeX error [string \directlua ]:1: invalid escape sequence
near '\#'.
\ctxcommand #1^^@-\directlua {commands.#1}

\bibgotoURL #1#2\-\useURL [#1][#2][][#1]
\from [#1]
argument ...ded {\bibgotoURL {\@@pb@title }{\@@pb@biburl }}
  .\egroup
\space 
\firstoftwoarguments #1#2o-#1
 
\@@pv:l:misc ...{\bgroup \it }{.\egroup \space }{}
  \insertpubname
{}{. }{}\in...
\dotypesetapublication ...ative {\bibgetvart {#1}}

\removeunwantedspaces \egr...
...
l.37 ...olumn to sort demand by vote.}][occupy_poll]
   This should
not discourag...
E
? You want to edit file Leitmotifs/Leitmotifs.tex at line 1
...

I don't know what the error means, but I think it is probably not being
raised in the latter file since line one is merely a comment. But
perhaps this is due to something in my environment file?

https://bazaar.launchpad.net/~avaneya/avaneya/trunk/view/head:/Documentation/Contributors/Handbook/Environment.tex

I am using ConTeXt 2013.04.30 00:31, LuaTeX beta-0.77.0-2013042719 (TeX
Live 2013/dev/Debian)(rev 4635), and LuajitTeX version
beta-0.77.0-2013042721  (TeX Live 2013/dev/Debian)(rev 39).

Regards,

PS I am not a subscriber. Kindly cc me.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an 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] Headings flow question

2013-05-06 Thread gaffer...@gmail.com
I have a word template I am trying to convert to context. In the word template, 
section headings are used to manage  bibliography numbering (i.e. each 
reference is included as a subsection). This translates fine to context except 
for one thing. Context headings seem to have a ‘keep with next’ type property 
such that if there is a long list of headings, the headings go off the bottom 
of the page. I expect that I can change this by defining a custom heading via 
\setuphead, but how to I override the ‘keep with next’ behavior?

 

-Lance Larsen___
If your question is of interest to others as well, please add an 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] Layer for all pages and for specific pages

2013-05-06 Thread Wolfgang Schuster

Am 06.05.2013 um 08:26 schrieb H. Özoguz h.oezo...@mmnetz.de:

 Hi,
 
 I use a vertical line (realized as a layer) for a bilingual project. My 
 question is:
 1. How can I set this line on all pages?

When this is the text where you place both columns with a table you can just 
enable the rule between both columns.

 2. How can I control, on which pages it is set, and on which not? I tried it 
 with state=start/stop/repeat, but that did not work.
 
 Here my try:
 
 \definelayer[mybg]
[x=0mm, y=0mm,
 width=\paperwidth, height=\paperheight]
 \setlayer[mybg]
[hoffset=10cm, voffset=4cm]
{\blackrule[width=1pt, height=\vsize, depth=0.5ex]}
 \setupbackgrounds[page][background=mybg]
 \setuptolerance[tolerant,stretch]
 
 \starttext
 \input knuth
 \page
 \input knuth
 \stoptext

\newconditional\placeRULE

\definelayer[rule][state=repeat]

\setlayer[rule][x=.5\textwidth]{\blackrule[width=1pt,height=\textheight]}

\defineoverlay[rule][{\ifconditional\placeRULE\placelayer[rule]\fi}]

\setupbackgrounds[text][background=rule]

\starttext

\input knuth

\page \settrue\placeRULE

\input tufte

\page

\input zapf

\page \setfalse\placeRULE

\input ward

\stoptext

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
___


[NTG-context] xml attribute trickery possible?

2013-05-06 Thread Meer, H. van der

In the xml setup one may call a command on the current node like:

\startxmlsetups xam:define:get
  \xmlcommand{#1}{}{xmlcommon:whatever}
\stopxmlsetups

The current node will have attributes and these can be used in the execution of 
the command xmlcommon:whatever.
The question is the following: I would like to change/addto the attributes on 
the current node, for example to supply missing defaults. Is this possible and 
if yes, how to?

Hans van der Meer



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

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


Re: [NTG-context] Layer for all pages and for specific pages

2013-05-06 Thread H. Özoguz

/  Hi,
//  
//  I use a vertical line (realized as a layer) for a bilingual project. My question is:

//  1. How can I set this line on all pages?
/
When this is the text where you place both columns with a table you can just 
enable the rule between both columns.


Thanks Wolfgang!

The reason for the use of the layer is the following: If I use frames of 
the natural table, then I have this:


\def\arde[#1][#2]{%
\bTABLE
\setupTABLE[frame=off]
\setupTABLE[c][1][rightframe=on]
\bTR
\bTD #1 \eTD
\bTD #2 \eTD
\eTR
\eTABLE}
\setuptolerance[tolerant,stretch]
\starttext
\arde[\input knuth][\input knuth]
\arde[\input knuth][\input knuth]
\stoptext

There you can see the problem, you have to zoom into the pdf: Between 
the two tables, there is a tiny tiny (!) space betweeen the vertical 
lines. Its not a big issue, but it is there.


Huseyin


___
If your question is of interest to others as well, please add an 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] Layer for all pages and for specific pages

2013-05-06 Thread Wolfgang Schuster

Am 06.05.2013 um 15:55 schrieb H. Özoguz h.oezo...@mmnetz.de:

  Hi,
  
  I use a vertical line (realized as a layer) for a bilingual project. My 
  question is:
  1. How can I set this line on all pages?
 
 When this is the text where you place both columns with a table you can just 
 enable the rule between both columns.
 
 Thanks Wolfgang!
 
 The reason for the use of the layer is the following: If I use frames of the 
 natural table, then I have this:
 
 \def\arde[#1][#2]{%
 \bTABLE
 \setupTABLE[frame=off]
 \setupTABLE[c][1][rightframe=on]
 \bTR 
 \bTD #1 \eTD
 \bTD #2 \eTD 
 \eTR
 \eTABLE}
 \setuptolerance[tolerant,stretch]
 \starttext
 \arde[\input knuth][\input knuth]
 \arde[\input knuth][\input knuth]
 \stoptext
 
 There you can see the problem, you have to zoom into the pdf: Between the two 
 tables, there is a tiny tiny (!) space betweeen the vertical lines. Its not a 
 big issue, but it is there.

The space is inserted by TeX when characters in different lines are touching.

You can avoid this when you put everything in a single table. You should also 
avoid
to use brackets as delimiters for text, use normal braced arguments why can be
grouped without problems.

\startsetups[arde]
  \setupTABLE[c][1][rightframe=on]
\stopsetups

\def\startarde
  {\bTABLE[frame=off,width=.5\textwidth,setups=arde,split=yes]}

\def\stoparde
  {\eTABLE}

\define[2]\arde
  {\bTR
 \bTD#1\eTD
 \bTD#2\eTD 
   \eTR}

\setuptolerance[tolerant,stretch]

\starttext
\startarde
\arde{\input knuth }{\input knuth }
\arde{\input knuth }{\input knuth }
\stoparde
\stoptext

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
___

[NTG-context] Finding a sample-graphic: cow.pdf

2013-05-06 Thread Willi Egger
Hi all,

it sound stupid but I can not figure out, why ConTeXt is not able to find the 
cow-picture.

\useexternalfigure
  [Logo]
  [cow.pdf]
  [width=3cm]
  
\starttext
  \externalfigure[Logo]
\stoptext

Kind regards

Willi
___
If your question is of interest to others as well, please add an 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] fontsize drawing in metapost

2013-05-06 Thread Meer, H. van der
This is but a partial solution in my case, for two reasons:
1. \textstyle=\small gives few control, I tried textstyle=5pt without result
2. the setup cannot be placed inside \startuseMPgraphic, where I need it most.

I skimmed through meta-ini.mkiv, but did not find a solution.
It is however quite possible things cannot be done other than by putting a 
fontchange inside each label.

Hans van der Meer



On 6 May 2013, at 6:04 PM, Marco Patzer home...@lavabit.com wrote:

 On 2013–05–06 Meer, H. van der wrote:
 
 What is the simplest way to change the size of fonts in labels drawn in 
 MetaPost?
 
 Probably a font switch directly in the label:
 
  label(\small foobar, origin);
 
 \switchtobodyfont[size] can be done in \startMPenvironment and inside each 
 label.
 
 Better use setupMPinstance:
 
  \setupMPinstance
[metafun]
[textstyle=\small]
 
 Marco
 __
___
If your question is of interest to others as well, please add an 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] fontsize drawing in metapost

2013-05-06 Thread Meer, H. van der
I did some further experimentation, hoping using dimexp calculations would 
help. But either I am doing somthing wrong or I do not understand the innards 
of bodyfont switching well enough.
The example program seems to have accessed a 30 pt font (see the log file) but 
did not typeset in it, the dimexpr does evaluates to 30 pt.
Where am I at fault?

Hans van der Meer

\setuppapersize[A6][A6]
\setupbodyfont[10pt]
\starttext
10pt\ \begingroup\switchtobodyfont[20pt]20pt\endgroup\ 10pt\par
\writestatus{==}{}
10pt\ \begingroup\switchtobodyfont[\the\dimexpr(3\bodyfontsize)] times 
3\endgroup\ 10pt\par
dimexpr=\the\dimexpr(3\bodyfontsize)\par
\stoptext

fonts'fallback modern rm 10pt' is loaded
fontsbodyfont '20pt' is defined (can better be done global)
fontsbodyfont '24pt' is defined (can better be done global)
fontsbodyfont '16pt' is defined (can better be done global)
==  
fontsbodyfont '30.0pt' is defined (can better be done global)
fontsbodyfont '36pt' is defined (can better be done global)
fontsbodyfont '24pt' is defined (can better be done global)
fontsbodyfont '30.0pt' is defined (can better be done global)
fontsbodyfont '30.0pt' is not defined


On 6 May 2013, at 8:57 PM, Meer, H. van der 
h.vanderm...@uva.nlmailto:h.vanderm...@uva.nl wrote:

This is but a partial solution in my case, for two reasons:
1. \textstyle=\small gives few control, I tried textstyle=5pt without result
2. the setup cannot be placed inside \startuseMPgraphic, where I need it most.

I skimmed through meta-ini.mkiv, but did not find a solution.
It is however quite possible things cannot be done other than by putting a 
fontchange inside each label.

Hans van der Meer



On 6 May 2013, at 6:04 PM, Marco Patzer 
home...@lavabit.commailto:home...@lavabit.com wrote:

On 2013–05–06 Meer, H. van der wrote:

What is the simplest way to change the size of fonts in labels drawn in 
MetaPost?

Probably a font switch directly in the label:

label(\small foobar, origin);

\switchtobodyfont[size] can be done in \startMPenvironment and inside each 
label.

Better use setupMPinstance:

\setupMPinstance
  [metafun]
  [textstyle=\small]

Marco
_


dimexpr.pdf
Description: dimexpr.pdf
___
If your question is of interest to others as well, please add an 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] Finding a sample-graphic: cow.pdf

2013-05-06 Thread Willi Egger
Wolfgang!

Thank you so much.

Willi
On May 6, 2013, at 7:02 PM, Wolfgang Schuster wrote:

 
 Am 06.05.2013 um 18:47 schrieb Willi Egger cont...@boede.nl:
 
 Hi all,
 
 it sound stupid but I can not figure out, why ConTeXt is not able to find 
 the cow-picture.
 
 \useexternalfigure
 [Logo]
 [cow.pdf]
 [width=3cm]
 
 \starttext
 \externalfigure[Logo]
 \stoptext
 
 You have to enable the picture search in the TeX tree with
 
  \setupexternalfigure[location={local,global,default}]
 
 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] Issue with 2013.04.30 00:31

2013-05-06 Thread Kip Warner
On Sun, 2013-05-05 at 23:36 -0700, Kip Warner wrote:
 Hey list,
 
 I am experiencing two issues in compiling my document. The first is a
 non-fatal warning during compilation of my book:
 
 ...
 (/usr/share/texmf/tex/context/base/s-abr-02.tex
 resolversmodules  'abr-01' is loaded
 (/usr/share/texmf/tex/context/base/s-abr-01.tex))tr: invalid
 option -- '
 '
 Try 'tr --help' for more information.
 
 publications wrote a new auxiliary file \jobname.aux
 This is BibTeX, Version 0.99d (TeX Live 2012/Debian)
 The top-level auxiliary file: Handbook.aux
 The style file: cont-au.bst
 Database file #1: References/References.bib
 (/usr/share/texmf/tex/context/bib/bibl-apa.tex)
 ...

So I managed to solve this problem with an additional space between the
tr command and its parameter as a macro in my environment file.

 
 The second issue is a fatal error:
 
 ...
 references   unknown reference '[Leitmotifs][Resources For
 Everyone]'
 pagesflushing realpage 9, userpage 9, subpage 2
 ! LuaTeX error [string \directlua ]:1: invalid escape sequence
 near '\#'.
 \ctxcommand #1^^@-\directlua {commands.#1}
 
 \bibgotoURL #1#2\-\useURL [#1][#2][][#1]
 \from [#1]
 argument ...ded {\bibgotoURL {\@@pb@title }{\@@pb@biburl }}
   .\egroup
 \space 
 \firstoftwoarguments #1#2o-#1
  
 \@@pv:l:misc ...{\bgroup \it }{.\egroup \space }{}
   \insertpubname
 {}{. }{}\in...
 \dotypesetapublication ...ative {\bibgetvart {#1}}
 
 \removeunwantedspaces \egr...
 ...
 l.37 ...olumn to sort demand by vote.}][occupy_poll]
This should
 not discourag...
 E
 ? You want to edit file Leitmotifs/Leitmotifs.tex at line 1
 ...

This was solved as well by removing an escaped pound sign in one of my
bibtex references. It shouldn't have choked on it, because as I said, it
was escaped, but removing it made it appear to compile ok.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an 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] Bracets in tables

2013-05-06 Thread MANUEL GONZALEZ SUAREZ
Hello everyoneHow can I draw a vertical bracet that spans multiple cells in a table?A B C        || Here!A B C        |- Manuel González Suárez
___
If your question is of interest to others as well, please add an 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] Can't use \type{\} in a footnote

2013-05-06 Thread Tim Li
Hi, 

I think these codes is normal in context,

\starttext
aa\footnote{I can't get a backslash \type{\} in footnote!} 
\stoptext

Since I have changed the catcode of `\` using `\type`, why can I not still use 
\type{\} in a footnote?

Tim   ___
If your question is of interest to others as well, please add an 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] Layer for all pages and for specific pages

2013-05-06 Thread H. Özoguz

You can avoid this when you put everything in a single table. You should also 
avoid
to use brackets as delimiters for text, use normal braced arguments why can be
grouped without problems.

\startsetups[arde]
   \setupTABLE[c][1][rightframe=on]
\stopsetups

\def\startarde
   {\bTABLE[frame=off,width=.5\textwidth,setups=arde,split=yes]}

\def\stoparde
   {\eTABLE}

\define[2]\arde
   {\bTR
  \bTD#1\eTD
  \bTD#2\eTD
\eTR}

\setuptolerance[tolerant,stretch]

\starttext
\startarde
\arde{\input knuth }{\input knuth }
\arde{\input knuth }{\input knuth }
\stoparde
\stoptext

Wolfgang


That does not work in my case, where in the right column a r2l-text 
(arabic) is set. See this example:


\startsetups[arde]
  \setupTABLE[c][1][rightframe=on]
\stopsetups
\def\startarde
  {\bTABLE[frame=off,width=.5\textwidth,setups=arde,split=yes]}
\def\stoparde
  {\eTABLE}
\define[2]\arde
  {\bTR
 \bTD#1\eTD
 \bTD#2\eTD
   \eTR}
\setuptolerance[tolerant,stretch]
\starttext
\arde{\input knuth }{\setupalign[r2l] Eigentlich steht hier etwas 
Arabisches.}

\stoptext

The two texts are just written one after another, no table, no columns.

Huseyin


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