LaTeX 布局教程容易理解吗?

发布于 2024-08-30 08:07:49 字数 1160 浏览 2 评论 0原文

我想使用 LaTeX 布局页面并在预定义位置分发文本片段/块。

像这样的东西

+--------------------------------------------------------+
| +-------------+                                        |
| |bla  bla  bla|                                        |
| |bla bl ab lab|  +-------------+                       |
| |bla  bla  bla|  |bla  bla  bla|                       |    
| |bla bl ab lab|  |bla bl ab lab|                       |
| +-------------+  |bla  bla  bla|                       |
|                  |bla bl ab lab|                       |
|                  +-------------+          +----+       |
|                                           |more|       |
|    Ich und Du                             |text|       |
|    Müllers Kuh                            +----+       |
|                                                        |
+--------------------------------------------------------+

我的猜测是我应该使用小型页面或使用类似的框来解决这个问题

\begin{minipage}[b][2cm]{8cm}
    \mbox{more} \newline
    \mbox{text} \newline
\end{minipage}

是否有教程或您知道的“如何”页面,它向我展示了如何做到这一点 - 不是列出所有 LaTeX习语,我有一些这方面的书。但我的书更侧重于命令列表、科学出版和数学......

I want to layout a page using LaTeX and distribute text snippets/blocks in predefined locations.

Something like this

+--------------------------------------------------------+
| +-------------+                                        |
| |bla  bla  bla|                                        |
| |bla bl ab lab|  +-------------+                       |
| |bla  bla  bla|  |bla  bla  bla|                       |    
| |bla bl ab lab|  |bla bl ab lab|                       |
| +-------------+  |bla  bla  bla|                       |
|                  |bla bl ab lab|                       |
|                  +-------------+          +----+       |
|                                           |more|       |
|    Ich und Du                             |text|       |
|    Müllers Kuh                            +----+       |
|                                                        |
+--------------------------------------------------------+

My guess is that I should go about this using a minipage or using boxes like

\begin{minipage}[b][2cm]{8cm}
    \mbox{more} \newline
    \mbox{text} \newline
\end{minipage}

Is there a tutorial or a 'how to' page that you know, that shows me how to do this - not a list all LaTeX idioms, I have some books for that. But my books are more focused on command lists, scientific publishing and math ..

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

丶情人眼里出诗心の 2024-09-06 08:07:49

如果您想要相当“固定”的布局,那么我可能会查看 Tikz 并使用它提供的绝对定位。 Tikz 手册对此进行了一些详细介绍(在执行 texdoc pgf 后搜索“引用当前页面节点 – 绝对定位”)。一个简单的例子:

\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[remember picture,overlay] 
  \node [xshift=1cm,yshift=1cm] at (current page.south west)
  [text width=7cm,fill=red!20,rounded corners,above right]
  {
    This is an absolutely positioned text in the
    lower left corner. No shipout-hackery is used. 
  };
\end{tikzpicture}

\begin{tikzpicture}[remember picture,overlay] 
  \node [xshift=10cm,yshift=5cm] at (current page.south west)
  [text width=7cm,fill=green!20,rounded corners,above right]
  {
    A second box placed absolutely.
  };
\end{tikzpicture}
\end{document}

If you want rather "fixed" layouts, then I'd probably look at Tikz and use the absolute positioning it offers. The Tikz manual covers this in some detail (search for "Referencing the Current Page Node – Absolute Positioning" after doing texdoc pgf). A simple example:

\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[remember picture,overlay] 
  \node [xshift=1cm,yshift=1cm] at (current page.south west)
  [text width=7cm,fill=red!20,rounded corners,above right]
  {
    This is an absolutely positioned text in the
    lower left corner. No shipout-hackery is used. 
  };
\end{tikzpicture}

\begin{tikzpicture}[remember picture,overlay] 
  \node [xshift=10cm,yshift=5cm] at (current page.south west)
  [text width=7cm,fill=green!20,rounded corners,above right]
  {
    A second box placed absolutely.
  };
\end{tikzpicture}
\end{document}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文