删除 Baskervville 字体中的前导空格

删除 Baskervville 字体中的前导空格

我正在使用 Baskervville-Regular 字体(https://github.com/anrt-type/ANRT-Baskervville)。我尝试\acute在文本区域中使用,但当\acute符号出现在行中时,行距发生了变化。请参阅下面的 MWE

\documentclass{book}

\usepackage{amsmath,amsfonts,amssymb}
\usepackage{xcolor}
\usepackage{fontspec}

\setmainfont{Baskervville-Regular.ttf}


\begin{document}

WinEdt's macro language has evolved gradually: as the need arose for actions beyond a predefined set of commands. As a consequence, it is a pretty non-standard language that implements loops{\color{red}{\ensuremath{\acute{\text{A}}}}} and  conditional statements with macro functions rather than keywords. Sophisticated macro scripts involving loops and conditional statements are,loops and conditional statements with macro functions rather than keywords. Sophisticated macro scripts involving admittedly, hard to write and read, and it may take some{\color{red}{\ensuremath{\acute{\text{b}}}}} time to become familiar with it. However, WinEdt comes with almost 500 predefined macro functions that can be used to accomplish the most common tasks. Thus you do not have to be a macro language guru to create an interface

\end{document}

答案1

你绝对应该使用文本口音,而不是数学口音。

\documentclass{book}

\usepackage{xcolor}
\usepackage{fontspec}

\setmainfont{Baskervville}[
  Extension=.ttf,
  UprightFont=*-Regular,
  ItalicFont=*-Italic,
]

\linespread{1.1}

\DeclareTextCompositeCommand{\'}{TU}{b}{\accent"B4 b}

\begin{document}

Á \'A \'b ć \'c

WinEdt's macro language has evolved gradually: as the need arose 
for actions beyond a predefined set of commands. As a consequence, 
it is a pretty non-standard language that implements loops \textcolor{red}{\'{A}} 
and conditional statements with macro functions rather than  keywords. 
Sophisticated macro scripts involving loops and conditional statements are, 
loops and conditional statements with macro functions rather than keywords. 
Sophisticated macro scripts involving admittedly, hard to write and read, 
and it may take some \textcolor{red}{\'{b}} time to become familiar with it. 
However, WinEdt comes with almost  500 predefined macro functions that can 
be used to accomplish the most common tasks. Thus you do not have to be a 
macro language guru to create an interface

\end{document}

重音符号 上的重音符号b位置可能不正确(因为复合字符的锚点定义不明确)。常见的重音字母是预制的,但您不需要知道如何输入它们。无论如何,Á\'A都会产生完全相同的结果。

根据 Thérèse 的评论,我设置了更大的行间距\linespread{1.1}

在此处输入图片描述

相关内容