Überarbeitungsverlauf[Zurück]
Klicke auf Einblenden/Ausblenden von Überarbeitungen 2

26 Nov '18, 17:15

Gel%C3%B6scht's gravatar image

Gelöscht
(ausgesetzt)

Hier ist eine Methode, die relativ aufwendig ist, aber beliebig komplizierte Hintergrundgraphiken erlaubt: setze in die Zelle eine tikzmarknode, die Du dann mit dem entsprechenden `path picture` hinterlegst. Falls Du nur eine Diagonale haben magst, gibt es vermutlich einfachere Möglichkeiten. Wenn Du Dich aber mit dem Gedanken spielst, kompliziertere Sachen einzubauen, dann könnte das möglicherweise interessant sein. (Du kannst in das `path picture` auch beliebige Graphiken einbinden, die werden dann entsprechend abgeschnitten. \documentclass[12pt, pointlessnumbers]{scrbook} \usepackage{tabularx} \usepackage{colortbl} \usepackage{tikz} \usetikzlibrary{tikzmark} \begin{document} \begin{tabular}{|p{0.15cm}p{0.7cm}|p{1.2cm}|m{0.1cm}|m{0.9cm}} \hline 1 & 2 & \cellcolor{green} \tikzmarknode{3}{\strut 3} & 4 \\ \hline \end{tabular} \begin{tikzpicture}[overlay,remember picture] \node[anchor=south west,inner xsep=\tabcolsep,inner ysep=3.5pt,text width=1.2cm, path picture={\fill[red!40] (path picture bounding box.north west) -- (path picture bounding box.north east) -- (path picture bounding box.south west); \fill[green] (path picture bounding box.south west) -- (path picture bounding box.south east) -- (path picture bounding box.north east);}] at ([xshift=-\tabcolsep]3.south west) {3}; \end{tikzpicture} \typeout{\the\tabcolsep} \end{document} [![alt text][1]][1] text][1]][2] Oder, wie von Ulrike Fischer vorgeschlagen, im Hintergrund. \documentclass[12pt, pointlessnumbers]{scrbook} \usepackage{tabularx} \usepackage{colortbl} \usepackage{eso-pic} \usepackage{tikz} \usetikzlibrary{tikzmark} \begin{document} \begin{tabular}{|p{0.15cm}p{0.7cm}|p{1.2cm}|m{0.1cm}|m{0.9cm}} \hline 1 & 2 & \tikzmarknode{3}{\strut \phantom{3}} & 4 \\ \hline \end{tabular} \AddToShipoutPictureBG*{% \begin{tikzpicture}[overlay,remember picture] \node[anchor=south west,inner xsep=\tabcolsep,inner ysep=3.5pt,text width=1.2cm, path picture={\fill[red!40] (path picture bounding box.north west) -- (path picture bounding box.north east) -- (path picture bounding box.south west); \fill[green] (path picture bounding box.south west) -- (path picture bounding box.south east) -- (path picture bounding box.north east);}] at ([xshift=-\tabcolsep]3.south west) {3}; \end{tikzpicture}} \end{document} [![alt text][3]][3] Ich denke, Du wirst auch noch konventionellere Antworten bekommen. [1]: https://texwelt.de/wissen/upfiles/Screen_Shot_2018-11-25_at_6.45.35_PM.pnghttps://texwelt.de/wissen/upfiles/Screen_Shot_2018-11-25_at_6.45.35_PM.png [2]: https://texwelt.de/wissen/upfiles/Screen_Shot_2018-11-25_at_6.45.35_PM.png [3]: https://texwelt.de/wissen/upfiles/Screen_Shot_2018-11-26_at_7.49.56_AM.png
Klicke auf Einblenden/Ausblenden von Überarbeitungen 1

26 Nov '18, 04:11

Gel%C3%B6scht's gravatar image

Gelöscht
(ausgesetzt)

Hier ist eine Methode, die relativ aufwendig ist, aber beliebig komplizierte Hintergrundgraphiken erlaubt: setze in die Zelle eine tikzmarknode, die Du dann mit dem entsprechenden `path picture` hinterlegst. Falls Du nur eine Diagonale haben magst, gibt es vermutlich einfachere Möglichkeiten. Wenn Du Dich aber mit dem Gedanken spielst, kompliziertere Sachen einzubauen, dann könnte das möglicherweise interessant sein. (Du kannst in das `path picture` auch beliebige Graphiken einbinden, die werden dann entsprechend abgeschnitten. \documentclass[12pt, pointlessnumbers]{scrbook} \usepackage{tabularx} \usepackage{colortbl} \usepackage{tikz} \usetikzlibrary{tikzmark} \begin{document} \begin{tabular}{|p{0.15cm}p{0.7cm}|p{1.2cm}|m{0.1cm}|m{0.9cm}} \hline 1 & 2 & \cellcolor{green} \tikzmarknode{3}{\strut 3} & 4 \\ \hline \end{tabular} \begin{tikzpicture}[overlay,remember picture] \node[anchor=south west,inner xsep=\tabcolsep,inner ysep=3.5pt,text width=1.2cm, path picture={\fill[red!40] (path picture bounding box.north west) -- (path picture bounding box.north east) -- (path picture bounding box.south west); \fill[green] (path picture bounding box.south west) -- (path picture bounding box.south east) -- (path picture bounding box.north east);}] at ([xshift=-\tabcolsep]3.south west) {3}; \end{tikzpicture} \typeout{\the\tabcolsep} \end{document} [![alt text][1]][1] Ich denke, Du wirst auch noch konventionellere Antworten bekommen. [1]: https://texwelt.de/wissen/upfiles/Screen_Shot_2018-11-25_at_6.45.35_PM.png

Willkommen, erstes Mal hier? Schau mal unter FAQ!

×