LaTeX forum ⇒ Graphics, Figures & TablesCreate a timeline

Information and discussion about graphics, figures & tables in LaTeX documents.
dirkst19
Posts: 1
Joined: Sat May 16, 2015 9:48 am

Create a timeline

Postby dirkst19 » Sat May 16, 2015 9:57 am

Hello everybody!

I need to create a couple of timelines that I've made ​​only with Visio . I would now like to implement in latex , but I have simply no idea about this .

I'll send a pic with added , as the timeline should look like .
The individual events should be displayed before the time.

example.png
example.png (6.61 KiB) Viewed 7338 times


Maybe someone already done something similar or have an idea?
I would be very happy about it

Thank you ! = )

User avatar
Johannes_B
Site Moderator
Posts: 3825
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sat May 16, 2015 12:36 pm

This question has also been asked at goLaTeX, our german partner site, and on TeXwelt.de.
Last edited by Stefan Kottwitz on Sun May 17, 2015 11:19 am, edited 1 time in total.
Reason: TeXwelt crosspost link added
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

User avatar
Stefan Kottwitz
Site Admin
Posts: 9019
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sat May 16, 2015 1:15 pm

Welcome to the forum!

Here is a different idea of a time line, based on the TikZ timeline library. I created it as an example for my next book. Maybe it's also interesting for you.

  1. \documentclass[a3paper]{article}
  2. \usepackage[landscape]{geometry}
  3. \usepackage{tikz}
  4. \usetikzlibrary{timeline}
  5. \pagestyle{empty}
  6. \begin{document}
  7. \begin{tikzpicture}
  8. \timeline{5}
  9. \begin{phases}
  10. \initialphase{involvement degree=3cm,phase color=blue}
  11. \phase{between week=1 and 2 in 0.4,
  12. involvement degree=5cm,phase color=green!50!black}
  13. \phase{between week=2 and 3 in 0.2,
  14. involvement degree=6cm,phase color=red!40!black}
  15. \phase{between week=3 and 4 in 0.5,
  16. involvement degree=3cm,phase color=red!90!black}
  17. \phase{between week=4 and 5 in 0.3,
  18. involvement degree=2.5cm,phase color=red!40!yellow}
  19. \end{phases}
  20. \node [xshift=-0.6cm,yshift=1cm,anchor=east,
  21. font=\Large\bfseries] at (phase-0.180) {Auhor};
  22. \node [xshift=-0.6cm,yshift=-1cm,anchor=east,
  23. font=\Large\bfseries] at (phase-0.180) {Publisher};
  24. \begin{scope}{text options={above}}
  25. \addmilestone{at=phase-0.120,direction=120:1cm,
  26. text={Concept}}
  27. \addmilestone{at=phase-0.90,direction=90:1.2cm,
  28. text={Outline}}
  29. \addmilestone{at=phase-1.110,direction=110:1.5cm,
  30. text={Research}}
  31. \addmilestone{at=phase-2.100,direction=100:1cm,
  32. text={Writing}}
  33. \addmilestone{at=phase-2.60,direction=90:1.5cm,
  34. text={First draft}}
  35. \addmilestone{at=phase-3.90,direction=90:1.2cm,
  36. text={Second draft}}
  37. \addmilestone{at=phase-4.90,direction=90:0.8cm,
  38. text={Approval of print draft}}
  39. \end{scope}
  40. \begin{scope}{text options={below}}
  41. \addmilestone{at=phase-0.270,direction=270:1cm,
  42. text={Concept Review}}
  43. \addmilestone{at=phase-2.270,direction=270:1cm,
  44. text={First Review}}
  45. \addmilestone{at=phase-3.250,direction=250:0.8cm,
  46. text={Second Review}}
  47. \addmilestone{at=phase-3.300,direction=270:1.5cm,
  48. text={Approval required}}
  49. \addmilestone{at=phase-4.260,direction=270:2.2cm,
  50. text={Draft for printing}}
  51. \addmilestone{at=phase-4.300,direction=300:1cm,
  52. text={Publication}}
  53. \end{scope}
  54. \end{tikzpicture}
  55. \end{document}


timeline.png
timeline.png (31.13 KiB) Viewed 7358 times


Also your image could easily created with TikZ. Johannes already mentioned goLaTeX.de, and I know there are TikZ drawing experts on TeXwelt.de (also a friend of us). Btw. I don't see problems with cross posts, as long as there's a link to the other site where it's posted. So kindly post a link to the parallel discussion each time, for example if you would post the same question to TeXwelt.de. But feel free to post further questions to TeXwelt or LaTeX-Community.org, we love good questions and like drawing things too. It's just that we more support in improving drawings and helping with questions, not really a drawing service. ;-)

Stefan
Site admin

ossenna
Posts: 2
Joined: Wed Jun 03, 2015 9:51 pm

Postby ossenna » Wed Jun 03, 2015 9:56 pm

Hi

Im a rather new user of LaTeX and I would love to make a similar timeline as yours.
Could you please indicate me what I need to install ? I ask because I get Package Tikz Error: I did not find the tikz 'timeline'.,while trying to compile in pdfLaTeX.

Thanks!

User avatar
Stefan Kottwitz
Site Admin
Posts: 9019
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Wed Jun 03, 2015 10:29 pm

Hi Ossenna,

welcome to the forum!

You need to install the timeline library. You can download the file tikzlibrarytimeline.code.tex and copy it to your document folder (or to your TeX installation).

Stefan
Site admin

ossenna
Posts: 2
Joined: Wed Jun 03, 2015 9:51 pm

Postby ossenna » Wed Jun 10, 2015 9:04 pm

Thanks for your answer, Stefan!

I'm working on it and I have two detail problems with the milestones
1 they are too close to the line.
2 i'd like to be able to add more text - maybe change fonts or break line

Can you give me a hint on how to fix that ?<


Thanks !
Attachments
Capture d’écran 2015-06-10 à 14.58.30.png
Capture d’écran 2015-06-10 à 14.58.30.png (45.96 KiB) Viewed 7189 times

User avatar
Stefan Kottwitz
Site Admin
Posts: 9019
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Fri Jun 12, 2015 10:48 pm

  1. Can be fixed by directly setting the above or below key:

    1. \addmilestone{at=phase-0.120,direction=120:1cm,
    2. text={Text},text options={above}}


    The setting for text options is remembered until you change it, so no need to repeat it.
  2. You can set the width as option too, such as

    1. \addmilestone{at=phase-0.120,direction=120:1cm,
    2. text={Very long long long text},text options={above,text width=5em}}

Stefan
Site admin


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 10 guests