[NTG-context] Unwanted empty last page in doublesided document

2009-07-03 Thread B. Tommy Jensen

I am using Context mkII and have the following challenge:

I am using a doblesided layout and want to have an even total number of  
pages. The last chapter
should have an empty trailing page (if necessary) to add up to the right  
number.


The problem is that I always get an ODD number of pages, and there are  
_two_ empty
last pages at the end of the document. I have tried  
\installpagebreakhandler with

no effect.

The attached sample shows the problem - two empty pages at end. I would  
have expected

the document to stop at page 10, but there is an empty page 11 as well.

Does anyone have a clue here?

Regards,
Tommy Jensen

Sample text follows:


\setuppagenumbering[alternative=doublesided]
\starttext
\startbodymatter
\chapter[]{Kap 1}
\chapter[]{Kap 2}
\chapter[]{Kap 3}
\chapter[]{Kap 4}
\chapter[]{Kap 5}
\stopbodymatter

%-
% Necessary to suppress emtpy last page in doublesided pagenumbering mode  
(no effect!)

\installpagebreakhandler{last}{}

\stoptext
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Is there any "leftoffset" and "rightoffset" possibilities for \framed (in natural tables) ?

2009-06-12 Thread B. Tommy Jensen

I have the following challenge:

I am using natural Tables (e.g. \bTABLE) and want to have a larger  
left/right offset than the top/bottom offset for the table cells.


The "offset" parameter (which I believe is from the \framed command) works  
fine, but assigns equal offset to all sides of the table cell.


Does anybody have a tip/solution on how to get individual  
left/right/top/bottom offsets?


Regards,
B. Tommy Jensen
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Verbatim with color background

2008-09-04 Thread B. Tommy Jensen
On Thu, 04 Sep 2008 10:12:47 +0200, Hans Hagen <[EMAIL PROTECTED]> wrote:

>> Is there any other easy way of controlling the background
>> color on verbatim areas?
>
> can you make a small example that shows where it goes wrong?
>

The example I used is shown below. Other observations are:

  - The code works with mkIV but not mkII
  - Removing the chapters in the test file also make it work with mkII
  - I am using the latest win32 standalone ConTeXt

Best regards,
Tommy Jensen


% START EXAMPLE

\setupcolors[state=start]

% We use Palatino as the main body font
\usetypescript[palatino][ec]
\setupbodyfont[palatino,10pt]

\definetextbackground[verbatim]
[background=color,
backgroundcolor=yellow,
backgroundoffset=0cm,
offset=0.5cm,
frame=on,
framecolor=black,
location=paragraph,
color=black]

% Setup verbatim
\setuptyping[typing][margin=1cm,bodyfont=8.0pt,
before={\starttextbackground[verbatim]},
after={\stoptextbackground}]

\starttext

\chapter{One}
Chapter one.

\chapter{Two}
Chapter two.

\chapter{Three}
Chapter three.

\starttyping
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verbatim section.
This is a long verba

[NTG-context] Verbatim with color background

2008-09-03 Thread B. Tommy Jensen
Hi,
I have a short question about verbatim areas (\starttyping):

I have been trying to define a background color to verbatim
areas in a document. My method so far is to define a
textbackground named "verbatim" and refer to this in the
setuptyping method:

\setuptyping[typing][margin=0.5cm,bodyfont=8.0pt,
before={\starttextbackground[verbatim]},
after={\stoptextbackground}]

This works only partly. For example, when using long
verbatim texts that spans over more than one page,
the background color disappears on the last page.

Is there any other easy way of controlling the background
color on verbatim areas?

Best regards,
Tommy Jensen
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] "Float within a frame" challenge

2008-09-02 Thread B. Tommy Jensen
On Tue, 02 Sep 2008 20:46:28 +0200, Henning Hraban Ramm <[EMAIL PROTECTED]>  
wrote:

> Am 2008-09-02 um 08:26 schrieb Wolfgang Schuster:
>> http://archive.contextgarden.net/message/20080624.074046.56e76622.en.html
>
> Never knew that myself.
> Wikified it:
> http://wiki.contextgarden.net/Using_Graphics#Flow_text_around_a_picture
>

Thanks for the updated documentation.

Another tricky question with \starthangaround: If the text
following the picture is very short, e.g. the text height
is much less than the picture height, the next paragraph
is placed below the picture, e.g. the "hanging" paragraph
does not get its correct height.

It seems that the height is calculated based on the text
height only, not the picture.

Is there a clever commmand/option that can compensate for this?

Best regards,
Tommy Jensen
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Missing background color with \definetextbackground

2008-09-02 Thread B. Tommy Jensen
On Tue, 02 Sep 2008 13:08:56 +0200, Wolfgang Schuster  
<[EMAIL PROTECTED]> wrote:

>>
>> Sorry for being a novice here; is it so that the "texexec" utility  
>> should
>> be consiered as obsolete?
>
> But MkII should work too. Try "texexec --make metafun --alone" and now
> "texexec myfile".
>
> Wolfgang

Thanks - this also now works! The "context" utility built the format
automatically while I had to run the command manually with "texexec"
(So "context" seems to be smarter than "texexec").

My installation is the "complete windows environment" of context. I ran
the "fist_setup.bat" batch file after installation; this built many  
formats.
I don't know why the metafun format wasn't built - perhaps something
is missing from the setup file?

In any case - thanks a lot for the good advice.

Best regards,
Tommy Jensen


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


Re: [NTG-context] Missing background color with \definetextbackground

2008-09-02 Thread B. Tommy Jensen
On Tue, 02 Sep 2008 11:08:36 +0200, Wolfgang Schuster  
<[EMAIL PROTECTED]> wrote:

>> Do you have other ideas?
>
> Is metapost or MPtoPDF called, take a in your terminal, dou you have
> the metafun format and do you use MkII (texexec ...) or MkIV (context  
> ...).
>
> Wolfgang

Thanks a lot for pointing me in the right direction!

I was using the "texexec" utility. When I tried the same with the "context"
version, it rebuilt some formats and it now works exactly as expected.

Sorry for being a novice here; is it so that the "texexec" utility should
be consiered as obsolete?

Best regards,
Tommy Jensen
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Missing background color with \definetextbackground

2008-09-02 Thread B. Tommy Jensen
On Tue, 02 Sep 2008 00:18:40 +0200, Mojca Miklavec  
<[EMAIL PROTECTED]> wrote:

>> %
>> \setupcolors[state=start]
>> \definetextbackground[highlight][backgroundcolor=yellow,
>> frame=on,
>
> %add
> background=color,
>
>> location=text,
>> color=blue]
>> \starttext
>> \starttextbackground[highlight]
>> This text should have yellow background but it is white.
>> The text is however blue.
>> \stoptextbackground
>> \stoptext
>> %-

Thanks for the prompt reply!

I have tried to add background=color as an option, but the result is  
exactly the same;
only the text gets colored; no frame and no background color appear.

Do you have other ideas?

Best regards,
Tommy Jensen
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Missing background color with \definetextbackground

2008-09-01 Thread B. Tommy Jensen
Hi,
I am strugglig to get the background color visible with the following code:

%
\setupcolors[state=start]
\definetextbackground[highlight][backgroundcolor=yellow,
 frame=on,
 location=text,
 color=blue]
\starttext
\starttextbackground[highlight]
This text should have yellow background but it is white.
The text is however blue.
\stoptextbackground
\stoptext
%-

The background of the rendered text is always white, independent of the
backgroundcolor parameter. The font color is however OK (blue).
All other samples I have tried from "details.pdf"
behaves similarly - no background color and no frame/frame color.

I am using the latest complete standalone Windows version of Context.

Has anybody encountered a similar behaviour?

Best regards,
Tommy Jensen
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] "Float within a frame" challenge

2008-09-01 Thread B. Tommy Jensen
Hi,
I am trying to accomplish the following layout with ConTeXt:

  - An icon and a descriptive text should be contained together in a  
separate frame
  - The frame should be centered and have a special background color
  - Within the frame, the icon should be placed to the upper left.
  - A descriptive text should "flow" around the icon within the frame,
first part to the right and then below the icon.

I have tried the following construct:

%--

\startframedtext
\placefigure[left]{none}{\externalfigure[danger]}

The textual description of the icon comes here. It should ideally flow to  
the right of
the figure within the frame, but the figure actually becomes behind the  
text.
\stopframedtext

%--

The problem here is that the icon and text is placed on top of each other.

When removing the frame (\startframedtext command), the placement of the
figure and the text works OK, but I don't get a frame then of course.

I have studied the "It's in the details" document which explains a great
deal about float's, but I haven't found anything covering the frame issue.

Is the "startframedtext" the wrong command to use? All hints or suggestions
(like references to other tutorials) are very welcome.

Best regards,
Tommy Jensen
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] "Padding" in natural tables

2008-08-28 Thread B. Tommy Jensen
Sorry for "polluting" the mailing list with my question - I just
discovered an "offset" property in the mail list archive that seems
to do what I want.

The TABLE package in Context is really powerful - it would be very nice
to have an updated documentation for it, summarising all available
options.

Best regards,
Tommy Jensen


> Hi,,
> I have been searching the documentation on natural tables (\bTABLE), but
> haven't been
> able to resolve the following issue:
>
> I would like to specify an internal padding in the table cells, e.g. text
> content should start 0.4cm
>  from the left edge of the table cell. Also, it would be nice to specify
> the distance from the top border.
> (In HTML this is accomplished with the "padding" option.)
>
> The table is composed with horizontal lines only.
>
> I have tried the "distance" option for the table columns, but this gives
> ugly "broken" horizontal lines.
>
> What is the best solution - is there an undocumented parameter, or do I
> have to add a block within the cell
> and specify an external margin for that block?
>
> Best regards,
> Tommy Jensen
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] "Padding" in natural tables

2008-08-28 Thread B. Tommy Jensen
Hi,,
I have been searching the documentation on natural tables (\bTABLE), but  
haven't been
able to resolve the following issue:

I would like to specify an internal padding in the table cells, e.g. text  
content should start 0.4cm
 from the left edge of the table cell. Also, it would be nice to specify  
the distance from the top border.
(In HTML this is accomplished with the "padding" option.)

The table is composed with horizontal lines only.

I have tried the "distance" option for the table columns, but this gives  
ugly "broken" horizontal lines.

What is the best solution - is there an undocumented parameter, or do I  
have to add a block within the cell
and specify an external margin for that block?

Best regards,
Tommy Jensen
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Numbered bookmarks in PDF

2008-08-27 Thread B. Tommy Jensen
I am struggling a bit with numbered bookmarks in generated PDF files.

In LaTex, the HyperRef package supports the option "bookmarksnumbered =  
true" which
adds the chapter numbers to the bookmark list.

Does anybody know of a similar option in ConText? I have searched the
\setupinteraction documentation, but haven't been able to locate anything  
useful.

I have also tried the \bookmark command with reference to \headnumber, but  
macro
expansion does not take place.

All hints are welcome!

Best regards,
Tommy Jensen
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Numbered bookmarks in PDF

2008-08-27 Thread B. Tommy Jensen
I am struggling a bit with numbered bookmarks in PDF files.

In LaTex, the HyperRef package supports the option "bookmarksnumbered =  
true" which
adds the chapter numbers to the bookmark list.

Does anybody know of a similar option in ConText? I have searched the  
\setupinteraction
documentation, but haven't been able to locate anything useful.

All hints are welcome!

Best regards,
Tommy Jensen
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___