ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Adjust font size to cell height in natural table
@ 2013-05-27 11:54 "H. Özoguz"
  0 siblings, 0 replies; only message in thread
From: "H. Özoguz" @ 2013-05-27 11:54 UTC (permalink / raw)
  To: ntg-context

Hello together,

I use this as a natural table

\def\esl[#1][#2][#3][#4][#5][#6][#7]{%
\page
\startframed[frame=off,width=fit,offset=overlay,align=middle,background=eslami]%
   \bTABLE[width=4.55cm,align={middle,lohi}]
     \bTR\bTD[height=2cm] ~\blank[-3.4mm]#1 \eTD\eTR
     \bTR\bTD[height=3cm] #2\\#3\\#4\\#5\\#6 \eTD\eTR
     \bTR\bTD[height=2.4cm] #7 \eTD\eTR
   \eTABLE
\stopframed}

Now it can happen, that the text of #7 is too long for the third cell, 
which is 4.55cm x 2.4cm. Is it possible to automatically adjust the fonz 
size (of this text in this sepcific cell only), s.t. it fits in the cell?

For testing:
%***********************************************************
\defineoverlay[eslami][{\externalfigure[eslamivorlage.pdf]}]
\def\esl[#1][#2][#3][#4][#5][#6][#7]{%
\page
\startframed[frame=off,width=fit,offset=overlay,align=middle]%
   \bTABLE[width=4.55cm,align={middle,lohi}]
     \bTR\bTD[height=2cm] ~\blank[-3.4mm]#1 \eTD\eTR
     \bTR\bTD[height=3cm] #2\\#3\\#4\\#5\\#6 \eTD\eTR
     \bTR\bTD[height=2.4cm] #7 \eTD\eTR
   \eTABLE
\stopframed}
\setuppagenumbering[location=]
\definepapersize[sheet][width=45.5mm,height=74mm]
\definepapersize[bigsheet][width=\dimexpr\paperwidth+2mm\relax,height=\dimexpr\paperheight+2mm\relax]
\setuplayout
   [location=middle,
    topspace=0mm,
    header=0mm,
    footer=0mm,
    bottomspace=0mm,
    width=middle,
    cutspace=0mm,
    backspace=0mm, %BCOR 5mm inkl.
    height=fit,
    grid=no]
\setuppapersize[sheet][bigsheet]
\setupbackgrounds[page][frame=off,frameoffset=0mm]
\starttext
\esl[Begriff][VB 1][VB 2][VB 3][VB 4][VB 5][Too small, too small, too 
small, too small, too small, too small, too small, too small. What to do?]
\stoptext
%***********************************************************

Thanks!
Huseyin

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-05-27 11:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-27 11:54 Adjust font size to cell height in natural table "H. Özoguz"

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