3

I'd be really grateful if someone could inform me of a method to replicate the attached diagram for inclusion in LaTeX.

image

  • Http://imgur.com/5W2FxYx – frank riggers Oct 16 '14 at 14:37
  • Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user31729 Oct 16 '14 at 14:43
  • 2
    There's already a solution for the arrows on the rectangle's edges here. Try to add a MWE showing where you are stuck if you have more problems drawing your graphic. – moospit Oct 16 '14 at 14:57
5
\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}

enter image description here

0

A PSTricks solution:

\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}

output

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.