标准的 \langle 和 \rangle 对我来说似乎不够尖锐。我也不希望它太尖锐,就像 $<$ 中那样。我想到的一个例子如下:
我尝试画出来如下,
\documentclass{article}
\usepackage{tikz}
\newcommand{\customlangle}{
\begin{tikzpicture}
\draw coordinate (a) at (.35,1);
\draw coordinate (b) at (0,.5);
\draw coordinate (c) at (.35,0);
\draw (a) -- (b) -- (c);
\end{tikzpicture}%
}
\newcommand{\customrangle}{
\begin{tikzpicture}
\draw coordinate (a) at (0,1);
\draw coordinate (b) at (.35,.5);
\draw coordinate (c) at (0,0);
\draw (a) -- (b) -- (c);
\end{tikzpicture}%
}
\begin{document}
This is a line of text with a custom angle symbol: \customlangle \customrangle
\end{document}
结果如下;
如何使 tikzpicture 与行高兼容?我希望它与 \langle 大小相同。
答案1
您可以使用与字体相关的单位,而不是 TikZ 默认的厘米单位,例如ex
:
\documentclass[varwidth]{standalone}
\usepackage{tikz}
\newcommand{\customlangle}{%
\begin{tikzpicture}[baseline=0.5ex]
\draw coordinate (a) at (.35ex,2.2ex);
\draw coordinate (b) at (0,1.1ex);
\draw coordinate (c) at (.35ex,0);
\draw[line width=0.12ex,line cap=round] (a) -- (b) -- (c);
\end{tikzpicture}%
}
\newcommand{\customrangle}{%
\begin{tikzpicture}[baseline=0.5ex]
\draw coordinate (a) at (0,2.2ex);
\draw coordinate (b) at (.35ex,1.1ex);
\draw coordinate (c) at (0,0);
\draw[line width=0.12ex,line cap=round] (a) -- (b) -- (c);
\end{tikzpicture}%
}
\begin{document}
Symbol: $\langle$ \customlangle \customrangle
\Huge Symbol \customlangle \customrangle
\end{document}
答案2
从这个 MWE 开始:
\documentclass[margin=3pt]{standalone}
\usepackage[T1]{fontenc}
% \usepackage[math]{kurier}
% \usepackage{newpx}
\usepackage{newtx}
\begin{document}
$|\langle Tf, g \rangle|$
\end{document}
然后通过https://tug.org/FontCatalogue/mathfonts.html直到找到你喜欢的字体。