![排版日本诗歌](https://linux22.com/image/417269/%E6%8E%92%E7%89%88%E6%97%A5%E6%9C%AC%E8%AF%97%E6%AD%8C.png)
(这与日文字符无关。)
我有兴趣排版一本古典日语的翻译瓦卡诗歌集。这意味着大量的非常短的诗歌,都带有散文序言。我研究过 poetryscol、verse 和 poetry 包,但我无法确定其中是否有任何包真正具有我需要的特定功能。
每首诗由四个部分组成:
- 我的序言编辑评论
- 诗歌的散文序言和作者(这些是原始集合的一部分,需要与#1 明确区分。在 Word 等中,我会缩进这部分)
- 诗歌本身,应为 5 行,分为两栏 - 一栏为罗马化日语,一栏为翻译。诗歌编号应出现在此处的边距中。(我通常会将这一栏缩进比 #2 多一级,但这不是必需的)
- 脚注,在文本中没有标记,用于对翻译本身无法提供的诗歌技巧和文化参考进行补充说明。
我最不确定的部分是区分 1 和 2,以及为 3 制作两列。诗歌编号不会改变,诗歌始终是 5 行短诗,因此一定程度的硬编码应该是可以接受的。我进行了一些搜索,看到了各种让两列正常工作的技巧。
有谁熟悉这些软件包并能提供一些建议吗?我今天要试着使用它们,但这些软件包似乎更适合西方诗歌,不一定能容纳日本诗集的一些特点。
答案1
这里有个建议。这个想法是一个简单的poem
环境。诗歌的标题(第一个强制参数)居中;介绍和序言文本(和标题)是环境的参数(第二和第三个强制参数),poem
并放在它们自己的parbox
es 中。原文逐行输入\obeylines
;\translation
宏开始翻译(也是逐行)—— savebox
es 保存随后在环境末尾使用的文本poem
。环境有一个可选的第五个参数poem
,它容纳您可能需要的脚注。
我在文本中设置了悬挂缩进以处理长行。环境有一个可选的第一个参数,poem
如果您想要或需要,它允许进行行编号——请参阅第二个示例。
这是一个基本的提议,我希望您能根据自己的喜好进行修改。
\documentclass{article}
\usepackage[papersize={5.5in,8.5in},margin=0.6in]{geometry}
\usepackage{xcolor}
\usepackage{fontspec}
\usepackage{tikz}
\usepackage{keyval}
\newsavebox{\origtext}
\newsavebox{\trantext}
\newcounter{origlines}
\newcounter{tranlines}
\newcounter{textnum}
\newif\ifpoemnums
\makeatletter
\define@key{poems}{poemnums}[true]{\csname poemnums#1\endcsname}
\makeatother
%% |=====8><-----| %%
\NewDocumentEnvironment{poem}{O{}m+m+m+o}{% title; pref; intro; optional footnote
\setkeys{poems}{#1}
\stepcounter{textnum}
\setcounter{origlines}{0}
\setcounter{tranlines}{0}
\centerline{#2}
\par
\smallskip
\parbox{\textwidth}{#3}%
\par
\smallskip
\parbox{0.75\textwidth}{\itshape#4}%
\par
\smallskip
%% Get the original text
\begin{lrbox}{\origtext}
\begin{minipage}[t]{0.4\textwidth}
\obeylines
\leftskip1.25em
\parindent-1.25em
\ifpoemnums\everypar={\stepcounter{origlines}\theoriglines. }\fi
}{%
\end{minipage}
\end{lrbox}
%% Put it all together:
\noindent
\llap{\thetextnum.\quad}%
\usebox{\origtext}%
\hspace{0.5in}%
\usebox{\trantext}%
\par
\IfNoValueF{#5}{%
\smallskip
\hbox to 1in{\hrulefill}\par
\parbox{\textwidth}{#5}
}
\bigskip
}
\NewDocumentCommand{\translation}{}{%
\end{minipage}
\end{lrbox}
%% Get the translation
\begin{lrbox}{\trantext}
\begin{minipage}[t]{0.4\textwidth}
\obeylines
\leftskip1.5em
\parindent-1.5em
\ifpoemnums\everypar={\llap{\stepcounter{tranlines}\thetranlines. }}\fi
}
%% |=====8><-----| %%
\parindent0pt
\begin{document}
\begin{poem}{The Title of the Poem}{The preface to the poem which might be a few lines. And here is a little more text for the preface, as promised.}{And this is the introduction to the poem proper. And this is just a bit more text.}[A footnote that explains the translation, if necessary.]
This is the poem
This is more
And this is more
And this is yet more
And this to finish up
\translation
This is the poem
This is more
And this is more
And this is yet more
And this to finish up
\end{poem}
\begin{poem}[poemnums]{The Title of Another Poem}{The preface to the poem which might be a few lines. And here is a little more text for the preface, as promised.}{And this is the introduction to the poem proper. And this is just a bit more text.}%[A footnote that explains the translation, if necessary.]
This is the poem
This is more
And this is more
And this is yet more and this might go on for a bit
And this to finish up
\translation
This is the poem
This is more
And this is more
And this is yet more
And this to finish up
\end{poem}
\end{document}
答案2
您说您愿意对诗句进行一些硬编码。我认为以下内容提供了您所追求的框架。
% poemprob.tex SE 552747
\documentclass{article}
\newcounter{poemnum}
\begin{document}
\begin{center}
A POEM
\end{center}
\setcounter{poemnum}{1}
Prefatory editorial comment. Just make this a couple of lines to see how
these compare with the following preface.
\begin{quote}
Prose preface to the poem and the author (these are part of the original
collection and need to be clearly differentiated from the editorial comment.
\end{quote}
\begin{center}
\marginpar{\thepoemnum} % poem number in the margin
\vspace{-\baselineskip} % make tabular align with poem number
\begin{tabular}{p{0.4\textwidth}cp{0.4\textwidth}}
Japanese text & English text \\
Japanese text & English text \\
Japanese text & English text \\
Japanese text & English text \\
Japanese text & English text \\
\end{tabular}
\end{center}
\footnotetext[\thepoemnum]{A footnote}
\begin{center}
ANOTHER POEM
\end{center}
\setcounter{poemnum}{6}
Prefatory editorial comment.
\begin{quote}
Prose preface to the poem and the author (these are part of the original
collection and need to be clearly differentiated from the editorial comment.
\end{quote}
\begin{center}
\marginpar{\thepoemnum}
\begin{tabular}{p{0.4\textwidth}cp{0.4\textwidth}}
Japanese text & English text \\
Japanese text & English text \\
Japanese text & English text \\
Japanese text & English text \\
Japanese text & English text \\
\end{tabular}
\end{center}
\footnotetext[\thepoemnum]{A footnote}
\end{document}