[pstricks] Shaded boxes request for ideas

Herbert Voss Herbert.Voss at FU-Berlin.DE
Mon Mar 9 08:09:18 CET 2009

David Arnold schrieb:

> But is there a way we can make the cyan boxes expand to fit their  
> content? Here I've added an extra word and it follows outside the  
> cyan background area.
> \documentclass[12pt]{article}
> \usepackage{pstricks-add}
> \newpsstyle{bgCyan}{fillstyle=solid,fillcolor=cyan!10,linestyle=none}
> \def\pBox#1{\psframebox[style=bgCyan]{\makebox[1.4cm]{%
>    \tabular{@{}c@{}}#1\endtabular}}}


then every cell is as wide as its contents. You can get a specific
width with \makebox, e.g. \pBox{\makebox[1.4cm]{4}}


More information about the PSTricks mailing list