[NTG-context] Delayed page layout change?

2015-01-10 Thread David Brooks

Hi,

I'm new to ConTeXt (although have used LaTeX in various ways over a long 
time) and am impressed! Many thanks for a great system.


I'm wanting some pages in a book to have a different layout to others, 
and am using \definelayout and \setuplayout to do so. This all works, 
including adding layers to the different layouts. However the layout 
change (specified by \setuplayout) occurs immediately after the command 
is given, which means following paragraphs on the page have the layout's 
new width and not the width used for earlier text on the page: i.e:


++
   x
   x
   x
<-- \setuplayout
   x
   x
++
++
   x
   x
   x
x
   x
   x
++

Is there anyway to defer the change in layout so that it occurs when the 
next page starts?? I can obviously force my own page breaks using \page 
and give \setuplayout immediately afterwards, but this doesn't allow for 
paragraph text to flow over the page boundary.




Thank you.

David Brooks
___
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] The \ConTeXt macro and sans serif fonts

2015-01-10 Thread Gerben Wierda
I want to use the \ConTeXt macro (so the colofon says \ConTeXt was used), but 
I'm using the Optima font. The result is pretty ugly. With a standard serif 
font that looks OK, as the n of Con would touch the serif of the upper side of 
the T if moved more to the right



but with a sans serif font, a 'hole' exists between Con and TeXt:



Is it OK to define my own \ConTeXt so that the kerning is more pleasing?

G

PS. I'm obviously close to finsihing the book if this is what I worry about.___
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] Reference to prologue becomes "Chapter 1"

2015-01-10 Thread Wolfgang Schuster

> Am 10.01.2015 um 15:18 schrieb Gerben Wierda :
> 
> I have a chapter in the frontmatter that has no chapter number. The first 
> chapter in the real book is Chapter 1.
> 
> But when I refer to \in{chapter}[prologue], what I get is "chapter 1". Is 
> there a way I can make \in{chapter}[prologue] return something like "the 
> prologue“?


You can use \about[prologue] to print the title of the heading.

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] Second-level itemization and indenting question

2015-01-10 Thread Wolfgang Schuster

> Am 10.01.2015 um 14:18 schrieb Gerben Wierda :
> 
> On 10 Jan 2015, at 13:53, Wolfgang Schuster  > wrote:
> 
>>> 
>>> Am 10.01.2015 um 13:36 schrieb Gerben Wierda >> >:
>>> 
>>> I have the following setup (in mkii)
>>> 
>>> \definemeasure[CAindent][12pt]
>>> \setupindenting[yes,\measure{CAindent}]
>>> \setupnarrower
>>>   [ left=\measure{CAindent},
>>> right=\measure{CAindent},
>>>middle=\measure{CAindent}]
>>> \setupitemize[each][margin=\measure{CAindent}]
>>> 
>>> \starttext
>>> \input knuth
>>> \startitemize[joinedup,packed]
>>> \item \input tufte
>>> \startitemize[joinedup,packed]
>>> \item \input tufte
>>> \stopitemize
>>> \input tufte
>>> \stopitemize
>>> \stoptext
>>> 
>>> The result is that quotations at first level are perfectly aligned with the 
>>> indentation of the first line of a paragraph at first level. But the 
>>> itemizations at second level are not. They are slightly less indented than 
>>> the indentation of the first line of the paragraph in the first-level item. 
>>> This can be seen at the last "We thrive" in the example, just after the 
>>> second-level item.
>>> 
>>> What can I do about that?
>> 
>> Is this what you want?
>> 
>> \setupitemize[each][margin=\measure{CAindent},width=\measure{CAindent}]
> 
> Yes. Can I get the same effect on this one?
> 
> \definemeasure[CAindent][12pt]
> \setupindenting[yes,\measure{CAindent}]
> \setupnarrower
>   [ left=\measure{CAindent},
> right=\measure{CAindent},
>middle=\measure{CAindent}]
> \setupitemize[each][margin=\measure{CAindent}]
> 
> \definedescription[Member][headstyle=bold,
> location=hanging,indenting={yes,\measure{CAindent}},width=fit]
> 
> \starttext
> \input knuth
> \startMember{Tufte}
> \input tufte
> \stopMember
> \input knuth
> \stoptext
> 
> Here, the indentation of the Member differs from the first-line-of-paragraph 
> indent (slightly larger)

\definedescription[Member][...,margin=\measure{CAindent}]

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] pgfplots.revision.tex is missing in the last ContextMinimals

2015-01-10 Thread DesdeChaves
Now is fine. Thanks a lot.

jorge

2015-01-10 12:30 GMT+00:00 Mojca Miklavec :

> On Sat, Jan 10, 2015 at 12:31 PM, DesdeChaves wrote:
> > There are a extra "\" in the beginning of the file
> "pgfplots.revision.tex".
>
> I'm sorry. After the problem was fixed, I synced the package, but not
> the distribution.
>
> Please try again.
>
> Mojca
>
> ___
> 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
>
> ___
>



-- 
Atentamente

DesdeChaves
___
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] Reference to prologue becomes "Chapter 1"

2015-01-10 Thread Gerben Wierda
I have a chapter in the frontmatter that has no chapter number. The first 
chapter in the real book is Chapter 1.

But when I refer to \in{chapter}[prologue], what I get is "chapter 1". Is there 
a way I can make \in{chapter}[prologue] return something like "the prologue"?

I'm using mkii

G
___
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] Second-level itemization and indenting question

2015-01-10 Thread Gerben Wierda
On 10 Jan 2015, at 13:53, Wolfgang Schuster  wrote:

>> 
>> Am 10.01.2015 um 13:36 schrieb Gerben Wierda :
>> 
>> I have the following setup (in mkii)
>> 
>> \definemeasure[CAindent][12pt]
>> \setupindenting[yes,\measure{CAindent}]
>> \setupnarrower
>>   [ left=\measure{CAindent},
>> right=\measure{CAindent},
>>middle=\measure{CAindent}]
>> \setupitemize[each][margin=\measure{CAindent}]
>> 
>> \starttext
>> \input knuth
>> \startitemize[joinedup,packed]
>> \item \input tufte
>> \startitemize[joinedup,packed]
>> \item \input tufte
>> \stopitemize
>> \input tufte
>> \stopitemize
>> \stoptext
>> 
>> The result is that quotations at first level are perfectly aligned with the 
>> indentation of the first line of a paragraph at first level. But the 
>> itemizations at second level are not. They are slightly less indented than 
>> the indentation of the first line of the paragraph in the first-level item. 
>> This can be seen at the last "We thrive" in the example, just after the 
>> second-level item.
>> 
>> What can I do about that?
> 
> Is this what you want?
> 
> \setupitemize[each][margin=\measure{CAindent},width=\measure{CAindent}]

Yes. Can I get the same effect on this one?

\definemeasure[CAindent][12pt]
\setupindenting[yes,\measure{CAindent}]
\setupnarrower
  [ left=\measure{CAindent},
right=\measure{CAindent},
   middle=\measure{CAindent}]
\setupitemize[each][margin=\measure{CAindent}]

\definedescription[Member][headstyle=bold,
location=hanging,indenting={yes,\measure{CAindent}},width=fit]

\starttext
\input knuth
\startMember{Tufte}
\input tufte
\stopMember
\input knuth
\stoptext

Here, the indentation of the Member differs from the first-line-of-paragraph 
indent (slightly larger)

G

> 
> 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] dealing with footnotes and ol in XML

2015-01-10 Thread Hans Hagen

On 1/9/2015 1:24 PM, Pablo Rodriguez wrote:

On 01/09/2015 12:29 PM, Hans Hagen wrote:

[...]
I'll add this:

\startluacode
  local gsub = string.gsub
  function xml.expressions.idstring(str)
  return type(str) == "string" and gsub(str,"^#","") or ""
  end
\stopluacode

\startxmlsetups xml:footnote:ref

\xmlfilter{main}{div[@class='footnotes']/ol/li[@id=idstring('\xmlatt{#1}{href}')]/command(xml:footnote:set)}
\stopxmlsetups

As this id stuff happens more often.


Many thanks for your reply and the code, Hans.

I have an issue with multiparagraph footnotes. Here is the sample in
ConTeXt code:

\setuppapersize[A7]
\setupbodyfont[15pt]
\starttext
\dorecurse{2}{A footnote\footnote
{\dorecurse{2}{Footnote paragraph.\par}}}
\dorecurse{3}{B footnote\footnote
{Footnote paragraph.\par Footnote paragraph.}}
\stoptext

Footnotes that end with \par have wrong space with next footnote.

I don’t know whether this is intended. How could I avoid that in XML?


well, more unexpected .. messing with the depth is always tricky

\unexpanded\def\handlenoteitself#tag#id%
  {\edef\currentnotenumber{#id}%
   \edef\currentnote{#tag}%
   \strc_constructions_initialize{#tag}%
   \strc_notes_synchronize

\edef\currentconstructionlistentry{\ctxcommand{notelistindex("\currentnote",#id)}}% 


   \reinstateconstructionnumberentry\currentconstructionlistentry
   \dontcomplain
   \strc_notes_interaction_check_display
   \strc_notes_set_reference_attribute_text
   \strc_constructions_stored_start
   \begstrut
   \strc_references_flush_destination_nodes
   \strc_notes_set_destination_attribute_text
   \strc_notes_inject_text
   \ifvmode\obeydepth\else\endstrut\fi % \obeydepth is new per 2015-01-10
   \strc_constructions_stored_stop}



-
  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] Second-level itemization and indenting question

2015-01-10 Thread Wolfgang Schuster

> Am 10.01.2015 um 13:36 schrieb Gerben Wierda :
> 
> I have the following setup (in mkii)
> 
> \definemeasure[CAindent][12pt]
> \setupindenting[yes,\measure{CAindent}]
> \setupnarrower
>   [ left=\measure{CAindent},
> right=\measure{CAindent},
>middle=\measure{CAindent}]
> \setupitemize[each][margin=\measure{CAindent}]
> 
> \starttext
> \input knuth
> \startitemize[joinedup,packed]
> \item \input tufte
> \startitemize[joinedup,packed]
> \item \input tufte
> \stopitemize
> \input tufte
> \stopitemize
> \stoptext
> 
> The result is that quotations at first level are perfectly aligned with the 
> indentation of the first line of a paragraph at first level. But the 
> itemizations at second level are not. They are slightly less indented than 
> the indentation of the first line of the paragraph in the first-level item. 
> This can be seen at the last "We thrive" in the example, just after the 
> second-level item.
> 
> What can I do about that?

Is this what you want?

\setupitemize[each][margin=\measure{CAindent},width=\measure{CAindent}]

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] Second-level itemization and indenting question

2015-01-10 Thread Gerben Wierda
I have the following setup (in mkii)

\definemeasure[CAindent][12pt]
\setupindenting[yes,\measure{CAindent}]
\setupnarrower
  [ left=\measure{CAindent},
right=\measure{CAindent},
   middle=\measure{CAindent}]
\setupitemize[each][margin=\measure{CAindent}]

\starttext
\input knuth
\startitemize[joinedup,packed]
\item \input tufte
\startitemize[joinedup,packed]
\item \input tufte
\stopitemize
\input tufte
\stopitemize
\stoptext

The result is that quotations at first level are perfectly aligned with the 
indentation of the first line of a paragraph at first level. But the 
itemizations at second level are not. They are slightly less indented than the 
indentation of the first line of the paragraph in the first-level item. This 
can be seen at the last "We thrive" in the example, just after the second-level 
item.

What can I do about that?

G___
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] pgfplots.revision.tex is missing in the last ContextMinimals

2015-01-10 Thread Mojca Miklavec
On Sat, Jan 10, 2015 at 12:31 PM, DesdeChaves wrote:
> There are a extra "\" in the beginning of the file "pgfplots.revision.tex".

I'm sorry. After the problem was fixed, I synced the package, but not
the distribution.

Please try again.

Mojca
___
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] pgfplots.revision.tex is missing in the last ContextMinimals

2015-01-10 Thread DesdeChaves
There are a extra "\" in the beginning of the file "pgfplots.revision.tex".
I have

*\*\begingroup* <--- should be \begingroup*
\\catcode`\\/=12
\\catcode`\\.=12
\\catcode`\\:=12
\\catcode`\\+=12
\\catcode`\\-=12
\gdef\pgfplotsrevision{1.11-232-g91e635c}
\gdef\pgfplotsversion{1.11}
\gdef\pgfplotsversiondatetime{2014-08-04 12:47:48 +0200}
\gdef\pgfplotsrevisiondatetime{2015-01-04 21:23:44 +0100}
\gdef\pgfplots@glob@TMPa#1-#2-#3 #4\\relax{#1/#2/#3}
\xdef\pgfplotsversiondate{\expandafter\pgfplots@glob
@TMPa\pgfplotsversiondatetime\\relax}
\xdef\pgfplotsrevisiondate{\expandafter\pgfplots@glob
@TMPa\pgfplotsrevisiondatetime\\relax}
\endgroup


2015-01-10 11:04 GMT+00:00 Mojca Miklavec :

> On Mon, Jan 5, 2015 at 11:00 PM, DesdeChaves wrote:
> >
> > Dear Sirs
> >
> > In the last ContextMinimals the file "pgfplots.revision.tex" is missing.
> > This file is required by the pgfplots module.
>
> Some problems had to be fixed upstream and I had to start
> auto-generating that file, but I hope that it is fixed now. Please
> check if it works ok.
>
> Mojca
>
> ___
> 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
>
> ___
>



-- 
Atentamente

DesdeChaves
___
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] bug in beta from 2015.01.10 00:44?

2015-01-10 Thread Wolfgang Schuster

> Am 10.01.2015 um 11:40 schrieb Pablo Rodriguez :
> 
> Dear list,
> 
> I get an error when compiling this minimal sample with beta from
> 2015.01.10 00:44:
> 
>\setuplayout[header=,]
>\starttext
>\input zapf
>\stoptext
> 
> Is this a bug or am I missing something?

ConTeXt expects a dimension (e.g. 1cm) as argument for the header key but since 
this is missing here you get a error message for this:

 ! Missing number, treated as zero

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] pgfplots.revision.tex is missing in the last ContextMinimals

2015-01-10 Thread Mojca Miklavec
On Mon, Jan 5, 2015 at 11:00 PM, DesdeChaves wrote:
>
> Dear Sirs
>
> In the last ContextMinimals the file "pgfplots.revision.tex" is missing.
> This file is required by the pgfplots module.

Some problems had to be fixed upstream and I had to start
auto-generating that file, but I hope that it is fixed now. Please
check if it works ok.

Mojca
___
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] Center horizontally and vertically a table with a graphic in a paragraph environment

2015-01-10 Thread Fabrice

You're right Pablo.
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
___

[NTG-context] bug in beta from 2015.01.10 00:44?

2015-01-10 Thread Pablo Rodriguez
Dear list,

I get an error when compiling this minimal sample with beta from
2015.01.10 00:44:

\setuplayout[header=,]
\starttext
\input zapf
\stoptext

Is this a bug or am I missing something?

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
___