我想为希腊语定义一个类似于德语的命令/快捷方式|
,它插入最小的空格并标记(迄今为止)首选的连字符点。此外,我需要第二个命令/快捷方式,就像第一个一样,此时不允许连字符。我尝试过的所有方法都失败了:在最好的情况下它什么也不做,在最坏的情况下它会插入|
,在最坏的情况下 eledmac 和 eledpar 会中断(尽管 ledmac 和 ledpar 可以工作)。正如我在整个文档中使用的一样\/
,\|
如果我能够以适当的方式定义这些命令而不替换它们,我会很高兴。MWE 是我最近的尝试,像往常一样失败了。(它有点长,因为我需要与 eledmac/eledpar 进行一些交互)
\documentclass{scrbook}
\usepackage{savesym}
\usepackage[LGR,T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[main=ngerman,greek]{babel}
\languageattribute{greek}{polutoniko}
\usepackage[GlyphNames]{teubner}
\savesymbol{breve}
\usepackage[osf,sc]{mathpazo}
\ifFamily{pplj}{porson}
\usepackage{calc}\usepackage{ragged2e}
\usepackage[nonegthinspace,twothirds]{thinsp}
\usepackage{eledmac}
\usepackage{eledpar}
\usepackage[babel,kerning=true,tracking=true]{microtype}
\makeatletter
\newcommand{\SOK}{\makebox[\widthof{FAI.}][r]{\textgreek{\scshape SW.}}\makebox[\widthof{xx}][r]{}}
\newcommand{\PHAI}{\makebox[\widthof{FAI.}][r]{\textgreek{\scshape FAI.}}\makebox[\widthof{xx}][r]{}}
renewcommand{\,}{\thinspace\linebreak[1]}
%%now it comes (this is the latest attempt, which failed like all others
\addto\extrasgreek{
\let\|\relax
\let\/\relax
\newcommand*{\/}{\discretionary{-}{}{\kern.08em}\linebreak[2]}
\renewcommand*{\|}{\ifmmode\mskip1mu\else\kern.08em\linebreak[0]\fi}
}
\makeatother
\begin{document}
\begin{pages}
\begin{Leftside}
\selectlanguage{polutonikogreek}
\beginnumbering
\autopar
SWKRATHS\quad\>\~W f\ia le Fa\ic dre, po\ic{}d\hg{} ka\ig{} p\oa\/jen?
\textsc{SWKRATHS}\quad Par\ag{} Lus\ia ou, \wsc{} S\wa krates, to\uc{} Kef\aa lou, pore\ua omai d\eg{}
pr\oG s per\ia\/paton \esa xw te\ia qous; suqn\oG n g\ag r \es ke\ic{} di\/\ea\/triya qr\oa non
kaj\/\ha menos \es x \er w\/jino\uc. t\wci{} d\eg{} s\wci{} ka\ig{} \es m\wci{} \er ta\ia r\wi{}
peij\oa menos \>Akoumen\wci{} kat\ag{} t\ag s \oR do\ug s poio\uc mai to\ug s peri\/p\aa tous;
fhs\ig{} g\ag r \as\|kopwt\ea rous e\isc nai t\wc n \es n to\ic s dr\oa mois.
\SOK Kal\wc s g\aa r, \wsc{} \er ta\ic re, l\ea gei. \as t\ag r Lus\ia as \hsc n,
\wr s \esa\|oiken, \es n \asa stei?
\PHAI Na\ia, par''\,\>Epi\/kr\aa tei, \es n t\hci\/de t\hci{} plhs\ia on to\uc{}
\>Olump\ia ou o\is k\ia\ai{} t\hci{} Moruq\ia\ai.
\SOK T\ia s o\usc n d\hg{} \hsc n \hr{} dia\/trib\ha? \hsg{} d\hc lon \ora\|ti t\wc n
l\oa gwn \ur m\ac s Lus\ia as e\ir st\ia a?
\PHAI Pe\ua s\hi, e\isa{} soi sqol\hg{} pro\/\id\oa nti \as ko\ua ein.
\SOK T\ia{} d\ea? o\us k \asg n o\isa ei me kat\ag{} P\ia ndaron ((ka\ig{} \as\|sqol\ia as
\ur p\ea r\/teron)) pr\ac gma poi\ha sesjai t\oG{} s\hg n te ka\ig{} Lus\ia ou dia\/trib\hg n \as ko\uc sai?
\PHAI Pr\oa\/age d\ha.
\SOK L\ea gois \asa n.
\PHAI Ka\ig{} m\ha n, \wsc{} S\wa\/krates, prosv\/\ha kousa g\ea{} soi \hr{} \as ko\ha; \oR{}
g\aa r toi l\oa gos \hsc n, per\ig{} \org n di\/e\|tr\ia bomen, o\us k o\isc d''\,\ora n\/tina
tr\oa pon \es rwtik\oa s. g\ea\/grafe g\ag r d\hg{} \oR{} Lus\ia as peir\wa men\oa n tina t\wc n kal\wc n,
o\us q \ur p''\,\es rasto\uc{} d\ea, \as ll''\,a\us t\oG{} d\hg{} to\uc to ka\ig{} ke\/k\oa myeutai;
l\ea gei g\ag r \wr s qarist\ea on m\hg{} \es r\wc nti m\ac llon \hsg{} \es r\wc nti.
\pend
\endnumbering
\end{Leftside}
\begin{Rightside}
\selectlanguage{ngerman}\beginnumbering\autopar
\emph{Sokrates} bla
\emph{Phaidros} bla
\emph{Sokrates} bla
\emph{Phaidros} bla
\emph{Sokrates} bla
\emph{Phaidros} bla
\emph{Sokrates} bla
\emph{Phaidros} bla
\emph{Sokrates} bla
\emph{Phaidros} bla
\pend
\endnumbering
\end{Rightside}
\Pages
\end{pages}
\end{document}