如何调整,使得带有注释的诗在排版时,每一行宽度都一样,不因为注释的插入而导致有的行长,有的行短?
\documentclass[b5paper,twoside,openany,UTF8]{ctexbook}
\usepackage[left=2.54cm, right=2.54cm, top=2.54cm, bottom=2.54cm]{geometry} %页边距设置
\newenvironment{shi}{\begin{center}\kaishu\vskip -5pt}{\end{center}\vskip -5pt}
\begin{document}
如何调整,使得带有注释的诗在排版时,每一行宽度都一样,不因为注释的插入而导致有的行长,有的行短?
\begin{shi}
景阳岗头风正狂,万里阴云埋日光。\\
焰焰满川红日赤,纷纷遍地草皆黄。\\
触目晚霞挂林薮,侵人冷雾满穹苍。\\
忽闻一声霹雳响,山腰飞出兽中王;\\
昂头踊跃逞牙爪,谷里獐鹿皆奔降;\\
山中狐兔潜踪迹,涧内獐猿惊且慌。\\
卞庄\footnote{卞庄——即卞庄子,春秋时鲁国大夫。有勇力,尝刺双虎。}见后魂魄散,存孝\footnote{存孝——即李存孝,五代后唐名将,原名安敬思,后为李克用义子,赐李姓,猿臂善射。元杂剧有《存孝打虎》剧目。}遇时心胆亡。\\
清河壮士酒未醒,忽在岗头偶相迎。\\
上下寻人虎饥渴,撞著狰狞来扑人。\\
虎来扑人似山倒,人去迎虎如岩倾。\\
臂腕落时坠飞炮,爪牙挝处几泥坑。\\
拳头脚尖如雨点,淋漓两手鲜血染。\\
秽污腥风满松林,散乱毛须坠山崦。\\
近看千钧势未休,远观八面威风减。\\
身横野草锦斑消,紧闭双睛光不闪。\\
\end{shi}
\end{document}
也许可以试试这样...抛砖引玉吧, 但是要在parbox
内部使用footnote
需要使用footnotemark
和morefootnotetext
, 但这种做法不是很优雅, 同时个人觉得这样的效果并不好看...是否有什么书籍的诗句排版实现了这样的两端对齐(justify)让你一定要这么做呢?
\documentclass[b5paper,twoside,openany,UTF8]{ctexbook}
\usepackage[left=2.54cm, right=2.54cm, top=2.54cm, bottom=2.54cm]{geometry} %页边距设置
\newenvironment{shi}{\begin{center}\kaishu\vskip -5pt}{\end{center}\vskip -5pt} % 总是建议不要用拼音命名...
\NewDocumentEnvironment{mypoem}{ O{\linewidth} +b}{%
% #1: \parbox宽度 #2 环境内容
\vskip -5pt%
\begin{center}\parbox[s]{#1}{%
\setlength\parfillskip{0pt}%
\kaishu\noindent #2
}
\end{center}\vskip -5pt
}{}
% https://tex.stackexchange.com/questions/349929/two-footnotemarks-in-a-tcolorbox-yield-footnotes-with-the-same-label/349938#349938
\usepackage{xassoccnt}
\usepackage{refcount}
\newcounter{totalfootnotes}
\newcounter{totalfootnotetexts}
\DeclareAssociatedCounters{footnote}{totalfootnotes}% Count all footnotes
\usepackage{xpatch}
\xpatchcmd{\footnotemark}{\stepcounter}{\refstepcounter}{}{}
\xapptocmd{\footnotemark}{\label{fnmark-\number\value{totalfootnotes}}}{}{}
\xpretocmd{\footnote}{\stepcounter{totalfootnotetexts}}{}{}% Explicitly step!
\NewDocumentCommand{\morefootnotetext}{o+m}{%
\IfValueTF{#1}{%
\footnotetext[#1]{#2}%
}{%
\stepcounter{totalfootnotetexts}%
\footnotetext[\getrefnumber{fnmark-\number\value{totalfootnotetexts}}]{#2}
}%
}
\begin{document}
\begin{shi}%
山中狐兔潜踪迹,涧内獐猿惊且慌。\\
卞庄\footnote{卞庄——即卞庄子,春秋时鲁国大夫。有勇力,尝刺双虎。}见后魂魄散,存孝\footnote{存孝——即李存孝,五代后唐名将,原名安敬思,后为李克用义子,赐李姓,猿臂善射。元杂剧有《存孝打虎》剧目。}遇时心胆亡。\\
清河壮士\footnote{注释}酒未醒,忽在岗头偶相迎。\\
上下寻人虎饥渴,撞著狰狞\footnote{注释}来扑人。\\
虎来扑人似山倒,人去迎虎如岩倾。\\
\end{shi}
\begin{center}\vskip -5pt
\parbox[s]{20\ccwd}{%
\setlength\parfillskip{0pt}%
\kaishu\noindent
虎来扑人似山倒,人去迎虎如岩倾。\linebreak
上下寻人虎饥渴,撞著狰狞\footnotemark 来扑人。\linebreak
上下寻人\footnotemark 虎饥渴,上下寻人\footnotemark 虎饥渴。\linebreak
上下\footnotemark 寻人\footnotemark 虎饥渴,上下寻人虎饥渴。
上\footnotemark 下寻人\footnotemark 虎饥\footnotemark 渴,上下\footnotemark 寻人\footnotemark 虎饥渴。%永远不要在文本中用‘\\’
}\vskip -5pt
\end{center}
\morefootnotetext{注释}
\morefootnotetext{注释}
\morefootnotetext{注释}
\morefootnotetext{注释}
\morefootnotetext{注释}
\morefootnotetext{注释}
\morefootnotetext{注释}
\morefootnotetext{注释}
\morefootnotetext{注释}
\morefootnotetext{注释}
\begin{mypoem}[20\ccwd]%
虎来扑人似山倒,人去迎虎如岩倾。
上下寻人虎饥渴,撞著狰狞\footnotemark 来扑人。
上下寻人\footnotemark 虎饥渴,上下寻人\footnotemark 虎饥渴。
上下\footnotemark 寻人\footnotemark 虎饥渴,上下寻人虎饥渴。
上\footnotemark 下\footnotemark 寻人虎饥\footnotemark 渴,上下\footnotemark 寻人\footnotemark 虎饥渴。
\end{mypoem}
\morefootnotetext{注释}
\morefootnotetext{注释}
\morefootnotetext{注释}
\morefootnotetext{注释}
\morefootnotetext{注释}
\morefootnotetext{注释}
\morefootnotetext{注释}
\morefootnotetext{注释}
\morefootnotetext{注释}
\morefootnotetext{注释}
\end{document}