vspace、hspace 在文字區塊中不起作用

vspace、hspace 在文字區塊中不起作用

我在textpos(texblock)中使用vspace、hspace,但不起作用。

請幫忙

預先感謝

我的最小編碼:

\documentclass[12pt]{article}
\usepackage[a4paper]{geometry}
\usepackage[poster]{tcolorbox}
\usepackage[absolute]{textpos}

\pagestyle{empty}
\begin{document}

\begin{textblock*}{5cm}(4.0cm,2.0cm) % 
\begin{center}
\small X
\vspace*{0.55cm}
\Huge Y
\vspace*{0.25cm} \hspace*{0.45cm}
\small Z
\end{center}
\end{textblock*}

\end{document}

在此輸入影像描述

答案1

問題在於,您基本上有一個段落,其中包含所有空格(這就是為什麼您會得到您所看到的結果。

如果您在\vspace命令中包含段落分隔符,那麼應該會更接近您的預期。

相關內容