%!TEX program = xelatex
%!TEX encoding = UTF-8 Unicode
\documentclass[parskip=half,
               fontsize=9pt,
               % chapterprefix=true,
               numbers=noenddot,
               bibliography=totoc]{scrbook}

% Golden ratio proportions on crown quarto with marginpar inside
\usepackage[includemp,
            paperwidth=18.90cm,
            paperheight=24.58cm,
            top=2.170cm,
            bottom=3.510cm,
            inner=2.1835cm,
            outer=2.1835cm,
            marginparwidth=4cm, % Fixed for now
            marginparsep=0.4cm]{geometry}

% For full bleed printing on crown quarto with 1/8 inch trim margin
% \usepackage[includemp,
%             paperwidth=19.54cm,
%             paperheight=25.22cm,
%             % showframe,
%             layoutwidth=18.90cm,
%             layoutheight=24.58cm,
%             layouthoffset=0.32cm,
%             layoutvoffset=0.32cm,
%             top=2.170cm,
%             bottom=3.510cm,
%             inner=2.1835cm,
%             outer=2.1835cm,
%             marginparwidth=4cm, % Fixed for now
%             marginparsep=0.4cm]{geometry}

% For printing on A4
% \usepackage[includemp,
%             a4paper,
%             layoutwidth=18.90cm,
%             layoutheight=24.58cm,
%             layouthoffset=1.05cm,
%             layoutvoffset=2.56cm,
%             top=2.170cm,
%             bottom=3.510cm,
%             inner=1.668cm,
%             outer=2.699cm,
%             marginparwidth=4cm, % Fixed for now
%             marginparsep=0.4cm]{geometry}

\usepackage{tocloft}                % Customise table of contents
%%%% Fonts Config
\usepackage{amsmath,amssymb}        % AMS symbols and environments
\usepackage{mathtools}              % More math symbols and environments
\usepackage{fontspec}           % Selecting fonts
\usepackage{charter}  % Nice, but too big. Scaled below.
% \usepackage[libertine,cmintegrals,cmbraces,vvarbb]{newtxmath}
%%%% Other tested fonts:
% \usepackage{kpfonts}%  for math 
% \usepackage{libertine}
% \usepackage{Alegreya} % Kind of blurry in some parts
% 
% \usepackage[expert]{mathdesign}
\usepackage{unicode-math}           % Use unicode math font, not TeX
%%%% Language 
\usepackage[main=spanish,english]{babel}         % Correct hyphenation
%%%% Layout Elements
\usepackage{subfig}                 % Subfigures
\usepackage[section]{placeins}
\usepackage{afterpage}				% Locate content after particular pages.
\usepackage{booktabs}               % Nicer tables
\usepackage{xcolor}                 % Colours in text
\usepackage{etoolbox}               % Easy programming to modify TeX stuff
\usepackage{ccicons}                % Creative Commons icons
\usepackage{pdfpages}               % Insert PDF pages
\definecolor{greenforlinks}{rgb}{0.09, 0.45, 0.27}
\PassOptionsToPackage{hyphens}{url}\usepackage[xetex,
            breaklinks=true,
            colorlinks=true,
            allcolors=greenforlinks,
            pagebackref,
            linktoc=all,
            pdftitle={Grafoscopio y el Data Week: coevolución entre artefactos digitales y comunidades},
            pdfauthor={Offray Vladimir Luna Cárdenas}]{hyperref}  % Hyperlinks
\usepackage{bookmark}               % Add things in TOC
% \usepackage{showframe}              % Frames to easily set up page layout
\usepackage[hypcap=true]{caption}   % Correctly placed anchors for hyperlinks
\usepackage{floatrow}               % Set up captions of floats
\usepackage{marginfix}              % Make marginpars float freely
\usepackage{metalogo}               % XeTeX logo
\usepackage{scrlayer-scrpage}       % Customise head and foot regions
\usepackage[footnote]{snotez}       % Footnotes as sidenotes
% \usepackage{showlabels}             % Show labels
\usepackage{listings}               % Code
\usepackage[linesnumbered,
            ruled,
            vlined]{algorithm2e}    % Algorithms
\usepackage{multirow}               % Cells occupying multiple rows in tables
\usepackage{multicol}               % Multiple columns in dictionary
\setlength\columnseprule{.4pt}
\usepackage[square]{natbib}         % Bibliography management
\usepackage{epigraph}				% Enabling chapter epigraphs
\usepackage{blindtext}				% Dummy text for seeing 

% More floats
\extrafloats{100}

% Figures and tables
\floatsetup[figure]{margins=hangoutside,
                    facing=yes,
                    capposition=beside,
                    capbesideposition={center,outside},
                    floatwidth=\textwidth}
\floatsetup[widefigure]{margins=hangoutside,
                        facing=yes,
                        capposition=bottom}
\floatsetup[table]{margins=hangoutside,
                   facing=yes,
                   capposition=beside,
                   capbesideposition={center,outside},
                   floatwidth=\textwidth}
\floatsetup[widetable]{margins=hangoutside,
                       facing=yes,
                       capposition=bottom}

% Sidenotes
\setsidenotes{text-mark-format=\textsuperscript{\normalfont#1},
              note-mark-format=#1:,
              note-mark-sep=\enskip}

% Listings code
\definecolor{listingkeywords}{rgb}{0.00, 0.5, 0.0}
\definecolor{listingidentifiers}{rgb}{0, 0, 0}
\definecolor{listingcomments}{rgb}{0.25, 0.5, 0.5}
\definecolor{listingstrings}{rgb}{0.73, 0.13, 0.13}
\definecolor{listingnumbers}{rgb}{0.25, 0.25, 0.25}
\lstset{
  basicstyle=\scriptsize\ttfamily,
  keywordstyle=\color{listingkeywords}\bfseries,
  identifierstyle=\color{listingidentifiers},
  commentstyle=\color{listingcomments}\itshape,
  stringstyle=\color{listingstrings},
  numberstyle=\scriptsize\color{listingnumbers}\ttfamily,
  frame=single,
  tabsize=4,
  language=[ISO]C++
}

% Dedication
\newenvironment{custom-dedication}
{\clearpage           % we want a new page
	\thispagestyle{empty}% no header and footer
	\vspace*{\stretch{1}}% some space at the top 
	\itshape             % the text is in italics
	\raggedleft          % flush to the right margin
}
{\par % end the paragraph
	\vspace{\stretch{3}} % space at bottom is three times that at the top
	\clearpage           % finish off the page
}


% Draw safety margins for variation in cropping, etc.
% \usepackage{background}
% \backgroundsetup{
% color=black,
% scale=1,
% opacity=1,
% angle=0,
% contents={
  % \tikz\draw[line width=1pt,black] (-8.18cm,-11.02cm) rectangle (8.18cm,11.02cm); % 1/2 inch safety margin
  % \tikz\draw[line width=1pt,black] (-8.81cm,-11.65cm) rectangle (8.81cm,11.65cm); % 1/4 inch safety margin
%   \tikz\draw[line width=1pt,black] (-9.45cm,-12.29cm) rectangle (9.45cm,12.29cm); % Crown quarto page
% }}

% Figure captions with no indentation
\setcapindent{0pt}

% List of figures title as "Figures"
\renewcaptionname{english}{\listfigurename}{Figures}
\renewcaptionname{english}{\listtablename}{Tables}

% Add half-title to PDF bookmarks
\makeatletter
\pretocmd{\maketitle}{%
  \if@openright\cleardoublepage\else\clearpage\fi
  \pdfbookmark[0]{Preliminaries}{title}% TODO: Change link to cover in online PDF version
  \pdfbookmark[1]{Half title}{title}% 
}{}{}%
\makeatother
% Add table of contents to PDF bookmarks
\makeatletter
\pretocmd{\tableofcontents}{%
  \if@openright\cleardoublepage\else\clearpage\fi
  \pdfbookmark[1]{Table of contents}{toc}%
}{}{}%
\makeatother
% Add list of figures to PDF bookmarks
\makeatletter
\pretocmd{\listoffigures}{%
  \if@openright\cleardoublepage\else\clearpage\fi
  \pdfbookmark[1]{List of figures}{lof}%
}{}{}%
\makeatother

% Font setup
\usepackage{fontspec, unicode-math}
\defaultfontfeatures{Scale=MatchLowercase}
\setmainfont[Scale=0.9]{Charter}
\setmonofont{Inconsolata}
\setmathfont{Asana-Math.otf}
\newfontfamily\fanciestfont[Ligatures={TeX,Discretionary}]{Linux Libertine O}
\newfontfamily\fancyfont[Ligatures=TeX]{Linux Libertine O}
\newfontfamily\chapternumberfont[Ligatures=TeX,Numbers=Lining]{Linux Libertine O}
\addtokomafont{disposition}{\fancyfont}
\addtokomafont{title}{\fanciestfont}
\addtokomafont{chapter}{\fanciestfont}
\addtokomafont{chapterentry}{\normalfont\scshape}
\addtokomafont{descriptionlabel}{\normalfont\bfseries}
\addtokomafont{caption}{\footnotesize}

% Levels in table of contents
\setcounter{tocdepth}{1}

% Table of contents styles
\newlength{\alignviiilength}
\setlength{\alignviiilength}{7.5mm}
\newlength{\alignxlength}
\setlength{\alignxlength}{8.5mm}
% \renewcommand{\cftdotsep}{\cftnodots}
% \renewcommand{\cftpnumalign}{l}

\setlength{\cftpartnumwidth}{\alignviiilength}
\renewcommand{\cftpartfont}{\fancyfont\LARGE\hypersetup{allcolors=black}}
\renewcommand{\cftpartpagefont}{\fancyfont\LARGE}

\setlength{\cftchapnumwidth}{\alignviiilength}
\renewcommand{\cftchapfont}{\fancyfont\large\hypersetup{allcolors=black}}
% \renewcommand{\cftchapleader}{\hspace{1em}}
\renewcommand{\cftchappagefont}{\fancyfont\large}
% \renewcommand{\cftchapafterpnum}{\cftparfillskip}

\setlength{\cftsecnumwidth}{\alignviiilength}
\renewcommand{\cftsecfont}{\hypersetup{allcolors=black}}
\setlength{\cftsecindent}{\alignviiilength}
\renewcommand{\cftsecleader}{\hspace{1em}}
% \renewcommand{\cftsecpagefont}{\normalfont\color{greenforlinks}}
\renewcommand{\cftsecafterpnum}{\cftparfillskip}

\setlength{\cftfigindent}{0mm}
\renewcommand{\cftfigfont}{\hypersetup{allcolors=black}}
\setlength{\cftfignumwidth}{\alignxlength}
\renewcommand{\cftfigleader}{\hspace{1em}}
\renewcommand{\cftfigafterpnum}{\cftparfillskip}

\setlength{\cfttabindent}{0mm}
\setlength{\cfttabnumwidth}{\alignxlength}
\renewcommand{\cfttabfont}{\hypersetup{allcolors=black}}
\renewcommand{\cfttableader}{\hspace{1em}}
\renewcommand{\cfttabafterpnum}{\cftparfillskip}

% Page styles for tables of contents, figures and tables
\renewpagestyle{scrheadings}{
  {\makebox[2em][r]{\thepage}\quad\rule{1pt}{100pt}\quad{}Contents}%
  {\hfill\rightmark\quad\rule{1pt}{100pt}\quad\makebox[2em][l]{\thepage}}%
  {}
}{
  {}%
  {}%
  {}
}
\renewpagestyle{plain.scrheadings}{
  {}%
  {}%
  {}
}{
  {\thepage}%
  {\hfill\thepage}%
  {}
}

% Part title style [todo]
\addtokomafont{part}{\Huge} 
\renewcommand*{\partformat}{\vspace{-6cm}\partname~\thepart\autodot\thispagestyle{empty}}

% Chapter title style
\makeatletter
\setlength{\fboxsep}{0cm}
\renewcommand*{\@@makechapterhead}[1]{%
  \vspace*{3\baselineskip plus \parskip}
  \makebox{%
    \makebox[\linewidth]{\parbox[c][2cm]{\linewidth}{\if@mainmatter\raggedleft\fi\size@chapter{#1}}}%
    \if@mainmatter%
      \makebox[\marginparsep]{\parbox[c][2cm]{\marginparsep}{\centering\rule{1pt}{2cm}}}%
      \makebox[4cm]{\parbox[c][2cm]{4cm}{\scalebox{5}{\chapternumberfont\thechapter\autodot}}}%
    \fi
  }%
  \vspace*{1.5\baselineskip plus .1\baselineskip minus .167\baselineskip}
}
\makeatother

% Formatting of back references
\renewcommand*{\backref}[1]{}
\renewcommand*{\backrefalt}[4]{{%
\ifcase#1 Not cited.%
\or{}Cited on page~#2.%
\else Cited on pages~#2.%
\fi%
}}

% Bullets
\renewcommand{\labelitemi}{$\textbullet$}
\renewcommand{\labelitemii}{$\circ$}

% Custom commands
\newcommand{\ie}{i.e.}
\newcommand{\eg}{e.g.}
\newcommand{\cf}{cf.}
\newcommand{\refpa}[1]{\hyperref[#1]{Part}~\ref{#1}}
\newcommand{\refch}[1]{\hyperref[#1]{Chapter}~\ref{#1}}
\newcommand{\refchs}[1]{Chapters~\ref{#1}}
\newcommand{\refse}[1]{\hyperref[#1]{\S}\ref{#1}}
% \newcommand{\refses}[1]{\S\ref{#1}}
\newcommand{\refap}[1]{\hyperref[#1]{Appendix}~\ref{#1}}
\newcommand{\reffig}[1]{\hyperref[#1]{Figure}~\ref{#1}}
\newcommand{\reffiges}[1]{\hyperref[#1]{Figura}~\ref{#1}}
\newcommand{\reffignl}[1]{\hyperref[#1]{Figuur}~\ref{#1}}
\newcommand{\reffigs}[1]{Figures~\ref{#1}}
\newcommand{\reffigp}[1]{\hyperref[#1]{Figure}~\ref{#1} on \hyperref[#1]{page}~\pageref{#1}}
\newcommand{\reftab}[1]{\hyperref[#1]{Table}~\ref{#1}}
\newcommand{\refalgo}[1]{\hyperref[#1]{Algorithm}~\ref{#1}}

% Papers
\newcommand{\paperostravaedgematching}{\item \textbf{Edge-matching polygons with a constrained triangulation}. Hugo Ledoux and Ken Arroyo Ohori. \emph{Proceedings of GIS Ostrava 2011}, Ostrava, Czech Republic, January 2011, pp. 377--390.}
\newcommand{\paperagileprepair}{\item[\href{http://dx.doi.org/10.5194/isprsarchives-xxxviii-4-c26-7-2012}{►}] \href{http://dx.doi.org/10.5194/isprsarchives-xxxviii-4-c26-7-2012}{\textbf{Automatically repairing invalid polygons with a constrained triangulation}}. Hugo Ledoux, Ken Arroyo Ohori and Martijn Meijers. In J\'er\^ome Gensel, Didier Josselin and Danny Vandenbroucke (eds.), \emph{Multidisciplinary Research on Geographical Information in Europe and Beyond. Proceedings of the 15th AGILE International Conference on Geographic Information Science}, Avignon, France, April 2012, pp. 13--18.}
\newcommand{\papertdgeoinfond}{\item[\href{http://dx.doi.org/10.5194/isprsarchives-xxxviii-4-c26-7-2012}{►}] \href{http://dx.doi.org/10.5194/isprsarchives-xxxviii-4-c26-7-2012}{\textbf{Integrating scale and space in 3D city models}}. Jantien Stoter, Hugo Ledoux, Martijn Meijers and Ken Arroyo Ohori. In Jacynthe Pouliot, Sylvie Daniel, Fr\'ed\'eric Hubert and Alborz Zamyadi (eds.), \emph{Proceedings of the 7th International 3D GeoInfo Conference, International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences} XXXVIII--4/C26, ISPRS, Québec City, Canada, May 2012, pp. 7--10.}
\newcommand{\paperosgisrepair}{\item \textbf{Automatically repairing polygons and planar partitions with \emph{prepair} and \emph{pprepair}}. Ken Arroyo Ohori, Hugo Ledoux and Martijn Meijers. \emph{Proceedings of the 4th Open Source GIS UK Conference}, Nottingham, United Kingdom, September 2012.}
\newcommand{\paperpfgpprepair}{\item[\href{http://dx.doi.org/10.1127/1432-8364/2012/0143}{►}] \href{http://dx.doi.org/10.1127/1432-8364/2012/0143}{\textbf{Validation and automatic repair of planar partitions using a constrained triangulation}}. Ken Arroyo Ohori, Hugo Ledoux and Martijn Meijers. \emph{Photogrammetrie, Fernerkundung, Geoinformation} 5, October 2012, pp. 613--630.}
\newcommand{\paperagileslicing}{\item \textbf{Manipulating higher dimensional spatial information}. Ken Arroyo Ohori, Filip Biljecki, Jantien Stoter and Hugo Ledoux. In Danny Vandenbroucke, B\'en\'edicte Bucher and Joep Crompvoets (eds.), \emph{Geographic Information Science at the Heart of Europe. Proceedings of the 16th AGILE International Conference on Geographic Information Science}, Leuven, Belgium, May 2013.}
\newcommand{\papergeoadvancesnd}{\item[\href{http://dx.doi.org/10.1007/978-3-642-36379-5_2}{►}] \href{http://dx.doi.org/10.1007/978-3-642-36379-5_2}{\textbf{Representing the dual of objects in a four-dimensional GIS}}.\@ Ken Arroyo Ohori, Pawel Boguslawski and Hugo Ledoux. In A. Abdul Rahman, P. Boguslawski, C. Gold and M. N. Said (eds.), \emph{Developments in Multidimensional Spatial Data Models}, Lecture Notes in Geoinformation and Cartography, Springer Berlin Heidelberg, Johor Bahru, Malaysia, May 2013, pp. 17--31.}
\newcommand{\papericcsand}{\item[\href{http://dx.doi.org/10.1007/978-3-642-39637-3_41}{►}] \href{http://dx.doi.org/10.1007/978-3-642-39637-3_41}{\textbf{Modelling higher dimensional data for GIS using generalised maps}}. Ken Arroyo Ohori, Hugo Ledoux and Jantien Stoter. In B. Murgante, S. Misra, M. Carlini, C. Torre, H. Q. Nguyen, D. Taniar, B. Apduhan and O. Gervasi (eds.), \emph{Computational Science and Its Applications --- ICCSA 2013. 13th International Conference, Ho Chi Minh City, Vietnam, June 24–27, 2013, Proceedings, Part I}, Lecture Notes in Computer Science 7971, Springer Berlin Heidelberg, June 2013, pp. 526--539.}
\newcommand{\paperacmsigspatialextrusion}{\item[\href{http://dx.doi.org/10.1145/2525314.2525447}{►}] \href{http://dx.doi.org/10.1145/2525314.2525447}{\textbf{Using extrusion to generate higher-dimensional GIS datasets}}. Ken Arroyo Ohori and Hugo Ledoux. In Craig Knoblock, Peer Kr\"oger, John Krumm, Markus Schneider and Peter Widmayer (eds.), \emph{SIGSPATIAL'13: Proceedings of the 21st ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems}, ACM, Orlando, Florida, United States, November 2013, pp. 398--401.}
\newcommand{\papericaaincrementalconstruction}{\item[\href{http://dx.doi.org/10.1007/978-3-319-04126-1_4}{►}] \href{http://dx.doi.org/10.1007/978-3-319-04126-1_4}{\textbf{Constructing an $n$-dimensional cell complex from a soup of $(n-1)$-dimensional faces}}. Ken Arroyo Ohori, Guillaume Damiand and Hugo Ledoux. In Prosenjit Gupta and Christos Zaroliagis (eds.), \emph{Applied Algorithms. First International Conference, ICAA 2014, Kolkata, India, January 13--15, 2014. Proceedings}, Lecture Notes in Computer Science 8321, Springer International Publishing Switzerland, Kolkata, India, January 2014, pp. 37--48.}
\newcommand{\papercgeoprepair}{\item[\href{http://dx.doi.org/10.1016/j.cageo.2014.01.009}{►}] \href{http://dx.doi.org/10.1016/j.cageo.2014.01.009}{\textbf{A triangulation-based approach to automatically repair GIS polygons}}. Hugo Ledoux, Ken Arroyo Ohori and Martijn Meijers. \emph{Computers \& Geosciences} 66, May 2014, pp. 121--131.}
\newcommand{\paperijgisndstructures}{\item[\href{http://dx.doi.org/10.1080/13658816.2014.999683}{►}] \href{http://dx.doi.org/10.1080/13658816.2014.999683}{\textbf{An evaluation and classification of $n$D topological data structures for the representation of objects in a higher-dimensional GIS}}.\@ Ken Arroyo Ohori, Hugo Ledoux and Jantien Stoter. \emph{International Journal of Geographical Information Science} 29(5), May 2015, pp. 825--849.}
\newcommand{\paperijgisextrusion}{\item[\href{http://dx.doi.org/10.1080/13658816.2015.1010535}{►}] \href{http://dx.doi.org/10.1080/13658816.2015.1010535}{\textbf{A dimension-independent extrusion algorithm using generalised maps}}. Ken Arroyo Ohori, Hugo Ledoux and Jantien Stoter. \emph{International Journal of Geographical Information Science} 29(7), July 2015, pp. 1166--1186.}
\newcommand{\paperijgind}{\item[\href{http://dx.doi.org/10.3390/ijgi4031055}{►}] \href{http://dx.doi.org/10.3390/ijgi4031055}{\textbf{Modelling a 3D city model and its levels of detail as a true 4D model}}. Ken Arroyo Ohori, Hugo Ledoux, Filip Biljecki and Jantien Stoter. \emph{ISPRS International Journal of Geo-Information}, 4(3), September 2015, pp. 1055--1075.} 
\newcommand{\paperisprsnd}{\item[\href{http://dx.doi.org/10.5194/isprsannals-II-2-W2-1-2015}{►}] \href{http://dx.doi.org/10.5194/isprsannals-II-2-W2-1-2015}{\textbf{Storing a 3D city model, its levels of detail and the correspondences between objects as a 4D combinatorial map}}. Ken Arroyo Ohori, Hugo Ledoux and Jantien Stoter. In Alias Abdul Rahman, Umit Isikdag and Francesc Ant\'on Castro (eds.), Joint International Geoinformation Conference 2015, 28--30 October 2015, Kuala Lumpur, Malaysia, ISPRS Annals of the Photogrammetry, Remote Sensing and Spatial Information Sciences II--2/W2, ISPRS, Kuala Lumpur, Malaysia, October 2015, pp. 1--8.}
\newcommand{\paperudmvobj}{\item[\href{http://dx.doi.org/10.2312/udmv.20151345}{►}] \href{http://dx.doi.org/10.2312/udmv.20151345}{\textbf{Automatic semantic-preserving conversion between OBJ and CityGML}}. Filip Biljecki and Ken Arroyo Ohori. In F. Biljecki and V. Tourre (eds.), \emph{Eurographics Workshop on Urban Data Modelling and Visualisation}, Eurographics Association, Delft, The Netherlands, November 2015, pp. 25--30.}
\newcommand{\paperijgisroeland}{\item[\href{http://dx.doi.org/10.1080/13658816.2015.1072201}{►}] \href{http://dx.doi.org/10.1080/13658816.2015.1072201}{\textbf{Automatically enhancing CityGML LOD2 models with a corresponding indoor geometry}}. Roeland Boeters, Ken Arroyo Ohori, Filip Biljecki and Sisi Zlatanova. \emph{International Journal of Geographical Information Science} 29(12), December 2015, pp. 2248--2268.}
\newcommand{\papermethodsxvoxelisation}{\item[\href{http://dx.doi.org/10.1016/j.mex.2016.01.001}{►}] \href{http://dx.doi.org/10.1016/j.mex.2016.01.001}{\textbf{Voxelization algorithms for geospatial applications: Computational methods for voxelating spatial datasets of 3D city models containing 3D surface, curve and point data models}}. Pirouz Nourian, Romulo Gon\c{c}alves, Sisi Zlatanova, Ken Arroyo Ohori and Anh Vu Vo. \emph{MethodsX} 3, January 2016, pp. 69--86.}

% \nofiles%
\begin{document}

%! Front cover: Reactivar
% \includepdf{cover-front.pdf}

% Sloppy spacing works better for small paper sizes: better than text outside margin, esp. because of marginpars
\sloppy

\frontmatter

\newgeometry{top=2.170cm,
            bottom=3.510cm,
            inner=2.1835cm,
            outer=2.1835cm,
            ignoremp}
\input{pre}

% No colour links in tables of contents and list of figures
\cleardoublepage%
\tableofcontents
% \cleardoublepage%
\listoffigures
% \cleardoublepage%
% \listoftables
\restoregeometry%

\mainmatter%

% Lengths used for page head
\newlength{\overflowingheadlen}
\setlength{\overflowingheadlen}{\linewidth}
\addtolength{\overflowingheadlen}{\marginparsep}
\addtolength{\overflowingheadlen}{\marginparwidth}

% Page style for preface
\renewpagestyle{scrheadings}{
  {\hspace{-\marginparwidth}\hspace{-\marginparsep}\makebox[\overflowingheadlen][l]{\makebox[2em][r]{\thepage}\quad\rule{1pt}{100pt}\quad{}Preface}}%
  {\makebox[\overflowingheadlen][r]{\rightmark\quad\rule{1pt}{100pt}\quad\makebox[2em][l]{\thepage}}}%
  {}
}{
  {}%
  {}%
  {}
}
\renewpagestyle{plain.scrheadings}{
  {}%
  {}%
  {}
}{
  {\thepage}%
  {\makebox[\overflowingheadlen][r]{\thepage}}%
  {}
}

\input{preface}

% Page style for chapters
\renewpagestyle{scrheadings}{
  {\hspace{-\marginparwidth}\hspace{-\marginparsep}\makebox[\overflowingheadlen][l]{\makebox[2em][r]{\thepage}\quad\rule{1pt}{100pt}\quad{}\leftmark}}%
  {\makebox[\overflowingheadlen][r]{\rightmark\quad\rule{1pt}{100pt}\quad\makebox[2em][l]{\thepage}}}%
  {}
}{
  {}%
  {}%
  {}
}
\renewpagestyle{plain.scrheadings}{
  {}%
  {}%
  {}
}{
  {\thepage}%
  {\makebox[\overflowingheadlen][r]{\thepage}}%
  {}
}

\input{introduction}

\setpartpreamble{
  \vspace{3cm}
  \begin{center}
  % \includegraphics[width=0.8\linewidth]{figs/gmaps-3d-simplices}
  \end{center}
}
\newgeometry{top=2.170cm,
            bottom=3.510cm,
            inner=2.1835cm,
            outer=2.1835cm,
            ignoremp}

\input{parte1}

% \part{Representing geographic information}
% \label{pa:representation}
% \restoregeometry%
% The underlying 3D simplicial complex in the representation of a cube as a 3D generalised map.
%
% \input{math}
%
% \input{modelling-background}
%
% \input{nd-modelling}

\setpartpreamble{
  \vspace{5cm}
  % \includegraphics[width=\linewidth]{figs/extrusion-steps}
}
\newgeometry{top=2.170cm,
            bottom=3.510cm,
            inner=2.1835cm,
            outer=2.1835cm,
            ignoremp}

\input{parte2}

\input{parte3}

% \part{Constructing and manipulating objects}
% \label{pa:operations}
% \restoregeometry%

% \input{operations-background}

% \input{extrusion}

% \input{incremental-construction}

% \input{linking-lods}

% \input{slicing}

\bookmarksetup{startatroot}
\addtocontents{toc}{\medskip\bigskip}

% \input{cleaning}

% \input{conclusions}

\appendix%

\addtocontents{toc}{\medskip\bigskip}

\include{materialidades}

\include{dataviz-infra}

\cleardoublepage%
\renewpagestyle{scrheadings}{
  {\makebox[2em][r]{\thepage}\quad\rule{1pt}{100pt}\quad\leftmark}%
  {\hfill\rightmark\quad\rule{1pt}{100pt}\quad\makebox[2em][l]{\thepage}}%
  {}
}{
  {}%
  {}%
  {}
}
\renewpagestyle{plain.scrheadings}{
  {}%
  {}%
  {}
}{
  {\thepage}%
  {\hfill\thepage}%
  {}
}
\newgeometry{top=2.170cm,
            bottom=3.510cm,
            inner=2.1835cm,
            outer=2.1835cm,
            ignoremp}

% \input{dictionary}

\addtocontents{toc}{\medskip\bigskip}

\backmatter%

% Bibliograhy
\bibliographystyle{plainnat}
{\small\bibliography{bibliography}}

\hypertarget{refs}{}
\leavevmode\hypertarget{ref-activist_object_curating_2014}{}%
Activist Object. 2014. ``Curating the Activist Object: About the
Activist Object.'' \url{http://activistobject.wordpress.com/about/}.

\leavevmode\hypertarget{ref-agile-visualization}{}%
``Agile Visualization.'' n.d. Accessed September 23, 2014.
\url{http://agilevisualization.com/\#credit}.

\leavevmode\hypertarget{ref-sbe-strings}{}%
Alex Sharp. 1997. ``Chapter 12. Strings.'' In \emph{Smalltalk by
	Example: The Developer's Guide}.
\url{http://stephane.ducasse.free.fr/FreeBooks/ByExample/14\%20-\%20Chapter\%2012\%20-\%20Strings.pdf}.

\leavevmode\hypertarget{ref-deep-into-pharo}{}%
Alexandre Bergel, Damien Cassou, Stéphane Ducasse, and Jannik Laval.
n.d. \emph{Deep into Pharo}. Square Bracket Associates. Accessed June
25, 2014. \url{http://www.deepintopharo.com/}.

\leavevmode\hypertarget{ref-zotero-api-intro-ph}{}%
Amanda Morton. n.d. ``Intro to the Zotero API.'' Accessed October 7,
2014.
\url{http://programminghistorian.org/lessons/intro-to-the-zotero-api.html}.

\leavevmode\hypertarget{ref-citezen-barreau}{}%
Barreau, Adrien. n.d. ``Citezen Université Lille 1 - Résumé de Stage -
Licence Mention Informatique 2010-2011.'' Accessed October 7, 2014.
\url{http://www.fil.univ-lille1.fr/~decomite/ue/ResumesStages/2010/resumes/barreau/abstract.php}.

\leavevmode\hypertarget{ref-bergel_software_2014}{}%
Bergel, Alexandre. 2014. ``Software as Graph.''
\url{http://vimeo.com/94724841}.

\leavevmode\hypertarget{ref-cannot-reproduce-lab-work}{}%
Bourne, Philip E. n.d. ``I Cannot Reproduce the Work from My Own
Laboratory.'' Accessed October 10, 2014.
\url{http://www.slideshare.net/pebourne/ebi121102013}.

\leavevmode\hypertarget{ref-open-science-to-open-math}{}%
Breuer, Felix. n.d. ``From Open Science to Open Mathematics - Felix
Breuer's Blog.'' Accessed October 7, 2014.
\url{http://blog.felixbreuer.net/2013/07/14/from-open-science-to-open-mathematics.html}.

\leavevmode\hypertarget{ref-caekenberghe-ston}{}%
Caekenberghe, Sven Van. 2012. ``Smalltalk Object Notation (STON).''
\url{https://github.com/svenvc/ston/blob/master/ston-paper.md}.

\leavevmode\hypertarget{ref-results-may-vary}{}%
Carole Goble. 2014. ``Results May Vary: Collaborations Workshop, Oxford
2014.''
\url{http://www.slideshare.net/carolegoble/results-may-vary-collaborations-workshop-oxford-2014}.

\leavevmode\hypertarget{ref-beyond-pdf}{}%
Christian Pietsch, Vitali Peil, and Najko Jahn. 2013.
``Publikationswerkzeuge Für Offene Wissenschaft Und Freie Software.''
Universität Bielefeld.
\url{http://www.ub.uni-bielefeld.de/~cpietsch/markdown/\#/1}.

\leavevmode\hypertarget{ref-critical_art_emsamble_ciencia_2009}{}%
Critical Art Emsamble. 2009. ``Ciencia de Garaje - Medialab-Prado
Madrid.'' \url{http://medialab-prado.es/article/garage_science}.

\leavevmode\hypertarget{ref-fenner_grammar_2013}{}%
Fenner, Martin. 2013. ``The Grammar of Scholarly Communication.''
\url{http://blog.martinfenner.org/2013/11/17/the-grammar-of-scholarly-communication/}.

\leavevmode\hypertarget{ref-zotero-api}{}%
Fritz, Christian. n.d. ``Zotero Web API V3.'' Accessed October 7, 2014.
\url{https://www.zotero.org/support/dev/web_api/v3/start}.

\leavevmode\hypertarget{ref-pbe2-glamour}{}%
Girba, Tudor. n.d. ``Glamour.'' In \emph{Deep into Pharo}, 191--207.

\leavevmode\hypertarget{ref-girba-custom-analyses}{}%
---------. n.d. ``Moose: Custom Analyses Made Easy.'' \emph{Humane
	Assessment}. Accessed September 27, 2014b.
\url{http://www.humane-assessment.com/blog/moose-custom-analyses-made-easy}.

\leavevmode\hypertarget{ref-girba-moose-book-intro}{}%
---------. n.d. \emph{The Moose Book: Introduction}. Accessed September
27, 2014c. \url{http://www.themoosebook.org/book/introduction}.

\leavevmode\hypertarget{ref-oo-recursion}{}%
Kent Beck. n.d. ``Object-Oriented Recursion.''
\url{http://www.macqueen.us/smalltalkReport/ST/ST09/27be.pdf}.

\leavevmode\hypertarget{ref-peer-review-plus-reproducible}{}%
Kraker, Peter. n.d. ```It's Not Only Peer-Reviewed, It's Reproducible!'
OKF Open Science Working Group.'' Accessed October 10, 2014.
\url{http://science.okfn.org/2013/10/18/its-not-only-peer-reviewed-its-reproducible/}.

\leavevmode\hypertarget{ref-open-sci-in-learning}{}%
Kraker, Peter, Derick Leony, Wolfgang Reinhardt, and Günter Beham. 2011.
``The Case for an Open Science in Technology Enhanced Learning.''
\emph{Int. J. Technology Enhanced Learning} 3 (6):643.

\leavevmode\hypertarget{ref-krampe_tirade_2009}{}%
Krampe, Göran. 2009. ``Tirade, a File Format for Smalltalkers - Roads
Less Taken.'' \emph{Roads Less Taken}.
\url{http://goran.krampe.se/2009/03/16/tirade-a-file-format-for-smalltalkers/}.

\leavevmode\hypertarget{ref-krampe_literal_2012}{}%
---------. 2012. ``Literal Arrays Vs JSON Vs STON Vs Tirade - Roads Less
Taken.'' \emph{Roads Less Taken}.
\url{http://goran.krampe.se/2012/05/08/literal-arrays-vs-json-vs-ston-vs-tirade/}.

\leavevmode\hypertarget{ref-lafuente_critica_2013}{}%
Lafuente, Antonio. 2013. ``La Crítica de La Ciencia.''
\emph{Profesiones} 141 (February):48--49.
\url{http://www.profesiones.org/var/plain/storage/original/application/55787586cfc72081a1dc891d40a3fbb5.pdf}.


\leavevmode\hypertarget{ref-ubakye-mapa}{}%
---------. 2012. ``Ubakye Aprendizaje E Identidad Digital.''
\url{http://mutabit.com/deltas/repos.fossil/mtb-charlas-talleres/doc/tip/Ubakye/ubakyeAprendizajeIdentidadDigital.png}.

\leavevmode\hypertarget{ref-luna_cardenas_ecologisaberes_2014}{}%
---------. 2014a. ``Ecología de Saberes En Diseño: Un Ejemplo Desde Los
Discursos Autopoiéticos.''
\url{http://mutabit.com/deltas/repos.fossil/doctorado-offray/doc/tip/Tesis/ExamenCandidatura/Escrito2/luna-offray-ecologia-de-saberes-en-diseno.pdf}.

\leavevmode\hypertarget{ref-luna_cardenas_outliner_2014}{}%
---------. 2014b. ``Outliner for Light Table or on Blurring the
Distinction Beween Programmers and Non Programmers. · Issue \#1530 ·
LightTable/LightTable.''
\url{https://github.com/LightTable/LightTable/issues/1530\#issuecomment-46760429}.

\leavevmode\hypertarget{ref-ubakye-smalltalkhub}{}%
---------. 2014c. ``Ubakye - SmalltalkHub.''
\url{http://smalltalkhub.com/\#!/~Offray/Ubakye/}.

\leavevmode\hypertarget{ref-grafoscopio-smalltalkhub}{}%
---------. n.d. ``Grafoscopio - SmalltalkHub.'' Accessed November 18,
2014a. \url{http://smalltalkhub.com/\#!/~Offray/Grafoscopio/}.

\leavevmode\hypertarget{ref-grafoscopio-fossil}{}%
---------. n.d. ``Grafoscopio: Repositorio de Documentación.'' Accessed
November 18, 2014b.
\url{http://mutabit.com/deltas/repos.fossil/grafoscopio/index}.

\leavevmode\hypertarget{ref-pharo-sitio-web}{}%
``Pharo - Welcome to Pharo!'' n.d. Accessed October 21, 2014.
\url{http://pharo.org/}.

\leavevmode\hypertarget{ref-pharo-sourcedocs-strings}{}%
``Pharo Source Documentation: Collections-Strings.'' n.d. Accessed
September 23, 2014.
\url{http://magaloma.seasidehosting.st/Collections-Strings}.

\leavevmode\hypertarget{ref-girba-playing-with-objects}{}%
``Pharo: Playing with Live Objects.'' 2014.
\url{http://vimeo.com/97315968}.

\leavevmode\hypertarget{ref-citezen-pollet-repository}{}%
Pollet, Damien. n.d. ``Citezen.'' Accessed October 12, 2014a.
\url{http://people.untyped.org/damien.pollet/software/citezen/}.

\leavevmode\hypertarget{ref-citezen-pollet-report}{}%
---------. n.d. ``Citezen, a Nicer Bibliography Toolkit.''
\url{http://vst.ensm-douai.fr/ESUG2009Media/uploads/1/citezen-EsugAwards2009.pdf}.

\leavevmode\hypertarget{ref-research-object-overview}{}%
Research Object. n.d. ``Research Object Overview.'' Accessed September
26, 2014. \url{http://www.researchobject.org/overview/}.

\leavevmode\hypertarget{ref-taste-of-smalltalk}{}%
Ted Kaehler, and Dave Patterson. 1986. \emph{A Taste of Smalltalk}. W W
Norton \& Co Inc.

\leavevmode\hypertarget{ref-tudor_glamorous_2014}{}%
Tudor, Girba, Andrei Chis, and Alex Syrel. 2014. ``The Glamorous
Toolkit.'' \url{http://gt.moosetechnology.org/}.

\leavevmode\hypertarget{ref-wenger_communities_1999}{}%
Wenger, Etienne. 1999. \emph{Communities of Practice}. Cambridge
University Press.

\leavevmode\hypertarget{ref-wikipedia_open_2014}{}%
Wikipedia. 2014. ``Open Research - Wikipedia, the Free Encyclopedia.''
\url{https://en.wikipedia.org/wiki/Open_research}.

\leavevmode\hypertarget{ref-zotero-api-v3}{}%
``Zotero Web API Documentation V. 3.'' n.d. Accessed October 7, 2014.
\url{https://www.zotero.org/support/dev/web_api/v3/basics}.

\leavevmode\hypertarget{ref-zotero-bibtex-mit}{}%
``Zotero with LaTeX and BibTeX - Zotero at MIT - Research Guides at MIT
Libraries.'' n.d. Accessed October 7, 2014.
\url{http://libguides.mit.edu/content.php?pid=55482\&sid=406343}.

\leavevmode\hypertarget{ref-better-bibtex}{}%
ZotPlus. n.d. ``Better BibTeX: Citation Keys.'' Accessed October 3,
2014. \url{https://zotplus.github.io/better-bibtex/Citation-Keys.html}.

\restoregeometry%

% Page style for back matter
\renewpagestyle{scrheadings}{
  {\hspace{-\marginparwidth}\hspace{-\marginparsep}\makebox[\overflowingheadlen][l]{\makebox[2em][r]{\thepage}\quad\rule{1pt}{100pt}\quad\leftmark}}%
  {\makebox[\overflowingheadlen][r]{\rightmark\quad\rule{1pt}{100pt}\quad\makebox[2em][l]{\thepage}}}%
  {}
}{
  {}%
  {}%
  {}
}
\renewpagestyle{plain.scrheadings}{
  {}%
  {}%
  {}
}{
  {\thepage}%
  {\makebox[\overflowingheadlen][r]{\thepage}}%
  {}
}

\cleardoublepage%
\label{thesis:back}
\pdfbookmark[-1]{Back matter}{thesis:back}

% \input{summary}

% \input{cv}

% Back cover
\clearpage
\thispagestyle{empty}
\null%
\clearpage
% \includepdf{cover-back.pdf}

\end{document}