关于LaTeX:数字符号 ('№'), 会
N\textsuperscript{\underline{\scriptsize o}}
是 \textnumero (来自 textcomp 包) 的有效替代品吗?我更喜欢与周围文本使用的字体相匹配的数字符号,尽管这显然不是某些字体设计师的偏好 (参见 Times New Roman)。
答案1
发挥带头作用替代方案在我的回答中苏格兰-爱尔兰裔美国姓氏:Mc——如何实现一系列带有下划线的美观的凸起 c?...
可选参数设置“o”和下划线之间的间隙。
\documentclass{article}
\usepackage{stackengine,graphicx}
\newcommand\No[1][.13ex]{%
\setbox0=\hbox{\scalebox{.7}{o}}%
\setbox2=\hbox{N}%
N\kern-.05em\stackengine{\dimexpr\ht0-\ht2+#1}{\belowbaseline[-\ht2]{\copy0}}%
{\rule[-.13ex]{.7\wd0}{.13ex}}%
{U}{c}{F}{F}{L}%
}
\begin{document}
\No 3
\LARGE\No[.2ex]3
\sffamily
\No 3
\normalsize \No 3
\end{document}
答案2
textcomp
只是从现代计算机的 TS1 中获取字形 155(八进制 233),这会给出您不喜欢的符号。
例如LaTeX 字体编码文档;相关页面如下。
不,我对你的选择没有任何异议,但正如 cfr 所观察到的,这个字形是字体的一部分。
答案3
为了回应评论,显示简单的、手动构建的蓝色表格(没有任何额外的字距调整、凸起框等),以便与字体设计师的版本进行比较:
传统字体需要做更多的工作(TS1 与 T1 编码、字距调整、调整大小等):
平均能量损失
\documentclass{article}
\usepackage[table]{xcolor}
\usepackage{fontspec}
\setmainfont{Noto Serif}
\newcommand\nhead{\rowcolor{blue!12}}
\newcommand\propsol{{\color{blue}N\textsuperscript{\underline{\scriptsize o}}}}
\newcommand\legpropsol{{\usefont{T1}{lmr}{m}{n}\color{blue}[N\textsuperscript{\underline{\scriptsize o}}]}}
\newcommand\mytext{text № [\propsol] 3 text}
\newfontfamily\ffonta{Book Antiqua}
%\newfontfamily\ffontb{Commissioner-Regular.ttf}
\newfontfamily\ffontc{Cormorant Garamond}
\newfontfamily\ffontd{Cormorant Infant}
\newfontfamily\ffonte{Cormorant SC}
\newfontfamily\ffontf{DejaVu Sans}
\newfontfamily\ffontg{DejaVu Sans Mono}
\newfontfamily\ffonth{DejaVu Serif}
\newfontfamily\ffonti{Doulos SIL}
%\newfontfamily\ffontj{Exo 2}
\newfontfamily\ffontk{FreeMono}
\newfontfamily\ffontl{FreeSans}
\newfontfamily\ffontm{FreeSerif}
\newfontfamily\ffontn{Gentium Plus}
\newfontfamily\ffonto{IBM Plex Mono}
\newfontfamily\ffontp{IBM Plex Sans}
\newfontfamily\ffontq{IBM Plex Serif}
\newfontfamily\ffontr{Liberation Mono}
\newfontfamily\ffonts{Liberation Sans}
\newfontfamily\ffontt{Liberation Serif}
\newfontfamily\ffontu{Linux Biolinum G}
\newfontfamily\ffontv{Linux Libertine Display G}
\newfontfamily\ffontw{Linux Libertine G}
\newfontfamily\ffontx{Noto Mono}
\newfontfamily\ffonty{Noto Sans}
\newfontfamily\ffontz{Noto Sans Display}
\newfontfamily\ffontaa{Noto Serif}
\newfontfamily\ffontab{Noto Serif Display}
\newfontfamily\ffontac{Roboto}
\newfontfamily\ffontad{Source Code Pro}
\newfontfamily\ffontae{Source Sans Pro}
\newfontfamily\ffontaf{Source Serif Pro}
\newcommand\legfont[2]{%
\usefont{T1}{#1}{m}{#2}text \usefont{TS1}{#1}{m}{#2}\char"9B \legpropsol \usefont{T1}{#1}{m}{#2}\ 3 text
}
\begin{document}
Unicode glyph [plus manually constructed form]
U+2116 № [\verb|N\textsuperscript{\underline{\scriptsize o}}|]
\bigskip
\noindent\begin{tabular}{lll}
\nhead Font & Upright & Italic \\
Book Antiqua & \ffonta\mytext & \ffonta\textit{\mytext} \\
%Commissioner & \ffontb\mytext & \ffontb\textit{\mytext} \\
Cormorant Garamond & \ffontc\mytext & \ffontc\textit{\mytext} \\
Cormorant Infant & & \ffontd\textit{\mytext} \\
%Cormorant SC & \ffonte\mytext & \\
DejaVu Sans & \ffontf\mytext & \ffontf\textit{\mytext} \\
DejaVu Sans Mono & \ffontg\mytext & \ffontg\textit{\mytext} \\
DejaVu Serif & \ffonth\mytext & \ffonth\textit{\mytext} \\
Doulos SIL & \ffonti\mytext & \\
%Exo 2 & \ffontj\mytext & \ffontj\textit{\mytext} \\
FreeMono & \ffontk\mytext & \ffontk\textit{\mytext} \\
FreeSans & \ffontl\mytext & \ffontl\textit{\mytext} \\
FreeSerif & \ffontm\mytext & \ffontm\textit{\mytext} \\
Gentium Plus & \ffontn\mytext & \ffontn\textit{\mytext} \\
IBM Plex Mono & \ffonto\mytext & \ffonto\textit{\mytext} \\
IBM Plex Sans & \ffontp\mytext & \ffontp\textit{\mytext} \\
IBM Plex Serif & \ffontq\mytext & \ffontq\textit{\mytext} \\
Liberation Mono & \ffontr\mytext & \ffontr\textit{\mytext} \\
Liberation Sans & \ffonts\mytext & \ffonts\textit{\mytext} \\
Liberation Serif & \ffontt\mytext & \ffontt\textit{\mytext} \\
Linux Biolinum G & \ffontu\mytext & \ffontu\textit{\mytext} \\
Linux Libertine Display G & \ffontv\mytext & \\
Linux Libertine G & \ffontw\mytext & \ffontw\textit{\mytext} \\
Noto Mono & \ffontx\mytext & \\
Noto Sans & \ffonty\mytext & \ffonty\textit{\mytext} \\
Noto Sans Display & \ffontz\mytext & \ffontz\textit{\mytext} \\
Noto Serif & \ffontaa\mytext & \ffontaa\textit{\mytext} \\
Noto Serif Display & \ffontab\mytext & \ffontab\textit{\mytext} \\
Roboto & \ffontac\mytext & \ffontac\textit{\mytext} \\
Source Code Pro & \ffontad\mytext & \ffontad\textit{\mytext} \\
Source Sans Pro & \ffontae\mytext & \ffontae\textit{\mytext} \\
Source Serif Pro & \ffontaf\mytext & \\
\end{tabular}
\newpage
\usefont{T1}{lmr}{m}{n}Legacy fonts: slot 9B of TS1 encoding: {\usefont{TS1}{lmr}{m}{n}\char"9B}
\bigskip
\begin{tabular}{lll}
\nhead Font family & Upright & Italic \\
lmr & \legfont{lmr}{n} & \legfont{lmr}{it} \\
qzc & & \legfont{qzc}{it} \\
qtm & \legfont{qtm}{n} & \legfont{qtm}{it} \\
qpl & \legfont{qpl}{n} & \legfont{qpl}{it} \\
qhv & \legfont{qhv}{n} & \legfont{qhv}{it} \\
qcs & \legfont{qcs}{n} & \legfont{qcs}{it} \\
qcr & \legfont{qcr}{n} & \legfont{qcr}{it} \\
qbk & \legfont{qbk}{n} & \legfont{qbk}{it} \\
qag & \legfont{qag}{n} & \legfont{qag}{it} \\
stix2 & \legfont{stix2}{n} & \legfont{stix2}{it} \\
\end{tabular}
\end{document}
原始答案
缩写数字似乎类似于 ℜ ℞ ℃ Å ℮ ℅ ℊ,具有自己的排版传统,这意味着使其与周围的文本相匹配可能会让一些读者感到惊讶。
话虽如此,它是一个很少使用的字形,并且似乎具有一些自由形式的特质,几乎是奇特的,与周围环境略有不同(特别是在衬线字体中),但差别不大。
Unicode 字体示例:
旧版字体示例:
平均能量损失
\documentclass{article}
\usepackage[table]{xcolor}
\usepackage{fontspec}
\setmainfont{Noto Serif}
\newcommand\nhead{\rowcolor{blue!12}}
\newcommand\mytext{text № 3 text}
\newfontfamily\ffonta{Book Antiqua}
%\newfontfamily\ffontb{Commissioner-Regular.ttf}
\newfontfamily\ffontc{Cormorant Garamond}
\newfontfamily\ffontd{Cormorant Infant}
\newfontfamily\ffonte{Cormorant SC}
\newfontfamily\ffontf{DejaVu Sans}
\newfontfamily\ffontg{DejaVu Sans Mono}
\newfontfamily\ffonth{DejaVu Serif}
\newfontfamily\ffonti{Doulos SIL}
%\newfontfamily\ffontj{Exo 2}
\newfontfamily\ffontk{FreeMono}
\newfontfamily\ffontl{FreeSans}
\newfontfamily\ffontm{FreeSerif}
\newfontfamily\ffontn{Gentium Plus}
\newfontfamily\ffonto{IBM Plex Mono}
\newfontfamily\ffontp{IBM Plex Sans}
\newfontfamily\ffontq{IBM Plex Serif}
\newfontfamily\ffontr{Liberation Mono}
\newfontfamily\ffonts{Liberation Sans}
\newfontfamily\ffontt{Liberation Serif}
\newfontfamily\ffontu{Linux Biolinum G}
\newfontfamily\ffontv{Linux Libertine Display G}
\newfontfamily\ffontw{Linux Libertine G}
\newfontfamily\ffontx{Noto Mono}
\newfontfamily\ffonty{Noto Sans}
\newfontfamily\ffontz{Noto Sans Display}
\newfontfamily\ffontaa{Noto Serif}
\newfontfamily\ffontab{Noto Serif Display}
\newfontfamily\ffontac{Roboto}
\newfontfamily\ffontad{Source Code Pro}
\newfontfamily\ffontae{Source Sans Pro}
\newfontfamily\ffontaf{Source Serif Pro}
\newcommand\legfont[2]{%
\usefont{T1}{#1}{m}{#2}text \usefont{TS1}{#1}{m}{#2}\char"9B\usefont{T1}{#1}{m}{#2}\ 3 text
}
\begin{document}
U+2116 №
\bigskip
\noindent\begin{tabular}{lll}
\nhead Font & Upright & Italic \\
Book Antiqua & \ffonta\mytext & \ffonta\textit{\mytext} \\
%Commissioner & \ffontb\mytext & \ffontb\textit{\mytext} \\
Cormorant Garamond & \ffontc\mytext & \ffontc\textit{\mytext} \\
Cormorant Infant & & \ffontd\textit{\mytext} \\
%Cormorant SC & \ffonte\mytext & \\
DejaVu Sans & \ffontf\mytext & \ffontf\textit{\mytext} \\
DejaVu Sans Mono & \ffontg\mytext & \ffontg\textit{\mytext} \\
DejaVu Serif & \ffonth\mytext & \ffonth\textit{\mytext} \\
Doulos SIL & \ffonti\mytext & \\
%Exo 2 & \ffontj\mytext & \ffontj\textit{\mytext} \\
FreeMono & \ffontk\mytext & \ffontk\textit{\mytext} \\
FreeSans & \ffontl\mytext & \ffontl\textit{\mytext} \\
FreeSerif & \ffontm\mytext & \ffontm\textit{\mytext} \\
Gentium Plus & \ffontn\mytext & \ffontn\textit{\mytext} \\
IBM Plex Mono & \ffonto\mytext & \ffonto\textit{\mytext} \\
IBM Plex Sans & \ffontp\mytext & \ffontp\textit{\mytext} \\
IBM Plex Serif & \ffontq\mytext & \ffontq\textit{\mytext} \\
Liberation Mono & \ffontr\mytext & \ffontr\textit{\mytext} \\
Liberation Sans & \ffonts\mytext & \ffonts\textit{\mytext} \\
Liberation Serif & \ffontt\mytext & \ffontt\textit{\mytext} \\
Linux Biolinum G & \ffontu\mytext & \ffontu\textit{\mytext} \\
Linux Libertine Display G & \ffontv\mytext & \\
Linux Libertine G & \ffontw\mytext & \ffontw\textit{\mytext} \\
Noto Mono & \ffontx\mytext & \\
Noto Sans & \ffonty\mytext & \ffonty\textit{\mytext} \\
Noto Sans Display & \ffontz\mytext & \ffontz\textit{\mytext} \\
Noto Serif & \ffontaa\mytext & \ffontaa\textit{\mytext} \\
Noto Serif Display & \ffontab\mytext & \ffontab\textit{\mytext} \\
Roboto & \ffontac\mytext & \ffontac\textit{\mytext} \\
Source Code Pro & \ffontad\mytext & \ffontad\textit{\mytext} \\
Source Sans Pro & \ffontae\mytext & \ffontae\textit{\mytext} \\
Source Serif Pro & \ffontaf\mytext & \\
\end{tabular}
\newpage
\usefont{T1}{lmr}{m}{n}Legacy fonts: slot 9B of TS1 encoding: {\usefont{TS1}{lmr}{m}{n}\char"9B}
\bigskip
\begin{tabular}{lll}
\nhead Font family & Upright & Italic \\
lmr & \legfont{lmr}{n} & \legfont{lmr}{it} \\
qzc & & \legfont{qzc}{it} \\
qtm & \legfont{qtm}{n} & \legfont{qtm}{it} \\
qpl & \legfont{qpl}{n} & \legfont{qpl}{it} \\
qhv & \legfont{qhv}{n} & \legfont{qhv}{it} \\
qcs & \legfont{qcs}{n} & \legfont{qcs}{it} \\
qcr & \legfont{qcr}{n} & \legfont{qcr}{it} \\
qbk & \legfont{qbk}{n} & \legfont{qbk}{it} \\
qag & \legfont{qag}{n} & \legfont{qag}{it} \\
stix2 & \legfont{stix2}{n} & \legfont{stix2}{it} \\
\end{tabular}
\end{document}