Re: [NTG-context] MikTeX 2.4 and Fonts

2004-08-10 Thread Hans Hagen
Mari Voipio wrote:
On Sat, 7 Aug 2004, Dieter Jakob wrote:
 

Can you help me to get the Adobe Fonts for PDF up and running?
   

Having recently fought with the same issue (i.e. \setupbodyfont[pos]) with
my recent installation of TeXLive, I found one answer in the user settings
- this might be what you are looking for (don't understand enough of fonts
to say for sure).
The TeXLive cont-sys.rme/cont-sys.tex settings file says:
% If you run into missing font metrics kind of problems,
% you may want to uncomment:
% \usetypescript[adobekb] [\defaultencoding]
Well, I don't expect my users to understand about changing the
cont-sys.rme/cont-sys.tex file, so the settings need to be in the
file/environment and thus I  put this on top of my file instead (I
use ec encoding, seems to work best with Windows):
\usetypescript[adobekb][ec]
\usetypescript[pos] % maybe I don't need this line any more???
\setupbodyfont[pos,10pt]
And it works like a charm, at least with my files. All complaints stopped
at once, which made me *very* happy. Looks like I can soon provide my
dummy users with something easily installable that doesn't need any
tweaking...
 

\setupbodyfont[pos] is the old method and in that case the \usetypescript[pos] is not 
needed
the more modern way is: 

\usetypescript[postscript][ec]
\setupbodyfont[postscript,10pt] 

that way you can mix typefaces, e.g. 

\usetypescript[palatino][ec]
\setupbodyfont[palatino,10pt] 

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
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Re: Is there a bug during pagination of external figures?

2004-08-10 Thread Hans Hagen
Stefan Wachter wrote:
Could you make a minimal example that fails?
\starttext \externalfigure[x_x.png] \stoptext
works ok here, so there must be something else interfering
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
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] baseline alignment

2004-08-10 Thread Hans Hagen
Vit Zyka wrote:
Hallo,
for text positioning in a layer I needed alignment to baseline. I do 
not known if I missed something but I did not find it in the current 
ConTeXt. So I did that. Baseline is choosen by capital 'B' in the 
position parameter. ('B' is adopted from grahicx LaTeX/plain package.)

Also I add \ctop, \ltop, and \rtop in sence of \cbox, \lbox, and rbox, 
respectively.

I suggest to add the macros to core-box and supp-box.
Vit Zyka
% baseline alignment
\setvalue{\??ab\??ab  B}{\baselinebox}
\setvalue{\??ab\??ab  Bl}{\baselineleftbox}
\setvalue{\??ab\??ab  Bc}{\baselinecenterbox}
\setvalue{\??ab\??ab  Br}{\baselinerightbox}
\setvalue{\??ab\??ab  lB}{\leftbaselinebox}
\setvalue{\??ab\??ab  cB}{\centerbaselinebox}
\setvalue{\??ab\??ab  rB}{\rightbaselinebox}
\def\baselinecenterbox#1%
  {\normalhbox
 {\setbox0\placedbox{#1}%
  \global\boxhdisplacement-.5\wd0
  \global\advance\boxhdisplacement-\boxoffset
  \global\boxvdisplacement-\boxoffset
  \boxcursor\hskip\boxhdisplacement\raise-\boxvdisplacement\box0}}
\def\baselineleftbox#1%
  {\normalhbox
 {\setbox0\placedbox{#1}%
  \global\boxhdisplacement-\wd0
  \global\advance\boxhdisplacement-\boxoffset
  \global\boxvdisplacement-\boxoffset
  \boxcursor\hskip\boxhdisplacement\raise-\boxvdisplacement\box0}}
\def\baselinerightbox#1%
  {\normalhbox
 {\setbox0\placedbox{#1}%
  \global\boxhdisplacement\boxoffset
  \global\boxvdisplacement-\boxoffset
  \boxcursor\hskip\boxhdisplacement\raise-\boxvdisplacement\box0}}
\let\baselinebox=\baselinecenterbox
\let\leftbaselinebox=\baselineleftbox
\let\rightbaselinebox=\baselinerightbox
hm, in that case we probably need a few more -)
See example below, there is already a grid option; also, keep an eye on 
topskip (we may need s sl sc sr but who can remember that)

I dislike the capital B but the g  is available (g from gridline)
\unprotect
% \v!grid is taken
\setvalue{\??ab\??ab  m}{\middlebox}
\setvalue{\??ab\??ab  g}{\baselinemiddlebox}
\setvalue{\??ab\??ab gl}{\baselineleftbox}
\setvalue{\??ab\??ab gc}{\baselinemiddlebox}
\setvalue{\??ab\??ab gr}{\baselinerightbox}
\setvalue{\??ab\??ab \v!regel }{\baselinemiddlebox} % \v!grid is 
taken
\setvalue{\??ab\??ab \v!regel\v!links }{\baselineleftbox}
\setvalue{\??ab\??ab \v!regel\v!midden}{\baselinemiddlebox}
\setvalue{\??ab\??ab \v!regel\v!rechts}{\baselinerightbox}

\def\baselinemiddlebox#1%
 {\normalhbox
{\setbox0\placedbox{#1}%
 \global\boxhdisplacement-.5\wd0
 \global\advance\boxhdisplacement-\boxoffset
 \global\boxvdisplacement-\boxoffset
 \boxcursor\hskip\boxhdisplacement\raise-\boxvdisplacement\box0}}
\def\baselineleftbox#1%
 {\normalhbox
{\setbox0\placedbox{#1}%
 \global\boxhdisplacement-\wd0
 \global\advance\boxhdisplacement-\boxoffset
 \global\boxvdisplacement-\boxoffset
 \boxcursor\hskip\boxhdisplacement\raise-\boxvdisplacement\box0}}
\def\baselinerightbox#1%
 {\normalhbox
{\setbox0\placedbox{#1}%
 \global\boxhdisplacement\boxoffset
 \global\boxvdisplacement-\boxoffset
 \boxcursor\hskip\boxhdisplacement\raise-\boxvdisplacement\box0}}
\protect
\definelayer[text] \setupbackgrounds[text][background=text]
\setuplayer[text][width=\textwidth,height=\textheight]
\showgrid
\starttext
\setlayer
 [text]
 [location=grid,line=13]
 {\vtop{\strut \input ward \endstrut}}
\setlayer
 [text]
 [corner={right,top},
  voffset=\topskip, % \topskipgap,
  location=gl]
 {\vtop{\begstrut \input ward \endstrut}}
x
\stoptext
i can add that to the kernel if tested
%-- \ltop, \rtop, \ctop
\def\lrctop#1#2#%
  {\vtop#2\bgroup
   \let\\=\endgraf
   \forgetall#1\let\next=}
\def\ltop{\lrctop\raggedleft}
\def\rtop{\lrctop\raggedright}
\def\ctop{\lrctop\raggedcenter}
ok, i've patched/added:
\def\lbox{\makelrcbox\normalvbox\raggedleft}
\def\cbox{\makelrcbox\normalvbox\raggedcenter}
\def\rbox{\makelrcbox\normalvbox\raggedright}
\def\ltop{\makelrcbox\normalvtop\raggedleft}
\def\ctop{\makelrcbox\normalvtop\raggedcenter}
\def\rtop{\makelrcbox\normalvtop\raggedright}
\def\makelrcbox#1#2#3#%
 {#1#3\bgroup \forgetall \let\\=\endgraf #2\let\next=}

-
 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
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] patterns

2004-08-10 Thread Hans Hagen
Vit Zyka wrote:
Hans Hagen Outside wrote:
So, what i need is for each language a couple of words that hyphenate 
in unique ways (i.e. they must hyphenate differently than related 
languages)

\language[xx] \hyphenatedword{..}

Sorry, Hans, I do not understand properly. You want the words
1) that are the same in some languages, but with different hyphenation
indeed, words that are hyphenated correctly, so that they cna be used to
verify tex live, so in your case some ten words that you'd like to see
hyphenated ok in czech
Karl Berry  is setting up a sort of test bed so that changes in patterns
and filenames of pattern files will not go unnoticed; so what we need is
a sort of reference hyphenation.
(the reason is that the last couple of tex lives we've been surprised
afterwards by changes in names and content of 'generic' pattern files)
(maybe this is something to add to the wiki)
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
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] updates

2004-08-10 Thread Hans Hagen
Hi,
Later this week i will post an update. Among the things to keep an eye 
on are:

- if you use the new (web2c) beta binaries be aware of the suffixes of 
formats now all being 'fmt'; conforming to the new tds structure, this 
should go in sync with a so called $engine subpath under webc, but this 
wil lnot be supported by tetex (i'm not sure about texlive); this can be 
rather annoying when you use pdfetex as well as aleph; in that case you 
may want to try

 texexec --make --alone --all --engine
(i always use --all to get all patterns in the format)
- with new binaries you should also be aware of changes in enc and map 
paths; texfont is already adapted to that and textools can be used to 
adapt your trees

- however, the main reason for writing this mail is that i recently 
found out that there has been a change in the us hyphenation files; on 
your system this may be obscured by the fact that sometimes there is an 
alias file somewhere in the tree mapping old names on new names [fyi: i 
finally found out that this alias file is also the reason why sometimes 
fonts like dingbats get messed up]. I have adapted context to look for 
new and old files; unfortunately important changes like this are not 
announced and just happen (i wonder how many us-english users are aware 
of this change); i have been bitten by this (unannounced changes in 
filenames, and i cross my fingers that the content is the same) too 
often now; when it happens again, i'll start distributing patterns as in 
the first versions of context (lang-*.pat/hyp files)

- 8 bit in/output: it looks like tex live will not be 8 bit (the last 
version was 8 bit except chars32, the previous version was 8 bit) and 
the next version will be yet another mix; since i want context to be 8 
in/8 out the formats will be built with the natural.tcx vector (in a few 
years, when i can be sure that suers are in sync, i will use the -8bit 
switch). I will not bore you with teh arguments that are used to let tex 
not be 8 but by default, but it has to do with unix and terminal output 
and locales and such. (interestingly this is no real problem for context 
since the control characters (32) are mostly used for file io, 
verbatim, pdf, metapost, javascript, xml etc).  

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
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \setupdescription

2004-08-10 Thread Hans Hagen
Peter Münster wrote:
Hello,
how could I define a list, that looks like this:
titel 1   text text text text text text text text text text text text text
 text text text text text text text text text text text text text
 text text text text text text text text text text text
long titel 2   text text text text text text text text text text text text
 text text text text text text text text text text text text text
 text text text text text text text text text text text
I tried with parameters distance and width of \setupdescription, but no
success.
TIA for any hint, Peter
 

\starttext
\definedescription[one]  [location=top,width=3cm]
\definedescription[two]  [location=left,hang=broad,width=2.5cm]
\definedescription[three][location=hanging,width=broad,margin=2em]
\one   {titel 1}  \input ward \par
\two   {long titel 2} \input ward \par
\three {long titel 2} \input ward \par
\stoptext
even i have to look it  up -)
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
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \type-|- within tabulate?

2004-08-10 Thread Hans Hagen
Marko Schütz wrote:
Using \type-|- in a \starttabulate ... \stoptabulate environment I
get:
 

use \type {|} instead; seems to work 

(no time not to look into this phenomena now) 

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
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] The last line

2004-08-10 Thread Taco Hoekwater
On Mon, 9 Aug 2004 16:23:12 +0200, Steffen wrote:

 Hi,
 
 
  xx x 
 xx xxx xxx xx-
 xxx.
 
 
 Is there a way to make a kind of global definition for this for the entire document?

There are a few TeX primitive commands that govern the final line of a paragraph:

\finalhyphendemerits=\maxdimen % disables hyphenation of final line
\parfillskip= 0pt plus .8\hsize % disallow final lines shorter than 20% of 
\hsize

ConTeXT might alter the values of these primitives occasionally (unlikely but I am not 
certain) so maybe you have to repeat these settings a few times.

-- 
groeten,

Taco
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Input path with spaces

2004-08-10 Thread Hans Hagen
Giuseppe Bilotta wrote:
Hello,
I just found out that I cannot compile ConTeXt documents using
TeXexec 4.3 when the input path of the original document
contains spaces, at least on MiKTeX 2.4 with pdf-e-TeX
1.20a-rc4.
 

Ah ... trying to find the boundaries of what is possible ... i instantly get a headache when i think about those s p a c y filenames. 

How about: 

 texexec --runpath=aleph test dir torturetest --pdf
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
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] howto overlayers on section head

2004-08-10 Thread Eros Albertazzi
I would like to start to experiment some metafun decoration 
around(over) section head and/or page number.
Something similar, just for example but I do not want to copy the style,
to the one used to produce the metafun manual.

From the (small scale) drawing primitives to the (large scale)
\setuphead I miss an howto that combine the two
(specifically I was thinking at a (non-existent) background keyword in 
\setup to pass an overlay...but likely I am far off)

I don't want to be lazy, maybe it is already written in the manuals, but
I still miss a certain kick so to say...
Regards.
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \setupdescription

2004-08-10 Thread Peter Mnster
On Mon, 9 Aug 2004, Hans Hagen wrote:

 Peter Münster wrote:
 
 Hello,
 how could I define a list, that looks like this:
 
 titel 1   text text text text text text text text text text text text text
   text text text text text text text text text text text text text
   text text text text text text text text text text text
 
 long titel 2   text text text text text text text text text text text text
   text text text text text text text text text text text text text
   text text text text text text text text text text text

 \definedescription[three][location=hanging,width=broad,margin=2em]
 
 \three {long titel 2} \input ward \par

Thank you Hans, \three is quite near what I'm looking for.
But with \three {short} ... \par the text begins too much at the left.
Consider the long title 2 as an exception. The more general label will
look like title 1. Here is a little better example to show what I want:

A text text text text text text text text text text text text text
  text text text text text text text text text text text text text
  text text text text text text text text text text text

BBB   text text text text text text text text text text text text text
  text text text text text text text text text text text text text
  text text text text text text text text text text text

CCtext text text text text text text text text text text text text
  text text text text text text text text text text text text text
  text text text text text text text text text text text

long titel 2   text text text text text text text text text text text text
  text text text text text text text text text text text text text
  text text text text text text text text text text text

I used to do this in LaTeX with mdwlist.sty, see also
http://contextgarden.net/Description

Greetings, Peter

-- 
http://pmrb.free.fr/contact/
_
FilmSearch engine: http://f-s.sf.net/
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] High level user macro (howto?)

2004-08-10 Thread Peter Mnster
On Mon, 28 Jun 2004, Taco Hoekwater wrote:

 The 'key' to the keyval functionality in ConTeXt are two macros called
 \getparameters and \processaction.
 
 Here is a 'quickstart', assuming you want to define \myzigzag:
 
 [...]

Hello Taco,
thank you for your 'quickstart'!
I've just tried to apply \getparameters to the \Changes macro on the Wiki
(http://contextgarden.net/Changes). But there is a problem and any help
would be nice.

Here is the new macro:

\def\Changes#1[#2]{%
  \getparameters[CH][#2]% Auteur, Modif, Labels, Date
  \ifnum\RevC=0 \BigTitle \vskip0.5ex \Vfil \startChanges \fi
  \global\advance\RevC by 1 \VL \the\RevC \VL \CHDate \VL \CHModif \VL
  XXX%\In[\CHLabels,\relax] % does not work, but not so important for now
  \VL \CHAuteur \VL\AR\HL}

And later on, the usage of the macro:

\Changes[Date=1/2/2004,Modif=First version,Auteur=Peter]
\Changes[Date=3/4/2004,Modif=Some modifications,Lables={sec:S1,sec:S2},
  Auteur=Peter Münster]
\Changes[Date=5/6/2004,Modif=Some other modifications,Lables={sec:S2},
  Auteur=Peter]

The problem:
the parameter values are not updated in the two last calls of the macro.

Regards, Peter

-- 
http://pmrb.free.fr/contact/
_
FilmSearch engine: http://f-s.sf.net/
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] High level user macro (howto?)

2004-08-10 Thread Peter Mnster
Pardon, I forgot the whole tex-file:

\useregime[il1]
\enableregime[il1]
\useencoding[ffr]
\definehspace[fr][:][.16667em]
\definehspace[fr][;][.16667em]
\definehspace[fr][!][.16667em]
\definehspace[fr][?][.16667em]
\mainlanguage[fr]
\newdimen\BigWidth \BigWidth=18cm
\setupscreens[screen=0.85]
\setupcolors[state=start]
\setupheadertexts[Rév.: \the\RevC]
\def\Vfil{\vskip0pt plus3fil\relax}
\def\In[#1,#2]{\ifx#1\empty\else\in[#1]\fi\if\relax#2\else, \In[#2]\fi}
\def\BigTitle{\centerline{\framed[width=\BigWidth,offset=2mm,
  background=screen]{\bfb\setupinterlinespace\cbox{Title

\def\startChanges{\hbox to \hsize\bgroup\hss\SetTableToWidth{\BigWidth}%
  \starttable[s1 | c | c | p(95mm) | p(17mm) | p(37mm) |]
  \HL\BL[5]\AR\VL Rév.\VL Date\VL Origine de la mise à jour\VL§ modifié\VL
  Auteur\VL\AR\HL}
\def\stopChanges{\stoptable\hss\egroup}\newcount\RevC
\def\Changes#1[#2]{%
  \getparameters[CH][#2]% Auteur, Modif, Labels, Date
  \ifnum\RevC=0 \BigTitle \vskip0.5ex \Vfil \startChanges \fi
  \global\advance\RevC by 1 \VL \the\RevC \VL \CHDate \VL \CHModif \VL
  XXX%\In[\CHLabels,\relax] % does not work, but not so important for now
  \VL \CHAuteur \VL\AR\HL}
\def\Destinataires#1{\stopChanges\Vfil
  \def\temp{#1}\ifx\temp\empty\else\noindenting Destinataires:\crlf#1\blank\fi
\centerline{\SetTableToWidth{\BigWidth}%
\bf\starttable[| c | c | c |]
\HL\BL[3]\AR\VL Approbateur\VL Date\VL Visa\VL\AR\HL
\VL\vbox to 2cm{}\VL\VL\VL\AR\HL
\stoptable}\par\page\completecontent}

\starttext
\Changes[Date=1/2/2004,Modif=First version,Auteur=Peter]
\Changes[Date=3/4/2004,Modif=Some modifications,Lables={sec:S1,sec:S2},
  Auteur=Peter Münster]
\Changes[Date=5/6/2004,Modif=Some other modifications,Lables={sec:S2},
  Auteur=Peter]
%
\Destinataires{Peter, Olivier}

\section[sec:S1]{A section}
some text
\subsection{Bla}
\subsection{Bla}

\section[sec:S2]{Another section}
some text
\stoptext

Cheers, Peter

-- 
http://pmrb.free.fr/contact/
_
FilmSearch engine: http://f-s.sf.net/
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] High level user macro (howto?)

2004-08-10 Thread Peter Mnster
On Tue, 10 Aug 2004, Vit Zyka wrote:

\getparameters[CH][#2]% Auteur, Modif, Labels, Date
 
 Try \getgparameters

Thanks!!  What an easy fix, just ONE letter :-)
Peter

-- 
http://pmrb.free.fr/contact/
_
FilmSearch engine: http://f-s.sf.net/
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] The last line

2004-08-10 Thread Steffen Wolfrum
Hans Hagen [EMAIL PROTECTED] wrote:

...

 (slowly a lot of internals will be defined this way, along with some fundamental 
 redefinitions of other internals, consider it a kind of ConTeXt4 feature-)   
 
 Hans 


Maybe something like 

\placefigure{top,left} 

or 

\placefigure{bottom,outer}

could be another ConTeXt4 feature? -)


Steffen

(how still is waiting for a reliable way of placing many figures in large documents)
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] The last line

2004-08-10 Thread Hans Hagen
Steffen Wolfrum wrote:
\placefigure{top,left} 

or 

\placefigure{bottom,outer}
could be another ConTeXt4 feature? -)
Steffen
(how still is waiting for a reliable way of placing many figures in large documents)
 

hm, graphic placement is and will always be tricky 

btw, \placefigure[outer]{}{} does work (see details.pdf)
as long as top/left i snot something with text aroun dit, it's doable -) 

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
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Some problems with framing typed text.

2004-08-10 Thread Brooks Moses
In the document I'm working on, I'd like to put some typed code bits in 
frames, to get an appearance sort of like the code excerpts on the 
ConTeXtWiki.  However, I've found myself needing to do a couple of rather 
ugly hacks to get that to work right, and I'm hoping for some suggestions 
on how to avoid that.

Here's what I have so far:
\def\typebufferframed[#1]{%
  \vskip\parskip
  \framed[background=color,
   backgroundcolor=gray,
   frame=on,
   strut=yes,
   offset=2mm,
   width=broad,
   framecolor=black,
   align=right]%
   {\vskip -11mm\typebuffer[#1]\vskip -5mm}}
\starttext
Plain text before the code.
\startbuffer[ex1]
This is an example.
\stopbuffer
\typebufferframed[ex1]
Plain text after the code.
\stoptext
The hacks that I'd like to get rid of:
It would be nice not to have to put the code in a buffer before typing it, 
since in general I only use these once.  However, if I put \starttyping and 
\stoptyping inside a framed command (even if I don't encapsulate it in 
another function) it breaks, and putting \startframedtext in the before= 
command and \stopframedtext in the after= command of \setuptyping also 
doesn't work.

The spacing, when I do things the way that I'm doing them, is all 
wrong.  The \vskip\parskip at the top is reasonably ok (although a bit 
annoying), but I'd really like to figure out how to get rid of the large 
negative \vskip's inside the frame.

Thanks!
- Brooks
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Blank figure hack: is there a better way?

2004-08-10 Thread Brooks Moses
I'm doing a document which has a large logo in the upper right corner of 
the page.  The logo (which is on a background layer) intrudes into the text 
area by a small amount, and so it would be nice to have the text wrap 
around it rather than having to do the wrapping by manual spacers and 
line-breaks.

The obvious solution that I came up with for this is to put a blank 
right-aligned float at the top of each page (it's a presentation where all 
the page breaks are hand-coded, so that's easy to do), of about the size of 
the part of the logo that intrudes into the text.  I defined a class of 
floats just for this:

  \definefloat[logospacer][logospacer]
(Using the same name for the singular and plural was a hack to get around 
the fact that the manual doesn't indicate which of the two the \setupfloat 
command uses.  Which is it?)

So far, so good.  Except that it's exceptionally hard to _get_ a blank 
float in ConTeXt, particularly one of a specified size.

If I do this (and specify the size in a \setupfloat command):
  \placelogospacer[right, force]{none}{}
I get a nice float exactly the size I want, but with a frame around it and 
the word undefined in the middle.

If I put something in the float -- say, a letter, or a non-breaking space:
  \placelogospacer[right, force]{none}{~}
The float suddenly becomes \textwidth wide, which is of course all wrong, 
but at least I have a blank float that's not undefined.

If I put an \hbox in the float, with a fixed width, it stops stretching to 
fill the pagewidth, but unless I put something that actually makes a mark 
on the page, it still comes up with undefined.  (The ~ that worked 
earlier doesn't work if it's in an \hbox.)  I tried a number of tricks -- 
hiding the nothing in a macro, using a zero-height rule, and so forth -- 
and ConTeXt was sufficiently clever to see through them all.

There's also the annoyance that I have to specify the size of the float by 
the size of the \hbox, rather than in a convenient [width=...,height=...] 
fashion.

Eventually, what I came up with was putting the mark somewhere off the 
page, with the following command:

  \placelogospacer[right, force]{none}{\hbox to 1cm{\hskip 5cm x}}
This of course gives overfull \hbox errors, and is a really ugly hack, 
but the results are acceptable -- a float of size 1cm by 1 x-height, which 
doesn't put marks on the physical page.

How can I do this better?  Better yet, how can I do this properly?
Thanks,
- Brooks

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Some problems with framing typed text.

2004-08-10 Thread Henning Hraban Ramm
Am 10.08.2004 um 19:30 schrieb Brooks Moses:
In the document I'm working on, I'd like to put some typed code bits 
in frames, to get an appearance sort of like the code excerpts on the 
ConTeXtWiki.  However, I've found myself needing to do a couple of 
rather ugly hacks to get that to work right, and I'm hoping for some 
suggestions on how to avoid that.
Did you try something like:
\setupbackground[background=screen, frame=on, color=blue]
\setuptyping[before=\startbackground, after=\stopbackground]
\starttyping
bla bla
\stoptyping
Grüßlis vom Hraban!
---
http://www.fiee.net/texnique/
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \CAP command does not work

2004-08-10 Thread Hans Hagen
Salman Khilji wrote:
Why don't I see capitals in the following example?
\setupbodyfont  [cmr,12pt]
\starttext
\startbuffer[test]
The quick brown fox jumps over the lazy dog.
\stopbuffer
\getbuffer[test]
\CAP{\getbuffer[test]}
\stoptext
 

in this case you should follow Hraban's suggestion. The problem is that teh uppercase function of tex will effectively make this \getbuffer[TEST] 

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
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] no graph after compilation

2004-08-10 Thread Floris van Manen
i'm working through the metafun manual.
i noticed at some point that changes to the source do not appear in
the pdf output. sometimes after another texexec round, sometimes not
at all until i do something different in the tex file...
how come (or how to work around :-)

thanks!
//f

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Disappearing headers -- belated followup

2004-08-10 Thread Matt Gushee
On Tue, Aug 10, 2004 at 09:03:20PM +0200, Hans Hagen wrote:

 i need a small doc with dummy text to see the effect -)
 
 \setupheader[state=empty]
  
 
 those seems redundant to me (since you set up the chapter head anyway)

Without that, headers were appearing on the first page of the chapter.
I expected there would be a global setup to suppress headers in such
places, but I couldn't find it. Did I miss something?

 your problem probably is that you expect the title marking to be 
 persistant while in reality it is coupled to the chapter mark;
 
 \decouplemarking[title]
 
 will decouple them

Aha! That seems to fix the problem. But could you explain (if the reason
is understandable to someone not very familiar with ConTeXt internals)?
If the chapter and title headings are coupled, that implies (doesn't
it?) that they will appear or not appear in pairs everywhere. Yet in my
document, the title stopped appearing on one page and failed to reappear
for the rest of the book, whereas the chapter headings continued.

I may not absolutely need to know this, but it will help me understand
ConTeXt a little better.

Thanks for the response.

-- 
Matt Gushee When a nation follows the Way,
Englewood, Colorado, USAHorses bear manure through
[EMAIL PROTECTED]   its fields;
http://www.havenrock.com/   When a nation ignores the Way,
Horses bear soldiers through
its streets.

--Lao Tzu (Peter Merel, trans.)
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \type-|- within tabulate?

2004-08-10 Thread Marko Schütz
From: Hans Hagen [EMAIL PROTECTED]
Subject: Re: [NTG-context] \type-|- within tabulate?
Date: Mon, 09 Aug 2004 21:49:45 +0200

 Marko Schütz wrote:
 
 Using \type-|- in a \starttabulate ... \stoptabulate environment I
 get:
   
 
 use \type {|} instead; seems to work 

it works, thanks. I could have sworn that is what I was trying to
start with and it didn't work then, but it does work now...

Thanks,

Marko


pgpUKlqLa0CvD.pgp
Description: PGP signature
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context