Advertisement
Speravir

LuaLaTeX/XeLaTeX example with package ledmac

Apr 25th, 2012
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 11.81 KB | None | 0 0
  1. % LuaLaTeX or XeLaTeX
  2. \documentclass[12pt,twoside,a4paper]{book}
  3. \usepackage[innermargin=15mm,outermargin=25mm]{geometry} % Set geometry
  4. % Since you set the second page to "1", the margins will be mixed up by TeX!
  5. % To see the effect I've set different margins.
  6.  
  7. % Set languages and fonts
  8. \usepackage{polyglossia,xunicode} % Multilanguage support
  9. \usepackage{fontspec} % Include fonts configuration
  10. \usepackage[%
  11.   libertine={Ligatures=TeX,Numbers=OldStyle},% use TeX ligatures and oldstyle numbers
  12.   biolinum={Ligatures=TeX,Numbers=OldStyle},%
  13.   mono={Scale=0.85},%
  14. ]{libertineotf}
  15.  
  16. \setmainlanguage{latin}
  17. \setotherlanguage[babelshorthands=true,spelling=old]{german} % just for the example
  18. % You will probably use this:
  19. %\setotherlanguage{russian}
  20. \setotherlanguage[variant=polytonic]{greek}
  21.  
  22. % Other packages, as far as possible in alphabetical order
  23. \usepackage{etoolbox} % Provides a lot of helpful commands and tools,
  24.                       % needed here for "\ifblank"
  25.  
  26. \usepackage{fancyhdr} % Include beautiful headers
  27. % Set headers, footers and footnotes
  28.   \fancyhead{}
  29.  \fancyfoot{}
  30.  \pagestyle{fancy}
  31.  \renewcommand{\headrulewidth}{0pt}
  32.  \renewcommand{\cleardoublepage}{\clearpage}
  33. %  \fancyfoot[LE,RO]{\thepage} % Looks after page count; since you set the second page
  34.                               % to "1", the numbers will be set to the inner margin!
  35.   \fancyfoot[LO,RE]{\thepage} % for setting the page number to the outer margin here
  36.  
  37. \usepackage{indentfirst} % Indent first paragraph after section header, too
  38.  
  39. \usepackage{ledmac} % For setting critical editions
  40.   \lineation{page} % page-wise line counting
  41.   \linenummargin{outer} % line numbers on outer margin of twoside document,
  42.                         % looks after page count; since you set the second page
  43.                         % to "1", the numbers will be set to the inner margin!
  44.   \sidenotemargin{inner} % for side notes, e.g. caput & sect;
  45.                          % should be the opposite of "\linenummargin"!
  46.   \renewcommand{\notenumfont}{\normalfont\bfseries}
  47. % "ledmac" provides by default 5 levels of apparatus, "\Afootnote" ... "\Efootnote"
  48. %  \let\variant\Afootnote % copy meaning of command "\Afootnote" into the new
  49.                          % "\variant", that is the first level of apparatus
  50. % better solution:
  51.   \newcommand{\variant}[3][]{\edtext{#2}{\ifblank{#1}{}{\lemma{#1}}\Afootnote{#3}}}
  52. %  \let\comment\Bfootnote
  53. % better solution:
  54. % you probably want to use here "\textrussian"
  55.   \newcommand{\comment}[3][]{\edtext{#2}{\textgerman{\ifblank{#1}{}{\lemma{#1}}\Bfootnote{#3}}}}
  56.   % comments set only for the first text-section
  57. %
  58.   \footparagraph{A} % apparatus, level A, as one single paragraph (here "\variant")
  59. %
  60. % Redefining the appearance of one apparatus level is difficult:
  61.   \makeatletter % switches the meaning (exactly the catcode) of the "@" sign,
  62.                 % because we have to use some "@"-containing commands
  63.   \renewcommand*{\twocolfootfmt}[3]{% switch to set comments in two columns below
  64.     \normal@pars
  65.     \hsize .45\hsize
  66.     \parindent=0pt
  67.     \tolerance=5000
  68. %    \raggedright
  69.     \RaggedRight % from package "ragged2e"
  70.     \leavevmode
  71.     \strut{\notenumfont\printlines#1|}\enspace
  72. %    {\select@lemmafont#1|#2}\rbracket\enskip
  73.     {\select@lemmafont#1|\textsf{\slshape#2}}\thinspace:\enskip
  74.    #3\strut\par\allowbreak}
  75.   \makeatother % switches back to the default catcode in LaTeX code outside of
  76.                % document classes or packages
  77.   \foottwocol{B} %  apparatus, level B, as one single paragraph in two columns (here "\comment")
  78. %
  79. % You can use ordinary footnotes, but "ledmac" provides by default 5 additional footnote series,
  80. % the counter for the first of them is redefined here, just to show you the effect
  81. \renewcommand*{\thefootnoteA}{\alph{footnoteA}}
  82.  
  83. % Create further commands
  84. \newcounter{Caput}\newcounter{Sect}
  85. \newcommand*{\caput}{\stepcounter{Caput}\stepcounter{Sect}%
  86.                      \ledsidenote{\Roman{Caput}.\arabic{Sect}}}% "\ledsidenote" from "ledmac"
  87.                     % "\ledsidenote" will be set according to "\sidenotemargin"
  88. % In "Pro Murena" the sections are continuously counted upwards,
  89. % otherwise we would have to do this:
  90. % \newcounter{Caput}\newcounter{Sect}[Caput]
  91. % \newcommand*{\caput}{\refstepcounter{Caput}\stepcounter{Sect}%
  92. %                      \ledsidenote{\Roman{Caput}.\arabic{Sect}}}
  93. \newcommand*{\sect}{\stepcounter{Sect}\ledsidenote{\arabic{Sect}}}
  94.  
  95. \newcommand*{\Yat}{Ѣ}
  96. \newcommand*{\yat}{ѣ}
  97. \newcommand*{\Ou}{Ȣ}
  98. \newcommand*{\ou}{ȣ}
  99. \renewcommand*{\ss}{ſſ}
  100. \newcommand*{\s}{ſ}
  101.  
  102. % Main document
  103. \begin{document}
  104.  
  105. % Create title page
  106. \title{Marci Tulli Ciceronis\\ Pro Lucio Licinio Murena oratio}
  107. \author{Дмитрий Сергеевич Селютин}
  108. \date{} %%% Suppresses the printout of the date (but adds a bit vertical space)
  109.  
  110. \maketitle
  111.  
  112. % Create document
  113. \setcounter{page}{1}% It's better to refrain from this!
  114. \selectlanguage{latin}
  115.  
  116. \section*{Pro L.~Licinio Murena\footnoteA{\textgerman{\mdseries Source
  117.                                for German commentary:
  118.                                \texttt{http://books.google.de/books?id=vklQAAAAcAAJ}.}}}
  119.  
  120.  
  121. \begingroup % For long text parts this is better to read than the
  122.             % short form "{"; grouping needed for "\autopar"
  123. \beginnumbering % ledmac
  124. \autopar % ledmac
  125. % "\autopar" will break, if you put footnotes (and surely other stuff, too)
  126. % inside extra groups, as you did it
  127.  
  128. \caput\comment[quae precatus {\dots} sum]{\variant[quae precatus]{Quae
  129. precatus}{\emph{Naugerius}~: quae deprecatus \emph{codd.} (\emph{cf. Quintil.}
  130. ix. 4. 107, \emph{Creticus et initiis optimus}. Quod precatus a dis immortalibus
  131. sum)~: quod precatus \emph{Halm} (2) \emph{cum Quintil.}} \variant{a}{ς1χψ~: ab
  132. ς2BAπ} dis immortalibus sum}{Der präsidierende Magistrat eröffnete die Comitien
  133. mit einem Opfer und Gebet, \emph{precatio}, s. Liv.~39,~15,~1:
  134. \textlatin{\emph{consules in rostra escenderunt, et contione advocata cum
  135. sollemne carmen precationis, quod praefari solent priusquam populum adloquantur
  136. magistratus, peregisset consul, ita coepit}}.}, iudices, more institutoque
  137. maiorum illo die quo \comment{auspicato}{s. Madvigs lat. Sprachl. \S~429.}
  138. comitiis centuriatis L.~Murenam consulem \comment{renuntiavi}{Nachdem der Praeco
  139. das Resultat der Abstimmung der einzelnen Centurien verkündet hatte, erfolgte
  140. die feierliche Renuntiation des Gewählten durch den Magistratus, der die
  141. Wahlhandlung geleitet hatte.}, ut ea res \comment{mihi
  142. \variant{fidei}{\emph{Lambinus}~: fides ςAπ, \emph{om.} Bχψ}
  143. magistratuique}{eine alte Formel, wie Ennii fragm. Ann.~111 (ed. Vahl) zeigt:
  144. \textlatin{\emph{Quod mihi meaeque fide \emph{(=~fidei)} et regno vobisque
  145. Quiritis [\dots]}}, und die bei Varro de ling. lat.~VI, \S~86 erhaltene Formel
  146. von den Censoren: \textlatin{\emph{Quod bonum fortunatum felixque salutareque
  147. siet populo Romano Quiritium {\dots} mihique collegaeque fidei magistratuique
  148. meo [\dots]}}. In dieser Formel scheint \emph{fides} im Sinne von
  149. `Gewissenhaftigkeit, Pflichttreue, redliches Wollen' zu stehen.} meo,
  150. \comment{populo plebique}{Mit dieser Verbindung, die nur in Gebeten,
  151. Orakelsprüchen und anderen alten Formeln vorkommt, wird das aus Patriciern und
  152. Plebejern bestehende röm. Gesammtvolk bezeichnet; sie stammt aus einer Zeit, wo
  153. die Patricier allein Vollbürger waren und als solche den \emph{populus}
  154. ausmachten.} Romanae bene atque feliciter eveniret, \variant{eadem}{idem
  155. \emph{Boot}} precor ab isdem dis immortalibus \comment[ob {\dots} obtinendum]{ob
  156. eiusdem hominis consulatum una cum \comment{salute}{`Freisprechung', durch die
  157. sein bürgerliches Wohl bedingt ist.} obtinendum}{`jetzt wo es sich darum handelt
  158. dass' etc.}, \comment{et ut}{schließt sich an \emph{idem} an~=
  159. \textlatin{\emph{precor ut ea res feliciter eveniat et ut}} etc.} vestrae mentes
  160. atque sententiae cum populi Romani voluntatibus suffragiisque consentiant, eaque
  161. res vobis populoque Romano pacem, tranquillitatem, otium concordiamque adferat.
  162. Quod si illa sollemnis comitiorum precatio consularibus auspiciis consecrata
  163. tantam habet in se vim et religionem quantam rei publicae dignitas postulat,
  164. idem ego sum precatus ut eis quoque hominibus quibus hic consulatus me rogante
  165. datus esset ea res fauste feliciter prospereque eveniret.
  166.  
  167. \sect Quae cum ita sint, iudices, et cum omnis deorum immortalium potestas aut
  168. \variant{translata}{tralata σπ} sit ad vos aut certe communicata vobiscum, idem
  169. \variant{consulem}{\emph{Boot}~: consul ei (eum ω) \emph{codd.}} vestrae fidei
  170. commendat qui antea dis immortalibus commendavit, ut eiusdem hominis voce et
  171. declaratus consul et defensus beneficium populi Romani cum vestra atque omnium
  172. civium salute tueatur. Et quoniam in hoc officio studium meae defensionis ab
  173. accusatoribus atque etiam ipsa susceptio causae reprensa est, ante quam pro
  174. L.~Murena dicere instituo, pro me ipso pauca dicam, non quo mihi potior hoc
  175. \variant{quidem}{\emph{Lag.} 9~: quidem in \emph{cett.}} tempore sit offici mei
  176. quam huiusce salutis defensio, sed ut meo facto vobis probato maiore auctoritate
  177. ab huius honore fama fortunisque omnibus inimicorum impetus propulsare possim.
  178.  
  179. \caput Et primum M.~Catoni vitam ad certam rationis normam
  180. \variant{derigenti}{ςAπφ~: dirigenti χψω} et diligentissime perpendenti momenta
  181. officiorum omnium de officio meo respondebo. Negat fuisse rectum Cato me et
  182. consulem et legis ambitus latorem et tam severe gesto consulatu causam
  183. L.~Murenae attingere. Cuius reprehensio me vehementer movet, non solum ut vobis,
  184. iudices, quibus maxime debeo, verum etiam ut ipsi Catoni, gravissimo atque
  185. integerrimo viro, rationem facti mei probem. A quo tandem, M.~Cato, est aequius
  186. consulem defendi quam a consule? Quis mihi in re publica potest aut debet esse
  187. coniunctior quam is cui res publica \variant{a me iam}{\emph{Klotz}~: ame/77/a ς
  188. (\emph{m.} 2 \emph{in lac.})~: a me una \emph{cett.}~: a me uno
  189. \emph{Lambinus}~: a me in manum \emph{Müller}~: \emph{fort.} a me universa
  190. (universa a me \emph{Landgraf})} traditur sustinenda magnis meis laboribus et
  191. periculis sustentata? Quod si in \variant{eis}{iis (is) φ1~: his \emph{cett.}}
  192. rebus repetendis quae mancipi sunt is periculum \variant{iudici}{\emph{om.} A}
  193. praestare debet qui se nexu obligavit, profecto etiam rectius in iudicio
  194. consulis designatiis potissimum \variant{consul}{\emph{del. Madvig}} qui
  195. consulem declaravit auctor benefici populi Romani defensorque periculi esse
  196. debebit.
  197.  
  198. \sect Ac si, ut non nullis in civitatibus fieri solet, patronus huic causae
  199. publice constitueretur, is \variant{potissimum summo}{\emph{Madvig}~: potissimo
  200. (-e ψ2) \emph{codd.}} honore adfecto defensor daretur qui eodem honore praeditus
  201. non minus adferret ad dicendum auctoritatis quam facultatis. Quod si \variant{e
  202. portu}{\emph{Quintil.} v. 11. 23~: portu \emph{B}ψ~: portus \emph{cett.}}
  203. solventibus \variant{ei qui}{qui \emph{Quintil.}} iam in portum ex alto
  204. invehuntur praecipere summo studio \variant{solent et}{ψ2~: solent ei ςAπφω~:
  205. solent eis χψ1} tempestatum rationem et praedonum et locorum, quod natura
  206. \variant{adfert}{fert \emph{Victorius (contra Quintil.)}} ut eis faveamus qui
  207. eadem pericula quibus nos perfuncti sumus \variant{ingrediantur}{πφω,
  208. \emph{Quintil.}~: ingrediuntur ςAχψ}, quo tandem me \variant{esse animo}{animo
  209. esse \emph{Quintil.}} oportet prope iam ex magna iactatione terram videntem in
  210. hunc cui video maximas \variant[rei p.]{rei publicae}{\emph{om. Quintil.}}
  211. tempestates esse subeundas? Qua re si est boni consulis non solum videre quid
  212. agatur verum etiam providere quid futurum sit, ostendam alio loco quantum
  213. salutis communis intersit duos consules in re publica Kalendis Ianuariis esse.
  214. \endnumbering % ledmac
  215. \endgroup % for long text parts this is better to read than the
  216.           % short form "}"; grouping needed for "\autopar"
  217. \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement