看起来,TIPA 包和西里尔文 T2A fontenc 包相互抵消,只允许序言中第一个定义的包在文档中拼写出来。
但是,一位朋友的论文需要这两个软件包。有没有办法让这两个软件包兼容,或者为多个西里尔符号定义新命令(因为与多个 TIPA 符号相比,那里只需要一个或两个)?
这是不起作用的代码:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[a4paper, total={6in, 8in}]{geometry}
\usepackage{adjustbox}
\usepackage{natbib}
\usepackage{accents}
\usepackage{alphabeta}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[T1]{tipa}
\usepackage{linguex}
\usepackage[linguistics]{forest}
\renewcommand{\eachwordone}{\itshape}
\begin{document}
\exg. \textbf{učęštju} \textbf{emu} ljudi vъ crkve \label{ex:ucestju}\\
teach-PrP.DAT.SG. he-DAT. people-ACC.PL. in temple-LOC.SG.\\
`While he was teaching people in the temple ...'\\
(C. Mar. Lk. 20.1 from \citet[149]{lunt_old_2001})
\exg. $[$\textbf{hefði} þá verit þetta boðit$]$, þá væri margr maðr... \label{ex:hefditha}\\
have-P.S.3sg. then be-PP. this-NOM.SG. offer-PP.NOM.SG. then be-P.S.3sg. many-NOM.SG. man-NOM.SG.\\
`Had this then been offered, then many a man would have been...’\\
(Old Norse. Heimskringla 9.91, from Faarlund, 2007, 252)
\end{document}
我们需要特别定义 ъ。 \newcommand{\yer}{ъ} 不起作用,但不幸的是我们找不到任何其他定义西里尔符号的方法。 也许通过 Unicode?
非常感谢大家的帮助。提前致谢!
答案1
如果你只需要 ъ,你应该能够通过\texthardsign
如果你只tipa
包裹。
如果您想在代码中保留此字符,您可以\DeclareUnicodeCharacter{044A}{\texthardsign}
在文档序言中设置(我建议使用\textup
恢复为非斜体文本而不是滥用数学模式):
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[a4paper, total={6in, 8in}]{geometry}
\usepackage{adjustbox}
\usepackage{natbib}
\usepackage{accents}
\usepackage{alphabeta}
\usepackage[T1]{tipa}
\usepackage{linguex}
\usepackage[linguistics]{forest}
\renewcommand{\eachwordone}{\itshape}
\DeclareUnicodeCharacter{044A}{\texthardsign}
\begin{document}
\exg. \textbf{učęštju} \textbf{emu} ljudi vъ crkve \label{ex:ucestju}\\
teach-PrP.DAT.SG. he-DAT. people-ACC.PL. in temple-LOC.SG.\\
`While he was teaching people in the temple ...'\\
(C. Mar. Lk. 20.1 from \citet[149]{lunt_old_2001})
\exg. \textup{[}\textbf{hefði} þá verit þetta boðit\textup{]}, þá væri margr maðr... \label{ex:hefditha}\\
have-P.S.3sg. then be-PP. this-NOM.SG. offer-PP.NOM.SG. then be-P.S.3sg. many-NOM.SG. man-NOM.SG.\\
`Had this then been offered, then many a man would have been...’\\
(Old Norse. Heimskringla 9.91, from Faarlund, 2007, 252)
\end{document}
答案2
你收到错误
! LaTeX Error: Command \cyrhrdsn unavailable in encoding T1.
你可以通过告诉 LaTeX,\cyrhrdsn
如果在西里尔语境之外发现,则必须从 T2A 编码中获取,从而解决这个问题。
\documentclass{article}
\usepackage[T2A,T1]{fontenc}
\usepackage[a4paper, total={6in, 8in}]{geometry}
\usepackage{adjustbox}
\usepackage{natbib}
\usepackage{accents}
\usepackage{alphabeta}
\usepackage[T1]{tipa}
\usepackage{linguex}
\usepackage[linguistics]{forest}
\renewcommand{\eachwordone}{\itshape}
% declare the necessary encoding switch
\DeclareTextSymbolDefault{\cyrhrdsn}{T2A}
\begin{document}
\exg. \textbf{učęštju} \textbf{emu} ljudi vъ crkve \label{ex:ucestju}\\
teach-PrP.DAT.SG. he-DAT. people-ACC.PL. in temple-LOC.SG.\\
`While he was teaching people in the temple ...'\\
(C. Mar. Lk. 20.1 from \citet[149]{lunt_old_2001})
\exg. \textup{[}\textbf{hefði} þá verit þetta boðit\textup{]}, þá væri margr maðr...
\label{ex:hefditha}\\
have-P.S.3sg. then be-PP. this-NOM.SG. offer-PP.NOM.SG. then
be-P.S.3sg. many-NOM.SG. man-NOM.SG.\\
`Had this then been offered, then many a man would have been...’\\
(Old Norse. Heimskringla 9.91, from Faarlund, 2007, 252)
\end{document}