ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: starters questions
@ 1998-08-03 10:36 W.H. Dekker
  0 siblings, 0 replies; 2+ messages in thread
From: W.H. Dekker @ 1998-08-03 10:36 UTC (permalink / raw)
  Cc: ntg-context

(with apologies for writing in dutch initially)

> Frans Goddijn wrote:
>  "HD> - Hoe krijg ik onder "Aantal pagina's" automatisch het juiste
>  "HD> getal?   Is er zoiets als \LastPage?
> 	  
> Did you read this in earlier messages:
> 	  
> > how can I print the number of pages a document has?
> 	  
> \totaalaantalpaginas 
> 	  
> the internal quantity is: \lastpage and you can bet that there is also

\lastpage worked fine,

> \firstpage, \prevpage, \lastpage, \nofsubpages \nextsubpage,
> \prevsubpage etc. 
> 	  
> There are also \realpageno (counts all pages) \userpageno (only the ones
> with a pagenumber) etc etc etc. 
> 	  
> So, in dutch \totaalaantalpaginas
> 	  
> (English: \totalnumberofpages )

but this one is unknown...

>  "HD> - de eerste regel (Kwaliteitsdienst)
>  "HD>   begint 60mm onder de bovenrand van het papier; hoe maak ik daar
>  "HD> 20mm   van? Ik dacht het met die voffset te doen, maar die doet
>  "HD> niets. 
>   
> I managed to narrow it down to 22 millimeters!
>   
> Play around with this in your opening lines of the .TEX code (I took yours
> and changed them:)
>   
> \setuppagenumbering[style=oldstyle]
> \language[nl]
> \starttext\setupbodyfont[sansserif,11pt]
>   
> % I added these lines:
> \setuppapersize[A4]
> \setuplayout[topspace=0cm,
> 	       header=0cm]

Well, that works, but also changes the layout for subsequent pages...

>  "HD> - het onderste blokje wil ik tegen de onderkant en gecentreerd,
>  "HD> maar   \vfill werkt niet, en van de twee \hfill's eromheen werkt
>  "HD> alleen de   eerste.
>      
> I didn't yet manage to get the text any lower on the page, but I did get
> it centered for you with one simple command instead of the two \hfill's
> that didn't work: \midaligned

> %\vfill              % you had this, which this didn't work
> \blank[force,9*big]  % this one works. "force" mandatory here

Indeed, although: force does'nt make any difference, and if you
increase the 9 the block keeps moving down. At 25 it is very low, with
35 only the top half of the first line remains visible. So this is'nt
quite the same as \vfill.

>  "HD> - datzelfde blokje heb ik een kleinere letter gegeven met \tfx,
>  "HD> maar   het moet nog kleiner. Hoe?
>      
> I tried three different ways that all worked. The third way worked best
> though.
>      
>  "HD> - de letters zijn dus wel kleiner, maar de regelafstand is daar
>  "HD> niet   aan angepast. Klopt dat? Hoe krijg ik die goed?
>      
> The first  one, \kleinerfont worked but not on the baselinsskip issue, the
> others did.
>      
> [...]
>    
> \font\kleinerfont=cmss9 at 6pt  % can be missed if not used later on
>     \midaligned{\framed[width=95mm,height=12mm,align=normal]{%
> %      \kleinerfont % works nicely 
> %      \switchtobodyfont[small]% also works, better baselineskip
> 	\switchtobodyfont[6pt]%
> 	Niets uit deze uitgave mag worden vermenigvuldigd en/of openbaar
> gemaakt
> 	door middel van druk, fotokopie, microfilm of op welke wijze dan
> ook,
> 	zonder voorafgaande toestemming van KDLL\par
>     }}
>   }

just \switchtobodyfont[6pt] worked fine

> If the baselinsskip looks odd, try \par. I had a problem like that once,
> and Herman Haverkort explained to me how TeX handles that (see page 217 of
> MAPS20) 

OK, that helped. I think Context should do that automatically at the
end of \framed and such.

> I hope this helps, as it would be the first message that I post to this
> list with answers instead of questions! ;=}

Well, you solved several problems. So you can stay our context guru
for a while!

-- 
Kind regards,
Wybo
===================Servalys Analytical Chemistry Services=================
Wybo H. Dekker        | Deilsedijk 60                 | tel (31)345-652164
wybo@servaly.hobby.nl | 4158 CH Deil, The Netherlands | fax (31)345-652383


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: starters questions
@ 1998-08-03 12:08 Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 1998-08-03 12:08 UTC (permalink / raw)
  Cc: fg, ntg-context

W.H. Dekker wrote:

> but this one is unknown...

Indeed, I simply didn't add it yet to mult-com. Sorry, but \lastpage is
ok too. 

> > \setuplayout[topspace=0cm,
> >              header=0cm]

See earlier mail. 

> OK, that helped. I think Context should do that automatically at the
> end of \framed and such.

This is more complicated, because someinternal quantities are derived
from the current font settings. The \framed macros are pretty versatile
and at the same time pretty complicated. They add struts and so without
spoilin things etc etc. 

It can be very instructive to debug saying e.g. \toonstruts
(\showstruts).  

{\switchtobodyfont[small]\framed....} does work ok. Changing the
baselines *inside the framed* otherwise can give rather annoying (but
quite logical) incompatibilities between side by side frames. Just like
\hskip 1em is different for bold face, slanted or normal face. 

I'll explain this some day in detail in an article. 

Hans

-----------------------------------------------------------------
                                              Hans Hagen | PRAGMA
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | fax: 038 477 53 74 | mail: pragma@wxs.nl
-----------------------------------------------------------------


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1998-08-03 12:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-08-03 10:36 starters questions W.H. Dekker
1998-08-03 12:08 Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).