15

On a single page, is it possible to vertically position a poem in the Golden Ratio? Look at the sketch to know what I mean. Poem placed in Golden Ration

The vertical red line is dived by the Golden Ratio. The vertical centre of the poem’s bounding box should be a the point where the vertical red line is divided.

Could you please give a working LaTeX example? Beside the technical feasibility, is it a good idea to place poems in the Golden Ratio?

EDIT:

Poem placed in Golden Ration 2

Instead of using the centre of the poem, the poem’s bounding box could also be divided by the Golden Ratio.

2
  • It is feasible, for example using a TikZ node absolutely positioned. What do you think about using the golden ratio also for its horizontal position?
    – JLDiaz
    Jul 13, 2012 at 11:36
  • Horizontal positioning is done by optical centring (because poem lines have no equal length). The page in the example is from two sided book. Therefore, I think using the Golden Ration for horizontal positioning is not appropriate.
    – Ronny
    Jul 13, 2012 at 11:43

2 Answers 2

7

The following code shows the answer to your first question (before your edit):

\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetikzlibrary{calc,positioning}
\def\Poem#1#2#3#4{ % width, title, content, author
\begin{tikzpicture}[overlay, remember picture]
\node[text width=#1] (poem) 
    at ($(current page.south)!.61803399!(current page.north)$)
    {#3};
\node[below=of poem.south east, left] {\emph{#4}};
\node[above=of poem.north west, right] {\textbf{\textsf{{\Large#2}}}};
\end{tikzpicture}
\newpage
}

\def\ShowMarks{ % draws frame around page, and horizontal rule at golden ratio
\begin{tikzpicture}[overlay, remember picture,red]
\draw (current page.south west) rectangle (current page.north east);
\draw ($(current page.south west)!.61803399!(current page.north west)$) --
      ($(current page.south east)!.61803399!(current page.north east)$);
\end{tikzpicture}
}


\begin{document}
\ShowMarks{}%
\Poem{7cm}{Abendlied}{%
    Über allen Gipfeln\\
    Its Ruh,\\
    In allen Wipfeln\\
    Spürest du\\
    Kaum einen Hauch;\\
    Die Vögelein schweigen im Walde\\
    Warte nur, balde\\
    Ruhest Du auch.\\
}{Johan Wolfgang von Goethe}
\end{document}

Resulting in (you have to compile twice, it is the way absolute TikZ positioning works):

Output

UPDATE To answer the second question, a new anchor should be defined so that, instead of being in the center of the poem, it is in a "golden ratio" point inside it. This is tricky, but can be done. However, note that the width of the poem has to be specified beforehand, and if you specify a width which is not tight, all the golden-ratio calculations are pointless.

This is my solution (I included a blue shade to see the poem box, you can disable it removing the fill=blue!20 option):

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetikzlibrary{calc,positioning}
\makeatletter
\pgfdeclareshape{golden anchored}
{
  \inheritsavedanchors[from=rectangle] % this is nearly a rectangle 
  \inheritanchorborder[from=rectangle]
  \inheritanchor[from=rectangle]{center}
  \inheritanchor[from=rectangle]{north}
  \inheritanchor[from=rectangle]{north east}
  \inheritanchor[from=rectangle]{north west}
  \inheritanchor[from=rectangle]{south}
  \inheritanchor[from=rectangle]{south east}
  \inheritanchor[from=rectangle]{south west}
  \inheritanchor[from=rectangle]{west}
  \inheritanchor[from=rectangle]{east}
  \inheritbackgroundpath[from=rectangle]
  \savedanchor{\goldenpoint}{
    \pgf@y=1\ht\pgfnodeparttextbox
    \advance\pgf@y by 1\dp\pgfnodeparttextbox
    \pgf@y=.61803399\pgf@y
    \advance\pgf@y by -1\dp\pgfnodeparttextbox
    \pgf@x=.381966011\wd\pgfnodeparttextbox
  }
  \anchor{golden}{ \goldenpoint }
  \anchor{text}{\pgfpoint{0}{0}}
}
\makeatother

\def\Poem#1#2#3#4{ % width, title, content, author
\begin{tikzpicture}[overlay, remember picture]
\node[text width=#1, golden anchored, anchor=golden, fill=blue!20] (poem)
    at ($(current page.south)!.61803399!(current page.north)$)
    {#3};
\node[below=of poem.south east, left] {\emph{#4}};
\node[above=of poem.north west, right] {\textbf{\textsf{{\Large#2}}}};
\end{tikzpicture}
\newpage
}

\def\ShowMarks{ % draws frame around page, and horizontal rule at golden ratio
\begin{tikzpicture}[overlay, remember picture,red]
\draw (current page.south west) rectangle (current page.north east);
\draw ($(current page.south west)!.61803399!(current page.north west)$) --
      ($(current page.south east)!.61803399!(current page.north east)$);
\draw (current page.south) -- (current page.north);
\end{tikzpicture}
}
\begin{document}
\Poem{5.5cm}{Abendlied}{%
    Über allen Gipfeln\\
    Its Ruh,\\
    In allen Wipfeln\\
    Spürest du\\
    Kaum einen Hauch;\\
    Die Vögelein schweigen im Walde\\
    Warte nur, balde\\
    Ruhest Du auch.\\
\ShowMarks{}%
}{Johan Wolfgang von Goethe}
\end{document}

And the result (remember compiling twice):

Output

3
  • The second question is just a matter of working out the vertical height of the node and doing the maths to work out what the yshift should be, right?
    – Seamus
    Jul 13, 2012 at 12:23
  • Not so simple, see my edit. By the way, I don't like much the result.
    – JLDiaz
    Jul 13, 2012 at 19:42
  • @JLDiaz Tanks for your suggestions! I think we have to use the whole poem bounding box, not only the verses’ bounding box. Do you have another idea to position poems on single pages? Golden Ration should be more aesthetic than centring for example.
    – Ronny
    Jul 13, 2012 at 21:57
1

I found a solution that seems to be easier. Also have look at How to remove extra space between \vspace*{0em} and \section?

\documentclass{scrbook}

\KOMAoptions{fontsize=10pt, paper=14cm:21cm, DIV=calc, pagesize=auto, BCOR=5mm, twoside=true, titlepage=true}

\usepackage{lmodern}
\usepackage[utf8]{inputenc}
\usepackage{calc}
\usepackage{verse}
% shows frames of type area (good for debugging)
\usepackage{showframe}

\makeatletter
% change definition of \section; remove space before
\renewcommand{\section}{\@startsection{section}{1}{\z@}%
  {-0.01ex}%
  {2.3ex \@plus.2ex}%
  {\ifnum \scr@compatibility>\@nameuse{scr@[email protected]}\relax
    \setlength{\parfillskip}{\z@ plus 1fil}\fi
    \raggedsection\normalfont\sectfont\nobreak\size@section}%
}
\makeatother


\begin{document}

% create a sample poem
\newcommand{\testPoem}{%
\addtokomafont{section}{\centering}%
\addsec{Abendlied}%
\settowidth{\versewidth}{Kaum einen Hauch;}%
\begin{verse}[\versewidth]%
Über allen Gipfeln\\*
Ist Ruh,\\*
In allen Wipfeln\\*
Spürest du\\*
Kaum einen Hauch;\\*
Die Vögelein schweigen im Walde.\\*
Warte nur, balde\\*
Ruhest du auch.
\end{verse}%
\unskip\vspace{1em}\hfill\hbox{Johann Wolfgang von Goethe}\hspace*{1em}%
}

% get the hight of the poem
\newlength{\heightOfPoem}
\settoheight{\heightOfPoem}{\vbox{\testPoem}}

% calculate distance from type area with Golden Ratio
\newlength{\poemSpaceBefore}
\setlength{\poemSpaceBefore}{0.38196601\textheight{}-0.38196601\heightOfPoem{}-\topskip}

% create golden space
\vspace*{\poemSpaceBefore}

% output poem
\testPoem

\clearpage

Poem hight: \the\heightOfPoem{}, Space before Poem: \the\poemSpaceBefore{}

\end{document}

The result is like:

Poem position at Golden Ratio

4
  • 1
    An interesting question and solution, but I'm not convinced yet. What happens on a two page spread with two poems of very different line lengths and total number of lines? Flipping through such a book might feel like riding a roller coaster. Even on subtle differences, wouldn't the reader begin to suspect something is slightly 'off' and then try to (visually) measure how things are being positioned?
    – jon
    Jul 14, 2012 at 22:16
  • @jon Your are right. But how to do this else? Positioning a poem at the top of the type area causes large space after the poem. It’s not aesthetic, but causes no jumps while turning pages. Otherwise the Golden Ratio placement should be aesthetic, but lets the poems jump while turning pages. (Centring let poems also jump around if the reader turn pages.) Currently I have no idea how to solve this dilemma.
    – Ronny
    Jul 15, 2012 at 0:14
  • I'm not sure, either. Perhaps what would help your solution would be to include (somehow) a design/pattern that subtly indicates the typeblock. That way, maybe readers wouldn't feel the 'jumping' was out of place ... and the discerning would understand what you are doing..?
    – jon
    Jul 15, 2012 at 0:44
  • @jon This could enhance the situation. I will check it out …
    – Ronny
    Jul 15, 2012 at 19:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .