[XeTeX] Background colour for some (but not all) rows of an \halign (UNIV: XeTeX, not XeLaTeX)
John Was
johnoxuk at gmail.com
Wed Mar 3 16:23:57 CET 2021
Hello Philip
I don't know if the following would be classed as simple, but it puts a
grey background to the second line of the table, and if required frequently
the code could be wrapped up in a control sequence:
\input pstricks
\tabskip 0pt
\halign to \hsize{%
#\hfil \tabskip 0pt plus 1em&
#\hfil&
#\hfil&
#\hfil&
#\hfil\tabskip 0pt\cr
123& 456& 789& 101112&131415\cr
\newrgbcolor{jwgrey}{0.9 0.9 0.9}
\pspolygon[fillstyle=solid,fillcolor=jwgrey,linestyle=none]%
(0pt,-0.35\baselineskip)%
(\hsize,-0.35\baselineskip)%
(\hsize,0.75\baselineskip)%
(0pt,0.75\baselineskip)\cr
\noalign{\kern -\baselineskip}
123& 456& 789& 101112&131415\cr
123& 456& 789& 101112&131415\cr
123& 456& 789& 101112&131415\cr
123& 456& 789& 101112&131415\cr
123& 456& 789& 101112&131415\cr}\par
\vfill \eject \bye
Best wishes
John
<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.
www.avg.com
<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
On Wed, 3 Mar 2021 at 11:39, Philip Taylor <P.Taylor at hellenic-institute.uk>
wrote:
> May I ask if there is a simple way to apply a background colour to some
> (but not all) rows of an \halign. UNIV = plain XeTeX, not XeLaTeX.
> --
> Philip Taylor
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/xetex/attachments/20210303/b8a909b7/attachment.html>
More information about the XeTeX
mailing list.