我想使用xelatex
和 来实现一种特定的方式来安排我的批判性设备reledmac
。首先,我想为我的文本的每个节分配一个特定的编号,这些编号不应像行号一样显示。以下示例是我想要批判性编辑的一个节。
藝術本身和成長的靈活 |
pañcasthā vāyavaḥ pañca mano bindus tathaiva ca ||1||
它由两个半节组成。每个半节有 16 个音节。每个半节应分为两部分,每部分 8 个音节。因此,每个诗节及其相应的诗节编号(例如“1”),我希望将其标记为“ad”,并计入四个部分,以便在我的关键脚注中使用此方案。
因此,不再对每一行进行计数,也不再用普通的阿拉伯脚注或下划线标记每个单词,而是根据方案节号和相应部分的字母自动标记脚注。
我只是无法弄清楚如何自己实现这一点。我已经花费了一些时间,而且我的 XelateX 技能还不够,无法找到解决方案。有人能帮我吗?
请参阅下面的当前代码。
谢谢!
祝一切顺利,尼尔斯·雅各布。
\documentclass[a4paper,11pt]{article}
\title{\textit{Mūlasāra}}
\usepackage{lscape}
\usepackage{polyglossia}
\setmainlanguage{german}
\setotherlanguage{sanskrit}
\usepackage{fontspec}
\setmainfont{TeX Gyre Termes}
\setmonofont{TeX Gyre Termes}
\newfontfamily\devanagarifont[Script=Devanagari]{Chandas}
\newfontfamily\devnag[Script=Devanagari]{Chandas}
\newfontface\dejlight{DejaVu Sans}
\DeclareTextFontCommand{\textding}{\dejlight}
\usepackage[backend=biber,bibstyle=authortitle,citestyle=authoryear,sorting=nyt]{biblatex}
\DeclareFieldFormat{postnote}{#1}
\renewcommand{\postnotedelim}{:}
\addbibresource{mula.bib}
\usepackage[draft]{reledmac}
\arrangementX[A]{paragraph}
\Xarrangement[B]{paragraph}
\firstlinenum{1}
\linenumincrement{2}
\setcounter{stanzaindentsrepetition}{2}
\setstanzaindents{8,2,2}
\makeatletter
\renewcommandx{\stanza}[1][1,usedefault]{\@startstanza[#1~]}
\makeatother
\tolerance=2000
\frenchspacing
\usepackage{hyperref}
\usepackage{cleveref}
\usepackage{geometry}
\usepackage{graphicx}
\usepackage{setspace}
\geometry{verbose,a4paper,tmargin=25mm,bmargin=25mm,lmargin=20mm,rmargin=25mm}
\usepackage{tikz}
\usepackage[hang,flushmargin]{footmisc}
\begin{document}
\section{Critical Edition}
\begingroup
\beginnumbering
\autopar
\stanza
namo ādināthāya ||\&
\stanza
\edtext{īśvara}{\Bfootnote{em. (\textit{īśvara} Pts): \textit{iśvara} Ms}}\footnoteA{\textbf{Ci} Pts Z. 5100} uvāca ||\&
\stanza
\edtext{candraḥ}{\Bfootnote{em. (\textit{candraḥ} Pts): \textit{candra} Ms}}\footnoteA{\textbf{Ci} Pts Z. 5102} sūryas tathā \edtext{vahniḥ}{\Bfootnote{em. (\textit{vahniḥ} Pts): \textit{vahni} Ms}}\footnoteA{\textbf{Ci} Pts Z. 5102} śarīre daśa nāḍikāḥ |&
\edtext{pañcasthā}{\Bfootnote{(\textit{pañcasthā} Ms): \textit{dehasthā} Pts}}\footnoteA{\textbf{Ci} Pts Z. 5104} \edtext{vāyavaḥ}{\Bfootnote{em. (\textit{vāyavaḥ} Pts): \textit{vāyava} Ms}}\footnoteA{\textbf{Ci} Pts Z. 5104} pañca mano bindus tathaiva ca ||1||\&
\endgroup
\endnumbering
\clearpage
\end{document}
现在,我得到了问题的答案。但不幸的是,如果没有解释,我就不明白那里发生了什么,以及如何在我的文本中使用和实现它。有人能告诉我吗?
\newcount\verseno
\newcount\padano
\newcount\choice
%Set the counters to 1 to begin with
\verseno=1
\padano=1
\choice=1
%
%A verse can have 16 pādas
\def\sthana{\ifnum\padano=1 {\the\verseno a}%
\else \ifnum\padano=2 {\the\verseno b}%
\else \ifnum\padano=3 {\the\verseno c}%
\else \ifnum\padano=4 {\the\verseno d}%
\else \ifnum\padano=5 {\the\verseno e}%
\else \ifnum\padano=6 {\the\verseno f}%
\else \ifnum\padano=7 {\the\verseno g}%
\else \ifnum\padano=8 {\the\verseno h}%
\else \ifnum\padano=9 {\the\verseno i}%
\else \ifnum\padano=10 {\the\verseno j}%
\else \ifnum\padano=11 {\the\verseno k}%
\else \ifnum\padano=12 {\the\verseno l}%
\else \ifnum\padano=13 {\the\verseno m}%
\else \ifnum\padano=14 {\the\verseno n}%
\else \ifnum\padano=15 {\the\verseno o}%
\else \ifnum\padano=16 {\the\verseno p}%
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
%
%These are the markup commands
\def\p{\vstrut\advance\padano by1\ifodd\padano\else\par\fi}% a single pāda
\def\v{\vstrut\ifodd\choice\chandas\fi\global\advance\verseno by1 \padano=1}%marks end of verse
%
\def\chandas{\enskip\textrm{\the\verseno}}
%
\makeatletter
\newcommand\lfootfmt[3]{\normal@pars \rightskip=0pt \leftskip=0pt \parindent=0pt \parfillskip=0pt plus 1fil{#3}\penalty-20}
\makeatother
%
\def\mynewrule{\kern4pt
\hrule width.245\textwidth height0.5pt depth0.0pt\kern 3pt}
%
\let\Afootnoterule=\mynewrule
\let\Bfootnoterule=\mynewrule
\let\Cfootnoterule=\mynewrule
\let\Dfootnoterule=\mynewrule
\let\Efootnoterule=\mynewrule
%
\footparagraph{A}
\footparagraph{B}
\footparagraph{C}
\footparagraph{D}
\footparagraph{E}
%
\let\Afootfmt=\lfootfmt
\let\Bfootfmt=\lfootfmt
\let\Cfootfmt=\lfootfmt
\let\Dfootfmt=\lfootfmt
\let\Efootfmt=\lfootfmt
%
%
\def\vstrut{\hbox{\vrule height4pt depth3pt width0pt}}
\def\strut{\hbox{\vrule height2pt depth2pt width0pt}}
%
\def\locspace{\hskip.8em plus .2em minus .2em}
\def\loc#1{\textrm{#1}\hskip.8em plus .2em minus .2em} % lemma location
\def\incipitloc#1{\textrm{Incipit #1}\hskip.8em plus .2em minus .2em} % lemma location
\def\explicitloc#1{\textrm{Explicit #1}\hskip.8em plus .2em minus .2em} % lemma location
%
\def\codices#1{\edtext{}{\Afootnote{\strut #1}}}
\def\testim#1{\edtext{}{\Bfootnote{\strut\loc{\sthana}#1\strut}}}
\def\notestim#1{\edtext{}{\Bfootnote{#1}}}
\def\var#1{\edtext{}{\Cfootnote{\strut\loc{\sthana}#1\strut}}}
\def\novar#1{\edtext{}{\Cfootnote{#1}}}
\def\nocom#1{\edtext{}{\Dfootnote{\rm#1}}}
\def\com#1{\edtext{}{\Dfootnote{\strut\loc{\sthana}#1\strut}}}
\def\remark#1{\edtext{}{\Efootnote{\strut\loc{\sthana}#1\strut}}}
%
%
答案1
感谢 Maïeul 提供这个简单而有效的解决方案。
\documentclass[a4paper,11pt]{article}
\usepackage{lscape}
\usepackage{polyglossia}
\setmainlanguage{german}
\setotherlanguage{sanskrit}
\usepackage{fontspec}
\setmainfont{TeX Gyre Termes}
\setmonofont{TeX Gyre Termes}
\newfontfamily\devanagarifont[Script=Devanagari]{Chandas}
\newfontfamily\devnag[Script=Devanagari]{Chandas}
\newfontface\dejlight{DejaVu Sans}
\DeclareTextFontCommand{\textding}{\dejlight}
\usepackage[hang,flushmargin]{footmisc}
\usepackage[noend,noeledsec]{reledmac}
\usepackage{libertineotf}
\arrangementX[A]{paragraph}
\Xarrangement[B]{paragraph}
\Xarrangement[A]{paragraph}
\setstanzaindents{3,1}
\setcounter{stanzaindentsrepetition}{1}
\linenumincrement{1}
\firstlinenum{1}
\begin{document}
\section{Edition}
\beginnumbering
\setline{1}
\stanza
\linenumannotation{a}\edtext{candraḥ}{\Bfootnote{em. : \textit{candra} Ms}{\lemma{\textbf{Ci}}\Afootnote[nosep]{Vgl. Pts S.84, Z. 5102-5104: candraḥ sūryas tathā vahniḥ śarīre daśa nāḍikāḥ | dehasthā vāyavaḥ pañca mano bindus tathaiva ca |}}} sūryas tathā \edtext{vahniḥ}{\Bfootnote{em. : \textit{vahni} Ms}} \linenumannotation{b}śarīre daśa nāḍikāḥ | &
\setline{2}
\linenumannotation{c}\edtext{pañca sthā}{\Bfootnote{\textit{dehasthā} Pts}} \edtext{vāyavaḥ}{\Bfootnote{em. : \textit{vāyava} Ms}} pañca \linenumannotation{d}mano bindus tathaiva \edtext{ca}{\Bfootnote{\textit{fa} Pts}} ||1|| \&
\clearpage
\end{document}