標準的 \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直到找到你喜歡的字體。