1

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.

\documentclass[a0]{a0poster}
\usepackage[absolute, overlay]{textpos}
\usepackage{amsfonts, amsmath}
\usepackage[demo]{graphicx}
\usepackage{color}
\usepackage{tcolorbox}
\graphicspath{ {LiteratureReview/}}
\TPGrid[10mm, 10mm]{48}{24}
\TPMargin{12.5mm}
\parindent=0pt
\definecolor{White}{cmyk}{0,0,0,0}
\definecolor{Lilac}{cmyk}{0.09,0.12,0,0}
\definecolor{Purple}{cmyk}{0.5,0.3,0,0}
\definecolor{Lemon}{cmyk}{0,0,0.1,0}
\begin{document}
\title{\Huge  Online Monitoring Systems for the Stability Analysis}
\date{}\author{\LARGE CJ}

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

\pagecolor{Lilac}

\begin{figure}
\includegraphics[height=150mm]{original_data}
\caption{original dynamic response data for contingencies DS01 (top) and DS02}
\label{original_data}
\end{figure}



\textblockcolour{White}
\begin{textblock}{0}(0,0)
%\begin{figure}
\includegraphics[height=50mm]{Mcrlogo}
%\end{figure}
%\begin{figure}
\includegraphics[height=50mm]{EPSRC}
%\end{figure}
\end{textblock}

\end{document}
  • 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
2

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.

\documentclass{article}
\usepackage[absolute,overlay]{textpos}
\usepackage{xcolor}
\parindent=0pt
\begin{document}
\title{Online Monitoring Systems for the Stability Analysis}
\date{}\author{CJ}
\maketitle

\pagecolor{yellow}

\textblockcolour{cyan}
\begin{textblock}{10}(0,0)
  abc
\end{textblock}
\end{document}

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.