如何使评论和文本并排显示?

如何使评论和文本并排显示?

我需要你的帮助。我打算用 XeLaTeX 写一篇关于西塞罗演讲的语言学评论,但我不知道如何将文本和评论结合起来(见下面的示例)。可以这样做吗?

下面是另一篇评论(Caesaris Commentarii de bello Gallico)的两页。你可以看到主要思想。

Caesaris Commentarii de bello Gallico,第 11 页

Caesaris Commentarii de bello Gallico,第 12 页

答案1

我会用ledmac这个。

\documentclass[12pt]{article}

\usepackage{ledmac,lipsum, ragged2e}% <-- crucial to this example

\usepackage[utf8]{inputenc}%
\usepackage[T1]{fontenc}%
\usepackage[osf]{mathpazo}%

\usepackage[english, latin]{babel}
\usepackage[hyperfootnotes=false, colorlinks]{hyperref}

% ledmac commands
\let\commentnote=\Afootnote  %% 
\newcommand{\comment}[2]{\edtext{#1}{\commentnote{#2}}}%

\newcommand{\notetextfont}{\footnotesize\normalfont}%

%% kill lemmata for commentary: 
% --- if notes are in two-column mode:
\makeatletter
\renewcommand*{\twocolfootfmt}[3]{%
 \normal@pars
  %\hsize .45\hsize % <-- original setting
  \hsize .49\hsize
  \parindent=0pt
  \tolerance=5000
  % \raggedright % <-- original setting
  % \RaggedRight % <-- from ragged2e package
  \leavevmode
  \strut{\notenumfont\printlines#1|}\enspace
  %{\select@lemmafont#1|#2}\rbracket\enskip
  #3\strut\par\allowbreak}
\makeatother
\foottwocol{A}

% --- if in notes are in paragraph form:
% \newcommand{\Aparafootfmt}[3]{% <-- app. font.
%  \ledsetnormalparstuff
%  \scriptsize
%  \notenumfont\printlines#1|\enspace
%  % \lemmafont#1|#2\enskip
%  \notetextfont
%  #3\penalty-10\hskip -0.25em plus 0.2em minus 0.2em\relax
% }%
% \footparagraph{A}
% \let\Afootfmt\Aparafootfmt

\begin{document}
\pagestyle{plain} 
\selectlanguage{latin}

\beginnumbering%
\pstart%

\noindent%
[1] \comment{Gallia est omnis divisa in partes tres, quarum unam
  incolunt Belgae, aliam Aquitani, tertiam qui ipsorum lingua Celtae,
  nostra Galli appellantur}{This is the first sentence of Caesar's
  work, but not the last.  It is three lines long, as you can
  see}. \comment{Hi omnes}{This the subject of the sentence, which
  should be obvious and not really require any comment.}
\comment{lingua, institutis, legibus}{These are all in the ablative
  case, which may require some explanation} inter se differunt. Gallos
ab Aquitanis Garumna flumen, a Belgis Matrona et Sequana
dividit. \comment{Horum omnium fortissimi sunt Belgae, propterea quod
  a cultu atque humanitate provinciae longissime absunt,
  \comment{minimeque}{\textbf{Note} that you can `nest' notes in
    ledmac's apparatus. Also: the extra space above this note is due
    to the end of the \texttt{\textbackslash{}lipsum} command} ad eos
  mercatores saepe commeant atque ea quae ad effeminandos animos
  pertinent important, proximique sunt Germanis, qui trans Rhenum
  incolunt, quibuscum continenter bellum gerunt}{Just to fill up some
  space: \lipsum[1]}. Qua de causa Helvetii quoque reliquos Gallos
virtute praecedunt, quod fere cotidianis proeliis cum Germanis
contendunt, cum aut suis finibus eos prohibent aut ipsi in eorum
finibus bellum gerunt. \comment{Eorum una}{Fill up more space:
  \lipsum[2]}, pars, quam Gallos obtinere dictum est, initium capit a
flumine Rhodano, continetur Garumna flumine, Oceano, finibus Belgarum,
attingit etiam ab Sequanis et Helvetiis flumen Rhenum, vergit ad
septentriones. Belgae ab extremis Galliae finibus oriuntur, pertinent
ad inferiorem partem fluminis Rheni, spectant in septentrionem et
orientem solem. Aquitania a Garumna flumine ad Pyrenaeos montes et eam
partem Oceani quae est ad Hispaniam pertinet; spectat inter occasum
solis et septentriones.

\pend\pstart

[2] Apud Helvetios longe nobilissimus fuit et ditissimus Orgetorix. Is
M. Messala, [et P.] M. Pisone consulibus regni cupiditate inductus
coniurationem nobilitatis fecit et civitati persuasit ut de finibus
suis cum omnibus copiis exirent: perfacile esse, cum virtute omnibus
praestarent, totius Galliae imperio potiri. Id hoc facilius iis
persuasit, quod undique loci natura Helvetii continentur: una ex parte
flumine Rheno latissimo atque altissimo, qui agrum Helvetium a
Germanis dividit; altera ex parte monte Iura altissimo, qui est inter
Sequanos et Helvetios; tertia lacu Lemanno et flumine Rhodano, qui
provinciam nostram ab Helvetiis dividit. His rebus fiebat ut et minus
late vagarentur et minus facile finitimis bellum inferre possent; qua
ex parte homines bellandi cupidi magno dolore adficiebantur. Pro
multitudine autem hominum et pro gloria belli atque fortitudinis
angustos se fines habere arbitrabantur, qui in longitudinem milia
passuum CCXL, in latitudinem CLXXX \comment{patebant}{This text was
  taken from \url{http://www.thelatinlibrary.com/caesar/gall1.shtml}}.

\pend
\endnumbering

\end{document}

答案2

这是我的示例,源自 ghostmansd 的示例。只有第一个文本部分完整显示,其他部分我已缩短(完整代码位于http://pastebin.com/YTKqN25H)。

正如我在评论中所说,ledmac可以使用多个装置,我在这里定义了两个:一个用于变体,一个用于自己的评论。一开始就可以看到,它们可以嵌套并获得一个可选参数,即引理,如装置中所示。不幸的是,装置(apparatūs?)的不同格式变得非常困难,正如 jon 已经展示的那样。我对评论(B 级装置)进行了重新定义。使用的包ragged2e在(左/右)对齐或居中文本中提供了更好的对齐和连字符,例如Beamer 演示文稿中的连字或者边注中的自动连字符

我还定义了章节和部分的计数器,它们将作为旁注放入页边空白处。

对于感兴趣的读者:“Pro Murena”的英文翻译可以在这里阅读:http://www.perseus.tufts.edu/hopper/text?doc=Cic.+Mur.+1(单击蓝色箭头查看下一部分)。

% LuaLaTeX or XeLaTeX
\documentclass[12pt,twoside,a4paper]{book}
\usepackage[innermargin=15mm,outermargin=25mm]{geometry} % Set geometry
% Since you set the second page to "1", the margins will be mixed up by TeX!
% To see the effect I've set different margins.

% Set languages and fonts
\usepackage{polyglossia,xunicode} % Multilanguage support
\usepackage{fontspec} % Include fonts configuration
\usepackage[%
  libertine={Ligatures=TeX,Numbers=OldStyle},% use TeX ligatures and oldstyle numbers
  biolinum={Ligatures=TeX,Numbers=OldStyle},%
  mono={Scale=0.85},%
]{libertineotf}

\setmainlanguage{latin}
\setotherlanguage[babelshorthands=true,spelling=old]{german} % just for the example
% You will probably use this:
%\setotherlanguage{russian}
\setotherlanguage[variant=polytonic]{greek}

% Other packages, as far as possible in alphabetical order
\usepackage{etoolbox} % Provides a lot of helpful commands and tools,
                      % needed here for "\ifblank"

\usepackage{fancyhdr} % Include beautiful headers
% Set headers, footers and footnotes
  \fancyhead{}
  \fancyfoot{}
  \pagestyle{fancy}
  \renewcommand{\headrulewidth}{0pt}
  \renewcommand{\cleardoublepage}{\clearpage}
%  \fancyfoot[LE,RO]{\thepage} % Looks after page count; since you set the second page
                              % to "1", the numbers will be set to the inner margin!
  \fancyfoot[LO,RE]{\thepage} % for setting the page number to the outer margin here

\usepackage{indentfirst} % Indent first paragraph after section header, too

\usepackage{ledmac} % For setting critical editions
  \lineation{page} % page-wise line counting
  \linenummargin{outer} % line numbers on outer margin of twoside document,
                        % looks after page count; since you set the second page
                        % to "1", the numbers will be set to the inner margin!
  \sidenotemargin{inner} % for side notes, e.g. caput & sect;
                         % should be the opposite of "\linenummargin"!
  \renewcommand{\notenumfont}{\normalfont\bfseries}
% "ledmac" provides by default 5 levels of apparatus, "\Afootnote" ... "\Efootnote"
%  \let\variant\Afootnote % copy meaning of command "\Afootnote" into the new
                         % "\variant", that is the first level of apparatus
% better solution:
  \newcommand{\variant}[3][]{\edtext{#2}{\ifblank{#1}{}{\lemma{#1}}\Afootnote{#3}}}
%  \let\comment\Bfootnote
% better solution:
% you probably want to use here "\textrussian"
  \newcommand{\comment}[3][]{\edtext{#2}{\textgerman{\ifblank{#1}{}{\lemma{#1}}\Bfootnote{#3}}}}
  % comments set only for the first text-section
%
  \footparagraph{A} % apparatus, level A, as one single paragraph (here "\variant")
%
% Redefining the appearance of one apparatus level is difficult:
  \makeatletter % switches the meaning (exactly the catcode) of the "@" sign,
                % because we have to use some "@"-containing commands
  \renewcommand*{\twocolfootfmt}[3]{% switch to set comments in two columns below
    \normal@pars
    \hsize .45\hsize
    \parindent=0pt
    \tolerance=5000
%    \raggedright
    \RaggedRight % from package "ragged2e"
    \leavevmode
    \strut{\notenumfont\printlines#1|}\enspace
%    {\select@lemmafont#1|#2}\rbracket\enskip
    {\select@lemmafont#1|\textsf{\slshape#2}}\thinspace:\enskip
    #3\strut\par\allowbreak}
  \makeatother % switches back to the default catcode in LaTeX code outside of
               % document classes or packages
  \foottwocol{B} %  apparatus, level B, as one single paragraph in two columns (here "\comment")
%
% You can use ordinary footnotes, but "ledmac" provides by default 5 additional footnote series,
% the counter for the first of them is redefined here, just to how you the effect
\renewcommand*{\thefootnoteA}{\alph{footnoteA}}


% Create further commands
\newcounter{Caput}\newcounter{Sect}
\newcommand*{\caput}{\stepcounter{Caput}\stepcounter{Sect}%
                     \ledsidenote{\Roman{Caput}.\arabic{Sect}}} % "\ledsidenote" from "ledmac"
                    % "\ledsidenote" will be set according to "\sidenotemargin"
% In "Pro Murena" the sections are continuously counted upwards,
% otherwise we would have to do this:
% \newcounter{Caput}\newcounter{Sect}[Caput]
% \newcommand*{\caput}{\refstepcounter{Caput}\stepcounter{Sect}%
%                      \ledsidenote{\Roman{Caput}.\arabic{Sect}}}
\newcommand*{\sect}{\stepcounter{Sect}\ledsidenote{\arabic{Sect}}}

% Main document
\begin{document}

% Create title page
\title{Marci Tulli Ciceronis\\ Pro Lucio Licinio Murena oratio}
\author{Дмитрий Сергеевич Селютин}
\date{} %%% Suppresses the printout of the date (but adds a bit vertical space)

\maketitle

% Create document
\setcounter{page}{1}% It's better to refrain from this!
\selectlanguage{latin}

\section*{Pro L.~Licinio Murena\footnoteA{\textgerman{\mdseries Quelle
                                für die deutschen Kommentare:
                                \texttt{http://books.google.de/books?id=vklQAAAAcAAJ}.}}}


\begingroup % For long text parts this is better to read than the
            % short form "{"; grouping needed for "\autopar"
\beginnumbering % ledmac
\autopar % ledmac
% "\autopar" will break, if you put footnotes (and surely other stuff, too)
% inside extra groups, as you did it

\caput\comment[quod precatus {\dots} sum]{\variant[quae precatus]{Quae
precatus}{\emph{Naugerius}~: quae deprecatus \emph{codd.} (\emph{cf. Quintil.}
ix. 4. 107, \emph{Creticus et initiis optimus}. Quod precatus a dis immortalibus
sum)~: quod precatus \emph{Halm} (2) \emph{cum Quintil.}} \variant{a}{ς1χψ~: ab
ς2BAπ} dis immortalibus sum}{Der präsidierende Magistrat eröffnete die Comitien
mit einem Opfer und Gebet, \emph{precatio}, s. Liv.~39,~15,~1:
\textlatin{\emph{consules in rostra escenderunt, et contione advocata cum
sollemne carmen precationis, quod praefari solent priusquam populum adloquantur
magistratus, peregisset consul, ita coepit}}.}, iudices, more institutoque
maiorum illo die quo \comment{auspicato}{s. Madvigs lat. Sprachl. \S~429.}
comitiis centuriatis L.~Murenam consulem \comment{renuntiavi}{Nachdem der Praeco
das Resultat der Abstimmung der einzelnen Centurien verkündet hatte, erfolgte
die feierliche Renuntiation des Gewählten durch den Magistratus, der die
Wahlhandlung geleitet hatte.}, ut ea res \comment{mihi
\variant{fidei}{\emph{Lambinus}~: fides ςAπ, \emph{om. B}χψ}
magistratuique}{eine alte Formel, wie Ennii fragm. Ann.~111 (ed. Vahl) zeigt:
\textlatin{\emph{Quod mihi meaeque fide \emph{(=~fidei)} et regno vobisque
Quiritis [\dots]}}, und die bei Varro de ling. lat.~VI, \S~86 erhaltene Formel
von den Censoren: \textlatin{\emph{Quod bonum fortunatum felixque salutareque
siet populo Romano Quiritium {\dots} mihique collegaeque fidei magistratuique
meo [\dots]}}. In dieser Formel scheint \emph{fides} im Sinne von
`Gewissenhaftigkeit, Pflichttreue, redliches Wollen' zu stehen.} meo,
\comment{populo plebique}{Mit dieser Verbindung, die nur in Gebeten,
Orakelsprüchen und anderen alten Formeln vorkommt, wird das aus Patriciern und
Plebejern bestehende röm. Gesammtvolk bezeichnet; sie stammt aus einer Zeit, wo
die Patricier allein Vollbürger waren und als solche den \emph{populus}
ausmachten.} Romanae bene atque feliciter eveniret, \variant{eadem}{idem
\emph{Boot}} precor ab isdem dis immortalibus \comment[ob {\dots} obtinendum]{ob
eiusdem hominis consulatum una cum \comment{salute}{`Freisprechung', durch die
sein bürgerliches Wohl bedingt ist.} obtinendum}{`jetzt wo es sich darum handelt
dass' etc.}, \comment{et ut}{schließt sich an \emph{idem} an~= \textlatin{precor
ut ea res feliciter eveniat et ut} etc.} vestrae mentes atque sententiae cum
populi Romani voluntatibus suffragiisque consentiant, eaque res vobis populoque
Romano pacem, tranquillitatem, otium concordiamque adferat. Quod si illa
sollemnis comitiorum precatio consularibus auspiciis consecrata tantam habet in
se vim et religionem quantam rei publicae dignitas postulat, idem ego sum
precatus ut eis quoque hominibus quibus hic consulatus me rogante datus esset ea
res fauste feliciter prospereque eveniret.

\sect Quae cum ita sint, iudices, et cum omnis deorum immortalium potestas aut
\variant{translata}{tralata σπ} sit [\dots]

\caput Et primum M.~Catoni vitam ad certam rationis normam
\variant{derigenti}{ςAπφ~: dirigenti χψω} et diligentissime perpendenti momenta
officiorum omnium de officio meo respondebo. [\dots]

\sect Ac si, ut non nullis in civitatibus fieri solet, [\dots]
\endnumbering % ledmac
\endgroup % for long text parts this is better to read than the
          % short form "}"; grouping needed for "\autopar"
\end{document}

答案3

尝试一下。

\documentclass[english]{article}

\usepackage{parallel}

\begin{document}
Sed lectus ...

\begin{Parallel}{2.4in}{2.4in}
\ParallelLText{Sed lacinia...} 
\ParallelRText{Comments Comments}
\ParallelPar
\ParallelLText{Sed lacinia...} 
\ParallelRText{Commentsasd Commentsasd}
\end{Parallel}
\end{document}

图像

文本写在 中\ParallelLText,注释写在 中\ParallelRText。以\ParallelPar新的文本/注释对开始。

答案4

也许是 Nicola Talbot 的流程框架这个包值得一看。我得承认我从来没有用过它。

相关内容