How can I reproduce the following drawing using LaTeX?


I suspect that TikZ has the right instruments to do it, but I'm not familiar with the package. Indeed, the most I can do with it is drawing basic shapes, like

    \draw[step=1cm,gray,very thin] (-1.9,-1.9) grid (5.9,5.9);


      \draw (0,0) -- (4,0) -- (4,4) -- (0,4) -- (0,0);

but I don't know how to combine them to create the desired end product and how to add labels.

  • Dis you code something? – Blincer Dec 28 '18 at 14:36
  • 1
    Welcome to TeX.SE! Yes, it is quite easy do with TikZ, but could you please add a minimal working example of what you have tried so far? It would make easier to help you. – CarLaTeX Dec 28 '18 at 14:39
  • @CarLaTeX I've edited the question. But unfortunately I'm not familiar at all with TikZ. – user178519 Dec 28 '18 at 14:45
  • 1
    It is quite easy to do in TikZ. I suggest you learn about \coordinate and \node plus see the tikz examples online. It is well worth it to learn tikz – daleif Dec 28 '18 at 14:47
  • 1
    We appreciate your effort, anyway. I added an answer. To become more familiar with TikZ, you could read a tutorial like Section 3 here: tug.org/TUGboat/tb39-1/tb121duck-tikz.pdf. – CarLaTeX Dec 28 '18 at 16:57

A solution with pstricks:



\psset{linejoin=1, dash=3.8pt 3pt, dimen=middle}
\begin{pspicture}(-0.6, -0.9)(6.2, 4.2)
\psline[linestyle=dashed](0, 1.2)(2, 1.2)(2,2.8)(0,2.8)
\psframe[fillstyle =solid,fillcolor=Silver](1.4,0)(2.6,1.2)

\rput(0.7, 1.9){$Q_{F_j}$}
\pnodes(3.2, 2.7){E}(2.8,-0.4){Q}
\psset{linewidth=0.4pt, arrows=->, arrowsize=2pt 3, arrowinset=0.12}
\ncdiagg[angleA=180, nodesepB=2pt]{E}{G}


enter image description here


There are infinite ways to do it, here's one with TikZ:

\usetikzlibrary{positioning, arrows.meta}
            inner sep=0pt,
            minimum height=#1,
            text width=#1},
            inner sep=1.5pt,
    \begin{tikzpicture}[font=\Large, thick]
        \node[quadro={4cm}, draw=none,  anchor=west, text centered] (mydashed) at (mysquare.west) {$Q_{F_{j}}$};
        \draw[dashed] (mydashed.south west) -- (mydashed.south east) -- (mydashed.north east) -- (mydashed.north west);
        \node[quadro={2cm}, fill=lightgray, anchor=south, text centered] at (mysquare.south) (graysquare) {$R_{1/2}$};
        \node[point] {};
        \node[point, label=left:{$F_{j}$}] at (mysquare.west) {}; 
        \node[point] at (mysquare.south) {};
        \node[below left=.3cm and -.7cm of mysquare.south east] (descr1) {$Q_{1/2}(1/4e_{n})$};
        \draw[-Stealth] (descr1.west) -- ([shift={(.25cm,.5cm)}]graysquare.south); 
        \node[above right= .1cm and .1cm of mysquare.south east, anchor=south west]  {$x_{n}=0$};
        \node[below left= 2cm and 1.5cm of mysquare.north east] (descr2) {$e_{n}$};
        \draw[-Stealth, shorten >=0.2cm] (descr2.south east) -- (descr2.south west) -- (mydashed.east);

enter image description here

  • 2
    To the downvoter: it would be fair to explain why. – CarLaTeX Dec 28 '18 at 17:50
  • I totally agree with you. It's a great job for me that you've done. – Sebastiano Dec 28 '18 at 18:01
  • I'm used to unexplained downvotes...or rather I'm a subscriber. – Sebastiano Dec 28 '18 at 18:06

It is indeed quite simple, a beginning of a solution could be:



        \draw (0,0) rectangle (3, 3) ;
        \draw [fill=gray] (1, 0) rectangle (2, 0.75) ;
        \draw [dashed] (0, 0.75) rectangle (1.5, 2.25) ;
        % $R_{1/2}$
        \node at (1.5, 0) {$\bullet$} ;
        \node [anchor=south] at (1.5, 0) {$R_{1/2}$} ;
        % $F_j$
        \node at (0, 1.5) {$\bullet$} ;
        \node [anchor=east] at (0, 1.5) {$F_j$} ;

        \node [anchor=north east] at (1, 1.5) {$Q_{F_j}$} ;
        \node [anchor=south] at (4, 0) {$x_n=0$} ;

enter image description here

I let you add the arrows.

Your Answer

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