Please could someone suggest what I am doing wrong? I keep getting text boxes with a grey background, even when I try to change the text block colour. I used an example from a popular book to try to get this right but I still get black lines around text boxes and grey background which does not appear in the book Learning LaTeX.

\usepackage[absolute, overlay]{textpos}
\usepackage{amsfonts, amsmath}
\graphicspath{ {LiteratureReview/}}
\TPGrid[10mm, 10mm]{48}{24}
\title{\Huge  Online Monitoring Systems for the Stability Analysis}
\date{}\author{\LARGE CJ}

%\begin{tcolorbox}[height=0.85\textheight, width=\textheight, arc=0mm]


\caption{original dynamic response data for contingencies DS01 (top) and DS02}


  • Hi Chloe, there's no need to sign off your post with your name or anything, because as you can see your name appears at the bottom of your post automatically. Also, if you highlight your code when you've pasted it in and hit ctrl+k, or press the code sample button in the toolbar (the one like {}) you can get it to look all nice like I've done – Au101 Feb 12 '18 at 23:43
  • Welcome! Are you missing an \end{document}? – cfr Feb 13 '18 at 2:23

The first argument passed to the textblock environment gives the horizontal width of the block. You have requested 0, so the block has zero width. Hence, you have a colour block of zero width, which is visibly indistinguishable from a non-colour block of somewhat greater width.

I suspect your blocks are actually lilac rather than grey, if you've compiling code similar to that posted in the question. That is, you're just seeing the colour you've set for the page.

Changing the value to set a non-zero width solves the problem.

\title{Online Monitoring Systems for the Stability Analysis}



cyan on yellow

[I minimised your example somewhat because I couldn't compile it as posted and, once I got it compiling, I didn't know what was responsible as I'm not familiar with textpos. Hence, my result is rather more lurid than your white-on-lilac might be and my paper's a bit smaller.]

  • Thank you so much! That really does help. I found that my use of tcolorbox kept giving grey boxes and these disappeared when I used your code and deleted them. Thank you! – Chloe Feb 13 '18 at 20:46
  • @Chloe I'm glad it helped, but your code didn't give me grey boxes at all. I just got the lilac background. – cfr Feb 14 '18 at 0:59

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.