Re: [NTG-context] layout question

2006-08-21 Thread richard rascher-friesenhausen
Hans Hagen schrieb:
 richard rascher-friesenhausen wrote:
   
 Hello,

 i have a simple (?) layout question. I want to typeset a doublesided 
 text with a larger margin on one side. This margin will be filled with 
 'margin images' or 'margin remarks'. But sometimes, larger images have 
 to be placed in the text+margin.

 Which commands, options or setups are correct, to get the same results 
 on odd and even pages? In the attached pdf file,  odd and even pages 
 behave different, using a simple setup (see tex file).
 

 it's dangerous to use dimensions in \setuplayout that get set themselves

 also, textwidth is for special purposed and special effects, not to be 
 used here (spoils things)

 \setuppapersize[A4][A4]

 \setuplayout
   [width=middle,
backspace=.75in,
curspace=2.55in,
leftmargin=.50in,
margindistance=.25in,
rightmargin=2.3in]

 \setuppagenumbering[alternative={singlesided,doublesided}]

 \starttext

 The very first page with a small image in the (bigger) margin.

 \placefigure
   [inright]{a margin image}
   {\framed[width=\marginwidth,height=3cm]{image}}

 \input tufte

 An now a larger image in the text and margin are

 \placefigure
   [here,inright]{a text+margin image}
   {\framed[width=1.2\textwidth,height=3cm]{image}}

 \inmargin{Tufte text} \input tufte \page

 The second page  with a small image in the (bigger) margin.

 \placefigure
   [inright]
   {a margin image}
   {\framed[width=\rightmarginwidth,height=3cm]{image}}

 \input tufte

 An now a larger image in the text and margin are

 \placefigure
   [here,inright]
   {a text+margin image}
   {\framed[width=1.2\textwidth,height=3cm]{image}}

 \inmargin{Tufte text} \input tufte \page


 -
   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
 -
   
Thanks for the quick response.

I have some questions about your code, because it does not fullfill all 
my wishes.

The command \inmargin now correctly puts its text on the correct side on 
even and odd pages. But i would like to have the same behaviour for the 
figures too. In a longer script, TeX should know, if the margin image 
has to be placed left or right. So 'inright' or 'inleft' is not an 
option. And 'margin' does not work ... (the image is placed mostly 
outside the page).
In your code, the long image on the second page does not start in the 
left margin, as desired.

%
% output=pdf
\setuppapersize[A4][A4]

\setuplayout
  [%width=middle,
   backspace=.75in,
   curspace=2.55in,
   leftmargin=.50in,
   margindistance=.25in,
   rightmargin=2.3in]

\setuppagenumbering[alternative={doublesided}]

\starttext

The very first page with a small image in the (bigger) margin.

\placefigure
  [margin]{a margin image}
  {\framed[width=\marginwidth,height=3cm]{image}}

\input tufte

And now a larger image in the text and margin

\placefigure
  [here,inright]{a text+margin image}
  {\framed[width=1.2\textwidth,height=3cm]{image}}

\inmargin{Tufte text} \input tufte \page

The second page  with a small image in the (bigger) margin.

\placefigure
  [margin]
  {a margin image}
  {\framed[width=\marginwidth,height=3cm]{image}}

\input tufte

And now a larger image in the text and margin

\placefigure
  [here,inleft]
  {a text+margin image}
  {\framed[width=1.2\textwidth,height=3cm]{image}}

\inmargin{Tufte text} \input tufte \page
%



Any help appreciated
   richard

-- 

==
Richard Rascher-Friesenhausen
MeVis -- Centrum fuer Medizinische Diagnosesysteme und Visualisierung GmbH
Universitaetsallee 29
D-28359 Bremen

email: [EMAIL PROTECTED], [EMAIL PROTECTED]
www  : http://www.mevis.de/, http://www.hs-bremerhaven.de/
fon  : +49 - 421 - 218 7707 (mevis)
fax  : +49 - 421 - 218 4236 (mevis)
==


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: footnotes and �

2006-08-21 Thread Horacio Suarez

Hello:

\enableregime[il1] fix the problem.

My file enconding is iso889x (I don´t remember exactly now).

Thankyou very much.




From: Mojca Miklavec [EMAIL PROTECTED]
To: Horacio Suarez [EMAIL PROTECTED]
Subject: Re: footnotes and ¿
Date: Mon, 21 Aug 2006 13:45:59 +0200

On 8/18/06, Horacio Suarez wrote:

maybe I´m repeatin this mail.

The name of this caracter ¿ is questiondown, and

\questiondown

works, but

\enableregime[utf]

doesn´t. Simply no character is shown.


Can you please send me a file with that problem? (I would like to make
see which encoding you're using.) There should be no reason why you
wouldn't be able to type characters directly (there is no need to type
things like \'a if everything is set up properly).

Mojca


_
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] How to \processcommalist inside another commalist?

2006-08-21 Thread Mojca Miklavec
Hello,

I tried to print out primes (well, I tried to do something else, but I
needed a more illustrative example), but it seems that my approach was
too naive:

\def\arePrime[#1]{%
\bgroup
\getparameters[Prime][p=,#1]
\def\printPrime##1{##1 is prime.\crlf}
\processcommalist[\Primep]\printPrime
\egroup}

\starttext
\arePrime[p={2,3,5}]
\stoptext

I expected something like
   2 is prime.
   3 is prime.
   5 is prime.
But I got
   2,3,5 is prime.

Any suggestions or hints about how to change the macro to produce the
desired result (using the same input)?

Thank you a lot,
Mojca
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Bold rules with TABLE

2006-08-21 Thread Mojca Miklavec
On 8/17/06, Fredrik Sjunnesson wrote:
 Hi,

 As this is my first mail to the list I'd like to start by thanking Hans
 and all other ConTeXt contributors. I stumbled upon ConTeXt just
 recently and I have fallen in love badly. :)

 Now to my question.

 Is it possible to control the rule thickness of a specific frames with
 TABLE, i.e. something like

 \setupTABLE[row][1][bottomframe=1pt]
 \setupTABLE[column][1][leftframe=2pt]

 If not, I'd guess it could be possible to fake this by inserting extra
 rows and columns with zero height and width, respectively, and use the
 rulethickness parameter to change the thickness of all their frames.
 Since this approach would add extra complexity to the table definitions
 I hope that you have better solutions.

Unless I have missed something (I would be glad if I would), there is
no support for that yet.

You could either do:
\setupTABLE[row][1][frame=off,bottomframe=on,rulethickness=1pt]
or
\setupTABLE[column][1][leftframe=on,rulethickness=2pt]
but none of that is what you really want.

Table building macros depend highly on \framed. And there are at least
two feature requests I know of that have been around for quite some
time now:

1. Support for setting different
leftoffset/rightoffset/topoffset/bottomoffset (natural tables look
ugly to me just because they have too little left/rightoofset and too
big top/bottomoffset)

Framedcontent supports that already, but cannot be used as a
replacement in tables.

2. Support for different line widths (or colors or whatever) for
left/right/top/bottom line. Some special care should be taken on
borders of course.

There is a workaround for your problem though: you can draw a frame in
metapost (where you can draw arbitrary lines around the cell) and then
use that frame as a background for the cells, but that's an extremely
lengthy and cumbersome solution for such a standard and well-defined
need.

I would vote for both of the features if Hans or someone else would
manage to implement them. One of the problems might be that \framed is
used very often and it is not desireble to have too much overhelm in
it, but I would really be very happy if functionality like that would
be made available for the usage in tables.

Mojca
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] How to \processcommalist inside another commalist?

2006-08-21 Thread nico
On Mon, 21 Aug 2006 17:23:48 +0200, Mojca Miklavec  
[EMAIL PROTECTED] wrote:

 Hello,

 I tried to print out primes (well, I tried to do something else, but I
 needed a more illustrative example), but it seems that my approach was
 too naive:

 \def\arePrime[#1]{%
   \bgroup
   \getparameters[Prime][p=,#1]
   \def\printPrime##1{##1 is prime.\crlf}
   \processcommalist[\Primep]\printPrime
   \egroup}

 \starttext
 \arePrime[p={2,3,5}]
 \stoptext

My 2 cents contribution:

\def\printPrime#1{#1 is prime.\crlf}

%% Why using parameter for this?
\def\arePrime[#1]{%
\bgroup
\processcommalist[#1]\printPrime
\egroup}

%% Expand the parameter before processing
\def\arePrimeN[#1]{%
\bgroup
\getparameters[Prime][p=,#1]
\expandafter\processcommalist\expandafter[\Primep]\printPrime
\egroup}

\starttext
\arePrime[2,3,5]
\arePrimeN[p={2,3,5}]
\stoptext

Regards,
BG
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] layout question

2006-08-21 Thread David Arnold
curspace=2.55in

should be

cutspace=2.55in


On Aug 21, 2006, at 3:12 AM, richard rascher-friesenhausen wrote:

 Hans Hagen schrieb:
 richard rascher-friesenhausen wrote:

 Hello,

 i have a simple (?) layout question. I want to typeset a doublesided
 text with a larger margin on one side. This margin will be filled  
 with
 'margin images' or 'margin remarks'. But sometimes, larger images  
 have
 to be placed in the text+margin.

 Which commands, options or setups are correct, to get the same  
 results
 on odd and even pages? In the attached pdf file,  odd and even pages
 behave different, using a simple setup (see tex file).


 it's dangerous to use dimensions in \setuplayout that get set  
 themselves

 also, textwidth is for special purposed and special effects, not  
 to be
 used here (spoils things)

 \setuppapersize[A4][A4]

 \setuplayout
   [width=middle,
backspace=.75in,
curspace=2.55in,
leftmargin=.50in,
margindistance=.25in,
rightmargin=2.3in]

 \setuppagenumbering[alternative={singlesided,doublesided}]

 \starttext

 The very first page with a small image in the (bigger) margin.

 \placefigure
   [inright]{a margin image}
   {\framed[width=\marginwidth,height=3cm]{image}}

 \input tufte

 An now a larger image in the text and margin are

 \placefigure
   [here,inright]{a text+margin image}
   {\framed[width=1.2\textwidth,height=3cm]{image}}

 \inmargin{Tufte text} \input tufte \page

 The second page  with a small image in the (bigger) margin.

 \placefigure
   [inright]
   {a margin image}
   {\framed[width=\rightmarginwidth,height=3cm]{image}}

 \input tufte

 An now a larger image in the text and margin are

 \placefigure
   [here,inright]
   {a text+margin image}
   {\framed[width=1.2\textwidth,height=3cm]{image}}

 \inmargin{Tufte text} \input tufte \page


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

 Thanks for the quick response.

 I have some questions about your code, because it does not fullfill  
 all
 my wishes.

 The command \inmargin now correctly puts its text on the correct  
 side on
 even and odd pages. But i would like to have the same behaviour for  
 the
 figures too. In a longer script, TeX should know, if the margin image
 has to be placed left or right. So 'inright' or 'inleft' is not an
 option. And 'margin' does not work ... (the image is placed mostly
 outside the page).
 In your code, the long image on the second page does not start in the
 left margin, as desired.

 %
 % output=pdf
 \setuppapersize[A4][A4]

 \setuplayout
   [%width=middle,
backspace=.75in,
curspace=2.55in,
leftmargin=.50in,
margindistance=.25in,
rightmargin=2.3in]

 \setuppagenumbering[alternative={doublesided}]

 \starttext

 The very first page with a small image in the (bigger) margin.

 \placefigure
   [margin]{a margin image}
   {\framed[width=\marginwidth,height=3cm]{image}}

 \input tufte

 And now a larger image in the text and margin

 \placefigure
   [here,inright]{a text+margin image}
   {\framed[width=1.2\textwidth,height=3cm]{image}}

 \inmargin{Tufte text} \input tufte \page

 The second page  with a small image in the (bigger) margin.

 \placefigure
   [margin]
   {a margin image}
   {\framed[width=\marginwidth,height=3cm]{image}}

 \input tufte

 And now a larger image in the text and margin

 \placefigure
   [here,inleft]
   {a text+margin image}
   {\framed[width=1.2\textwidth,height=3cm]{image}}

 \inmargin{Tufte text} \input tufte \page
 %



 Any help appreciated
richard

 -- 

 == 
 
 Richard Rascher-Friesenhausen
 MeVis -- Centrum fuer Medizinische Diagnosesysteme und  
 Visualisierung GmbH
 Universitaetsallee 29
 D-28359 Bremen

 email: [EMAIL PROTECTED], [EMAIL PROTECTED] 
 bremerhaven.de
 www  : http://www.mevis.de/, http://www.hs-bremerhaven.de/
 fon  : +49 - 421 - 218 7707 (mevis)
 fax  : +49 - 421 - 218 4236 (mevis)
 == 
 


 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] A few questions (mostly about fonts)

2006-08-21 Thread Jeff Smith
Hi,

On 8/18/06, Hans Hagen [EMAIL PROTECTED] wrote:

 grep the base path for \definehspace and search for line with fr in
 the tag and you'll see how things can be influences

Hans, the answer was in lang-spa.tex! I then regenerated the format
and it works absolutely perfectly, my single quotes as much as my
guillemets.

Thanks a lot!
JFS
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] How to \processcommalist inside another commalist?

2006-08-21 Thread Mojca Miklavec
On 8/21/06, nico wrote:
 On Mon, 21 Aug 2006 17:23:48 +0200, Mojca Miklavec wrote:

  Hello,
 
  I tried to print out primes (well, I tried to do something else, but I
  needed a more illustrative example), but it seems that my approach was
  too naive:
 
  \def\arePrime[#1]{%
\bgroup
\getparameters[Prime][p=,#1]
\def\printPrime##1{##1 is prime.\crlf}
\processcommalist[\Primep]\printPrime
\egroup}
 
  \starttext
  \arePrime[p={2,3,5}]
  \stoptext

 My 2 cents contribution:

 \def\printPrime#1{#1 is prime.\crlf}

 %% Why using parameter for this?

I was sure that someone would ask that. I want to provide optional
parameters for both numbers and scaling:
\useGNUPLOTgraphic[name]
or
\useGNUPLOTgraphic[name][width=.9\textwidth]
or
\useGNUPLOTgraphic[name][n={1,3}]
or
\useGNUPLOTgraphic[name][n={1,3},width=.9\textwidth]

but after some thinking I realized that it would indeed be a better
idea (less to type?) to have
\useGNUPLOTgraphic[name][1,3]
and
\useGNUPLOTgraphic[name][1,3][width=.9\textwidth]
instead.

At the beginning the main reason against it was that I didn't know how
to distinguish which kind of parameters are being used in the second
pair of brackets, but I guess that I can safely use \ifnumberelse as a
test on the first item to distinguish between the two.

 %% Expand the parameter before processing
 \def\arePrimeN[#1]{%
 \bgroup
 \getparameters[Prime][p=,#1]
 \expandafter\processcommalist\expandafter[\Primep]\printPrime
 \egroup}

On 8/21/06, Taco Hoekwater wrote:
 And an equivalent is

\processcommacommand[\Primep]\printPrime

Thanks to both of you!

Mojca
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] A few questions (mostly about fonts)

2006-08-21 Thread Aditya Mahajan
On Mon, 21 Aug 2006, Jeff Smith wrote:

 Hi,

 On 8/18/06, Hans Hagen [EMAIL PROTECTED] wrote:

 grep the base path for \definehspace and search for line with fr in
 the tag and you'll see how things can be influences

 Hans, the answer was in lang-spa.tex! I then regenerated the format
 and it works absolutely perfectly, my single quotes as much as my
 guillemets.

Do not change your local copy of lang-spa.tex. It will be rewritten 
with the next update of ConTeXt. You can copy the changed part in your 
environment file (inside \unprotect... \protect if the code has some 
special characters like [EMAIL PROTECTED] etc). Or you can keep your changes in 
/texmf-local/tex/context/user/cont-sys.tex

Aditya
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] How to \processcommalist inside another commalist?

2006-08-21 Thread nico
On Mon, 21 Aug 2006 20:35:27 +0200, Mojca Miklavec  
[EMAIL PROTECTED] wrote:

 %% Why using parameter for this?

 I was sure that someone would ask that. I want to provide optional
 parameters for both numbers and scaling:
 \useGNUPLOTgraphic[name]
 or
 \useGNUPLOTgraphic[name][width=.9\textwidth]
 or
 \useGNUPLOTgraphic[name][n={1,3}]
 or
 \useGNUPLOTgraphic[name][n={1,3},width=.9\textwidth]

 but after some thinking I realized that it would indeed be a better
 idea (less to type?) to have
 \useGNUPLOTgraphic[name][1,3]
 and
 \useGNUPLOTgraphic[name][1,3][width=.9\textwidth]
 instead.

 At the beginning the main reason against it was that I didn't know how
 to distinguish which kind of parameters are being used in the second
 pair of brackets, but I guess that I can safely use \ifnumberelse as a
 test on the first item to distinguish between the two.

Maybe you could play only with the parameter count. The limitation is that  
an empty second argument is required when only options need to be passed.

\def\printPrime#1{#1 is prime.\crlf}

\def\useGNUPLOTgraphic
   {\dotripleempty\douseGNUPLOTgraphic}

\def\douseGNUPLOTgraphic[#1][#2][#3]%
   {\ifthirdargument
  \doprime{#2}
  parameters are #3
  \getparameters[gnuplot][#3]
\else\ifsecondargument
  \doprime{#2}
\fi\fi}

\def\doprime#1{\processcommalist[#1]\printPrime}

\starttext
\useGNUPLOTgraphic[name]
\useGNUPLOTgraphic[name][2,3,5]
\useGNUPLOTgraphic[name][3,5,7][width=2in]
\useGNUPLOTgraphic[name][][width=4in]
\stoptext

Regards,
BG
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] How to \processcommalist inside another commalist?

2006-08-21 Thread Taco Hoekwater
Mojca Miklavec wrote:
 
 At the beginning the main reason against it was that I didn't know how
 to distinguish which kind of parameters are being used in the second
 pair of brackets, but I guess that I can safely use \ifnumberelse as a
 test on the first item to distinguish between the two.

You could look up \doifassignmentelse in the sources.

Cheers, taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] How to \processcommalist inside another commalist?

2006-08-21 Thread Hans Hagen
Mojca Miklavec wrote:
 On 8/21/06, nico wrote:
   
 On Mon, 21 Aug 2006 17:23:48 +0200, Mojca Miklavec wrote:

 
 Hello,

 I tried to print out primes (well, I tried to do something else, but I
 needed a more illustrative example), but it seems that my approach was
 too naive:

 \def\arePrime[#1]{%
   \bgroup
   \getparameters[Prime][p=,#1]
   \def\printPrime##1{##1 is prime.\crlf}
   \processcommalist[\Primep]\printPrime
   \egroup}

 \starttext
 \arePrime[p={2,3,5}]
 \stoptext
   
 My 2 cents contribution:

 \def\printPrime#1{#1 is prime.\crlf}

 %% Why using parameter for this?
 

 I was sure that someone would ask that. I want to provide optional
 parameters for both numbers and scaling:
 \useGNUPLOTgraphic[name]
 or
 \useGNUPLOTgraphic[name][width=.9\textwidth]
 or
 \useGNUPLOTgraphic[name][n={1,3}]
 or
 \useGNUPLOTgraphic[name][n={1,3},width=.9\textwidth]

 but after some thinking I realized that it would indeed be a better
 idea (less to type?) to have
 \useGNUPLOTgraphic[name][1,3]
 and
 \useGNUPLOTgraphic[name][1,3][width=.9\textwidth]
 instead.

   
along these lines:

\def\useGNUPLOTgraphic
  {\dotripleempty\douseGNUPLOTgraphic}

\def\douseGNUPLOTgraphic[#1][#2][#3]%
   {\itthirdargument
\dodouseGNUPLOTgraphic[#1][#2][#3]%
\else\ifsecondargument
\def\docommand##1{\dodouseGNUPLOTgraphic[#1][##1][#3]}%
\processcommalist[#2]\docommand
   \fi}

\def\dodouseGNUPLOTgraphic[#1][#2][#3]%
   {\getparameters[#1:#2][#3]}

etc etc

you can also check for \doifsssignmentelse{#2}{...}{...}
 At the beginning the main reason against it
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
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context