Textblock 给出灰色背景,我无法更改

Textblock 给出灰色背景,我无法更改

有人能告诉我我做错了什么吗?即使我尝试更改文本块颜色,文本框的背景仍然为灰色。我使用了一本流行书籍中的示例来尝试解决此问题,但文本框周围仍然有黑线,背景为灰色,而这在《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}

答案1

传递给环境的第一个参数textblock给出了块的水平宽度。您已请求0,因此块的宽度为零。因此,您有一个宽度为零的彩色块,从视觉上看,它与宽度稍大的非彩色块没有区别。

如果您编译的代码与问题中发布的代码类似,我怀疑您的块实际上是淡紫色而不是灰色。也就是说,您只看到您为页面设置的颜色。

更改值以设置非零宽度可以解决问题。

\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}

黄色上的青色

[我稍微缩小了您的示例,因为我无法按照发布的那样对其进行编译,而且一旦我对其进行编译,我不知道是什么原因造成的,因为我不熟悉textpos。因此,我的结果比您的白色淡紫色更加鲜艳,而且我的论文也小一些。]

相关内容