![\lfloor 和 \vert 的厚度](https://linux22.com/image/404586/%5Clfloor%20%E5%92%8C%20%5Cvert%20%E7%9A%84%E5%8E%9A%E5%BA%A6.png)
出于某种原因,我必须在 latex 文件中同时使用\lfloor
和\left\vert
。但随着线条数量的增加,很明显它们的粗细不一样,这对我来说看起来不太好看 :(
这是最小的工作环境以及输出的屏幕截图。
显然\lfloor
比 厚\vert
。
我的问题:有没有办法为它们设置相同的厚度?
\documentclass[a4paper,11pt,fleqn]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}
\begin{equation}
&\begin{array}{l}
\text{for}\;n=0,1,\ldots\\
\left\vert\left\lfloor
\begin{array}{l}
\text{for some reason, I have a mixture of
\texttt{lfloor} and \texttt{vert}}\\
\text{but their thickness are not the same}\\
\text{what are my options?}\\
\text{I would like the same thickness for both of them}
\end{array}
\right.
\end{array}
\end{equation}
\end{document}
答案1
mathabx
确实有一个\thickvert
可扩展的分隔符。你可能不想使用mathabx
,因此您需要遵循这些步骤仅加载此符号。然后您可以\thickvert
使用
\documentclass[a4paper,11pt,fleqn]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\DeclareFontFamily{U}{mathb}{\hyphenchar\font45}
\DeclareFontShape{U}{mathb}{m}{n}{
<5> <6> <7> <8> <9> <10> gen * mathb
<10.95> mathb10 <12> <14.4> <17.28> <20.74> <24.88> mathb12
}{}
\DeclareSymbolFont{mathb}{U}{mathb}{m}{n}
\DeclareFontSubstitution{U}{mathb}{m}{n}
\DeclareFontFamily{U}{mathx}{\hyphenchar\font45}
\DeclareFontShape{U}{mathx}{m}{n}{
<5> <6> <7> <8> <9> <10>
<10.95> <12> <14.4> <17.28> <20.74> <24.88>
mathx10
}{}
\DeclareSymbolFont{mathx}{U}{mathx}{m}{n}
\DeclareFontSubstitution{U}{mathx}{m}{n}
\DeclareMathDelimiter{\thickvert}{0}{mathb}{"7E}{mathx}{"1F}
\begin{document}
\begin{equation}
\begin{array}{l}
\text{for}\;n=0,1,\ldots\\
\left\thickvert\left\lfloor
\begin{array}{l}
\text{for some reason, I have a mixture of
\texttt{lfloor} and \texttt{vert}}\\
\text{but their thickness are not the same}\\
\text{what are my options?}\\
\text{I would like the same thickness for both of them}
\end{array}
\right.\right.
\end{array}
\end{equation}
\end{document}
答案2
您可以使用 设置垂直线,\vrule
并使用 添加一条小水平线\rule
。确保将内部tabular
与[b]
底部对齐。
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
\begin{array}{ l }
\text{for } n = 0, 1, \dots \\
\hspace{.5em}% Space between left margin of tabular cell and first \vrule
\vrule \hspace{.5em}% Vertical rule + space to next \vrule
\vrule \rule[-.4em]{.5ex}{.4pt}% Vertical rule with little horizontal line
\begin{tabular}[b]{ l }
for some reason, I have a mixture of \texttt{lfloor} and \texttt{vert} \\
but their thickness are not the same \\
what are my options? \\
I would like the same thickness for both of them
\end{tabular}
\end{array}
\]
\end{document}