小型大写字母(\sc)
不产生带点的 I (İ)
这里是 mwe
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[turkish]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage[left=3.50cm, right=2.50cm, top=3.00cm, bottom=3.00cm]{geometry}
\addto\extrasturkish{\uccode`i=\string"9D \lccode`I=\string"19 }
\addto\noextrasturkish{\uccode`i=`I \lccode`I=`i }
\begin{document}
\shorthandoff{=}
\sc{ı and i. just like I and İ}
\end{document}
我该如何强制呢?
答案1
请注意,已被弃用,并且将按照我下面不使用的\sc
方式使用。{\sc ...}
\sc{...}
\textsc
我认为最简单的做法是删除\.\i
与的魔法关联,i
以便它始终使用点重音。
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[turkish]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage[left=3.50cm, right=2.50cm, top=3.00cm, bottom=3.00cm]{geometry}
\addto\extrasturkish{\uccode`i=\string"9D \lccode`I=\string"19 }
\addto\noextrasturkish{\uccode`i=`I \lccode`I=`i }
\begin{document}
\expandafter\let\csname\string\T1\string\.-\string\i\endcsname\relax
\shorthandoff{=}
\textsc{ı and \.\i. just like I and İ}
\textrm{ı and \.\i. just like I and İ}
\end{document}
答案2
这是一个相当大的问题。:(
小型大写字母i
有不点并将其改为带点的 i 必然会带来比它解决的更大的问题。
这真实的解决方案是使用合适的土耳其字体,其中i
始终有一个点。
对于你的情况,我建议一个解决方法:添加到序言中
\providecommand*\UndeclareTextComposite[3]{%
\expandafter\let\csname\expandafter\string\csname
#2\endcsname\string#1-#3\endcsname\relax}
\UndeclareTextComposite{\.}{T1}{i}
\makeatletter
\DeclareTextCompositeCommand{\.}{T1}{i}{%
\ifx\f@shape\scdefault\accent10i\else i\fi}
\makeatother
并输入小写字母中的带点的 i
\textsc{ı and \.i. just like I and İ}
用正常文字书写\.i
应该不会造成太大的伤害。
答案3
下面,我将尝试给出一个尝试使用 来解决问题的示例lualatex
。如上所述,使用经过正确设计的开放式字体几乎可以立即解决问题。不幸的是,有相当多的字体需要调整才能产生小写点 i。在这里,我将使用四种不同的字体 - Minion Pro、Scala Pro、TeX Gyre Termes 和 Latin Modern。前两种是商业字体,而后两种可以从http://www.gust.org.pl/projects/e-foundry。
最终结果如下所示。
我现在将解释我对上表中每一行所做的事情。
1) Minion Pro 已进行过多次更新。最新版本的查询表中已正确设置了土耳其语。这里你可以看到
version 2.012 created 2004/06/29
Edited 'smcp' feature to remove a redundant i->i.sc substitution which was interfering with Turkish substitution i->idotaccent.sc.
version 2.030 created 2007/08/16
Added glyph "i.dot" as duplicate of glyph "i". Added substitution to 'locl' feature to substitute "i.dot" from "i" in certain languages (e.g. Turkish).
该字体开箱即用。无需任何调整。
2-3) Scala Pro 似乎开箱即用。但是,由于它造成的歧义,当语言为土耳其语时,fi 连字符不适用。不幸的是,fi 对之间的字距太近了,不符合我的口味。尽管问题中没有明确要求,但我提供了一个示例功能文件,它增加了一些空间来修复字距。
4-5) TeX Gyre Termes 有一个名为 的字形idotaccent.sc
,但字体的查找表中没有对它的引用。下面的功能文件解决了这个问题,尽管是以一种蛮力的方式。可能有一个比图示更优雅的解决方案:我使用 Font Forge 程序提取字体的功能文件,复制了用于小型大写字母转换的相关查找表,在名为(小型大写字母土耳其语)(Font Forge->Element Menu->Font Info->Click on lookups->Right click on the table->Save feature file)
的新功能中修改了土耳其语的查找信息并激活了该功能。sctr
6-7) Latin Modern 中没有带点的 i 的小写字母。这次我采用了无点的 i 的小写字母,为其添加了一个点重音符(uni0307)
,并粗略地修复了字距。我再次创建了一个名为 的新功能sctr
,并激活了它。
可能有方法可以直接修改 smcp 查找表中使用的规则,但我无法使用功能文件来做到这一点。无论我做什么,smcp 规则中的预定义替换似乎都会覆盖我指示的更改。因此,我能找到的唯一补救措施是创建一个新功能来执行黑客攻击。
有关功能文件的更多信息,请参阅文件语法页面。此外,以下页面对如何定义无点 i 小型大写字母以及土耳其语的各种连字的功能文件进行了详细的讨论:第 1 页,第2页,第 3 页。
以下是生成上表的代码:
% !TeX program = lualatex
% !TeX spellcheck = tr
\documentclass[12pt,oneside,a4paper]{article}
\pagestyle{empty}
\usepackage[no-math]{fontspec}
\usepackage[turkish]{babel}
\defaultfontfeatures{Ligatures=TeX, Language=Turkish}
\setmainfont[SmallCapsFont={Latin Modern Roman Caps}]{Latin Modern Roman}
\newfontfamily\scalaKern[FeatureFile={scala.fea}]{Scala Pro}
\newfontface\termesSC[FeatureFile={termes.fea},RawFeature={+sctr}]{TeX Gyre Termes}
\newfontfamily\lmSC[SmallCapsFont={Latin Modern Roman Caps}, SmallCapsFeatures={FeatureFile={lm.fea},RawFeature={+sctr}}]{Latin Modern Roman}
\newcommand{\test}{fizik}
\newcommand{\TEST}{FİZİK}
\begin{document}
\begin{tabular}{rllll}
&Font & Regular & Small Caps & All Caps \\
1) &Minion Pro v2.030 & {\fontspec{Minion Pro}\test} & {\fontspec{Minion Pro} \textsc{\test}} & {\fontspec{Minion Pro} \TEST} \\
2) &Scala Pro & {\fontspec{Scala Pro} \test} & {\fontspec{Scala Pro} \textsc{\test}} & {\fontspec{Scala Pro} \TEST}\\
3) &Scala Pro (scala.fea) & {\scalaKern \test} & &\\
4) &TeX Gyre Termes v2.004& {\fontspec{TeX Gyre Termes} \test} & {\fontspec{TeX Gyre Termes} \textsc{\test}} & {\fontspec{TeX Gyre Termes} \TEST}\\
5) &TeX Gyre Termes (termes.fea) & & {\termesSC \test} & \\
6) &Latin Modern v2.004 & {\test} & {\textsc{\test}} & {\TEST} \\
7) &Latin Modern (lm.fea) & & {\lmSC \textsc{\test}} & \\
\end{tabular}
\end{document}
scala.fea 内容
feature kern {
language TRK;
pos \f \i.latn_TRK 40;
} kern;
termes.fea 内容
lookup smcpLowercasetoSmallCapitalsloo {
lookupflag 0;
sub \a by \a.sc ;
sub \b by \b.sc ;
sub \c by \c.sc ;
sub \d by \d.sc ;
sub \e by \e.sc ;
sub \f by \f.sc ;
sub \g by \g.sc ;
sub \h by \h.sc ;
# sub \i by \i.sc ;
sub \j by \j.sc ;
sub \k by \k.sc ;
sub \l by \l.sc ;
sub \m by \m.sc ;
sub \n by \n.sc ;
sub \o by \o.sc ;
sub \p by \p.sc ;
sub \q by \q.sc ;
sub \r by \r.sc ;
sub \s by \s.sc ;
sub \t by \t.sc ;
sub \u by \u.sc ;
sub \v by \v.sc ;
sub \w by \w.sc ;
sub \x by \x.sc ;
sub \y by \y.sc ;
sub \z by \z.sc ;
sub \aacute by \aacute.sc ;
sub \abreve by \abreve.sc ;
sub \abreveacute by \abreveacute.sc ;
sub \abrevedotbelow by \abrevedotbelow.sc ;
sub \abrevegrave by \abrevegrave.sc ;
sub \abrevehookabove by \abrevehookabove.sc ;
sub \abrevetilde by \abrevetilde.sc ;
sub \acircumflex by \acircumflex.sc ;
sub \acircumflexacute by \acircumflexacute.sc ;
sub \acircumflexdotbelow by \acircumflexdotbelow.sc ;
sub \acircumflexgrave by \acircumflexgrave.sc ;
sub \acircumflexhookabove by \acircumflexhookabove.sc ;
sub \acircumflextilde by \acircumflextilde.sc ;
sub \adblgrave by \adblgrave.sc ;
sub \adieresis by \adieresis.sc ;
sub \adotbelow by \adotbelow.sc ;
sub \ae by \ae.sc ;
sub \aeacute by \aeacute.sc ;
sub \agrave by \agrave.sc ;
sub \ahookabove by \ahookabove.sc ;
sub \amacron by \amacron.sc ;
sub \aogonek by \aogonek.sc ;
sub \aring by \aring.sc ;
sub \aringacute by \aringacute.sc ;
sub \atilde by \atilde.sc ;
sub \cacute by \cacute.sc ;
sub \ccaron by \ccaron.sc ;
sub \ccedilla by \ccedilla.sc ;
sub \ccircumflex by \ccircumflex.sc ;
sub \cdotaccent by \cdotaccent.sc ;
sub \dcaron by \dcaron.sc ;
sub \dcroat by \dcroat.sc ;
sub \ddotbelow by \ddotbelow.sc ;
sub \dlinebelow by \dlinebelow.sc ;
sub \eacute by \eacute.sc ;
sub \ebreve by \ebreve.sc ;
sub \ecaron by \ecaron.sc ;
sub \ecircumflex by \ecircumflex.sc ;
sub \ecircumflexacute by \ecircumflexacute.sc ;
sub \ecircumflexdotbelow by \ecircumflexdotbelow.sc ;
sub \ecircumflexgrave by \ecircumflexgrave.sc ;
sub \ecircumflexhookabove by \ecircumflexhookabove.sc ;
sub \ecircumflextilde by \ecircumflextilde.sc ;
sub \edblgrave by \edblgrave.sc ;
sub \edieresis by \edieresis.sc ;
sub \edotaccent by \edotaccent.sc ;
sub \edotbelow by \edotbelow.sc ;
sub \egrave by \egrave.sc ;
sub \ehookabove by \ehookabove.sc ;
sub \emacron by \emacron.sc ;
sub \eng by \eng.sc ;
sub \eogonek by \eogonek.sc ;
sub \ereversed by \ereversed.sc ;
sub \eth by \eth.sc ;
sub \etilde by \etilde.sc ;
sub \gacute by \gacute.sc ;
sub \gbreve by \gbreve.sc ;
sub \gcaron by \gcaron.sc ;
sub \gcircumflex by \gcircumflex.sc ;
sub \gcommaaccent by \gcommaaccent.sc ;
sub \gdotaccent by \gdotaccent.sc ;
sub \germandbls by \germandbls.sc ;
sub \hbar by \hbar.sc ;
sub \hbrevebelow by \hbrevebelow.sc ;
sub \hcircumflex by \hcircumflex.sc ;
sub \hdieresis by \hdieresis.sc ;
sub \hdotbelow by \hdotbelow.sc ;
sub \iacute by \iacute.sc ;
sub \ibreve by \ibreve.sc ;
sub \icircumflex by \icircumflex.sc ;
sub \idblgrave by \idblgrave.sc ;
sub \idieresis by \idieresis.sc ;
sub \idotbelow by \idotbelow.sc ;
sub \igrave by \igrave.sc ;
sub \ihookabove by \ihookabove.sc ;
sub \i_j by \i_j.sc ;
sub \imacron by \imacron.sc ;
sub \iogonek by \iogonek.sc ;
sub \itilde by \itilde.sc ;
sub \jcircumflex by \jcircumflex.sc ;
sub \kcommaaccent by \kcommaaccent.sc ;
sub \lacute by \lacute.sc ;
sub \lcaron by \lcaron.sc ;
sub \lcommaaccent by \lcommaaccent.sc ;
sub \ldot by \ldot.sc ;
sub \ldotbelow by \ldotbelow.sc ;
sub \ldotbelowmacron by \ldotbelowmacron.sc ;
sub \lslash by \lslash.sc ;
sub \mdotbelow by \mdotbelow.sc ;
sub \nacute by \nacute.sc ;
sub \ncaron by \ncaron.sc ;
sub \ncommaaccent by \ncommaaccent.sc ;
sub \ndotaccent by \ndotaccent.sc ;
sub \ndotbelow by \ndotbelow.sc ;
sub \ntilde by \ntilde.sc ;
sub \oacute by \oacute.sc ;
sub \obreve by \obreve.sc ;
sub \ocircumflex by \ocircumflex.sc ;
sub \ocircumflexacute by \ocircumflexacute.sc ;
sub \ocircumflexdotbelow by \ocircumflexdotbelow.sc ;
sub \ocircumflexgrave by \ocircumflexgrave.sc ;
sub \ocircumflexhookabove by \ocircumflexhookabove.sc ;
sub \ocircumflextilde by \ocircumflextilde.sc ;
sub \odblgrave by \odblgrave.sc ;
sub \odieresis by \odieresis.sc ;
sub \odotbelow by \odotbelow.sc ;
sub \oe by \oe.sc ;
sub \ograve by \ograve.sc ;
sub \ohookabove by \ohookabove.sc ;
sub \ohorn by \ohorn.sc ;
sub \ohornacute by \ohornacute.sc ;
sub \ohorndotbelow by \ohorndotbelow.sc ;
sub \ohorngrave by \ohorngrave.sc ;
sub \ohornhookabove by \ohornhookabove.sc ;
sub \ohorntilde by \ohorntilde.sc ;
sub \ohungarumlaut by \ohungarumlaut.sc ;
sub \omacron by \omacron.sc ;
sub \oogonek by \oogonek.sc ;
sub \oslash by \oslash.sc ;
sub \oslashacute by \oslashacute.sc ;
sub \otilde by \otilde.sc ;
sub \racute by \racute.sc ;
sub \rcaron by \rcaron.sc ;
sub \rcommaaccent by \rcommaaccent.sc ;
sub \rdblgrave by \rdblgrave.sc ;
sub \rdotaccent by \rdotaccent.sc ;
sub \rdotbelow by \rdotbelow.sc ;
sub \rdotbelowmacron by \rdotbelowmacron.sc ;
sub \sacute by \sacute.sc ;
sub \scaron by \scaron.sc ;
sub \scedilla by \scedilla.sc ;
sub \scircumflex by \scircumflex.sc ;
sub \uni0219 by \uni0219.sc ;
sub \sdotbelow by \sdotbelow.sc ;
sub \tcaron by \tcaron.sc ;
sub \tcedilla by \tcedilla.sc ;
sub \uni021B by \uni021B.sc ;
sub \tdieresis by \tdieresis.sc ;
sub \tdotbelow by \tdotbelow.sc ;
sub \thorn by \thorn.sc ;
sub \tlinebelow by \tlinebelow.sc ;
sub \uacute by \uacute.sc ;
sub \ubreve by \ubreve.sc ;
sub \ucircumflex by \ucircumflex.sc ;
sub \udblgrave by \udblgrave.sc ;
sub \udieresis by \udieresis.sc ;
sub \udotbelow by \udotbelow.sc ;
sub \ugrave by \ugrave.sc ;
sub \uhookabove by \uhookabove.sc ;
sub \uhorn by \uhorn.sc ;
sub \uhornacute by \uhornacute.sc ;
sub \uhorndotbelow by \uhorndotbelow.sc ;
sub \uhorngrave by \uhorngrave.sc ;
sub \uhornhookabove by \uhornhookabove.sc ;
sub \uhorntilde by \uhorntilde.sc ;
sub \uhungarumlaut by \uhungarumlaut.sc ;
sub \umacron by \umacron.sc ;
sub \uogonek by \uogonek.sc ;
sub \uring by \uring.sc ;
sub \utilde by \utilde.sc ;
sub \wacute by \wacute.sc ;
sub \wcircumflex by \wcircumflex.sc ;
sub \wdieresis by \wdieresis.sc ;
sub \wgrave by \wgrave.sc ;
sub \yacute by \yacute.sc ;
sub \ycircumflex by \ycircumflex.sc ;
sub \ydieresis by \ydieresis.sc ;
sub \ydotbelow by \ydotbelow.sc ;
sub \ygrave by \ygrave.sc ;
sub \yhookabove by \yhookabove.sc ;
sub \ytilde by \ytilde.sc ;
sub \zacute by \zacute.sc ;
sub \zcaron by \zcaron.sc ;
sub \zdotaccent by \zdotaccent.sc ;
sub \zdotbelow by \zdotbelow.sc ;
sub \aogonekacute by \aogonekacute.sc ;
sub \eogonekacute by \eogonekacute.sc ;
sub \iogonekacute by \iogonekacute.sc ;
sub \jacute by \jacute.sc ;
sub \oogonekacute by \oogonekacute.sc ;
sub \u_uni032F by \ubrevebelowinverted.sc ;
sub \h_uni0303 by \h_uni0303.sc ;
sub \imacron.alt by \imacron.alt.sc ;
sub \l_uni0303 by \l_uni0303.sc ;
sub \t_uni0303 by \t_uni0303.sc ;
} smcpLowercasetoSmallCapitalsloo;
feature sctr {
language TRK;
sub i by idotaccent.sc;
lookup smcpLowercasetoSmallCapitalsloo;
} sctr;
lm.fea 内容
feature sctr {
language TRK;
sub i by \i \uni0307;
} sctr;
feature kern {
language TRK;
position \uni0307 <150 0 0 0>;
} kern;