Created
November 15, 2013 18:23
-
-
Save jmora/7489184 to your computer and use it in GitHub Desktop.
A friend requested this slide, it took some time to ensure all the dependencies are there (there may be some unnecessary dependencies). Since I spent some time on this and it's more than 100 lines, I thought I would put it here.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[xcolor={x11names, table},table,compress,10pt]{beamer} | |
\usepackage{varwidth, graphicx, tikz, palatino} | |
\usetikzlibrary{arrows,shapes.geometric,positioning} | |
\definecolor{oegred}{RGB}{153,0,0} | |
\definecolor{oegblu}{RGB}{0,0,153} | |
% http://tex.stackexchange.com/questions/103688/folded-paper-shape-tikz | |
\makeatletter | |
\pgfdeclareshape{document}{ | |
\inheritsavedanchors[from=rectangle] % this is nearly a rectangle | |
\inheritanchorborder[from=rectangle] | |
\inheritanchor[from=rectangle]{center} | |
\inheritanchor[from=rectangle]{north} | |
\inheritanchor[from=rectangle]{south} | |
\inheritanchor[from=rectangle]{west} | |
\inheritanchor[from=rectangle]{east} | |
% ... and possibly more | |
\backgroundpath{% this is new | |
% store lower right in xa/ya and upper right in xb/yb | |
\southwest \pgf@xa=\pgf@x \pgf@ya=\pgf@y | |
\northeast \pgf@xb=\pgf@x \pgf@yb=\pgf@y | |
% compute corner of ‘‘flipped page’’ | |
\pgf@xc=\pgf@xb \advance\pgf@xc by-10pt % this should be a parameter | |
\pgf@yc=\pgf@yb \advance\pgf@yc by-10pt | |
% construct main path | |
\pgfpathmoveto{\pgfpoint{\pgf@xa}{\pgf@ya}} | |
\pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@yb}} | |
\pgfpathlineto{\pgfpoint{\pgf@xc}{\pgf@yb}} | |
\pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@yc}} | |
\pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@ya}} | |
\pgfpathclose | |
% add little corner | |
\pgfpathmoveto{\pgfpoint{\pgf@xc}{\pgf@yb}} | |
\pgfpathlineto{\pgfpoint{\pgf@xc}{\pgf@yc}} | |
\pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@yc}} | |
\pgfpathlineto{\pgfpoint{\pgf@xc}{\pgf@yc}} | |
} | |
} | |
\makeatother | |
\tikzstyle{decision} = [diamond, draw, fill=white!20, text width=4em, text badly centered, inner sep=0pt] | |
\tikzstyle{block} = [rectangle, draw, fill=white!20, text centered, minimum height=2em, | |
execute at begin node={\begin{varwidth}{6em}\centering}, | |
execute at end node={\end{varwidth}}] | |
\tikzstyle{line} = [draw, -latex'] | |
% \tikzstyle{curve} = [draw, bend left, -latex'] | |
\tikzstyle{cloud} = [draw, ellipse,fill=white!20, text badly centered, minimum height=2em, | |
execute at begin node={\begin{varwidth}{6em}\centering}, | |
execute at end node={\end{varwidth}}] | |
\tikzstyle{ontology} = [draw, isosceles triangle, text centered, isosceles triangle apex angle=60,fill=white!20, minimum height=2em, shape border rotate=90] | |
\tikzstyle{database} = [draw, cylinder, text centered, fill=white!20, shape border rotate=90, aspect=0.2, | |
execute at begin node={\begin{varwidth}{6em}\centering}, | |
execute at end node={\end{varwidth}}] | |
\tikzstyle{doc}=[draw, shape=document, inner sep=2ex] % http://tex.stackexchange.com/questions/103688/folded-paper-shape-tikz | |
\begin{document} | |
\begin{frame}{Context} | |
\centering | |
\begin{tikzpicture}[node distance = 25mm and 35mm , thick,scale=0.7, every node/.style={transform shape}, auto, on grid=true] | |
\node [ontology] (ontology) {ontology}; | |
\node<5>[ontology, fill=oegred!20, yshift=-9pt, xshift=9pt] (ontology) {ontology}; | |
\node<5>[ontology, fill=oegred!20, yshift=-6pt, xshift=6pt] (ontology) {ontology}; | |
\node<5>[ontology, fill=oegred!20, yshift=-3pt, xshift=3pt] (ontology) {ontology}; | |
\node<2->[ontology, fill=oegred!20] (ontology) {ontology}; | |
\node [block, right= of ontology, draw=oegred] (rewriting) {\textbf{\textsc{rewriting}}}; | |
\node [cloud, below= of rewriting] (query) {query}; | |
\node<2->[cloud, below= of rewriting, fill=oegred!20] (query) {query}; | |
\node [cloud, right= of rewriting] (rewrittenquery) {rewritten query}; | |
\node<2->[cloud, right= of rewriting, fill=oegred!20] (rewrittenquery) {rewritten query}; | |
\node [block, right= of rewrittenquery] (translation) {translation}; | |
\node<3-5>[block, right= of rewrittenquery, fill=oegblu!20] (translation) {translation}; | |
\node [cloud, right= of translation] (translatedquery) {translated query}; | |
\node [block, below= of translatedquery] (execution) {query execution}; | |
\node [database, left= of execution] (database) {data source}; | |
\node<3-5>[database, left= of execution, fill=oegblu!20] (database) {data source}; | |
\node<4>[doc, left= of database] (ebox) {EBox}; | |
\node<5>[doc, left= of database] (mappings) {Mappings}; | |
\node [cloud, below= of execution] (results) {results}; | |
\node [block, left= of results] (translationres) {translation}; | |
\node<3-5>[block, left= of results, fill=oegblu!20] (translationres) {translation}; | |
\node [cloud, left= of translationres] (transresults) {translated results}; | |
\node<6>[doc, densely dotted, below= of query, fill=oegblu!20] (anal) {to analyse}; | |
\path [line] (query) -- (rewriting); | |
\path [line] (ontology) -- (rewriting); | |
\path [line] (rewriting) -- (rewrittenquery); | |
\path [line] (rewrittenquery) -- (translation); | |
\path [line] (translation) -- (translatedquery); | |
\path [line] (translatedquery) -- (execution); | |
\path [line] (execution) -- (database); | |
\path [line] (database) -- (execution); | |
\path [line] (execution) -- (results); | |
\path [line] (results) -- (translationres); | |
\path [line] (translationres) -- (transresults); | |
\path<4>[line, dashed] (ebox) -- (rewriting); | |
\path<4>[line, dashed] (database) -- (ebox); | |
\path<5>[line, dashed] (database) -- (mappings); | |
\path<5>[line, dashed] (mappings) -- (translation); | |
\path<5>[line, dashed] (mappings) -- (translationres); | |
\path<5>[line, dashed] (mappings) -- (rewriting); | |
\path<6>[line, densely dotted] (anal) edge[bend left] (ontology); | |
\path<6>[line, densely dotted] (anal) -- (query); | |
\path<6>[line, densely dotted] (anal) edge[bend right] (rewrittenquery); | |
\end{tikzpicture} | |
\begin{tikzpicture}[remember picture,overlay] | |
\node[anchor=south east, xshift=-1.2em, yshift=1.2em] at (current page.south east) {\tiny Slide modified from \href{https://gist.github.com/jmora/7489184}{Jose Mora}, with permission} ; | |
\end{tikzpicture} | |
\end{frame} | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment