ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: Strange errors on using setupheader
       [not found] <mailman.1.1333274401.9682.ntg-context@ntg.nl>
@ 2012-04-01 10:35 ` Malte Stien
  2012-04-01 13:10   ` Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: Malte Stien @ 2012-04-01 10:35 UTC (permalink / raw)
  To: ntg-context

Hi Wolfgang,

Thank you so much for that. It did work. And yes, I was wondering whether there was a more elegant way of doing this. This way of setting and using variables does not seem to be all that well documented; it's not in the ConTeXt Manual, presumably because it is new, right?

I think I mostly worked it out, though, except for: What does this line mean:

  set=\texsetup{titlepage}

Thank you again,
Malte.

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Strange errors on using setupheader
  2012-04-01 10:35 ` Strange errors on using setupheader Malte Stien
@ 2012-04-01 13:10   ` Hans Hagen
  0 siblings, 0 replies; 8+ messages in thread
From: Hans Hagen @ 2012-04-01 13:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Malte Stien

On 1-4-2012 12:35, Malte Stien wrote:
> Hi Wolfgang,
>
> Thank you so much for that. It did work. And yes, I was wondering whether there was a more elegant way of doing this. This way of setting and using variables does not seem to be all that well documented; it's not in the ConTeXt Manual, presumably because it is new, right?
>
> I think I mostly worked it out, though, except for: What does this line mean:
>
>    set=\texsetup{titlepage}

that the setup names 'titlepage' will be invoked each time after you set 
variables in this category so when you've set some titlepage properties 
a titlepage will be generated

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Strange errors on using setupheader
  2012-03-31 12:20       ` Malte Stien
@ 2012-03-31 12:45         ` Wolfgang Schuster
  0 siblings, 0 replies; 8+ messages in thread
From: Wolfgang Schuster @ 2012-03-31 12:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 31.03.2012 um 14:20 schrieb Malte Stien:

> Hi all, Hi Hans,
> 
> Thank you for the fix. Okay, so now I am on
> 
>  ConTeXt  ver: 2012.03.30 16:16 MKIV  fmt: 2012.3.31  int: english/english
> 
> which does indeed fix the little problem I posted yesterday. However, I still have one more issue. Again, I condensed it down to something very close to a minimal example:
> 
> 
> \color[darkgray]\blank[small]
> Commercial in Confidence \hfill Version #4

You have to change this to:

\blank[small]
\color[darkgray]{Commercial Confidence \hfill Version #4}

A cleaner way to set the values for the title page is \setvariables:

\startsetups titlepage

  \startstandardmakeup[style=sans]

  \blank[50mm]

  \rightaligned{\bfd\getvariable{titlepage}{company}}

  \textrule

  \rightaligned{\tfc\color[darkgray]{\getvariable{titlepage}{title}}}

  \blank[170mm]

   \starttabulate[|plf{\tfa}|prf{\tfa}|]
   \NC \tfa © Some Company Pty Ltd                \NC                          \getvariable{titlepage}{author}   \NC\NR
   \TB[small]
   \NC \color[darkgray]{Commercial in Confidence} \NC \color[darkgray]{Version \getvariable{titlepage}{version}} \NC\NR
   \stoptabulate

  \stopstandardmakeup

\stopsetups

\starttext

\startfrontmatter

\setvariables
  [titlepage]
  [     set=\texsetup{titlepage},
	company={Company Name},
     title={The Plan},
    author={Dr Who, et al.},
   version={0.1}]

\stopfrontmatter

\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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Strange errors on using setupheader
  2012-03-30 14:17     ` Hans Hagen
@ 2012-03-31 12:20       ` Malte Stien
  2012-03-31 12:45         ` Wolfgang Schuster
  0 siblings, 1 reply; 8+ messages in thread
From: Malte Stien @ 2012-03-31 12:20 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users

Hi all, Hi Hans,

Thank you for the fix. Okay, so now I am on

  ConTeXt  ver: 2012.03.30 16:16 MKIV  fmt: 2012.3.31  int: english/english

which does indeed fix the little problem I posted yesterday. However, I still have one more issue. Again, I condensed it down to something very close to a minimal example:


% Select A4 as the paper size
\setuppapersize[A4]

% A macro for the title page
\def\titlepage[#1][#2][#3][#4]{
\startstandardmakeup
\blank[50mm]
\rightaligned{\ss\tfd\bf\nohyphens{#1}}
\blank[2mm]\textrule[bottom]
\rightaligned{\ss{\tfc{\color[darkgray] {#2}}}}
\blank[170mm]

\ss\tfa\copyright\thinspace Some Company Pty Ltd \hfill #3 \par
\color[darkgray]\blank[small]
Commercial in Confidence \hfill Version #4
\stopstandardmakeup
}

\starttext
\startfrontmatter

\titlepage[Company Name][The Plan][Dr Who, et al.][0.1]
\completecontent

\page \chapter{Purpose and Scope}
\section[]{Purpose}
This document should be read in conjunction with bla bla bla...

\stopfrontmatter
\stoptext


This results in

29 >>  \stopfrontmatter
30     \stoptext
31     

<inserted text> 
                }
<to be read again> 
                   \endgroup 
l.29 \stopfrontmatter


If I remove the line

  \color[darkgray]\blank[small]

from the \titlepage macro all works, which I find somewhat unexpected.

Could you please have a look at this?
Thank you.
Malte.


On 31/03/2012, at 1:17, Hans Hagen wrote:

> On 30-3-2012 11:47, Malte Stien wrote:
>> Hans,
>> 
>> No, everything works in the "(by now ancient) current" but is broken in the beta. I am trying to switch to the beta as you suggested, but am being held up by some errors, the first one of which is this
> 
> Ah, I forgot to rename a macro ... new beta in an hour ...
> 
> (btw, no need for utf directive in mkiv and english is default anyway)
> 
> 
> -----------------------------------------------------------------
>                                          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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Strange errors on using setupheader
  2012-03-30  9:47   ` Malte Stien
@ 2012-03-30 14:17     ` Hans Hagen
  2012-03-31 12:20       ` Malte Stien
  0 siblings, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2012-03-30 14:17 UTC (permalink / raw)
  To: Malte Stien; +Cc: mailing list for ConTeXt users

On 30-3-2012 11:47, Malte Stien wrote:
> Hans,
>
> No, everything works in the "(by now ancient) current" but is broken in the beta. I am trying to switch to the beta as you suggested, but am being held up by some errors, the first one of which is this

Ah, I forgot to rename a macro ... new beta in an hour ...

(btw, no need for utf directive in mkiv and english is default anyway)


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Strange errors on using setupheader
  2012-03-30  9:44 ` Hans Hagen
@ 2012-03-30  9:47   ` Malte Stien
  2012-03-30 14:17     ` Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: Malte Stien @ 2012-03-30  9:47 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users

Hans,

No, everything works in the "(by now ancient) current" but is broken in the beta. I am trying to switch to the beta as you suggested, but am being held up by some errors, the first one of which is this

Regards,
Malte.

On 30/03/2012, at 20:44, Hans Hagen wrote:

> On 30-3-2012 11:35, Malte Stien wrote:
> 
>> <argument>  doifelsemarking("\ascii
> 
> So that's in the (by now ancient) current and not th ebets I assume?
> 
> 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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Strange errors on using setupheader
  2012-03-30  9:35 Malte Stien
@ 2012-03-30  9:44 ` Hans Hagen
  2012-03-30  9:47   ` Malte Stien
  0 siblings, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2012-03-30  9:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Malte Stien

On 30-3-2012 11:35, Malte Stien wrote:

> <argument>  doifelsemarking("\ascii

So that's in the (by now ancient) current and not th ebets I assume?

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Strange errors on using setupheader
@ 2012-03-30  9:35 Malte Stien
  2012-03-30  9:44 ` Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: Malte Stien @ 2012-03-30  9:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi again,

After I had some issues with \externalfigure, Hans suggested to me that I use a newer version of ConTeXt. So, rather than using the latest current (which seems to be from May 2011)

  ConTeXt  ver: 2011.05.18 18:04 MKIV  fmt: 2011.12.6  int: english/english

I am not using the latest beta

  ConTeXt  ver: 2012.03.29 11:28 MKIV  fmt: 2012.3.29  int: english/english

However, as it turns out, the document I am working on is no longer processed without errors. I butchered my document to isolate the error and come up with a (close to) minimal example:


% Use UTF encoding
\enableregime[utf]

% Set English as the language
\language[en]

% Select A4 as the paper size
\setuppapersize[A4]

% Setup the header...
\setupheadertexts[chapter][section]
\setupheader[leftwidth=.5\hsize, rightwidth=.4\hsize]

\starttext
\startfrontmatter
\completecontent

\chapter{Purpose and Scope}
\section[]{Purpose}
This document should be read in conjunction with bla bla bla...

\stopfrontmatter
\stoptext


I get the following error when processing with the aforementioned version:


<argument> doifelsemarking("\ascii 
                                   ")
\ctxcommand #1->\directlua \zerocount {commands.#1
                                                  }
\page_layouts_process_element_single_limited ...i 
                                                  {\limitatetext {\getmarkin...
\page_layouts_process_element_single_indeed ...#4}
                                                  \fi \endgroup 
\page_layouts_process_element_single ...#1#2#3{#4}
                                                  \fi 
<argument> ...\layoutelementparameter \c!lefttext 
                                                  \hss }\hskip -\makeupwidth...
...
l.18 \chapter{Purpose and Scope}


Strangely enough, all works well when I remove (or comment) the \setupheader line. Is there anything strange I am doing here? Should work, right?

Any pointers would be appreciated.
Thank you,
Malte.

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-04-01 13:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.1.1333274401.9682.ntg-context@ntg.nl>
2012-04-01 10:35 ` Strange errors on using setupheader Malte Stien
2012-04-01 13:10   ` Hans Hagen
2012-03-30  9:35 Malte Stien
2012-03-30  9:44 ` Hans Hagen
2012-03-30  9:47   ` Malte Stien
2012-03-30 14:17     ` Hans Hagen
2012-03-31 12:20       ` Malte Stien
2012-03-31 12:45         ` Wolfgang Schuster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).