我无法更改箭头的大小,因为当我<->
在此处使用 MWE时,它会采用默认大小
\documentclass[a4paper]{article}
\usepackage[margin=1cm,bottom=1cm]{geometry}
\usepackage{tikz}
\usepackage{graphicx}
\begin{document}
\pagenumbering{gobble}
\begin{center}
\begin{tikzpicture}
\draw (36mm,-0.5mm)--(36mm,0mm)--(36mm,25.4mm)--(36mm,26.9mm)--(37mm,26.9mm)--(37mm,25.4mm)--(40mm,25.4mm)--(40mm,23.9mm)--(37mm,23.9mm)--(37mm,0mm)--(37mm,-0.5mm);
\draw[|<->|] (34mm,25.4mm)--node[sloped,midway,above]{\scalebox{0.4}{1.5mm}}(34mm,26.9mm);
\end{tikzpicture}
\end{center}
\end{document}
下面是上述 MWE 的输出
答案1
下面是使用该arrows.meta
库和特定(任意)长度的一个版本:
\documentclass[a4paper]{article}
\usepackage[margin=1cm,bottom=1cm]{geometry}
\usepackage{tikz}
\usepackage{graphicx}
\usetikzlibrary{arrows.meta}
\begin{document}
\pagenumbering{gobble}
\begin{center}
\begin{tikzpicture}
\draw (36mm,-0.5mm)--(36mm,0mm)--(36mm,25.4mm)--(36mm,26.9mm)--(37mm,26.9mm)--(37mm,25.4mm)--(40mm,25.4mm)--(40mm,23.9mm)--(37mm,23.9mm)--(37mm,0mm)--(37mm,-0.5mm);
\draw[|<->|,>={Classical TikZ Rightarrow[length=.25mm]}] (34mm,25.4mm)--node[sloped,midway,above]{\scalebox{0.4}{1.5mm}}(34mm,26.9mm);
\end{tikzpicture}
\end{center}
\end{document}