LaTeX forum ⇒ Graphics, Figures & Tablesmacro for stair? Topic is solved

Information and discussion about graphics, figures & tables in LaTeX documents.
odhage
Posts: 19
Joined: Wed Sep 02, 2015 11:41 am

macro for stair?

Postby odhage » Wed Sep 02, 2015 2:20 pm

It would be nice with some kind of macro to easy make a stair (like for example Maslows). It comes in handy when you want to illustrate for example a process with succeding steps depending on the one before. I imagine it could for example be similar to a table in the way you write your stair:
  1. \begin{stair}{<horisontal direction>}
  2. \up
  3. first step & inside the stair \\
  4. second &\\
  5. third&\\
  6. \down (maybe you need: &\\ ?)
  7. second level again on the other side & inside \\
  8. first again &\\
  9. \end{stair}

There could be default measures that you could change with \setlength or something.
Or it could be a tikz macro?
Can someone please tell me if something like this already exist, or is someone willing to make such a macro?

Kindly
Mikael
Last edited by Johannes_B on Wed Sep 02, 2015 5:32 pm, edited 1 time in total.

Tags:

User avatar
cgnieder
Site Moderator
Posts: 1974
Joined: Sat Apr 16, 2011 7:27 pm
Location: Germany
Contact:

Postby cgnieder » Wed Sep 02, 2015 8:11 pm

Hi. What is Maslows? Could you describe what you'd like the output of your code to look like?

Regards
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim

odhage
Posts: 19
Joined: Wed Sep 02, 2015 11:41 am

Postby odhage » Fri Sep 04, 2015 9:11 am

Thank you for your involvment!
A macro or a package or something, I don't know the best solution.
Maslow is famous for his idea of putting our needs in a hierarchy that is sometimes displayed as a pyramid sometimes as a stair.https://en.wikipedia.org/wiki/Maslow's_hierarchy_of_needs
An other example is the aging stair, like this Image.
The output I want is simple, just a line as the steps. Maybe some of the parameters can be the same as in a real stair, se attached pdf. With possibility to have text on the steps and inside. Maybe a rail for binding concepts and platforms to show plateau in a development or progress. I want all possible directions.
Attachments
stair_nomenclature.pdf
(198.8 KiB) Downloaded 92 times

User avatar
Stefan Kottwitz
Site Admin
Posts: 8522
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Sun Sep 06, 2015 11:06 am

Hi,

I got a first quick idea to make a staircase diagram using a TikZ matrix.
You can see the steps in the matrix. The draw commands goes through matrix
node coordinates. It could be simplified using a \foreach loop, but
I think it already shows what is meant. And, in such a matrix, you could
go upwards and downwards too.

  1. \documentclass[border=10pt]{standalone}
  2. \usepackage{tikz}
  3. \usetikzlibrary{matrix}
  4. \begin{document}
  5. \begin{tikzpicture}
  6. \matrix (m) [ matrix of nodes, row sep = 3em, column sep = 0em,
  7. nodes={minimum width = 7em, outer sep = 0em}] {
  8. & & & & Best \\
  9. & & & Much better & \\
  10. & & better & & \\
  11. & good & & & \\
  12. bad & & & & \\
  13. };
  14. \draw (m-5-1.south west) -- (m-5-1.south east)
  15. -- (m-4-2.south west) -- (m-4-2.south east)
  16. -- (m-3-3.south west) -- (m-3-3.south east)
  17. -- (m-2-4.south west) -- (m-2-4.south east)
  18. -- (m-1-5.south west) -- (m-1-5.south east)
  19. ;
  20. \end{tikzpicture}
  21. \end{document}


staircase-diagram.png
staircase-diagram.png (4.5 KiB) Viewed 2039 times


Stefan
Site admin

odhage
Posts: 19
Joined: Wed Sep 02, 2015 11:41 am

Postby odhage » Mon Sep 07, 2015 5:23 pm

Thank you Stefan!
I think that will do the job. I would have loved something with less work with syntax, but it looks good anyway. :P
/Mikael


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 7 guests