开发者

Easy to follow LaTeX tutorial on layout?

开发者 https://www.devze.com 2022-12-27 21:36 出处:网络
I want to layout a page using LaTeX and distribute text snippets/blocks in predefined locations. Something like this

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. B开发者_StackOverflow社区ut my books are more focused on command lists, scientific publishing and math ..


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

精彩评论

暂无评论...
验证码 换一张
取 消