ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* setting lineheight in embedded xtables
@ 2015-10-19 10:48 Thomas A. Schmitz
  0 siblings, 0 replies; only message in thread
From: Thomas A. Schmitz @ 2015-10-19 10:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

I have a small problem with adjusting the height of embedded xtables. 
Here's my example (the colors are there just to see that all the setups 
are read and applied):

\startbuffer[test]
<text>
     <bilingual>
       <bilingualrow>
	<bilingualcell>
	  First line of text
	</bilingualcell>
	<bilingualcell ny="2">
	  This is the translation. It is slightly longer than the width of the 
paragraph.
	</bilingualcell>
       </bilingualrow>
       <bilingualrow>
	<bilingualcell>
	  Second line of text
	</bilingualcell>
       </bilingualrow>
     </bilingual>
     <bilingual>
       <bilingualrow>
	<bilingualcell>
	  third line of text
	</bilingualcell>
	<bilingualcell ny="3">
	  An even longer translation which should span three rows of the table.
	</bilingualcell>
       </bilingualrow>
       <bilingualrow>
	<bilingualcell>
	  fourth line of text
	</bilingualcell>
       </bilingualrow>
       <bilingualrow>
	<bilingualcell>
	  fifth line of text.
	</bilingualcell>
       </bilingualrow>
     </bilingual>
</text>
\stopbuffer

\startxmlsetups xml:somesetups
    \xmlsetsetup{#1}{text|bilingual|bilingualrow|bilingualcell}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:somesetups}

\startxmlsetups xml:text
    \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:bilingual
	\startembeddedxtable [Bilingual]
	  \xmlflush{#1}
	\stopembeddedxtable
\stopxmlsetups

\startxmlsetups xml:bilingualrow
   \startxrow 
[height=\the\baselineskip,background=color,backgroundcolor=gray]
		\xmlflush{#1}
	\stopxrow
\stopxmlsetups

\startxmlsetups xml:bilingualcell
	\startxcell [width=0.4\textwidth,align=normal,ny=\xmlattdef{#1}{ny}{1}]
		\xmlflush{#1}
	\stopxcell
\stopxmlsetups

\setupxtable [Bilingual]
	[option=stretch,
	 frame=on,
	align=normal,
	 columndistance=1em,
	 foregroundcolor=darkred]

\starttext
    \xmlprocessbuffer{main}{test}{}
\stoptext

Problem: while the fist table <bilingual></bilingual> follows the height 
assignment for table rows, in the second table, the lines are much 
higher. When I try to reproduces in a TeX file and apply the 
height=\the\baselineskip to every row individually, it works. What's 
going wrong here?

All best

Thomas
___________________________________________________________________________________
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:[~2015-10-19 10:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-19 10:48 setting lineheight in embedded xtables Thomas A. Schmitz

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