我为一道光学问题画了下图。我想知道是否有办法让箭头线更长(用黄色高亮表示)。
有人可以建议如何实现这一点吗?
谢谢你!
\documentclass[]{article}
\usepackage[margin=0.5in]{geometry}
\usepackage{pgfplots}
\renewcommand{\thesection}{\arabic{section}}
\usepackage{mathtools}
\usepackage{cancel}
\usepackage{pgfplots}
\usepackage{amsmath}
\newtheorem{theorem}{THEOREM}
\newtheorem{proof}{PROOF}
\usepackage{tikz}
\usepackage{amssymb}
\usetikzlibrary{patterns}
\usepackage{fancyhdr}
\usepackage{bigints}
\usepackage{color}
\usepackage{tcolorbox}
\usepackage{color,xcolor}
\usepackage{booktabs,array}
\usepackage{hyperref}
\usepackage{graphicx}
\usetikzlibrary{arrows}
\usepackage{polynom}
\usepackage{wallpaper}
\usepackage{flexisym}
\usepackage{caption}
\usetikzlibrary{calc}
\usetikzlibrary{shapes.misc}
\usetikzlibrary{arrows}
\usepgfplotslibrary{fillbetween}
\usepgfplotslibrary{statistics}
\newenvironment{tightcenter}{
\setlength\topsep{0pt}
\setlength\parskip{0pt}
\begin{center}}{\end{center}}
\begin{document}
\begin{tikzpicture}
\draw[thick](-1.5,-2.0) -- (-1.5,2.0);
%
\draw[thick](-3.2,-2.0) -- (-1.5,-0.5) -- (-3.2,1.0);
\draw[thick](-3.2,-1.4) -- (-1.5,+0.1) -- (-3.2,1.6);
\draw[thick](-3.2,-0.8) -- (-1.5,+0.7) -- (-3.2,2.2);
%
\draw[thick,->](-3.2,-2.0) -- (-2.5,-1.38);
\draw[thick,->](-3.2,-1.4) -- (-2.5,-0.78);
\draw[thick,->](-3.2,-0.8) -- (-2.5,-0.18);
%
%
\draw[thick,->](-1.5,-0.5) -- (-2.7,0.56);
\draw[thick,->](-1.5,+0.1) -- (-2.7,1.16);
\draw[thick,->](-1.5,+0.7) -- (-2.7,1.76);
\end{tikzpicture}
\end{document}
答案1
通过使用库arrows.meta
和decorations.markings
:
\documentclass[border=3.141592]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,
decorations.markings}
\begin{document}
\begin{tikzpicture}[
->-/.style = {thick,
decoration={markings,% switch on markings
mark=between positions .2 and .8 step 0.6 with {\arrow[thick]{Straight Barb[scale=1.5]}}},
postaction={decorate}
}
]
\draw[thick](-1.5,-2.0) -- (-1.5,2.0);
%
\draw[->-] (-3.2,-2.0) -- (-1.5,-0.5) -- (-3.2,1.0);
\draw[->-] (-3.2,-1.4) -- (-1.5,+0.1) -- (-3.2,1.6);
\draw[->-] (-3.2,-0.8) -- (-1.5,+0.7) -- (-3.2,2.2);
\end{tikzpicture}
\end{document}