如果有人能告诉我一种复制附图并纳入 LaTeX 的方法,我将不胜感激。
答案1
\documentclass[tikz]{standalone}
\usetikzlibrary{decorations.markings}
\begin{document}
\begin{tikzpicture}[arrowmark/.style 2 args={decoration={markings,mark=at position #1 with \arrow{#2}}}]
\draw[-latex] (-1,0) -- (6,0)node[right]{$x$};
\draw[-latex] (0,-1) -- (0,6)node[above left]{$y$};
\draw[dashed] (6,2) -- (0,2)node[left] {$\xi$};
\draw[dashed] (6,4) -- (0,4)node[left] {$\eta$};
\draw[dashed] (2,6) -- (2,0)node[below] {$\alpha$};
\draw[dashed] (4,6) -- (4,0)node[below] {$\beta$};
\draw[ultra thick,postaction={decorate}, arrowmark={0.125}{<},arrowmark={.375}{<}, arrowmark={0.625}{<},arrowmark={.875}{<}
] (2,2) rectangle (4,4);
\node at (3,3) {$R$};
\draw[<-] (4.05,3.5) -- +(0.5,0)node[anchor=west]{$\partial R$};
\end{tikzpicture}
\end{document}
答案2
PSTricks 解决方案:
\documentclass{article}
\usepackage{pst-plot}
\def\pathLabelVert(#1)#2{%
\psline[linestyle = dashed](!2 #1 mul 6)(!2 #1 mul 0)
\uput[270](!2 #1 mul 0){#2}}
\def\pathLabelHori(#1)#2{%
\psline[linestyle = dashed](!6 2 #1 mul)(!0 2 #1 mul)
\uput[180](!0 2 #1 mul){#2}}
\begin{document}
\begin{pspicture}(-0.5,-0.5)(6.35,6.4)
\psaxes[
labels = none,
ticks = none
]{->}(0,0)(-0.5,-0.5)(6,6)[$x$,0][$y$,90]
\psline[
ArrowInside = ->,
ArrowInsidePos = 0.55,
arrowscale = 1.5,
linewidth = 1pt
](4,4)(2,4)(2,2)(4,2)(4,4)
\rput(3,3){$R$}
\psline{->}(4.8,3.5)(4,3.5)
\uput[0](4.8,3.5){$\partial R$}
\pathLabelVert(1){$\alpha$}
\pathLabelVert(2){$\beta$}
\pathLabelHori(1){$\xi$}
\pathLabelHori(2){$\eta$}
\end{pspicture}
\end{document}