1

Target: I would like to have this I would like to use a table where each second row is colored slightly gray. but i also have a backgrund image on the page so just using \rowcolors with standart colors isnt working.

\documentclass{book}
\usepackage[table]{xcolor}
\usepackage{background}
\usepackage{eso-pic,graphicx}    

\backgroundsetup{
scale=1,
opacity=1,
angle=0,
color=black,
contents={%
 \ifodd\value{page}
   \AddToShipoutPictureBG*{\includegraphics[width=\paperwidth]{Images/Backgrounds/HeXXenBG_Left_LQ}}
  \else
   \AddToShipoutPictureBG*{\includegraphics[width=\paperwidth]{Images/Backgrounds/HeXXenBG_Right_LQ}}
  \fi
    }
}

\begin{document}
\rowcolors{2}{black!40}{}
\begin{tabular}{l|l|l|l}
{\scshape Spalte 1}&{\scshape Spalte 2}&{\scshape Spalte 3}&{\scshape Spalte 4}\\\hline\hline
Beispiel 1 & Hier geht mehr rein. & A & Die Tabelle sollte sich an die Textspalten halten\\
Beispiel 2 & Genauso hier. & B & Das musst du manuell machen.leider\\
\end{tabular}
\end{document}

Current: this is what i got is there some possibility for activate multiply blend mode, for table background color? or some other workaround?

Edit: i am compiling with xelatex, so the duplicate is not working

  • 2
    Welcome to TeX.SE! Could you please provide us with the code that you have tried? (No one here is keen on punching in tables from scratch just to see that this table was not what you're looking for.) – user121799 Nov 19 '18 at 14:39
  • Looking for something like this?: tex.stackexchange.com/q/457202/28557 – nidhin Nov 19 '18 at 14:45
  • i am trying to develop an command or environment, which can be used more easily, than editing each row/cell manually – lukas ester Nov 19 '18 at 15:02
  • @lukasester Can you please make a minimal working example (MWE) that includes all necessary packages to compile your code? E.g. where is \backgroundsetup coming from? – user36296 Nov 19 '18 at 15:36
  • sorry, i updated the code to a working MWE (except for the Image) i do not know how to create a structured background image by code except for maybe tikz. The problem. I also included the condition to work with xelatex and even tested the "original of this duplicate" which does not work. not even without xelatex. because the other solution works with colorbox and not background. – lukas ester Nov 20 '18 at 9:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.