Re: [NTG-context] factor=fit images don't fit

2007-07-22 Thread Giuseppe Bilotta
Saturday, July 21, 2007 Brian R. Landy wrote:

 Hi,

 What version of ConTeXt are you using?  I just noticed a difference a
 few days ago between the version installed by TeXLive 2007 and the
 April 2007 release (tested locally  through contextgarden) placing
 an image into a natural table, using factor=max.  I'll post an
 example in a separate thread shortly.

According to the log:

ConTeXt  ver: 2007.04.17 12:51 MKII  fmt: 2007.7.17  int: english/english

It's the one shipped with Debian.

-- 
Giuseppe Oblomov Bilotta

___
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] old textbook style

2007-07-22 Thread Patrick Gundlach
Hi,


 I've always liked the style of old textbooks, where important terms
 were emphasized not by bold or italic, but extra spacing between
 letters. How to achieve this in ConTeXt?

See the manual and search for '\streched'. But you should know what
you are doing. Letter spacing should only be used in black letter fonts, on a
typewriter and in (small) caps.

Also go to the wiki and use the google search there with 'streched'.
You'll find more some information there.

Patrick
___
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] old textbook style

2007-07-22 Thread Patrick Gundlach
Hi again,

there is also \stretchednormalcase{}, \stretcheduppercase{}
and \stretchedlowercase{}. You can change the default stretch with
\def\stretchedspacefactor{4} and \def\stretchedspaceamount{.25em}
(these are the defaults). See

http://source.contextgarden.net/tex/context/base/core-fnt.tex#stretched

Patrick

___
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] \setupheader: leftstyle rightstyle

2007-07-22 Thread Matt Gushee
Hi, all--

I would like to use different styles for left and right headers in a 
book: I would like to set the left side (which shows the book title) in 
small caps, and the right side (chapter title) in italics.

   \setupheader[style=\sc]

works fine. So does

   \setupheader[style=\it]

But

   \setupheader[leftstyle=\sc,rightstyle=\it]

Doesn't work. Both headers appear in the (medium-weight roman) body 
font. Any idea why this is the case?

-- 
Matt Gushee
___
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] \setupheader: leftstyle rightstyle

2007-07-22 Thread Patrick Gundlach
Hello Matt,

\setupheader[leftstyle=\sc,rightstyle=\it]

I think the reference is wrong here, I couldn't find 'leftstyle' and
'rightstyle' in the source. And \setupheader is AFAIU for the section
title. You can use \setupheadertexts. See the example:

--
\starttext 
\setupheadertexts[{\sc This is my book!}][{\it \getmarking[section]}]
\setupfootertexts [pagenumber]

\setuppagenumbering [location=]
% \setuphead [section][style=\it]
\section{My first section}
\input tufte

\input knuth

\section{My second section}
\input tufte

\input tufte
\stoptext
--

Patrick
___
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] \setupheader: leftstyle rightstyle

2007-07-22 Thread Mojca Miklavec
On 7/22/07, Matt Gushee wrote:
 Hi, all--

 I would like to use different styles for left and right headers in a
 book: I would like to set the left side (which shows the book title) in
 small caps, and the right side (chapter title) in italics.

\setupheader[style=\sc]

 works fine. So does

\setupheader[style=\it]

 But

\setupheader[leftstyle=\sc,rightstyle=\it]

 Doesn't work. Both headers appear in the (medium-weight roman) body
 font. Any idea why this is the case?

I usually use something like

\setuppagenumbering
[alternative=doublesided,location=bottom]
\setupheadertexts
[\sc Book Title][]
[][{\it (\getmarking[chapter][current])}]

However, there seems to be a little bug. This works perfectly well for
section (\getmarking[section]), but for chapter the chapter labels
seem to be erased after the first appearance.

leftstyle= might also require implementation of
- style of the left label on left page
- style of the middle label on the left page
- style of the right labale on the left page
- all the three styles again on the right page, the same 6 for footer

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


[NTG-context] presentation module

2007-07-22 Thread Thomas A. Schmitz
Hi all,

after some feedback and some more fiddling around, I have now  
uploaded a first (beta) version of the presentation module. It can be  
downloaded at the garden: http://modules.contextgarden.net/taspresent

It has been improved (at least I hope); in particular, it provides  
more configurability and a couple of new styles. Have a look and let  
me know if you like it. (And those to whom I have sent the first  
version: feedback would still be welcome!)

Best

Thomas
___
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] makempy (pstoedit - gs) hangs

2007-07-22 Thread Mojca Miklavec
Hello Wolfgang and others,

Has anyone ever managed to use \useMPlibrary[txt] in the last two or
three years?

On 7/21/07, Wolfgang Werners-Lucchini wrote:
 Hallo,

 the following code let ghostscript fail.
 What is wrong her?

 Wolfgang

 \setupcolors  [state=start]
 \starttext
 \useMPlibrary[txt]
 \startlinecorrection
 \TightText{\ss\bf 123}{0cm}{3cm}{red}
 \stoplinecorrection
 \stoptext
 %
 %ConTeXt  ver: 2007.07.03 19:38 MKII
 %pstoedit: version 3.44 / DLL interface 108
 %GPL Ghostscript 8.57 (2007-05-11)

I've written to the author of pstoedit exactly two years ago, when
pstoedit v. 3.40 was indeed broken (approved by the author). He sent
me a patch, but I didn't know how to compile the program, and I never
tested it since then.

Hans claimed that version 3.33 worked for him (and others approved
that downgrading worked), but it didn't work for me, since I would
need an older GS version as well.

Here some infinite loop occurs when I call
pstoedit -ssp -dt -f mpost mpy-bla-mpgraph.pdf mpy-bla-mpgraph.tmp
(which is what ConTeXt does in line 328 of makempy.pl)

I have no dea whether that's pdtoedit's or ghostscript's problem. I
hope that the author of pstoedit will reply and figure out what the
problem could be.

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


[NTG-context] problem with mp clip

2007-07-22 Thread Peter Rolf
Hi,

it seems, that clipping with a MetaPost path is broken (at least on my
machine). I couldn't test it on Contextgarden, as the standard example
pictures are not installed (or the !!path is not searched).

Anyhow, if someone can test this please.

I work with the latest minimal distribution (XP), ConTeXt beta from
03.07.2007, pdftex 1.40.4 and mpost 1.0.

Thanks in advance, Peter


@Patrick:
  Is there a way to add the test pictures (cont-img.zip) to 'live context'?

\setupcolors[state=start]
\setuppagenumber[state=stop]

\startMPclip{ClipTest}
  clip currentpicture to
  unitcircle scaled 3cm;
\stopMPclip

\starttext

\clip[width=3cm,height=3cm,mp=ClipTest]{\externalfigure[mill.png]}

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


Re: [NTG-context] Some minor issus

2007-07-22 Thread Patrick Gundlach
Hello Steffen,

you should provide examples how you do things, otherwise we'd have to
guess.

 First, some of my URLs within footnotes are wider as the textwidth. Is 
 there a way to force a line break other than defining break points for 
 each of it? Maybe even with a nice symbol identicating the forced break?

Perhaps this thread helps?
http://archive.contextgarden.net/thread/20041206.211906.9dc6aa4d.en.html#20041206.211906.9dc6aa4d


 Second problem is the formatting of the in text references. it would be 
 nice if there is a way they were not bold. I tried different things with 
 \setupreferencing but the text stayed bold. I could not find something 
 in regards to this topic in the manual or in the wiki.

I don't know references (never used them), but could this be due to
interaction? Put style=\tf in \setupinteraction. But this is just a
wild guess.

 My thrid problem is, how can I force context not to continue footnotes 
 on another page?

Sorry, no idea. Somebody else? 


 And a similar thing ... how can I achieve that there are always at least 
 two lines of a paragraph on each page if this paragraph is split between 
 two pages. I tried \clubpenalty and \widowpenalty as well as 
 \def\defaultwidowpenalty and \def\defaultclubpenalty. But I am not 
 really sure what the numbers identicate. I guess not the lines ...

No, not the line numbers. It is a TeX concept called 'penalty' where
high positive numbers represents 'very bad'. The default in ConTeXt is
2000, which is pretty high. Maximum is 1 (= infinity). Perhaps you
need to play with \brokenpenalty as well, which tells TeX how bad it
is to break a page at a line with a hyphen.

But perhaps you could provide an example.

Patrick
___
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] \setupheader: leftstyle rightstyle

2007-07-22 Thread Alex K
Hi,

Hope this isn't hijacking the thread, but I have a quick question related to 
this and I'd thought I'd post it here instead of starting a whole new topic 
about something similar. How do you center headers? I know that if you just use 
one header, it's automatically centered, but if you use alternating headers, 
they're left/right aligned by default... right?

So far I have a two-page spread set up so that the chapter appears on the right 
header and the title of the text on the left, but neither are centered. Do I 
use \midaligned, or am I on the wrong track?

Thanks.

- Original Message 
From: Mojca Miklavec [EMAIL PROTECTED]
To: mailing list for ConTeXt users ntg-context@ntg.nl
Sent: Sunday, July 22, 2007 7:56:12 AM
Subject: Re: [NTG-context]
 \setupheader: leftstyle  rightstyle

On 7/22/07, Matt Gushee wrote:
 Hi, all--

 I would like to use different styles for left and right headers in a
 book: I would like to set the left side (which shows the book title) in
 small caps, and the right side (chapter title) in italics.

\setupheader[style=\sc]

 works fine. So does

\setupheader[style=\it]

 But

\setupheader[leftstyle=\sc,rightstyle=\it]

 Doesn't work. Both headers appear in the (medium-weight roman) body
 font. Any idea why this is the case?

I usually use something like

\setuppagenumbering
[alternative=doublesided,location=bottom]
\setupheadertexts
[\sc Book Title][]
[][{\it
 (\getmarking[chapter][current])}]

However, there seems to be a little bug. This works perfectly well for
section (\getmarking[section]), but for chapter the chapter labels
seem to be erased after the first appearance.

leftstyle= might also require implementation of
- style of the left label on left page
- style of the middle label on the left page
- style of the right labale on the left page
- all the three styles again on the right page, the same 6 for footer

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








   
Ready
 for the edge of your seat? 
Check out tonight's top picks on Yahoo! TV. 
http://tv.yahoo.com/

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


Re: [NTG-context] Some minor issus

2007-07-22 Thread Steffen Fritzsche
Hi Patrick,

thanks for the answers ...

 First, some of my URLs within footnotes are wider as the textwidth. Is 
 there a way to force a line break other than defining break points for 
 each of it? Maybe even with a nice symbol identicating the forced break?
 
 Perhaps this thread helps?
 http://archive.contextgarden.net/thread/20041206.211906.9dc6aa4d.en.html#20041206.211906.9dc6aa4d

Yeah! \hyphenantedurl{...} ist working for my purpose. Because it is 
going to be a printed text anyways I do not need interaction.

 Second problem is the formatting of the in text references. it would be 
 nice if there is a way they were not bold. I tried different things with 
 \setupreferencing but the text stayed bold. I could not find something 
 in regards to this topic in the manual or in the wiki.
 
 I don't know references (never used them), but could this be due to
 interaction? Put style=\tf in \setupinteraction. But this is just a
 wild guess.

Yeah! Your wild guess was right - setupinteraction I never looked at 
this, because references is not something which I put in for 
interaction. It is just a convienient way to keep all chapter references 
uptodate. Without all these bold spots the text looks much nicer ...

 My thrid problem is, how can I force context not to continue footnotes 
 on another page?
 
 Sorry, no idea. Somebody else? 
 
 And a similar thing ... how can I achieve that there are always at least 
 two lines of a paragraph on each page if this paragraph is split between 
 two pages. I tried \clubpenalty and \widowpenalty as well as 
 \def\defaultwidowpenalty and \def\defaultclubpenalty. But I am not 
 really sure what the numbers identicate. I guess not the lines ...
 
 No, not the line numbers. It is a TeX concept called 'penalty' where
 high positive numbers represents 'very bad'. The default in ConTeXt is
 2000, which is pretty high. Maximum is 1 (= infinity). Perhaps you
 need to play with \brokenpenalty as well, which tells TeX how bad it
 is to break a page at a line with a hyphen.
 
 But perhaps you could provide an example.

I increased those values now

\def\defaultwidowpenalty{9000}
\def\defaultclubpenalty{9000}

and it works for all cases except one. So maybe I just go down the 
manual path ...

... surprisingly it seemed to affect also the footnote problem. There is 
also only one case left. Are those two somehow related?

Again, thanks for the help!

Steffen
___
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] Some minor issus

2007-07-22 Thread Patrick Gundlach

[...]

 I increased those values now

 \def\defaultwidowpenalty{9000}
 \def\defaultclubpenalty{9000}

 and it works for all cases except one. So maybe I just go down the 
 manual path ...

then try \clubpenalty=1 \widowpenalty=1 \brokenpenalty 0 

Any change?

TeX's paragraph/page breaking is a highly complex thing, there are
lots of parameters to play with. For a complete refrerence you'll
probably need Knuth's original TeX book. But with these three
penalites above, you should be able to solve the problem.

 ... surprisingly it seemed to affect also the footnote problem.
 There is also only one case left. Are those two somehow related?

This is beyond my knowledge, but here is a guess: These are related,
but only very deep down inside. So for most practical cases, these
two are different things.


Patrick
___
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] \type{__}

2007-07-22 Thread Hans Hagen
Wolfgang Schuster wrote:
 On Sat, 21 Jul 2007 01:35:15 +0200
 Wolfgang Werners-Lucchini [EMAIL PROTECTED] wrote:
 
 Hmm, two leading underscores in titles are not allowed?

 Wolfgang

 \starttext
 \section{The \type{_\_problem} is}
 
 \section{The \retype{__problem } is}
 
 I inserted the space after problem because ConTeXt gobbles the space
 after \retype, a bug?

no, a side of using scantokens

Hans
___
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] setups/setuplayout

2007-07-22 Thread Patrick Gundlach
Hi,

consider this example:

\startsetups [empty]
\stopsetups
\starttext
% \setuplayout[lines=7,grid=yes,setups=empty] \showgrid
\setuplayout[lines=7,grid=yes] \showgrid
\dorecurse{2}{\input ward \endgraf} \page
\stoptext

If you use the other setuplayout line, the result is different. Why?
Feature or bug?

Patrick
___
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] problem with mp clip

2007-07-22 Thread Patrick Gundlach

   Is there a way to add the test pictures (cont-img.zip) to 'live context'?

They are already installed, but not in a local path. I have changed
'live context' so now the sample figures are in the search path. 

Patrick
___
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] problem with mp clip

2007-07-22 Thread Hans Hagen
Peter Rolf wrote:
 Hi,
 
 it seems, that clipping with a MetaPost path is broken (at least on my
 machine). I couldn't test it on Contextgarden, as the standard example
 pictures are not installed (or the !!path is not searched).
 
 Anyhow, if someone can test this please.



has to do with the changed mp output ... in supp-mps.tex change this ...

\bgroup
\catcode`\%=\@@active
\catcode`\/=\@@comment
\gdef\dograbMPclippath/
   {\setbox\scratchbox=\hbox\bgroup/
\catcode`\%=\@@active
\obeylines\let\obeyedline\space
\def\do##1q n##2p W##3\od/
  {\xdef\MPclippath{##2}\endinput}/
\def%##1%%EOF/
  {\do##1q np W\od\endinput}/
\readfile{\MPgraphicfile.\the\currentMPgraphic}{}{}/
\ifx\MPclippath\empty
  \def\do##1newpath##2closepath##3\od/
{\xdef\MPclippath{##2}\endinput}/
  \def%##1%%EOF/
{\do##1newpathclosepath\od\endinput}/
  \readfile{\MPgraphicfile.\the\currentMPgraphic}{}{}/
\fi
\deallocateMPslot\currentMPgraphic / new
\egroup}
\egroup

keep in mind that it's still a dirty trick


 I work with the latest minimal distribution (XP), ConTeXt beta from
 03.07.2007, pdftex 1.40.4 and mpost 1.0.
 
 Thanks in advance, Peter
 
 
 @Patrick:
   Is there a way to add the test pictures (cont-img.zip) to 'live context'?
 
 
 
 
 
 ___
 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
 ___


-- 

-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] factor=fit images don't fit

2007-07-22 Thread Hans Hagen
Giuseppe Bilotta wrote:
 Friday, July 20, 2007 Giuseppe Bilotta wrote:
 
 Hello all,
 
 I have to place a number of images into some given-size
 frames in a layer. The images should be scaled
 proportionally to fit into the frame. The code I'm working
 with is:
 
 \defineframed[framedimg][
   frame=on,framecolor=elux,
   background=color,
   backgroundcolor=white,
   width=\wdfig,
   height=\htfigone,
   offset=overlay,
 ]
 
 \setlayer[figs][voffset=\nextfigvoff]{%
   \framedimg{%
 \externalfigure[#1][
   factor=fit,
   % maxwidth=\wdfig,
   % maxheight=\htfigone,
   % frame=on,
 ]%
   }%
 }%
 
 where \wdfig, \htfigone are the frame size and \nextfigvoff
 is the vertical offset which must be placed. I've tried
 factor=fit, factor=max, but in both cases I get images which
 cross the boundaries of the frame, mostly in the horizontal
 direction. If I add the maxwidth/maxheight specification,
 images don't get scaled at all.
 
 I would expect factor=fit to scale the image in such a way
 that the biggest direction fits into the enclosing box,
 while factor=max would scale the image in such a way that
 the smallest direction fits into the enclosing box. Instead,
 in both cases the vertical direction is being fitted, with
 no apparent consideration for the horizontal direction.
 
 What am I doing wrong and what should I do to fix it?
 
 Ok, I've tried studying the source and I really think that
 the way factor scaling is computed is wrong. However, the
 fix is nontrivial, and a somewhat thorough checking should
 be implemented, with earlier check for the factor value
 (fit, max, broad), since the logic selecting which dimension
 to scale depends on the kind of scaling.

the fit assumes operating on a page not in a box; an alternative is:

\framed[width=5cm,height4cm]
   {\externalfigure[mill.png][maxwidth=4cm,maxheight=5cm,width=10cm]}

i.e. setting the maximum values


 Anyway, I've found a temporary solutin to my problem by
 using a very large value of scale=, coupled with appropriate
 maxwidth and maxheight values.
 


-- 

-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] strange colorleak in definetyping[XML]

2007-07-22 Thread Hans Hagen
Hans van der Meer wrote:
 I did encounter 'leaking' color outside the XML verbatim typing.
 The effect can be turned off and on by removing/placing the ':' in 
 'file:' in the second xml-line.
 Is this a bug? It certainly is annoying that the default color is 
 inadvertently changed.
 
 A (somewhat) minimal example follows:
 
 ===
 \setupcolors[state=start]
 \definecolor [mistyrose] [r=1,g=.894118,b=.882353]
 
 % Setup coloring for framed text (unbreakable) blocks.
 \defineframedtext[framedcode][frame=on,corner=round,rulethickness=2pt,
 width=\textwidth,color=codecolor,style=\ttxx,
 background=color,backgroundcolor=mistyrose,framecolor=indianred]
 
 % Setup coloring for verbatim code fragments.
 \definecolor [codecolor] [red]
 \definecolor [colorprettyone]   [codecolor]
 \definecolor [colorprettytwo]   [codecolor]
 \definecolor [colorprettythree] [codecolor]
 \definecolor [colorprettyfour]  [codecolor]
 \setuptyping [color=codecolor,palet=colorpretty]
 % XML typesetting inside framebox with background.
 \definetyping[XMLBOX][option=XML,style=\ttxx,
 before={\bgroup\setupinterlinespace[line=2ex]\startframedcode},
 after={\stopframedcode\egroup}]
 
 \starttext
 
 Testing xml typing\crlf
 
 \startXMLBOX
 ?xml version=1.0 encoding=UTF-8?
 locationURIzip:/?filepath/to/a.zip/locationURI
 \stopXMLBOX
 
 This color is black as it should be.
 
 \startXMLBOX
 ?xml version=1.0 encoding=UTF-8?
 locationURIzip:/?file:path/to/a.zip/locationURI
 \stopXMLBOX
 
 This color should be black not \quote{codecolor}!!!
 \stoptext

looks like an unfinished coloring state


removing the \setpretty`\: lines in the file verb-xml.tex helps


btw,


\startbuffer
?xml version=1.0 encoding=UTF-8?
locationURI oeps:oeps=x:xzip:/?file:path/to/a.zip/locationURI
\stopbuffer

\showXMLbuffer

also is an option

if you want the whole verbatim to have one color, don't use option= but 
just use color=...

Hans




-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \setupheader: leftstyle rightstyle

2007-07-22 Thread Matt Gushee
Patrick Gundlach wrote:

 'rightstyle' in the source. And \setupheader is AFAIU for the section
 title.

AFAIU? Sorry, I'm not familiar with that acronym.

 \setupheadertexts[{\sc This is my book!}][{\it \getmarking[section]}]

Ah, yes, that does the trick! Thank you.


Mojca Miklavec wrote:

  \setupheadertexts
  [\sc Book Title][]
  [][{\it (\getmarking[chapter][current])}]

Okay, that seems to work, too. But why use the [current] argument? Are 
there conditions where

   \getmarking[chapter]

doesn't return the current chapter title?

  However, there seems to be a little bug. This works perfectly well for
  section (\getmarking[section]), but for chapter the chapter labels
  seem to be erased after the first appearance.

Hmm, that doesn't happen for me. I'm using the 2007-01-23 release of 
ConTeXt. Which version are you using?

-- 
Matt Gushee
___
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
___