我需要帮助来排版一个复杂的排版布局,类似于塔木德,但不一定使用希伯来语。我找到了这个parcolumns
软件包,但它不支持脚注,也没有提供让列溢出到页面末尾的单个列的方法。
我正在尝试创建一个类似于塔木德的布局:
中间是正文,周围是评论,底部是脚注,一侧是边注……
我找不到任何有用的东西,因此非常感激任何帮助。
答案1
flowfram 似乎不是特别强大。由于这是我第一次使用这个包,我怀疑它还有改进的可能。
\documentclass{article}
\usepackage{graphicx}
\usepackage{color}
\usepackage{flowfram}
\usepackage[margin=0.5in,noheadfoot]{geometry}
\usepackage{xparse}
\newcounter{tempcount}
%\newcommand{\ditto}[2]{% #1 = number of repetitions, #2=rext to repeat
\ExplSyntaxOn
\DeclareExpandableDocumentCommand{\ditto}{mm}
{\prg_replicate:nn{#1}{#2} }
\ExplSyntaxOff
%put 0.25in header and footer, plus .3in notes on the sides.
\newlength\mainH
\newlength\mainW
\setlength{\mainW}{\textwidth}
\addtolength{\mainW}{-1in}
\setlength{\mainH}{\textheight}
\addtolength{\mainH}{-1in}
\newflowframe[1]{\mainW}{\mainH}{0.5in}{0.5in}[unused]
%create header, footer and notes
\newlength{\headY}
\setlength{\headY}{\textheight}
\addtolength{\headY}{-0.25in}
\newstaticframe[1]{\mainW}{0.25}{0.5in}{\headY}[top]
\newstaticframe[1]{\mainW}{0.25in}{0.5in}{0pt}[bottom]
\newlength{\noteX}
\setlength{\noteX}{\textwidth}
\addtolength{\noteX}{-0.3in}
\newstaticframe[1]{0.3in}{\mainH}{0pt}{0.5in}[left]
\newstaticframe[1]{0.3in}{\mainH}{\noteX}{0.5in}[right]
%create variable width frames
\newlength{\halfW}% compute width of top section
\setlength{\halfW}{\mainW}
\addtolength{\halfW}{-0.25in}% gutter
\setlength{\halfW}{0.5\halfW}
\newlength{\parW}% compute width if middle section
\setlength{\parW}{\mainW}
\addtolength{\parW}{-0.5in}% gutters
\setlength{\parW}{0.333\parW}
\newstaticframe[1]{\mainW}{\mainH}{0.5in}{0.5in}[first]
\setstaticframe*{first}{shape={\parshape=56
\ditto{8}{0pt \halfW }
\ditto{40}{0pt \parW }
\ditto{8}{0pt \mainW }
}}
\newlength{\parI}% indentation for second frame
\setlength{\parI}{\parW}
\addtolength{\parI}{0.25in}
\newlength{\newW}% compute width at bottom
\setlength{\newW}{\mainW}
\addtolength{\newW}{-\parI}
\newstaticframe[1]{\mainW}{\mainH}{0.5in}{0.5in}[second]
\setstaticframe*{second}{shape={\parshape=34
\ditto{30}{\parI \parW }
\ditto{4}{\parI \newW }
}}
\newlength{\halfI}%compute indentation at top
\setlength{\halfI}{\mainW}
\addtolength{\halfI}{-\halfW}
\newlength{\newI}%compute indentation at bottom
\setlength{\newI}{\mainW}
\addtolength{\newI}{-\parW}
\newstaticframe[1]{\mainW}{\mainH}{0.5in}{0.5in}[third]
\setstaticframe*{third}{shape={\parshape=28
\ditto{8}{\halfI \halfW }
\ditto{20}{\newI \parW }
}}
\begin{document}
\pagestyle{empty}
\begin{staticcontents*}{top}
Header \hfill with \hfill multiple \hfill fields
\end{staticcontents*}
\begin{staticcontents*}{bottom}
\hfil Footer
\end{staticcontents*}
\begin{staticcontents*}{left}
\raggedright
Hi there
\vfill\rule{0pt}{0pt}
\end{staticcontents*}
\begin{staticcontents*}{right}
\raggedright
Default is to center vertically.
\end{staticcontents*}
\begin{staticcontents*}{first}
\ditto{12}{This is a test. If this had been a real emergency, I would be gone from here and you would not be hearing me.
Oh, you would be in so much trouble and I would be laughing my ass off! \\}
\end{staticcontents*}
\begin{staticcontents*}{second}
\vspace*{0.2in}
\resizebox{\parW}{!}{\includegraphics{rowboat.png}}
\ditto{5}{This is a test. If this had been a real emergency, I would be gone from here and you would not be hearing me.
Oh, you would be in so much trouble and I would be laughing my ass off! \\}
\end{staticcontents*}
\begin{staticcontents*}{third}
\ditto{8}{This is a test. If this had been a real emergency, I would be gone from here and you would not be hearing me.
Oh, you would be in so much trouble and I would be laughing my ass off! \\}
\vspace*{1.8in}
\end{staticcontents*}
\rule{\linewidth}{0pt}%some text is required
\end{document}
答案2
这是基于 TikZ 节点而不是 flowfram 列的替代方案。优点是您不必处理 parshape。缺点是您必须手动在节点之间拆分段落。
\documentclass[letter]{article}
\usepackage[margin=0.5in,noheadfoot]{geometry}
\usepackage{tikz}
\usepackage{mwe}% for image and \lipsum
\usetikzlibrary{calc}
\pagestyle{empty}
\parindent=0pt
\newcommand{\nopar}{\strut\parfillskip 0pt}
% manually inserted at end of minipage
\begin{document}
\begin{tikzpicture}[every node/.style={inner sep=0pt}]
\node[minimum width=\textwidth, minimum height=\textheight] (Page) at (0.5\textwidth,0.5\textheight) {};
% define 0.25in header and footer, plus .5in notes on the sides.
\node[minimum width=\textwidth-1in, minimum height=\textheight-.5in] (Text) at (Page.center) {};
\node[minimum width=\textwidth-1in, minimum height=.25in,below] (Top) at (Page.north) {};
\node[minimum width=\textwidth-1in, minimum height=.25in,above] (Bottom) at (Page.south) {};
\node[minimum width=.5in, minimum height=\textheight,right] (Left) at (Page.west) {};
\node[minimum width=.5in, minimum height=\textheight,left] (Right) at (Page.east) {};
% example headers
\node[below right] at (Top.north west) {\huge left};
\node[below] at (Top.north) {\huge center};
\node[below left] at (Top.north east) {\huge right};
% example footers
\node[above] at ($(Bottom.south west)!.333!(Bottom.south east)$) {\huge 1/3};
\node[above] at ($(Bottom.south west)!.667!(Bottom.south east)$) {\huge 2/3};
% example left margin
\node[below right,text width=.4in,align=left] at (Left.north west)
{Notice that the margin notes go all the way to the top};
\node[above right,text width=.4in,align=left] at (Left.south west)
{and bottom};
% example columns
\node[below right] (A) at (Text.north west) {\begin{minipage}{3.2in}
\parindent=.25in
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris.
Nam arcu libero, nonummy eget, consectetuer id,
vulputate a, magna. Donec vehicula augue eu neque.\nopar
\end{minipage}};
\node[below right] (B) at (A.south west) {\begin{minipage}{2in}
\parindent=.25in
\noindent
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
Mauris ut leo. Cras viverra metus rhoncus sem.
Nulla et lectus vestibulum urna fringilla ultrices.
Phasellus eu tellus sit amet tortor gravida placerat.
Integer sapien est, iaculis in, pretium quis, viverra ac, nunc.
Praesent eget sem vel leo ultrices bibendum. Aenean faucibus.
Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac, nulla.
Curabitur auctor semper nulla. Donec varius orci eget risus.
Duis nibh mi, congue eu, accumsan eleifend, sagittis quis, diam.
Duis eget orci sit amet orci dignissim rutrum.
\lipsum[2]
Nulla malesuada porttitor diam.
Donec felis erat, congue non, volutpat at, tincidunt tristique, libero.
Vivamus viverra\nopar
\end{minipage}};
\node[below right] (C) at (B.south west) {\begin{minipage}{6.5in}
\parindent=.25in
\noindent
fermentum felis.
Donec nonummy pellentesque ante.
Phasellus adipiscing semper elit.
Proin fermentum massa ac quam.
Sed diam turpis, molestie vitae, placerat a, molestie nec, leo.
Maecenas lacinia. Nam ipsum ligula, eleifend at, accumsan nec, suscipit a, ipsum.
Morbi blandit ligula feugiat magna.
Nunc eleifend consequat lorem.
Sed lacinia nulla vitae enim.
Pellentesque tincidunt purus vel magna. Integer non enim.
Praesent euismod nunc eu purus.
\lipsum[4]
\end{minipage}};
\node[below left] (D) at (Text.north east) {\begin{minipage}{3.2in}
\parindent=.25in
Fusce mauris.
Vestibulum luctus nibh at lectus.
Sed bibendum, nulla a faucibus semper, leo velit ultricies tellus, ac venenatis arcu wisi vel nisl.
Vestibulum diam.
Aliquam pellentesque, augue quis sagittis posuere, turpis lacus congue quam, in hendrerit risus\nopar
\end{minipage}};
\node[below left] (E) at (D.south east) {\begin{minipage}{2in}
\parindent=.25in
\noindent
eros eget felis.
Maecenas eget erat in sapien mattis porttitor.
Vestibulum porttitor.
Nulla facilisi.
Sed a turpis eu lacus commodo facilisis.
Morbi fringilla, wisi in dignissim interdum, justo lectus sagittis dui, et
vehicula libero dui cursus dui.
Mauris tempor ligula sed lacus. Duis cursus enim ut augue.
Cras ac magna.
Cras nulla. Nulla egestas.
Curabitur a leo.
Quisque egestas wisi eget nunc.
Nam feugiat lacus vel est.
Curabitur consectetuer.
\lipsum[6]
\end{minipage}};
\node[below] (F) at ($(Text.north)+(0,-1in)$) {\begin{minipage}{2in}
\parindent=.25in
\begin{center}
\includegraphics[width=.9\textwidth]{example-image}
\end{center}
\lipsum[7]
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
Donec odio elit, dictum\nopar
\end{minipage}};
\node[below right] (G) at (F.south west) {\begin{minipage}{4.25in}
\parindent=.25in
\noindent
in, hendrerit sit amet, egestas sed, leo.
Praesent feugiat sapien aliquet odio.
Integer vitae justo.
Aliquam vestibulum fringilla lorem.
Sed neque lectus, consectetuer at, consectetuer sed, eleifend ac, lectus.
Nulla facilisi.
Pellentesque eget lectus.
Proin eu metus.
Sed porttitor.
In hac habitasse platea dictumst.
Suspendisse eu lectus.
Ut mi mi, lacinia sit amet, placerat et, mollis vitae, dui.
\end{minipage}};
% example right margin
\node[below left,text width=.4in,align=left] at (Right.east |- F.north)
{You can align margin notes to column locations};
\node[left,text width=.4in,align=left] at (Right.east)
{\resizebox{.4in}{!}{You can}
\resizebox{.4in}{!}{adjust}
\resizebox{.4in}{!}{the font}
\resizebox{.4in}{!}{to fit the}
\resizebox{.4in}{!}{space}};
\end{tikzpicture}
\end{document}
由于很多操作会重复,因此应该创建宏和/或环境来减少混乱。