Latex 数字加粗后变宽 Latex bold without increasing the length of the text

时间:2023-03-09 20:00:41
Latex  数字加粗后变宽 Latex bold without increasing the length of the text
Add the following code at the beginning of the article
\newsavebox\CBox
\def\textBF#1{\sbox\CBox{#1}\resizebox{\wd\CBox}{\ht\CBox}{\textbf{#1}}}

Then :

\textBF{foobarbaz}

Example:

\documentclass{article}
\usepackage{graphicx}
\newsavebox\CBox
\def\textBF#1{\sbox\CBox{#1}\resizebox{\wd\CBox}{\ht\CBox}{\textbf{#1}}}
\parindent=0pt
\begin{document}
foobarbaz y\\
\textbf{foobarbaz} y\\
\textBF{foobarbaz} y \end{document}

Latex  数字加粗后变宽 Latex bold without increasing the length of the text

参考:

https://tex.stackexchange.com/questions/23678/textbftext-without-increasing-the-length-of-the-text

https://tex.stackexchange.com/questions/399859/fake-semibold-bold-without-increasing-the-length-of-the-text