将文本精确放置在页面上

将文本精确放置在页面上

自从我开始使用 LaTeX 以来,最近两个月一直困扰我的一件事就是无法将文本准确地放置在页面上我想要的位置

欢迎就此提出建议

编辑:使用@Fran 的代码来解释textpos为什么文本重叠

为什么\cleardoublepage不把第二段代码输出放在一个单独的新页面上

     \documentclass{article}

     \usepackage[absolute]{textpos}
     \usepackage{lipsum}
     \begin{document}
     \setlength{\TPHorizModule}{30mm}
     \setlength{\TPVertModule}{\TPHorizModule}
     \textblockorigin{10mm}{10mm} % start everything near the top-left corner
     \setlength{\parindent}{0pt}
     \begin{textblock}{3}(0,0)
     This block is 3 modules wide,  and is placed with its top left corner
     at the ‘origin’ on the page. Note that the length of the block is not
     specified in the arguments -- the box will be as long as necessary to
     accomodate the text inside it. You need to examine the output of the
     text to adjust the positioning of the blocks on the page.
     \end{textblock}

     \begin{textblock}{2}(2,1)
     \textblocklabel{block two}
     Here is another, slightly narrower, block, at position (2,1) on the page.
     \end{textblock}

     \begin{textblock}{3}[0.5,0.5](2,3)
     This block is at position (2,3), but because the optional argument

     [0.5,0.5] has been given, it is the centre of the block which is
     located at that point, rather than the top-left corner.
     \end{textblock}
    \cleardoublepage
    ------------------------------------
    \setlength{\TPHorizModule}{1cm}
    \setlength{\TPVertModule}{\TPHorizModule}
    \textblockorigin{10mm}{10mm} 
    \setlength{\parindent}{0pt}

    \begin{textblock}{3}(0,0)\lipsum[1][1-3]\end{textblock}
    \begin{textblock}{3}(3.2,3)\lipsum[1][4-5]\end{textblock}
    \begin{textblock}{3}(5.6,4.7)\lipsum[1][6-9]\end{textblock}
    \begin{textblock}{6}(6.5,8.5)\lipsum[1][9-14]\end{textblock}
    \end{document}

在此处输入图片描述

好心提醒

答案1

姆韦

\documentclass{article}
\usepackage{lipsum}
\usepackage[absolute]{textpos}
\setlength{\TPHorizModule}{1cm}
\setlength{\TPVertModule}{\TPHorizModule}
\textblockorigin{10mm}{10mm} 
\setlength{\parindent}{0pt}
\begin{document}
\begin{textblock}{3}(0,0)\lipsum[1][1-3]\end{textblock}
\begin{textblock}{3}(3.2,3)\lipsum[1][4-5]\end{textblock}
\begin{textblock}{3}(5.6,4.7)\lipsum[1][6-9]\end{textblock}
\begin{textblock}{6}(6.5,8.5)\lipsum[1][9-14]\end{textblock}
\end{document}

相关内容