TeXLive2009 中的 tipa 中的大多数功能似乎是 TeXLive2012 中 fontspec 的一部分 - 如果您同时激活两者,您会收到一条错误消息:“命令 sups 已定义”。
以下代码用于抑制音调字母上的侧音符条,在 TeXLive2009 中与 tipa 配合使用效果很好,但在 TeXLive2012 中不再与 fontspec 配合使用:
\makeatletter
\renewcommand\@tonestembar{%
\setbox0\hbox{\tipaencoding\char'277}%
\hbox{\vrule height \ht0 depth \dp0
width 0pt}}
\makeatother
您会收到一个错误,指出音调杆未定义,并且音调标记是与附加的侧边栏一起打印的。
有什么方法可以调整此代码以说服 TeXLive2012 抑制音调杆?
MWE 乳胶(作品):
\documentclass[a4paper,12pt, oneside]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8x]{inputenc}
\usepackage{mathptmx}
\usepackage[tone]{tipa} % tone invokes the tone letters
% Fix tonemarks to show marks without sidebars.
\makeatletter
\renewcommand\@tonestembar{%
\setbox0\hbox{\tipaencoding\char'277}%
\hbox{\vrule height \ht0 depth \dp0 width 0pt}} % no stem
\makeatother
\begin{document}
This is an example of the tonemarks without the stembars:
\textbf{babubibuba [~\tone{11}\, \tone{55}\, \tone{33}\, \tone{55}\, \tone{11}~]}
\end{document}
MWE xetex(不起作用):
\documentclass[a4paper,12pt, oneside]{article}
\usepackage{fontspec}
\defaultfontfeatures{Mapping=tex-text, Scale=MatchLowercase}
\setmainfont{Charis SIL}
% \usepackage[tone]{tipa} % IPA letters - tone invokes the tone letters
% Fix tonemarks to show marks without sidebars.
\makeatletter
\renewcommand\@tonestembar{%
\setbox0\hbox{\tipaencoding\char'277}%
\hbox{\vrule height \ht0 depth \dp0 width 0pt}} % no stem
\makeatother
\begin{document}
\fontspec[Renderer=Graphite]{Charis SIL}
This is an example of the tonemarks which are showing the stembars in spite of using the suppression code that works in latex:
\textbf{babubibuba [~\tone{11}\, \tone{55}\, \tone{33}\, \tone{55}\, \tone{11}~]}
Changing ``renewcommand'' to ``newcommand'' to get rid of the error message``@tonestembar undefined'' makes no difference.
\end{document}
答案1
tipa
提供的输入支持fontspec
来自xunicode
包。但是,它并未涵盖所有功能tipa
。一种解决方法是阻止xuicode
加载:
\documentclass[a4paper,12pt, oneside]{article}
\expandafter\def\csname [email protected]\endcsname{}
\usepackage[tone]{tipa} % tone invokes the tone letters
\usepackage{fontspec}
\defaultfontfeatures{Mapping=tex-text, Scale=MatchLowercase}
\setmainfont{Charis SIL}
% \usepackage[tone]{tipa} % IPA letters - tone invokes the tone letters
% Fix tonemarks to show marks without sidebars.
\makeatletter
\renewcommand\@tonestembar{%
\setbox0\hbox{\tipaencoding\char'277}%
\hbox{\vrule height \ht0 depth \dp0 width 0pt}} % no stem
\makeatother
\begin{document}
\fontspec[Renderer=Graphite]{Charis SIL}
This is an example of the tonemarks which are showing the stembars in spite of using the suppression code that works in latex:
\textbf{babubibuba [~\tone{11}\, \tone{55}\, \tone{33}\, \tone{55}\, \tone{11}~]}
Changing ``renewcommand'' to ``newcommand'' to get rid of the error message``@tonestembar undefined'' makes no difference.
\end{document}
当然,如果真实文档使用其他xuincode
功能,这将是一个问题!