New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Think about creating a list of tutorials of increasing complexity #941
Comments
I will make a first draft for discussion. I will need help in implementing the .dot file into the documentation. |
Attached is a strawman visualization for this project and roughly follows the same principles as the deal.ii project. Green and orange are cookbooks; blue are geophysical setups; yellow benchmarks as defined in the manual. White are needed .prms; files prepended with "f" are .prms in the "future" folder and have not been written up in the manual. Not all benchmarks are in the manual as well. Hexagons are basic techniques with the arrows suggested of flow and ordering. |
Nice! |
The .dot file was renamed so this would upload. |
@bangerth, I remember you wanted to make a pull request for this? It would be great if we could get this done before the CGU tutorial so that people would know where to start from. Let us know if you need help with this. |
Attached here is a version of @ljhwang 's original file except that it has some syntax errors cleaned up and actually compiled (but these are only small modifications -- credit still goes to @ljhwang!): But before I go there, the question to me is rather how exactly we will use this. In deal.II, the tutorial graph is used in an HTML page that allows us to embed links so you can click on a tutorial box and get redirected to the correct page. It also allows for tooltips. But here we are talking about a graph that's going to be embedded into a PDF file. We can run the graph through
I don't think this is easily possible by embedding a png or svg into the latex pdf output, not the least because I don't know how latex encodes the links in the pdf file. There is apparently a graphviz latex package out there, but (i) it essentially just takes a piece of input from the .tex file, puts it into a .dot file, and calls Looking around a bit, what we want to do can probably be done using
For example, here is a little (poorly laid out graph) in latex that contains links: \documentclass{article}
\usepackage[colorlinks,linkcolor=blue,urlcolor=blue,citecolor=blue,baseurl=../]{hyperref}
\usepackage{tikz}
\begin{document}
\section{Section 1}
\label{sec:1}
\begin{tikzpicture}
[->,
scale=1.5,auto=left,
basic/.style={circle,
top color = white,
bottom color = blue!20,
draw,
blue,
text=blue,
minimum width =1 cm},
cookbook/.style={rectangle,
top color = white,
bottom color = blue!20,
draw,
blue,
text=blue,
minimum width =1 cm}]
\node[basic] (n6) at (1,10) {Cookbook $6/\pi$};
\node[cookbook] (n4) at (4,8) {Link to Section~\ref{sec:2}};
\node[basic] (n5) at (8,9) {Cookbook $5/\pi$};
\node[basic] (n1) at (11,8) {Cookbook $1/\pi$};
\path (n6) edge node{} (n4);
\path (n6) edge (n5);
\path (n6) edge (n1);
\path (n1) edge (n4);
\end{tikzpicture}
\section{Section 2}
\label{sec:2}
\end{document} I don't think it would be very difficult to convert @ljhwang's |
Here is an example of the thing I have in mind: \documentclass{article}
\usepackage[colorlinks,linkcolor=blue,urlcolor=blue,citecolor=blue,baseurl=../]{hyperref}
\usepackage{tikz}
\begin{document}
\section{Section 1}
\label{sec:1}
\begin{tikzpicture}
[->,
scale=1.5,auto=left,
basic/.style={circle,
top color = white,
bottom color = blue!20,
draw,
blue,
text=blue,
minimum width =1 cm},
cookbook/.style={rectangle,
top color = white,
bottom color = blue!20,
draw,
blue,
text=blue,
minimum width =1 cm}]
\node[cookbook] (2dBox) {Convection in a 2D Box};
\node[cookbook] (2dAnnulus) [below left of=2dBox] {\begin{minipage}{2cm}Simple convection in a quarter of a 2d annulus\end{minipage}};
\node[cookbook] (MD04) [below right of=2dBox] {\begin{minipage}{2cm}Reproducing rheology of Morency and Doin, 2004\end{minipage}};
\node[cookbook] (vanKeken) [below of=MD04] {\begin{minipage}{2cm}The van Keken thermochemical composition benchmark\end{minipage}};
\node[cookbook] (SolCx) [below right of=vanKeken] {The SolCx Stokes benchmark};
\node[cookbook] (SolKz) [below left of=vanKeken] {The SolKz Stokes benchmark};
\path (2dBox) edge (2dAnnulus);
\path (2dBox) edge (MD04);
\path (MD04) edge (vanKeken);
\path (vanKeken) edge (SolCx);
\path (vanKeken) edge (SolKz);
\end{tikzpicture}
\end{document} The problem is that the layout is seriously terrible: For now, what do people think about the general direction? |
I think we should discuss at the hackathon. But a couple of comments:
|
graphviz should be able to have links: https://graphviz.gitlab.io/_pages/doc/info/output.html#d:ps2 |
here is a working example using dot2tex and a tikz figure. Only tooltips don't work... |
Maybe similar to the deal.II steps.
The text was updated successfully, but these errors were encountered: