## LaTeX forum ⇒ Graphics, Figures & Tables ⇒ macro 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?

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:
\begin{stair}{<horisontal direction>}\upfirst step & inside the stair \\second &\\third&\\\down (maybe you need: &\\ ?)second level again on the other side & inside \\first again &\\\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:

cgnieder
Site Moderator
Posts: 1974
Joined: Sat Apr 16, 2011 7:27 pm
Location: Germany
Contact:
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
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 .
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

Stefan Kottwitz
Posts: 8522
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:
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.

\documentclass[border=10pt]{standalone}\usepackage{tikz}\usetikzlibrary{matrix}\begin{document}\begin{tikzpicture}   \matrix (m) [ matrix of nodes, row sep = 3em, column sep = 0em,                 nodes={minimum width = 7em, outer sep = 0em}] {          &      &        &             & Best \\          &      &        & Much better &      \\          &      & better &             &      \\          & good &        &             &      \\      bad &      &        &             &      \\   };   \draw (m-5-1.south west) -- (m-5-1.south east)      -- (m-4-2.south west) -- (m-4-2.south east)      -- (m-3-3.south west) -- (m-3-3.south east)      -- (m-2-4.south west) -- (m-2-4.south east)      -- (m-1-5.south west) -- (m-1-5.south east)   ;\end{tikzpicture}\end{document}

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

Stefan

odhage
Posts: 19
Joined: Wed Sep 02, 2015 11:41 am
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.
/Mikael