Graphics, Figures & TablesCreating a Diagram

Information and discussion about graphics, figures & tables in LaTeX documents.
steFON
Posts: 9
Joined: Wed Mar 13, 2013 5:23 pm

Creating a Diagram

Post by steFON »

Hello, I am new here.

I'd like to get help with this diagram. How can I create it with LaTeX?

Thanks.
Attachments
The wanted diagram.
The wanted diagram.
diagram.jpg (16.83 KiB) Viewed 8615 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Creating a Diagram

Post by localghost »

How do your own efforts look like? As it stands now, your request sounds like "Do this for me". We would appreciate questions that sound more like "Can you help me on with my code?". So, please start a serious approach on your own and ask for help when running into trouble.

You can try packages like PGF/TikZ (Example gallery) or PSTricks (Example gallery) to draw the diagram. The respective manuals have the details. You may also look at the "Similar Topics" at the bottom of this page for possible solutions (only when logged in).


Best regards and welcome to the board
Thorsten
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Creating a Diagram

Post by Stefan Kottwitz »

Hi stefon,

welcome to the forum!

There are several packages which could be used for such diagrams, such as TikZ, tikz-cd, PSTricks, xy-pic and amscd. TikZ is very modern und currently perhaps the most popular.

Have a look at this commutative diagram example, or at TikZ diagrams in the example gallery.
Perhaps try it and tell us, when you would have further questions about this.

Stefan
LaTeX.org admin
steFON
Posts: 9
Joined: Wed Mar 13, 2013 5:23 pm

Creating a Diagram

Post by steFON »

Sorry, but I am really new in LaTeX :(

I tried to do it with this:

Code: Select all

\begin{diagram}[heads=LaTeX]
                   &                 &\textrm{výraz?}  & \\
                   &\ldTo^{označuje} &&\rdTo^{vyjadřuje}\\
\textrm{denotát}   &\rTo^{dole}       &\textrm{smysl}
\end{diagram}
But there is no option to do "left-right" arrow.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Creating a Diagram

Post by Stefan Kottwitz »

Which package are you using? Try to post a complete small example, so we can see. It's unclear what you mean with this diagram environment.

Stefan
LaTeX.org admin
steFON
Posts: 9
Joined: Wed Mar 13, 2013 5:23 pm

Creating a Diagram

Post by steFON »

I use this packages:

Code: Select all

\usepackage[small,nohug,heads=vee]{diagrams}
\diagramstyle[labelstyle=\scriptstyle]
But I only copy it from one document about diagrams.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Creating a Diagram

Post by localghost »

It seems that this is not an official package. Furthermore is appears very limited.

With the already suggested PGF/TikZ it is quite straightforward with nice arrows. The output is attached.

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usetikzlibrary{positioning}

\begin{document}
  \begin{tikzpicture}[
    >=stealth,
    node distance=3cm
  ]
    \node (A) at (0,0) {A};
    \node[below left=of A] (B) {B};
    \node[below right=of A] (C) {C};

    \path[<->] (A) edge node[midway,above left] {D} (B)
               (A) edge node[midway,above right] {E} (C)
               (B) edge node[midway,below] {F} (C);
  \end{tikzpicture}
\end{document}
For details please refer to the package manual.
Attachments
stmp.png
stmp.png (1.84 KiB) Viewed 8609 times
steFON
Posts: 9
Joined: Wed Mar 13, 2013 5:23 pm

Re: Creating a Diagram

Post by steFON »

Thank you localghost, but when I implmented your code to my .tex it draw only letters, no arrows :( I do not know where is problem.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: Creating a Diagram

Post by localghost »

Look at the PS or PDF output, not at DVI.
steFON
Posts: 9
Joined: Wed Mar 13, 2013 5:23 pm

Re: Creating a Diagram

Post by steFON »

I use WinEdt, and there is option to create pdf from dvi, so I choose it, and nothing happened. But, when I push "PDF TeXify" it create pdf file. :) THANK YOU VERY MUCH!!! Really nice diagram :)
Post Reply