[NTG-context] \type{__}

2007-07-20 Thread Wolfgang Werners-Lucchini
Hmm, two leading underscores in titles are not allowed?

Wolfgang

\starttext
\section{The \type{_\_problem} is}
Here the \type{__problem} is not.
\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] makempy (pstoedit <-> gs) hangs

2007-07-20 Thread Wolfgang Werners-Lucchini
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)

___
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] TABLE problems

2007-07-20 Thread Wolfgang Werners-Lucchini
Hallo,

I have two problems/questions with the following tables:

1. Should'nt all the columns be .2\textwidth, as in the last table?
2. Why expands column width to \textwidth in the second table?
   Has to do with \type{} and/or color!
3. Why behaves table 1 (with \type{}) as table 3 (whitout \type{})?

Wolfgang 

\setupcolors[state=start]
\starttext
\input tufte

\setupTABLE[row][odd][background=color,backgroundcolor=lightgray, 
width=.2\textwidth]
\bTABLE
\bTR \bTD \type{short} \eTD \bTD reads the whole file \eTD \eTR
\bTR \bTD kurz \eTD \bTD reads a string with up to num characters 
\eTD \eTR
\eTABLE

\input tufte

\setupTABLE[row][odd][background=color,backgroundcolor=lightgray, 
width=.2\textwidth]
\bTABLE
\bTR \bTD short \eTD \bTD reads the whole file \eTD \eTR
\bTR \bTD \type{kurz} \eTD \bTD reads a string with up to num 
characters \eTD \eTR
\eTABLE

\input tufte

\setupTABLE[row][odd][background=color,backgroundcolor=lightgray, 
width=.2\textwidth]
\bTABLE
\bTR \bTD short \eTD \bTD reads the whole file \eTD \eTR
\bTR \bTD kurz \eTD \bTD reads a string with up to num characters 
\eTD \eTR
\eTABLE

\input tufte

\setupTABLE[row][odd][background=color,backgroundcolor=lightgray, 
width=.2\textwidth]
\bTABLE
\bTR \bTD kurz \eTD \bTD reads a string with up to num characters 
\eTD \eTR
\eTABLE

\input tufte
\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] factor=fit images don't fit

2007-07-20 Thread Giuseppe Bilotta
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.

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.

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