add sections

This commit is contained in:
Motiejus Jakštys 2021-05-19 22:57:46 +03:00 committed by Motiejus Jakštys
parent 22e5ee9479
commit f6f8a7f6fb
2 changed files with 49 additions and 30 deletions

View File

@ -1,27 +1,13 @@
#!/bin/bash #!/bin/bash
set -euo pipefail set -euo pipefail
dir=$(mktemp -d) dir=$(mktemp -d)
fname=mj-msc-all.pdf fname=${1:-mj-msc-all.pdf}
echo "Extracting $fname to $dir/" && pdfdetach -saveall -o "$dir" "$fname"
echo "Extracting all files from $fname to $dir ..."
pdfdetach -saveall -o "$dir" "$fname"
echo "Generating $dir/$fname ..." echo "Generating $dir/$fname ..."
fail=0 make -j $(nproc) -C "$dir" "$fname" &> "$dir/make.log" || {
make -C "$dir" -j $(nproc) "$fname" > "$dir/make.log" 2>&1 || fail=1 echo "Generation failed. Here are the last 20 log lines:"
tail -20 "$dir/make.log"
if [[ $fail == 1 ]]; then
>&2 echo "Generation failed. Here are the last 10 log lines:"
tail -10 "$dir/make.log"
exit 1 exit 1
fi }
echo "Opening $dir/$fname ..." && xdg-open "$dir/$fname"
open=open echo "File has been closed. Removing $dir" && rm -fr "$dir"
[[ $(uname) == Linux ]] && open=xdg-open
echo "Opening $dir/$fname ..."
"$open" "$dir/$fname"
echo "Editor has been closed. Removing $dir"
rm -fr "$dir"

View File

@ -173,8 +173,8 @@ However, I wasn't able to find code for any of those to evaluate with my
desired data set, or use as a basis for my own maps. \cite{wang1998line} is desired data set, or use as a basis for my own maps. \cite{wang1998line} is
available in a commercial product. available in a commercial product.
The lack of robust openly available generalization algorithm implementations Lack of robust openly available generalization algorithm implementations poses
poses a problem for map creation with free software: there is not a similar a problem for map creation with free software: there is not a similar
high-quality simplification algorithm to create down-scaled maps, so any high-quality simplification algorithm to create down-scaled maps, so any
cartographic work, which uses line generalization as part of its processing, cartographic work, which uses line generalization as part of its processing,
will be of sub-par quality. We believe that availability of high-quality will be of sub-par quality. We believe that availability of high-quality
@ -185,6 +185,37 @@ as a whole.
\section{Methodology} \section{Methodology}
\label{sec:methodology} \label{sec:methodology}
In this paper we describe {\WM} in a detail that is more useful for algorithm
developers than the original \cite{wang1998line}: sections will be expanded,
with more detailed illustrations next to the descriptions.
<TODO: expand>
\subsection{Automated tests}
\section{Description of the implementation}
\subsection{Definition of a Bend}
\subsection{Gentle Inflection at End of a Bend}
\subsection{Self-line Crossing When Cutting a Bend}
\subsection{Attributes of a Single Bend}
\subsection{Shape of a Bend}
\subsection{The Context of a Bend: Isolated and Similar Bends}
\subsection{Elimination Operator}
\subsection{Combination Operator}
\subsection{Exaggeration Operator}
\section{Program Implementation}
\section{Results of Experiments}
\section{Conclusions} \section{Conclusions}
\label{sec:conclusions} \label{sec:conclusions}
@ -197,15 +228,17 @@ as a whole.
\section{Code listings} \section{Code listings}
We strongly believe ability to reproduce the results is critical for any We strongly believe in the ability to reproduce the results is critical for any
scientific work. To make it possible for this algorithm, all source scientific work. To make it possible for this paper, all source files and
files and accompanying scripts have been attached to the PDF. To preview accompanying scripts have been attached to the PDF. To preview the code
the code listings and re-generate this document, run this simple script: listings and re-generate this document (also, re-generate the included
graphics), run this script (assuming name of this document is {\tt
mj-msc-all.pdf}):
\inputminted[fontsize=\small]{bash}{extract-and-generate} \inputminted[fontsize=\small]{bash}{extract-and-generate}
A reasonably up-to-date Linux or OS X system with a working Docker installation A reasonably up-to-date Linux or OS X system with a working Docker installation
is required to re-generate this document. is required.
\end{appendices} \end{appendices}
\end{document} \end{document}