文字區塊提供灰色背景,我無法更改

文字區塊提供灰色背景,我無法更改

請有人建議我做錯了什麼?即使我嘗試更改文字區塊顏色,我仍然收到帶有灰色背景的文字方塊。我使用了一本流行書中的範例來嘗試解決這個問題,但我仍然在文字方塊周圍看到黑線和灰色背景,這在《學習 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.因此,我的結果比你的紫丁香上的白色更令人震驚,而且我的論文有點小。

相關內容