如何在文本模式下使用 Fraktur/Gothic 字体

如何在文本模式下使用 Fraktur/Gothic 字体

有没有办法在文本模式下使用 fraktur 字体样式?我无法输入 math 和 do,\mathfrak因为空格会被 LaTeX 占用。

有什么指点吗?

答案1

您可以使用由 Yiannis Haralambous 设计的一些精美的字体(这些字体也可以与 XeLaTeX 一起使用,但不幸的是它们不接受重音字母的 Unicode 输入)。

\documentclass{article}
\usepackage{yfonts}

\begin{document}
\textfrak{This: is: Fraktur}

\textswab{This: is: Schwabacher}

\textgoth{This: is: Gothic}
\end{document}

(注意“round s”是如何获得的。感谢@Christian 注意到这一点。)

简单的例子

您可以在以下位置找到字体的描述TUGboat 上的这篇文章

值得注意的是,包装上还提供了首字母。

首字母缩写示例

这是由此代码生成的,请注意 long 和 round 之间的变化:

\documentclass{article}
\usepackage{yfonts}

\begin{document}
{\frakfamily\fraklines
   \yinipar{T}his: is: an initial with a sentence in Fraktur.\\
   \textfrak{This: is: also Fraktur.}\\
   \textswab{This: is: Schwabacher.}\\
   \textgoth{This: is: Gothic.}
}
\end{document}

答案2

UniFraktur 项目相当不错。

\documentclass{minimal}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}
\setmainfont{UnifrakturMaguntia}
\renewcommand\emshape{\addfontfeature{LetterSpace=20.0,Ligatures=Required,Ligatures=NoCommon}}
\begin{document}
This is an \emph{important} teſt.
\end{document}

这是一次重要的考验。

引自该页面Fraktur 字母间距

就字母间距而言,花体连字‹ch›、‹ck›、‹ſt›、‹tz›被视为单个字母。

线路

\renewcommand\emshape{\addfontfeature{LetterSpace=20.0,Ligatures=Required,Ligatures=NoCommon}}

取自该页面。

一个人为的例子:

\documentclass{minimal}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}
\setmainfont{UnifrakturMaguntia}
\renewcommand\emshape{\addfontfeature{LetterSpace=20.0,Ligatures=Required,Ligatures=NoCommon}}
\begin{document}
Uſe the \emph{tzar's checkliſt}!
\end{document}

使用沙皇的清单!

该项目有一个论坛,一篇帖子推荐几条线路

\usepackage{xspace}
\renewcommand\emshape{\xspace\addfontfeature{LetterSpace=20.0,WordSpace=2.0,Ligatures={Required,NoCommon}}}

反而。

我们可以通过以下例子来说明其中的差异:

\documentclass[a5paper]{scrartcl}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}
\setmainfont{UnifrakturMaguntia}
\usepackage{xspace}
\newcommand{\exampletext}{%
‘Now, it is very remarkable that this is ſo extenſively overlooked,’
continued the Time Traveller, with a ſlight acceſſion of cheerfulneſs.
‘Really this is what is meant by the Fourth Dimenſion, though ſome
people who talk about the Fourth Dimenſion do not know they mean it. It
is only another way of looking at Time. \emph{There is no difference
between Time and any of the three dimenſions of Space except that our
conſciouſneſs moves along it.} But ſome fooliſh people have got hold of
the wrong ſide of that idea. You have all heard what they have to ſay
about this Fourth Dimenſion?’%
}
\begin{document}
\renewcommand\emshape{\addfontfeature{LetterSpace=20.0,Ligatures=Required,Ligatures=NoCommon}}
\exampletext

\renewcommand\emshape{\xspace\addfontfeature{LetterSpace=20.0,WordSpace=2.0,Ligatures={Required,NoCommon}}}
\exampletext
\end{document}

示例文本

\xspace重要的是要注意(与 -package 一起引入)的效果xspace。如果没有它,间隔文本前面的空格将成为正常的单词间空格,因此会变得太细;使得很难识别间隔文本的开头。

答案3

使用 XeLaTeX,你可以使用特殊的 fraktur 字体(也许http://www.fontspace.com/george-williams/fractur)例如使用:

\usepackage{fontspec}
\setmainfont[Ligatures=TeX]{frakturfontname}

当然可以将这种字体仅应用于文档的特定部分,但我以前并不需要这样做。

相关内容