3

Assume you have Parts

  • Eggs
  • Bars

Some of Eggs belong too to Bars. I can visualise this by a venn diagram, however I would like show this kind of structure in colours too.

Assume you have items which belong to Eggs and Bars or any combination

Eggs

  • Kinder

Bars

  • Mars
  • Fazer
  • Kinder

The structure of my text (note this is old example of code so You do not need to use this - this is only a dummy example about Tikz how possibly visualize the situation by it)

\documentclass{article}    
\usepackage[framemethod=tikz]{mdframed}

%%%%%%%%%%%%%%%%%%%%%%%% Counter Section %%%%%%%%%%%%%%%%%%%%%%
\makeatletter
  \def\@part[#1]#2{%
    \ifnum \c@secnumdepth >\m@ne
      \refstepcounter{part}%
    \fi
    \addcontentsline{toc}{part}{#1}%
    {\parindent \z@ \raggedright
     \interlinepenalty \@M
     \normalfont
     \LARGE \bfseries #2%
     \markboth{}{}\par}%
    \nobreak
    \vskip 3ex
    \@afterheading}
\@addtoreset{section}{part}    
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}
% Start yellow bar on the left-hand-side margin for the Eggs
\part{Eggs}
\section{Mars}
....
% Start red bar on the left-hand-side margin to sign for Bars
\part{Bars}
\section{Kinder}
...
\section{Fazer}
...
% End Red bar on the margin for Bars
% End yellow bar on the margin for Eggs

tikz package comes to my mind only fro this visualisation. However, there can be better solutions.

Having keyword-list about other groups of the species

\section{Kinder in Eggs}
Lorem ipsun.     
Groups: Bars, Eggs. % Notice here. % autogenerate this by checking the applicable groups of Kinder and add them to the end of the section.

section{Fazer in Bars}
Lorem ipsun. 
Groups: Bars. % have this although topic in Bars

Visualising this thing with tikz

Above example with any applicable visualization. I am not sure how to do this. Some ideas which I have seen elsewhere

  • use colors or some specific markers to make it that this item belongs to other group too
  • use group Cloud to visualise the connections i.e. generate a picture where you can see which items belong to which groups

How would you do the visualisation of the body and mark intersections?

I remember of seeing an elliptical curve visualisation for Table of Contents, where the writer added tag words to specific sections and then finally it created 2D elliptical curve visualisation about the relationships in the body. However, I cannot remember by which package he did it.

  • I don't understand what you want. Can you elaborate a bit on this? A tikz-expert might take up on that. – Johannes_B Feb 15 '15 at 18:28
  • @Johannes_B To somehow visualize the interconnections between different things. Etc thing A belongs to b and c. I think one possibility to is to put think A to groups b and c and then after each time writing a section, there is a keyword list about other groups of the species. Other visualisation possibility is to do a word cloud. However, I think the keyword-list is a good one after each section. My original idea was to have some visual element also in the text along the side of the page. However, not sure if so usable. – Léo Léopold Hertz 준영 Feb 16 '15 at 13:59
  • Please edit this into the question, it gets on top of the main site and other users see it. – Johannes_B Feb 16 '15 at 14:25
  • Can you make the problem a bit more generic, using names of candy bars (this might not be a good idea actually), or animal names. Cats pets can live inside and outside, but pet fishes can only live inside. I bet i am not the only one familiar with cats but unfamiliar with strange latin name.. – Johannes_B Feb 16 '15 at 14:33
  • @Johannes_B There are now only Eggs and Bars. – Léo Léopold Hertz 준영 Feb 16 '15 at 14:46
2

Here's one idea using the changebar package to insert colorized bars in the outer margins; if an element belongs to more than one category, you can nest changebar environments with different width to have superimposed bars with the color associated to each category:

\documentclass{article}    
\usepackage[framemethod=tikz]{mdframed}
\usepackage[outerbars,color]{changebar}
\usepackage{lipsum}

\makeatletter
  \def\@part[#1]#2{%
    \ifnum \c@secnumdepth >\m@ne
      \refstepcounter{part}%
    \fi
    \addcontentsline{toc}{part}{#1}%
    {\parindent \z@ \raggedright
     \interlinepenalty \@M
     \normalfont
     \LARGE \bfseries\textcolor{partcolor}{#2}%
     \markboth{}{}\par}%
    \nobreak
    \vskip 3ex
    \@afterheading}
\@addtoreset{section}{part}    
\makeatother

\setlength\changebarwidth{6pt}

\colorlet{eggcolor}{orange}
\colorlet{barcolor}{cyan}

\begin{document}

\colorlet{partcolor}{orange}

\part{Eggs}
\section{Kinder}
\begin{changebar}[2pt]
\begin{changebar}
\cbcolor{eggcolor}
\lipsum[4]
\end{changebar}
\cbcolor{barcolor}
\end{changebar}

\colorlet{partcolor}{cyan}
\part{Bars}

\section{Mars}
\begin{changebar}
\cbcolor{barcolor}
\lipsum[4]
\end{changebar}

\section{Kinder}
\begin{changebar}[2pt]
\begin{changebar}
\lipsum[4]
\end{changebar}
\cbcolor{eggcolor}
\end{changebar}

\section{Fazer}
\begin{changebar}
\cbcolor{barcolor}
\lipsum[4]
\end{changebar}

\end{document}

The result:

enter image description here

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.