├── chapters ├── abstract.tex ├── acknowledgments.tex ├── ch-review.tex ├── ap-recipes.tex ├── ap-ingredients.tex ├── ap-publication.tex ├── ch-noodle.tex ├── ch-concl.tex ├── ch-intro.tex └── ch-rice.tex ├── pic ├── signature.jpg ├── ch-Intro │ └── vege.pdf ├── ch-Rice │ └── rice.jpg └── ch-Noodle │ └── noodle.jpg ├── exp └── ch-Rice │ ├── taste_with_freshness.txt │ ├── taste_with_meals.txt │ ├── taste.plt │ ├── taste_with_freshness.eps │ └── taste_with_meals.eps ├── fairy-lite ├── README.md ├── _common_lib │ ├── output_utils.sh │ ├── argument_utils.sh │ ├── system.sh │ └── filesystem.sh └── latex │ └── build_latex.sh ├── .gitignore ├── .devcontainer ├── Dockerfile └── devcontainer.json ├── .gitattributes ├── LICENSE ├── main.tex ├── references.bib ├── README.md ├── _global_settings.tex └── nusthesis.cls /chapters/abstract.tex: -------------------------------------------------------------------------------- 1 | \begin{abstract} 2 | 3 | \lipsum[1-3] 4 | 5 | \end{abstract} 6 | -------------------------------------------------------------------------------- /pic/signature.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/streamjoin/nusthesis/HEAD/pic/signature.jpg -------------------------------------------------------------------------------- /pic/ch-Intro/vege.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/streamjoin/nusthesis/HEAD/pic/ch-Intro/vege.pdf -------------------------------------------------------------------------------- /pic/ch-Rice/rice.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/streamjoin/nusthesis/HEAD/pic/ch-Rice/rice.jpg -------------------------------------------------------------------------------- /pic/ch-Noodle/noodle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/streamjoin/nusthesis/HEAD/pic/ch-Noodle/noodle.jpg -------------------------------------------------------------------------------- /chapters/acknowledgments.tex: -------------------------------------------------------------------------------- 1 | \begin{acknowledgments} 2 | 3 | \lipsum[1-5] 4 | 5 | \end{acknowledgments} 6 | -------------------------------------------------------------------------------- /exp/ch-Rice/taste_with_freshness.txt: -------------------------------------------------------------------------------- 1 | # Rice Type Fresh Overnight 2 | White 75 65 3 | Brown 65 40 4 | Chicken 95 80 5 | Duck 90 60 6 | Fried 85 82 7 | -------------------------------------------------------------------------------- /exp/ch-Rice/taste_with_meals.txt: -------------------------------------------------------------------------------- 1 | # meals White Rice Brown Rice Chicken Rice Duck Rice Fried Rice 2 | 1 75 65 95 90 85 3 | 2 60 35 90 80 70 4 | 3 45 25 85 70 65 5 | 4 40 20 80 60 55 6 | 5 25 15 65 50 45 7 | 6 20 10 55 40 30 8 | 7 15 8 40 30 25 9 | -------------------------------------------------------------------------------- /chapters/ch-review.tex: -------------------------------------------------------------------------------- 1 | \chapter{Literature Review} 2 | \label{ch:review} 3 | \vspace{2em} 4 | 5 | \lipsum 6 | 7 | A journal paper~\cite{cacm70:Codd} is cited. 8 | \lipsum[2] 9 | 10 | A conference paper~\cite{sigmod14:Chandramouli} is cited. 11 | \lipsum[3] 12 | 13 | A PhD thesis~\cite{PHD:Pavlo} is cited. 14 | 15 | \section{Summary} 16 | 17 | \lipsum[10] 18 | -------------------------------------------------------------------------------- /fairy-lite/README.md: -------------------------------------------------------------------------------- 1 | # Fairy-lite # 2 | 3 | This is a tailored checkout of the Fairy project ([https://github.com/streamjoin/fairy](https://github.com/streamjoin/fairy)), mainly containing the scripts for latex compilation. 4 | 5 | Note that there is no liability of synchronizing the codes contained in this folder with that hosted in the [Fairy](https://github.com/streamjoin/fairy) project. 6 | -------------------------------------------------------------------------------- /chapters/ap-recipes.tex: -------------------------------------------------------------------------------- 1 | \chapter{Recipes} 2 | \label{append:recipes} 3 | \vspace*{2em} 4 | 5 | \lipsum[1] 6 | 7 | \section{Mustard Green Pork Rice} 8 | \label{appsec:prok_rice} 9 | 10 | \lipsum[2-3] 11 | 12 | \section{Hakka Pancake Roll} 13 | \label{appsec:pancake_roll} 14 | 15 | \lipsum[4-6] 16 | 17 | \section{Pumpkin Tang Yuan} 18 | \label{appsec:tang_yuan} 19 | 20 | \lipsum[7-8] 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Output 2 | ChickenR.pdf 3 | *.md5 4 | *.bbl 5 | *.aux 6 | 7 | # Generated by Fairy 8 | pdfbuild/ 9 | *trimbib_log*.txt 10 | 11 | # Temporary files 12 | *-converted-to.pdf 13 | *.out 14 | *.blg 15 | *.ps 16 | *.dvi 17 | *.ent 18 | *.log 19 | *.bak 20 | *.sav 21 | *.bcf 22 | *.run.xml 23 | *.synctex.gz 24 | *.fls 25 | *.fdb_latexmk 26 | *.lot 27 | *.lof 28 | *.toc 29 | *.zip 30 | -------------------------------------------------------------------------------- /chapters/ap-ingredients.tex: -------------------------------------------------------------------------------- 1 | \chapter{Ingredients} 2 | \label{append:ingred} 3 | 4 | \section{Hokkien Mee: Stir-fry Noodles with Shrimps and Squids} 5 | 6 | \lipsum[51] 7 | 8 | \section{Nasi Lemak: Rice Boiled with Coconut Milk and Accompanied with Chilli Paste and Anchovies} 9 | 10 | \lipsum[52] 11 | 12 | \section{Prata: a Dough Served with Curry} 13 | 14 | \lipsum[53] 15 | 16 | \section{Fried Carrot Cake: Stir-fry Rice Cakes with Eggs} 17 | 18 | \lipsum[54] 19 | -------------------------------------------------------------------------------- /.devcontainer/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG VARIANT=bullseye 2 | FROM mcr.microsoft.com/vscode/devcontainers/base:${VARIANT} 3 | 4 | RUN apt-get update \ 5 | && DEBIAN_FRONTEND=noninteractive apt-get install -y \ 6 | texlive-base \ 7 | texlive-binaries \ 8 | texlive-fonts-recommended \ 9 | texlive-latex-base \ 10 | texlive-latex-recommended \ 11 | texlive-latex-extra \ 12 | texlive-fonts-extra \ 13 | texlive-science \ 14 | texlive-font-utils \ 15 | biber \ 16 | chktex \ 17 | && apt-get clean \ 18 | && rm -rf /var/lib/apt/lists/* 19 | -------------------------------------------------------------------------------- /chapters/ap-publication.tex: -------------------------------------------------------------------------------- 1 | \begin{refsection} 2 | \nocite{% 3 | TR04:Arasu, 4 | nsdi12:Zaharia, 5 | tods92:Mohan, 6 | } 7 | 8 | \defbibnote{PubListPrenote}{% 9 | % provide some text, if any, before the list of publications 10 | } 11 | \defbibnote{PubListPostnote}{% 12 | % provide some text, if any, after the list of publications 13 | } 14 | 15 | \bookmarksetup{startatroot} 16 | \newrefcontext[sorting=none] 17 | \printbibliography[ 18 | heading=bibintoc, 19 | title={Publications during PhD Study}, 20 | prenote=PubListPrenote, 21 | postnote=PubListPostnote 22 | ] 23 | \end{refsection} 24 | -------------------------------------------------------------------------------- /chapters/ch-noodle.tex: -------------------------------------------------------------------------------- 1 | \SetPicSubDir{ch-Noodle} 2 | \SetExpSubDir{ch-Noodle} 3 | 4 | \chapter{Use Your Noodle} 5 | \label{ch:noodle} 6 | \vspace{2em} 7 | 8 | \lipsum[1-4] 9 | 10 | \section{Preliminaries} 11 | 12 | \lipsum[5-8] 13 | 14 | \begin{figure}[!t] 15 | \centering 16 | \includegraphics[width=.5\linewidth]{\Pic{jpg}{noodle}} 17 | \vspace{\BeforeCaptionVSpace} 18 | \caption{A bowl of noodles.} 19 | \label{Noodle:fig:bowl_of_noodles} 20 | \end{figure} 21 | 22 | \section{Methodology} 23 | 24 | \autoref{Noodle:fig:bowl_of_noodles} shows a bowl of noodles. 25 | \lipsum[9-15] 26 | 27 | \section{Evaluation} 28 | 29 | \lipsum[16-20] 30 | 31 | \section{Summary} 32 | 33 | \lipsum[21] 34 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Handle line endings automatically for files detected as text 2 | # and leave all files detected as binary untouched. 3 | * text=auto 4 | 5 | # These files are text and should be normalized (Convert crlf => lf) 6 | *.md text 7 | *.php text 8 | *.css text 9 | *.js text 10 | *.json text 11 | *.htm text 12 | *.html text 13 | *.xml text 14 | *.txt text 15 | *.ini text 16 | *.inc text 17 | *.pl text 18 | *.rb text 19 | *.py text 20 | *.scm text 21 | *.sql text 22 | *.sh text 23 | 24 | # These files are binary and should be left untouched 25 | # (binary is a macro for -text -diff) 26 | *.png binary 27 | *.jpg binary 28 | *.jpeg binary 29 | *.gif binary 30 | *.ico binary 31 | *.mov binary 32 | *.mp4 binary 33 | *.mp3 binary 34 | *.flv binary 35 | *.fla binary 36 | *.swf binary 37 | *.gz binary 38 | *.zip binary 39 | *.7z binary 40 | *.ttf binary 41 | *.pyc binary 42 | 43 | -------------------------------------------------------------------------------- /chapters/ch-concl.tex: -------------------------------------------------------------------------------- 1 | \chapter{Conclusion and Future Work} 2 | \label{ch:concl} 3 | 4 | \section{Conclusion} 5 | 6 | \lipsum[1-3] 7 | 8 | \section{Future Research Directions} 9 | 10 | \lipsum[4] 11 | 12 | \subsection{Eat good, Feel good, Look Good} 13 | 14 | \lipsum[5] 15 | 16 | \subsection{An Apple a Day Keeps the Doctor Away} 17 | 18 | \lipsum[6] 19 | 20 | \subsection{A Healthy Food for a Wealthy Mood} 21 | 22 | \lipsum[7] 23 | 24 | \subsection{Eat Your Veggies, Have Less Wedgies} 25 | 26 | \lipsum[8] 27 | 28 | \subsection{Salad and Beets Are Some Healthy Treats} 29 | 30 | \lipsum[9] 31 | 32 | \subsection{Eat Only When Hungry} 33 | 34 | \lipsum[10] 35 | 36 | \vspace{2em} 37 | We believe the above (but not limited to) future research directions will advance the technology presented in this thesis and contribute to academia and industry. 38 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Qian Lin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /main.tex: -------------------------------------------------------------------------------- 1 | %%% enable "DoubleSided" for paper-based submission, i.e. printing, and 2 | %%% remove it for the final submission, i.e. electronic thesis 3 | %\newcommand*{\DoubleSided}{} 4 | 5 | \input{_global_settings.tex} 6 | 7 | \begin{document} 8 | 9 | \title{We Are What We Eat: The Recipe of Success} 10 | 11 | \author{CHICKEN Rice} 12 | \prevdegrees{% 13 | B.S., Culinary University} 14 | \degree{Doctor of Philosophy} 15 | \field{Cooking Science} 16 | \degreeyear{2021} 17 | \supervisor{Professor Hamburger STEAK} 18 | 19 | % only involve the examiners in the final submission 20 | \examiners{% 21 | Associate Professor CHAR Kway Teow \\ 22 | Assistant Professor Yummy Bee Hoon CRAB \\ 23 | Professor BAK Kwa, Dessert University} 24 | 25 | \maketitle 26 | 27 | \declaredate{1 March 2021} 28 | \declaresign{\RootPicDir /signature.jpg} % remove this if you prefer to sign physically 29 | \declarationpage 30 | 31 | \begin{frontmatter} 32 | \dedicate{To my delicious friends} 33 | \input{chapters/acknowledgments.tex} 34 | \tableofcontents 35 | \input{chapters/abstract.tex} 36 | \listoffigures 37 | \listoftables 38 | \end{frontmatter} 39 | 40 | \input{chapters/ch-intro.tex} 41 | \input{chapters/ch-review.tex} 42 | \input{chapters/ch-rice.tex} 43 | \input{chapters/ch-noodle.tex} 44 | \input{chapters/ch-concl.tex} 45 | 46 | \bookmarksetup{startatroot} 47 | \printbibliography[heading=bibintoc] 48 | 49 | \appendix 50 | \input{chapters/ap-recipes.tex} 51 | \input{chapters/ap-ingredients.tex} 52 | 53 | \input{chapters/ap-publication.tex} % optional to include your publication list 54 | 55 | \end{document} 56 | -------------------------------------------------------------------------------- /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "NUS Thesis", 3 | "build": { 4 | "dockerfile": "Dockerfile", 5 | }, 6 | 7 | // Set *default* container specific settings.json values on container create. 8 | "settings": { 9 | "latex-workshop.latex.tools": [ 10 | { 11 | "name": "pdflatex", 12 | "command": "pdflatex", 13 | "args": [ 14 | "-synctex=1", 15 | "-interaction=nonstopmode", 16 | "-file-line-error", 17 | "%DOC%" 18 | ] 19 | }, 20 | { 21 | "name": "biber", 22 | "command": "biber", 23 | "args": [ 24 | "%DOCFILE%" 25 | ] 26 | } 27 | ], 28 | "latex-workshop.latex.recipes": [ 29 | { 30 | "name": "pdflatex->biber->2*pdflatex", 31 | "tools": [ 32 | "pdflatex", 33 | "biber", 34 | "pdflatex", 35 | "pdflatex" 36 | ] 37 | } 38 | ], 39 | }, 40 | 41 | // Add the IDs of extensions you want installed when the container is created. 42 | "extensions": [ "james-yu.latex-workshop",], 43 | 44 | // Use 'forwardPorts' to make a list of ports inside the container available locally. 45 | // "forwardPorts": [], 46 | 47 | // Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker. 48 | // "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ], 49 | 50 | // Uncomment when using a ptrace-based debugger like C++, Go, and Rust 51 | // "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ], 52 | 53 | // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. 54 | "remoteUser": "vscode" 55 | } -------------------------------------------------------------------------------- /fairy-lite/_common_lib/output_utils.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Output utilities 4 | 5 | [[ -n "${__FAIRY_COMMON_LIB_OUTPUT_UTILS_SH__+x}" ]] && return 6 | readonly __FAIRY_COMMON_LIB_OUTPUT_UTILS_SH__=1 7 | 8 | readonly __FONT_NE="\033[0m" # for reset font 9 | readonly __FONT_BOLD="\033[1m" 10 | 11 | readonly __BLACK="\033[30m" 12 | readonly __RED="\033[31m" 13 | readonly __GREEN="\033[32m" 14 | readonly __YELLOW="\033[33m" 15 | readonly __BLUE="\033[34m" 16 | readonly __MAGENTA="\033[35m" 17 | readonly __CYAN="\033[36m" 18 | readonly __WHITE="\033[37m" 19 | 20 | readonly __BOLD_BLACK="${__FONT_BOLD}${__BLACK}" 21 | readonly __BOLD_RED="${__FONT_BOLD}${__RED}" 22 | readonly __BOLD_GREEN="${__FONT_BOLD}${__GREEN}" 23 | readonly __BOLD_YELLOW="${__FONT_BOLD}${__YELLOW}" 24 | readonly __BOLD_BLUE="${__FONT_BOLD}${__BLUE}" 25 | readonly __BOLD_MAGENTA="${__FONT_BOLD}${__MAGENTA}" 26 | readonly __BOLD_CYAN="${__FONT_BOLD}${__CYAN}" 27 | readonly __BOLD_WHITE="${__FONT_BOLD}${__WHITE}" 28 | 29 | echo_bold_blue() { 30 | printf "%b%s%b\n" "${__BOLD_BLUE}" "$@" "${__FONT_NE}" 31 | } 32 | 33 | debug() { 34 | printf "[%bDEBUG%b] %b\n" "${__BOLD_YELLOW}" "${__FONT_NE}" "$@" >&1 # to stdout 35 | } 36 | 37 | info() { 38 | printf "[%bINFO%b] %b\n" "${__BOLD_BLUE}" "${__FONT_NE}" "$@" >&1 # to stdout 39 | } 40 | 41 | info_bold_green() { 42 | info "${__BOLD_GREEN}$*${__FONT_NE}" 43 | } 44 | 45 | info_bold_blue() { 46 | info "${__BOLD_BLUE}$*${__FONT_NE}" 47 | } 48 | 49 | warn() { 50 | printf "[" >&2 51 | printf "%b" "${__BOLD_MAGENTA}" >&1 52 | printf "WARNING" >&2 53 | printf "%b" "${__FONT_NE}" >&1 54 | printf "] %b\n" "$@" >&2 55 | } 56 | 57 | err() { 58 | printf "[" >&2 59 | printf "%b" "${__BOLD_RED}" >&1 60 | printf "ERROR" >&2 61 | printf "%b" "${__FONT_NE}" >&1 62 | printf "] %b\n" "$@" >&2 63 | } 64 | 65 | check_err() { 66 | local -r ec="$?" 67 | if [[ "${ec}" -ne 0 ]]; then 68 | err "$* [EXIT:${ec}]" 69 | exit "${ec}" 70 | fi 71 | } 72 | -------------------------------------------------------------------------------- /exp/ch-Rice/taste.plt: -------------------------------------------------------------------------------- 1 | set terminal postscript eps color solid enhanced "Helvetica" 14 2 | 3 | set style line 1 lc rgb 'red' lt 3 lw 1.5 pt 4 ps 1 4 | set style line 2 lc rgb 'orange' lt 3 lw 1.5 pt 6 ps 1 5 | set style line 3 lc rgb 'green' lt 3 lw 1.5 pt 8 ps 1.2 6 | set style line 4 lc rgb 'blue' lt 3 lw 1.5 pt 2 ps 1 7 | set style line 5 lc rgb 'violet' lt 3 lw 1.5 pt 14 ps 1.2 8 | 9 | set boxwidth 1 10 | set size 0.5,0.55 11 | 12 | set xlabel "# of Meals" offset 0,0 13 | set xtics nomirror 14 | set xrange[0:8] 15 | 16 | set key on inside right top width -1 height 0.5 samplen 3 spacing 2 enhanced font ",12" 17 | set ylabel "Delicious Score" offset 1,0 18 | set yrange[0:110] 19 | set ytics 0,20,100 nomirror 20 | 21 | set output 'taste_with_meals.eps' 22 | plot 'taste_with_meals.txt' using 1:($2):xtic(1) title "White" with linespoints ls 1, \ 23 | '' using 1:($3) title "Brown" with linespoints ls 2, \ 24 | '' using 1:($4) title "Chicken" with linespoints ls 3, \ 25 | '' using 1:($5) title "Duck" with linespoints ls 4, \ 26 | '' using 1:($6) title "Fried" with linespoints ls 5 27 | 28 | ################### 29 | reset 30 | set terminal postscript eps color solid enhanced lw 1 "Helvetica" 14 31 | 32 | set size 0.5, 0.55 33 | set boxwidth 1 34 | 35 | set style histogram clustered gap 2 title 36 | set style data histogram 37 | set style fill solid border -1 38 | 39 | set xlabel "Type of Rice" offset 0,-0.5 40 | set xtics nomirror scale 0 rotate by -30 offset -0.5,-0.2 41 | 42 | set key on inside vertical top left width 0.5 height 1 samplen 2 spacing 1.2 enhanced font ",12" 43 | set ylabel "Delicious Score" offset 1,0 44 | set ytics nomirror 45 | set yrange[0:110] 46 | 47 | set output "taste_with_freshness.eps" 48 | plot newhistogram '', "taste_with_freshness.txt" using ($2):xtic(1) title "Fresh" fs pattern 3 linecolor rgb "orange", \ 49 | '' using ($3) title "Overnight" fs pattern 1 linecolor rgb "blue" 50 | -------------------------------------------------------------------------------- /references.bib: -------------------------------------------------------------------------------- 1 | @article{cacm70:Codd, 2 | author = {Codd, E. F.}, 3 | title = {A Relational Model of Data for Large Shared Data Banks}, 4 | journal = {Communications of the ACM (CACM)}, 5 | volume = {13}, 6 | number = {6}, 7 | year = {1970}, 8 | pages = {377--387}, 9 | } 10 | 11 | @article{tods92:Mohan, 12 | author = {Mohan, C. and Haderle, Don and Lindsay, Bruce and Pirahesh, Hamid and Schwarz, Peter}, 13 | title = {{ARIES}: A Transaction Recovery Method Supporting Fine-Granularity Locking and Partial Rollbacks Using Write-Ahead Logging}, 14 | journal = {ACM Transactions on Database Systems (TODS)}, 15 | volume = {17}, 16 | number = {1}, 17 | year = {1992}, 18 | pages = {94–-162}, 19 | } 20 | 21 | @inproceedings{sigmod14:Chandramouli, 22 | author = {Chandramouli, Badrish and Goldstein, Jonathan}, 23 | title = {Patience is a Virtue: Revisiting Merge and Sort on Modern Processors}, 24 | booktitle = {Proceedings of the ACM SIGMOD International Conference on Management of Data (SIGMOD)}, 25 | year = {2014}, 26 | pages = {}, 27 | } 28 | 29 | @inproceedings{nsdi12:Zaharia, 30 | author = {Zaharia, Matei and Chowdhury, Mosharaf and Das, Tathagata and Dave, Ankur and Ma, Justin and McCauley, Murphy and Franklin, Michael J. and Shenker, Scott and Stoica, Ion}, 31 | title = {Resilient Distributed Datasets: A Fault-tolerant Abstraction for In-memory Cluster Computing}, 32 | booktitle = {Proceedings of the USENIX Conference on Networked Systems Design and Implementation (NSDI)}, 33 | year = {2012}, 34 | pages = {}, 35 | } 36 | 37 | @book{BOOK:Gray, 38 | author = {Gray, Jim and Reuter, Andreas}, 39 | title = {Transaction Processing: Concepts and Techniques}, 40 | year = {1992}, 41 | publisher = {Morgan Kaufmann Publishers Inc.}, 42 | } 43 | 44 | @techreport{TR04:Arasu, 45 | title = {{STREAM}: The Stanford Data Stream Management System}, 46 | author = {Arasu, Arvind and Babcock, Brian and Babu, Shivnath and Cieslewicz, John and Datar, Mayur and Ito, Keith and Motwani, Rajeev and Srivastava, Utkarsh and Widom, Jennifer}, 47 | year = {2004}, 48 | institution = {Stanford InfoLab}, 49 | } 50 | 51 | @phdthesis{PHD:Pavlo, 52 | title = {On Scalable Transaction Execution in Partitioned Main Memory Database Management Systems}, 53 | author = {Andrew Pavlo}, 54 | school = {Brown University}, 55 | year = {2014}, 56 | } 57 | 58 | @misc{tpc-c, 59 | title = {The {TPC-C} Benchmark}, 60 | howpublished= {\url{http://www.tpc.org/tpcc/}}, 61 | } 62 | 63 | -------------------------------------------------------------------------------- /chapters/ch-intro.tex: -------------------------------------------------------------------------------- 1 | \SetPicSubDir{ch-Intro} 2 | 3 | \chapter{Introduction} 4 | \vspace{2em} 5 | 6 | \lipsum[1] 7 | 8 | \section{Overview} 9 | 10 | This section includes some tricks extracted from my years' experience of using \LaTeX{}. 11 | Rule of thumb: Doing the right things in the right way can your efforts. 12 | And I am just the right person telling you this. 13 | 14 | \subsection{Citing, Referring and Hyperlinks} 15 | 16 | A book~\cite{BOOK:Gray} is cited. 17 | 18 | \begin{figure}[!t] 19 | \centering 20 | \includegraphics[width=.6\linewidth]{\Pic{pdf}{vege}} 21 | \vspace{\BeforeCaptionVSpace} 22 | \caption{A collection of food.} 23 | \label{intro:fig:vege} 24 | \end{figure} 25 | 26 | An online article~\cite{tpc-c} is cited. \citet{tods92:Mohan} created a new area. 27 | 28 | \autoref{intro:fig:vege} demonstrates a collection of vegetables. 29 | There are broccoli, carrot, pea, onion, snow bean, scallion, etc. 30 | They are healthy food characteristic of high-fiber and low-calorie. 31 | 32 | \begin{align} 33 | Q_{a}^{b} &= \sum_{x=1}^{\infty} \dfrac{\prod_{y=1}^{x} f(y) - a}{\lim_{z \to x} g(z) + b} + 34 | \int_{a}^{b} x^2 dx \label{eq:sample:1}\\ 35 | &= H_{1}(a, b) + H_{2}(a, b) \nonumber\\ 36 | &= \gamma(a, b) \label{eq:sample:2} 37 | \end{align} 38 | 39 | \autoref{eq:sample:1}, albeit complex, is equivalent to \autoref{eq:sample:2}. 40 | Note that we do not label the second line of the derivation process. 41 | Given $f(x) = x^{2}$ and $0 < x \leq 1$, we have 42 | \[ 43 | f(1) = 1^{2} = 1 44 | \] 45 | and the result is quite simple. 46 | 47 | You may go to \href{https://github.com/streamjoin/nusthesis}{my GitHub repository} by searching for ``nus latex template'' in Google or accessing the url \url{https://github.com/streamjoin/nusthesis} directly. 48 | 49 | You may refer to the \href{run:./src/references.bib}{bibliography file} to see its organization. 50 | 51 | \subsection{Hyphenation} 52 | 53 | The compound word ``ingredient\zz{}insensitive'', where the hyphen is generated through command \CMD{\zz{}} will be hyphenated for individual words rather than the compound word as a whole. 54 | In contrast, ``nutrition-oriented'' with normal hyphen will be hyphenated as a whole compound word, which is unlikely to be recognized by \LaTeX\ and therefore no hyphenation will be carried out unless you provide customized hyphenation for it. 55 | 56 | \section{Thesis Synopsis} 57 | 58 | The rest of this thesis is organized as follows. 59 | In \autoref{ch:review}, we conduct a literature review. 60 | \autoref{ch:rice} provides the study on rice. 61 | \autoref{ch:noodle} describes noodles. 62 | We conclude the entire thesis as well as discuss further directions for future research in \autoref{ch:concl}. 63 | -------------------------------------------------------------------------------- /fairy-lite/_common_lib/argument_utils.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Command-line argument utilities. 4 | 5 | [[ -n "${__FAIRY_COMMON_LIB_ARGUMENT_UTILS_SH__+x}" ]] && return 6 | readonly __FAIRY_COMMON_LIB_ARGUMENT_UTILS_SH__=1 7 | 8 | # Include dependencies 9 | [[ -n "${FAIRY_HOME+x}" ]] || readonly FAIRY_HOME="$(cd "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)/.." 10 | # shellcheck disable=SC1090 11 | source "${FAIRY_HOME}/_common_lib/output_utils.sh" 12 | # shellcheck disable=SC1090 13 | source "${FAIRY_HOME}/_common_lib/system.sh" 14 | 15 | ####################################### 16 | # Handler of argument option. 17 | # Globals: 18 | # 19 | # Arguments: 20 | # $1: Option descriptor 21 | # $2: Name of flag variable 22 | # Returns: 23 | # Flag variable set according to the option 24 | ####################################### 25 | deal_with_arg_opt() { 26 | declare -r opt="$1" flag_name="$2" 27 | 28 | check_dangling_arg_opt "${opt}" "${flag_name}" 29 | eval "${flag_name}=1" 30 | } 31 | 32 | ####################################### 33 | # Handler of argument variable assignment. 34 | # Globals: 35 | # 36 | # Arguments: 37 | # $1: Option descriptor 38 | # $2: Name of flag variable 39 | # $3: Name of variable to set 40 | # $4: Assignment value 41 | # Returns: 42 | # 0 if the variable is set with the value specified; 43 | # non-zero if no assignment is executed 44 | ####################################### 45 | arg_set_opt_var() { 46 | declare -r opt="$1" flag_name="$2" var_name="$3" value="$4" 47 | 48 | [[ -n "${!flag_name+x}" ]] || return 1 49 | 50 | assign_var_once_on_err_exit "${var_name}" "${value}" \ 51 | "Cannot apply option '${opt}' multiple times" 52 | 53 | unset -v "${flag_name}" 54 | } 55 | 56 | ####################################### 57 | # Handler of positional argument variable assignment. 58 | # Globals: 59 | # 60 | # Arguments: 61 | # $1: Assignment value 62 | # Returns: 63 | # Variable "ARG_POS_VAR_X" set with the value specified, 64 | # where "X" is the positional index starting from 1 65 | ####################################### 66 | arg_set_pos_var() { 67 | declare -r value="$1" 68 | 69 | __POS_ARG_CURSOR="${__POS_ARG_CURSOR:-0}" 70 | ((++__POS_ARG_CURSOR)) 71 | eval "ARG_POS_VAR_${__POS_ARG_CURSOR}=${value}" 72 | } 73 | 74 | ####################################### 75 | # Check dangling argument option and exit on error. 76 | # Globals: 77 | # 78 | # Arguments: 79 | # $1: Option descriptor 80 | # $2: Name of flag variable 81 | # Returns: 82 | # 83 | ####################################### 84 | check_dangling_arg_opt() { 85 | declare -r opt="$1" flag_name="$2" 86 | 87 | [[ -z "${!flag_name-}" ]] 88 | check_err "Found redundant option '${opt}', or its value assignment is missing (see '--help' for usage)" 89 | } 90 | -------------------------------------------------------------------------------- /chapters/ch-rice.tex: -------------------------------------------------------------------------------- 1 | \SetPicSubDir{ch-Rice} 2 | \SetExpSubDir{ch-Rice} 3 | 4 | \chapter{Like White on Rice} 5 | \label{ch:rice} 6 | \vspace{2em} 7 | 8 | \lipsum[1-4] 9 | 10 | \section{Preliminaries} 11 | 12 | \lipsum[5-8] 13 | 14 | \begin{figure}[!t] 15 | \centering 16 | \includegraphics[width=.5\linewidth]{\Pic{jpg}{rice}} 17 | \vspace{\BeforeCaptionVSpace} 18 | \caption{A bowl of rice.} 19 | \label{Rice:fig:bowl_of_rice} 20 | \end{figure} 21 | 22 | \section{Methodology} 23 | 24 | \autoref{Rice:fig:bowl_of_rice} shows a bowl of rice. 25 | \autoref{Rice:algo:sample} demonstrates the formatting of pseudo code. 26 | Please carefully check the source files and learn how to use this style. 27 | Importantly: 28 | 29 | \begin{itemize} 30 | \item Always state your input. 31 | 32 | \item State the output if any. 33 | 34 | \item Always number your lines for quick referral. 35 | 36 | \item Always declare and initialize your local variables. 37 | 38 | \item Always use \CMD{\gets} (``$\gets$'') for assignments. 39 | %Always use \textbackslash gets for assignments. 40 | \end{itemize} 41 | 42 | \begin{algorithm}[!t] 43 | \AlgoFontSize 44 | \DontPrintSemicolon 45 | 46 | \KwGlobal{max. calories of daily intake $\mathcal{C}$} 47 | \KwGlobal{calories per bowl of rice $\mathcal{B}$} 48 | \BlankLine 49 | 50 | \SetKwFunction{fEatRice}{EatRice} 51 | \SetKwFunction{fDoExercise}{DoExercise} 52 | 53 | \KwIn{number of bowls of rice $n$} 54 | \KwOut{calories intake} 55 | \Proc{\fEatRice{$n$}}{ 56 | $cal \gets n \times \mathcal{B}$\; 57 | \uIf{$cal \geq \mathcal{C}$}{ 58 | \Return $\mathcal{C}$\; 59 | } 60 | \Else{ 61 | \Return $cal - \fDoExercise{n}$\; 62 | } 63 | } 64 | 65 | \BlankLine 66 | 67 | \KwIn{time duration (in minutes) of exercise $t$} 68 | \KwOut{calories consumed} 69 | \Func{\fDoExercise{$t$}}{ 70 | $cal \gets 0$\; 71 | \lFor{$i \gets 1$ \To $t$}{$cal \gets cal + i$} 72 | \Return $cal$\; 73 | } 74 | 75 | \caption{Sample pseudo code of a dummy algorithm.} 76 | \label{Rice:algo:sample} 77 | \end{algorithm} 78 | 79 | \section{Evaluation} 80 | 81 | \lipsum[16-19] 82 | 83 | \begin{figure}[!t] 84 | \centering 85 | \begin{minipage}[b]{.45\linewidth} 86 | \centering 87 | \includegraphics[width=\linewidth]{\Exp{eps}{taste_with_meals}} 88 | \caption{Taste with meal repetition.} 89 | \label{Rice:exp:taste_with_meals} 90 | \end{minipage} 91 | \hspace*{2em} 92 | \begin{minipage}[b]{.45\linewidth} 93 | \centering 94 | \includegraphics[width=\linewidth]{\Exp{eps}{taste_with_freshness}} 95 | \caption{Taste with meal freshness.} 96 | \label{Rice:exp:taste_with_freshness} 97 | \end{minipage} 98 | \end{figure} 99 | 100 | \autoref{Rice:exp:taste_with_meals} and \autoref{Rice:exp:taste_with_freshness} show how the taste of rice is affected by meal repetition and freshness respectively. 101 | \lipsum[20] 102 | 103 | \section{Summary} 104 | 105 | \lipsum[21] 106 | -------------------------------------------------------------------------------- /fairy-lite/_common_lib/system.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Operating system related utilities. 4 | 5 | [[ -n "${__FAIRY_COMMON_LIB_SYSTEM_SH__+x}" ]] && return 6 | readonly __FAIRY_COMMON_LIB_SYSTEM_SH__=1 7 | 8 | # Include dependencies 9 | [[ -n "${FAIRY_HOME+x}" ]] || readonly FAIRY_HOME="$(cd "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)/.." 10 | # shellcheck disable=SC1090 11 | source "${FAIRY_HOME}/_common_lib/output_utils.sh" 12 | 13 | check_cmd_exists() { 14 | [[ "$#" -gt 0 ]] && [[ "$#" -le 2 ]] 15 | check_err "wrong number of parameters to 'check_cmd_exists()'" 16 | 17 | command -v "$1" >/dev/null || 18 | check_err "command ${1:+"'$1'"} not found${2:+": $2"}" 19 | } 20 | 21 | check_cmd_args() { 22 | local -r EXIT_CODE="$?" 23 | if [[ "${EXIT_CODE}" -ne 0 ]]; then 24 | err "Usage: $(basename -- "$0") $*" 25 | exit "${EXIT_CODE}" 26 | fi 27 | } 28 | 29 | os_type() { 30 | local -r kern_name="$(uname -s)" 31 | 32 | case "${kern_name}" in 33 | Darwin*) os_name="Mac" ;; 34 | Linux*) os_name="Linux" ;; 35 | MINGW*) os_name="MinGW" ;; 36 | CYGWIN*) os_name="Cygwin" ;; 37 | *) os_name="UNKNOWN:${kern_name}" ;; 38 | esac 39 | 40 | echo "${os_name}" 41 | } 42 | 43 | arg_find_e() { 44 | case $(os_type) in 45 | "Mac") arg="-E" ;; 46 | *) arg="" ;; 47 | esac 48 | 49 | echo "${arg} " 50 | } 51 | 52 | cmd_md5sum() { 53 | case $(os_type) in 54 | "Mac") cmd="md5" ;; 55 | *) cmd="md5sum" ;; 56 | esac 57 | 58 | echo "${cmd}" 59 | } 60 | 61 | timer() { 62 | if [[ "$#" -eq 0 ]]; then 63 | date '+%s' 64 | else 65 | local stime=$1 66 | local -r etime="$(date '+%s')" 67 | 68 | if [[ -z "${stime}" ]]; then stime="${etime}"; fi 69 | local -r delta="$((etime - stime))" 70 | 71 | local -r sec="$((delta % 60))" 72 | if [[ "${delta}" -lt 60 ]]; then 73 | echo "${sec} sec" 74 | else 75 | local -r min="$(((delta / 60) % 60))" 76 | if [[ "${delta}" -lt 3600 ]]; then 77 | echo "${min} min ${sec} sec" 78 | else 79 | local -r hr="$((delta / 3600))" 80 | echo "${hr} hr ${min} min ${sec} sec" 81 | fi 82 | fi 83 | fi 84 | } 85 | 86 | ####################################### 87 | # Assign value to variable. 88 | # Globals: 89 | # 90 | # Arguments: 91 | # $1: Name of variable to set 92 | # $2: Assignment value 93 | # Returns: 94 | # 0 if the variable is successfully set with the value specified; 95 | # non-zero if the variable has been previously set 96 | ####################################### 97 | assign_var_once() { 98 | declare -r var_name="$1" value="$2" 99 | 100 | [[ -z "${!var_name:-}" ]] || return 1 101 | eval "${var_name}=${value}" 102 | } 103 | 104 | ####################################### 105 | # Assign value to variable, or exit if the variable has been previously set. 106 | # Globals: 107 | # 108 | # Arguments: 109 | # $1: Name of variable to set 110 | # $2: Assignment value 111 | # $3 (optional): Error message 112 | # Returns: 113 | # Variable set with the value specified 114 | ####################################### 115 | assign_var_once_on_err_exit() { 116 | declare -r var_name="$1" value="$2" err_msg="$3" 117 | 118 | assign_var_once "${var_name}" "${value}" || 119 | check_err "${err_msg:-"Cannot assign variable '${var_name}' multiple times"}" 120 | } 121 | -------------------------------------------------------------------------------- /fairy-lite/_common_lib/filesystem.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Utilities for file and directory manipulation. 4 | 5 | [[ -n "${__FAIRY_COMMON_LIB_FILESYSTEM_SH__+x}" ]] && return 6 | readonly __FAIRY_COMMON_LIB_FILESYSTEM_SH__=1 7 | 8 | # Include dependencies 9 | [[ -n "${FAIRY_HOME+x}" ]] || readonly FAIRY_HOME="$(cd "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)/.." 10 | # shellcheck disable=SC1090 11 | source "${FAIRY_HOME}/_common_lib/output_utils.sh" 12 | 13 | delete_file() { 14 | rm -f "$1" 15 | [[ ! -f "$1" ]] || 16 | check_err "failed to delete file '$1'" 17 | } 18 | 19 | delete_dir() { 20 | rm -rf "$1" 21 | [[ ! -d "$1" ]] || 22 | check_err "failed to delete directory '$1'" 23 | } 24 | 25 | try_delete_empty_dir() { 26 | rmdir --ignore-fail-on-non-empty "$1" || 27 | warn "Failed to delete directory '$1': Permission denied" 28 | } 29 | 30 | find_and_link_files_by_ext() { 31 | [[ "$#" -eq 3 ]] || 32 | check_err "wrong number of parameters to 'find_and_link_files_by_ext()'" 33 | 34 | local -r ext="$1" 35 | 36 | local -r from_dir="$2" 37 | [[ -d "${from_dir}" ]] || 38 | check_err "invalid path of directory '${from_dir}'" 39 | 40 | local -r to_dir="$3" 41 | mkdir -p "${to_dir}" 42 | 43 | # shellcheck disable=SC2016 44 | find "${from_dir}" -maxdepth 1 -type f -iname "*.${ext}" -print0 | 45 | td="${to_dir}" xargs -0 -n 1 sh -c '[[ -f "$0" ]] && ln -s "$0" ${td}' 46 | } 47 | 48 | find_and_link_files_by_regex() { 49 | [[ "$#" -eq 3 ]] || 50 | check_err "wrong number of parameters to 'find_and_link_files_by_regex()'" 51 | 52 | local regex="$1" 53 | [[ "$(os_type)" != "Mac" ]] && 54 | regex="$(echo "${regex//|/\\|}" | sed 's/(/\\(/g' | sed 's/)/\\)/g')" 55 | 56 | local -r from_dir="$2" 57 | [[ -d "${from_dir}" ]] || 58 | check_err "invalid path of directory '${from_dir}'" 59 | 60 | local -r to_dir="$3" 61 | mkdir -p "${to_dir}" 62 | 63 | # shellcheck disable=SC2016,SC2046 64 | find $(arg_find_e) "${from_dir}" -maxdepth 1 -type f -iregex "${regex}" -print0 | 65 | td="${to_dir}" xargs -0 -n 1 sh -c '[[ -f "$0" ]] && ln -s "$0" ${td}' 66 | } 67 | 68 | find_and_link_subdirs() { 69 | [[ "$#" -eq 2 ]] || 70 | check_err "wrong number of parameters to 'find_and_link_subdirs()'" 71 | 72 | local -r from_dir="$1" 73 | [[ -d "${from_dir}" ]] || 74 | check_err "invalid path of directory '${from_dir}'" 75 | 76 | local -r to_dir="$2" 77 | mkdir -p "${to_dir}" 78 | 79 | # shellcheck disable=SC2016 80 | find "${from_dir}/." -maxdepth 1 -type d -print0 | 81 | xargs -0 -n 1 bash -c 'basename -- "$0"' | 82 | fd="${from_dir}" td="${to_dir}" xargs -n 1 \ 83 | bash -c '[[ "$0" != "." ]] && ln -s "${fd}/$0" "${td}"' 84 | } 85 | 86 | check_file_exists() { 87 | [[ "$#" -eq 1 ]] || 88 | check_err "wrong number of parameters to 'check_file_exists()'" 89 | 90 | [[ -f "$1" ]] || 91 | check_err "invalid path of file '$1'" 92 | } 93 | 94 | check_dir_exists() { 95 | [[ "$#" -eq 1 ]] || 96 | check_err "wrong number of parameters to 'check_dir_exists()'" 97 | 98 | [[ -d "$1" ]] || 99 | check_err "invalid path of directory '$1'" 100 | } 101 | 102 | file_size_bytes() { 103 | [[ "$#" -eq 1 ]] || 104 | check_err "wrong number of parameters to 'get_file_size_bytes()'" 105 | 106 | check_file_exists "$1" 107 | 108 | # shellcheck disable=SC2012 109 | ls -l "$1" | awk '{ print $5 }' 110 | } 111 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # A LaTeX Template for PhD/Master Thesis of the National University of Singapore (NUS) 2 | 3 | > Although I have already left NUS, I'm still actively maintaining this thesis template. As the formatting guidelines may change from time to time, I endeavor to adapt this template to the latest guidelines, which (unfortunately) can only be accessed by NUS students and staff. Therefore, if you find that this template deviates from the latest guidelines, please [create an issue](https://github.com/streamjoin/nusthesis/issues) by attaching the guidelines and I will take the time to address it. Thanks for your support along the way! 4 | 5 | This set of latex code (mainly the [`nusthesis.cls`](nusthesis.cls)) composes a template of NUS thesis, which is compliant with the [university's requirement](https://www.dropbox.com/s/o6jtrk9y7cil70w/General-Guidelines-and-Instructions-on-Format-of-Research-Thesis-and-Electronic-Submission.pdf "General Guidelines and Instructions on Format of Research Thesis and Electronic Submission"). 6 | Using this template to organize your thesis content can save a lot of effort spent in formatting. 7 | 8 | Apart from formatting, the example .tex files also include a lot of latex tricks extracted from my years' experience of using latex. 9 | These tricks are mainly described and demonstrated in the `chapters/ch-Intro.tex` file. 10 | 11 | You may refer to [this](https://www.dropbox.com/s/rar6yxn9u6n19dp/ChickenR.pdf) to preview a sample thesis generated using this template. In addition, the template is also available on [Overleaf](https://www.overleaf.com/latex/templates/thesis-template-of-the-national-university-of-singapore-nus/gkvbbgybrjnw) (but it may not be timely synchronized with updates maintained in this repository). 12 | 13 | ## Compilation 14 | 15 | Run the `build.sh` script to compile in Linux, macOS or emulated Unix-like environment for Windows (e.g., [Cygwin](https://www.cygwin.com/) and [MinGW](http://www.mingw.org/ "Minimalist GNU for Windows")). ~~For compilation in the native Windows, run the `build.bat` script.~~ The produced .pdf file locates in the same folder. 16 | 17 | You may customize the name of the output .pdf file by configuring `PDF_NAME` in the above scripts. Alternatively, you could specify the filename with the `--pdf-name` option (or `-o` for short). For example, 18 | 19 | ```sh 20 | $ ./build.sh --pdf-name MyThesis 21 | ``` 22 | 23 | This will produce `MyThesis.pdf` as output. 24 | 25 | ps: Since [Windows 10 already provides built-in Linux Bash Shell](https://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/), the original crappy `build.bat` script has been deprecated. Nevertheless, you are still welcomed to provide a robust one via [pull request](https://github.com/streamjoin/nusthesis/pulls) if you believed that's really necessary. 26 | 27 | ### Manual Compilation 28 | 29 | In case you prefer to compile the code manually, please run *exactly* the following commands at the project root (i.e., where the `main.tex` locates at the same directory level). 30 | 31 | ```sh 32 | $ pdflatex main.tex 33 | $ biber main 34 | $ pdflatex main.tex 35 | $ pdflatex main.tex 36 | ``` 37 | 38 | Note that the parameter to `biber` is the filename *without extension*. Moreover, you must run the second `pdflatex` to generate bibliography and resolve citations, and the third `pdflatex` to generate the bibliography entry in the table of contents. 39 | 40 | ### Dependencies 41 | 42 | - LaTeX ([MiKTeX](https://miktex.org/) or [TeX Live](https://www.tug.org/texlive/)) 43 | - [biber](http://biblatex-biber.sourceforge.net/ "Biber: A BibTeX replacement for users of BibLaTeX") 44 | 45 | ## Editing 46 | 47 | Your edit should start with [`main.tex`](main.tex), which is also the compilation entry (as configured in [`build.sh`](build.sh)). Sources of individual chapters as well as abstract, acknowledgments, appendices, etc., are placed in the [`chapters`](chapters/) folder. Illustrative figures and analytical plotting should be stored in the [`pic`](pic/) and [`exp`](exp/) folders respectively. 48 | 49 | ### Printing vs. Electronic 50 | 51 | Uncomment the following line at the head of `main.tex` when you are producing the thesis for printing hard copies in a **double-sided** fashion. 52 | 53 | ```latex 54 | \newcommand*{\DoubleSided}{} 55 | ``` 56 | 57 | And comment it out when you are producing the electronic thesis for the final submission. 58 | 59 | ## Contact 60 | 61 | If you encounter any problem with this template, feel free to [contact me](http://linqian.me/) or [create an issue](https://github.com/streamjoin/nusthesis/issues) in this repository. 62 | 63 | All the best for your graduation! 64 | -------------------------------------------------------------------------------- /_global_settings.tex: -------------------------------------------------------------------------------- 1 | \ifdefined\DoubleSided 2 | \documentclass[twoside,openright,a4paper]{nusthesis} 3 | \else 4 | \documentclass[a4paper]{nusthesis} 5 | \fi 6 | 7 | \dsp % pseudo double spacing 8 | 9 | \usepackage[utf8]{inputenc} 10 | \usepackage[english]{babel} 11 | \usepackage{csquotes} 12 | 13 | %%% The abstract of the thesis is titled as "Abstract" by default. 14 | %%% However, the Graduate Division may require you to name it as "Summary". 15 | %\renewcommand{\abstractname}{Summary} 16 | %\addto{\captionsenglish}{\renewcommand{\abstractname}{Summary}} 17 | 18 | %%% Depth of section numbering 19 | \setcounter{secnumdepth}{3} 20 | 21 | %%% Depth of numbering in table of content 22 | \setcounter{tocdepth}{2} 23 | 24 | \usepackage{indentfirst} % indent the first paragraph of a section 25 | 26 | \usepackage{silence} % ignore trivial warnings 27 | \WarningFilter{biblatex}{File 'english-ieee.lbx'} 28 | 29 | \usepackage{bookmark} 30 | \usepackage[ 31 | backend=biber, 32 | style=ieee, 33 | citestyle=numeric, 34 | giveninits=true, 35 | sorting=nyt, 36 | maxbibnames=99, 37 | dashed=false, 38 | doi=false]{biblatex} 39 | \DeclareFieldFormat*{title}{``#1''\newunitpunct} % move comma outside the quotation mark 40 | \addbibresource{references.bib} 41 | 42 | \newcommand{\citet}[1]{% 43 | \AtNextCite{\defcounter{maxnames}{1}\defcounter{minnames}{1}}% 44 | \citeauthor{#1}% 45 | } 46 | 47 | \usepackage{microtype} % Better typography 48 | \usepackage{tabulary} % Automatic table sizing 49 | \usepackage{hhline} 50 | 51 | \usepackage{enumitem} 52 | 53 | \usepackage{hyperref} 54 | \renewcommand{\sectionautorefname}{\S} 55 | \let\subsectionautorefname\sectionautorefname 56 | \let\subsubsectionautorefname\sectionautorefname 57 | \renewcommand{\chapterautorefname}{Chapter} 58 | 59 | \usepackage{listings} 60 | \renewcommand{\lstlistingname}{Code} 61 | \lstset{language=SQL, 62 | morekeywords={ONLINE, WITHIN}, 63 | frame=none, 64 | float, 65 | basicstyle=\ttfamily\normalsize, 66 | keywordstyle=\bfseries, 67 | numbers=none, 68 | showstringspaces=false, 69 | aboveskip=-2pt, %\smallskipamount 70 | belowskip=-4pt, %\smallskipamount 71 | xleftmargin=1em, 72 | escapeinside={(*@}{@*)}, 73 | captionpos=b 74 | } 75 | 76 | \let\proof\relax 77 | \let\endproof\relax 78 | \usepackage{amsthm} 79 | \theoremstyle{definition} 80 | \newtheorem{defn}{Definition} \newcommand{\defnautorefname}{Definition} 81 | \theoremstyle{plain} 82 | \newtheorem{rul}{Rule} \newcommand{\rulautorefname}{Rule} 83 | \newtheorem{thm}{Theorem} \newcommand{\thmautorefname}{Theorem} 84 | \newtheorem{lemma}{Lemma} \newcommand{\lemmaautorefname}{Lemma} 85 | \newtheorem{coroll}{Corollary} \newcommand{\corollautorefname}{Corollary} 86 | 87 | \usepackage{mathtools} 88 | \DeclarePairedDelimiter{\ceil}{\lceil}{\rceil} 89 | \DeclarePairedDelimiter{\floor}{\lfloor}{\rfloor} 90 | \DeclarePairedDelimiter{\vbar}{\vert}{\vert} 91 | \DeclarePairedDelimiter{\vbarbar}{\Vert}{\Vert} 92 | \DeclarePairedDelimiter{\parenLR}{\lparen}{\rparen} 93 | \DeclarePairedDelimiter{\brackLR}{\lbrack}{\rbrack} 94 | \DeclarePairedDelimiter{\braceLR}{\lbrace}{\rbrace} 95 | \DeclarePairedDelimiter{\angleLR}{\langle}{\rangle} 96 | \DeclareMathOperator*{\argmin}{arg\,min} 97 | \DeclareMathOperator*{\argmax}{arg\,max} 98 | 99 | \usepackage{interval} 100 | \intervalconfig{soft open fences} 101 | \newcommand{\intervalO}{\interval[open]} 102 | \newcommand{\intervalOL}{\interval[open left]} 103 | \newcommand{\intervalOR}{\interval[open right]} 104 | 105 | \usepackage[linesnumbered,ruled,vlined]{algorithm2e} 106 | \SetAlgorithmName{Algorithm}{Algorithm}{Algorithm} 107 | \newcommand{\AlgoFontSize}{\small} % \scriptsize \footnotesize \small \normalsize 108 | \IncMargin{0.5em} 109 | \SetCommentSty{textnormal} 110 | \SetNlSty{}{}{:} 111 | \SetAlgoNlRelativeSize{0} 112 | \SetKwInput{KwGlobal}{Global} 113 | \SetKwInput{KwPrecondition}{Precondition} 114 | \SetKwProg{Proc}{Procedure}{:}{} 115 | \SetKwProg{Func}{Function}{:}{} 116 | \SetKw{And}{and} 117 | \SetKw{Or}{or} 118 | \SetKw{To}{to} 119 | \SetKw{DownTo}{downto} 120 | \SetKw{Break}{break} 121 | \SetKw{Continue}{continue} 122 | \SetKw{SuchThat}{\textit{s.t.}} 123 | \SetKw{WithRespectTo}{\textit{wrt}} 124 | \SetKw{Iff}{\textit{iff.}} 125 | \SetKw{MaxOf}{\textit{max of}} 126 | \SetKw{MinOf}{\textit{min of}} 127 | \SetKwBlock{Match}{match}{}{} 128 | 129 | \usepackage{array} 130 | \newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} 131 | \newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} 132 | \newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} 133 | 134 | \usepackage{color} 135 | \usepackage[usenames,dvipsnames]{xcolor} 136 | \usepackage{soul} 137 | \soulregister\cite7 138 | \soulregister\ref7 139 | \soulregister\pageref7 140 | \soulregister\autoref7 141 | \soulregister\eqref7 142 | \newcommand{\hlred}[2][Lavender]{{\sethlcolor{#1}\hl{#2}}} 143 | \newcommand{\hlblue}[2][SkyBlue]{{\sethlcolor{#1}\hl{#2}}} 144 | \newcommand{\hlyellow}[2][GreenYellow]{{\sethlcolor{#1}\hl{#2}}} 145 | \newcommand{\hlgreen}[2][YellowGreen]{{\sethlcolor{#1}\hl{#2}}} 146 | 147 | \let\originaleqref\eqref 148 | \renewcommand{\eqref}{Equation~\ref} 149 | 150 | %%% Use this command when you need to add a hyphen with hyphenation 151 | %%% enabled for the individual compound words 152 | \newcommand{\zz}{-\nolinebreak\hspace{0pt}} 153 | 154 | %%% Handy commands for image/figure insertion 155 | \newcommand*{\RootPicDir}{pic} 156 | \newcommand*{\PicDir}{\RootPicDir} 157 | \newcommand*{\ResetPicDir}{\renewcommand*{\PicDir}{\RootPicDir}} 158 | \newcommand*{\SetPicSubDir}[1]{\renewcommand*{\PicDir}{\RootPicDir /#1}} 159 | \newcommand*{\Pic}[2]{\PicDir /#2.#1} 160 | 161 | \newcommand*{\RootExpDir}{exp} 162 | \newcommand*{\ExpDir}{\RootExpDir} 163 | \newcommand*{\ResetExpDir}{\renewcommand*{\ExpDir}{\RootExpDir}} 164 | \newcommand*{\SetExpSubDir}[1]{\renewcommand*{\ExpDir}{\RootExpDir /#1}} 165 | \newcommand*{\Exp}[2]{\ExpDir /#2.#1} 166 | 167 | \newcommand*{\BeforeCaptionVSpace}{1ex} 168 | \newcommand*{\BeforeSubCaptionVSpace}{0.75ex} 169 | 170 | %%% For example code used only 171 | \usepackage{lipsum} % for generating dummy text 172 | \newcommand{\CMD}[1]{\texttt{\string#1}} % for typing a command 173 | -------------------------------------------------------------------------------- /fairy-lite/latex/build_latex.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Execution of compiling LaTeX project. 4 | 5 | # Do not allow use of undefined vars. Use ${VAR:-} to use an undefined VAR 6 | set -o nounset 7 | # Exit on error. Append "|| true" if you expect an error. 8 | set -o errexit 9 | # Exit on error inside any functions or subshells. 10 | set -o errtrace 11 | # Catch the error in case mysqldump fails (but gzip succeeds) in `mysqldump |gzip` 12 | set -o pipefail 13 | # Turn on traces, useful while debugging but commented out by default 14 | # set -o xtrace 15 | 16 | IFS=$'\t\n' # Split on newlines and tabs (but not on spaces) 17 | 18 | [[ -n "${__SCRIPT_DIR+x}" ]] || readonly __SCRIPT_DIR="$(cd "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)" 19 | [[ -n "${__SCRIPT_NAME+x}" ]] || readonly __SCRIPT_NAME="$(basename -- "$0")" 20 | 21 | # Include libraries 22 | [[ -n "${FAIRY_HOME+x}" ]] || readonly FAIRY_HOME="${__SCRIPT_DIR}/.." 23 | # shellcheck disable=SC1090 24 | source "${FAIRY_HOME}/_common_lib/argument_utils.sh" 25 | # shellcheck disable=SC1090 26 | source "${FAIRY_HOME}/_common_lib/filesystem.sh" 27 | # shellcheck disable=SC1090 28 | source "${FAIRY_HOME}/_common_lib/output_utils.sh" 29 | # shellcheck disable=SC1090 30 | source "${FAIRY_HOME}/_common_lib/system.sh" 31 | 32 | # Global variables 33 | [[ -n "${__START_TIME+x}" ]] || readonly __START_TIME="$(timer)" 34 | 35 | # The main function 36 | main() { 37 | check_args "$@" 38 | set_globals 39 | 40 | info "This is Fairy LaTeX Compilation (under the MIT License)" 41 | pushd "${WORK_DIR}" >/dev/null 42 | clean_all 43 | if [[ -z "${FLAG_ARG_CLEAN_ONLY:-}" ]]; then 44 | mkdir -p "${BUILD_DIR}" 45 | prepare_bib 46 | compile 47 | deliver 48 | finish 49 | delete_dir "${BUILD_DIR}" 50 | fi 51 | popd >/dev/null 52 | } 53 | 54 | set_globals() { 55 | WORK_DIR="${WORK_DIR:-"$(dirname -- "$0")"}" 56 | check_dir_exists "${WORK_DIR}" 57 | readonly WORK_DIR="$(cd "${WORK_DIR}"; pwd -P)" # canonical path 58 | 59 | BUILD_DIR="${BUILD_DIR:-"${WORK_DIR}/pdfbuild"}" 60 | mkdir -p "${BUILD_DIR}" 61 | readonly BUILD_DIR="$(cd "${BUILD_DIR}"; pwd -P)" # canonical path 62 | 63 | TEX_NAME="${TEX_NAME:-}" 64 | if [[ -n "${TEX_NAME}" ]]; then 65 | check_file_exists "${WORK_DIR}/${TEX_NAME}.tex" 66 | elif [[ -f "${WORK_DIR}/main.tex" ]]; then 67 | TEX_NAME="main" 68 | elif [[ -f "${WORK_DIR}/ms.tex" ]]; then 69 | TEX_NAME="ms" 70 | fi 71 | check_err "'TEX_NAME' undefined: name of the main .tex file" 72 | readonly TEX_NAME="${TEX_NAME%.tex}" 73 | 74 | PDF_NAME="${ARG_PDF_NAME:-"${PDF_NAME:-${TEX_NAME}}"}" 75 | readonly PDF_NAME="${PDF_NAME%.pdf}" 76 | 77 | readonly CMD_LATEX="${CMD_LATEX:-"latex"}" 78 | check_cmd_exists "${CMD_LATEX}" "compile .tex" 79 | 80 | CMD_BIBTEX="${CMD_BIBTEX-"bibtex"}" 81 | [[ "${CMD_BIBTEX}" = "" ]] && CMD_BIBTEX="" 82 | readonly CMD_BIBTEX 83 | [[ -z "${CMD_BIBTEX}" ]] || check_cmd_exists "${CMD_BIBTEX}" "compile .bib" 84 | 85 | TRIMBIB_JAR="${TRIMBIB_JAR-"${TRIMBIB_HOME:+"${TRIMBIB_HOME}/release/trimbib.jar"}"}" 86 | [[ "${TRIMBIB_JAR}" = "" ]] && TRIMBIB_JAR="" 87 | readonly TRIMBIB_JAR 88 | [[ -z "${TRIMBIB_JAR}" ]] || check_file_exists "${TRIMBIB_JAR}" 89 | 90 | readonly TRIMBIB_LOG="${TRIMBIB_LOG:-"trimbib_log.txt"}" 91 | } 92 | 93 | clean_all() { 94 | printf "Cleaning up previously generated files ... " 95 | 96 | delete_file "${WORK_DIR}/${PDF_NAME}.pdf" 97 | delete_file "${WORK_DIR}/${PDF_NAME}.md5" 98 | delete_file "${WORK_DIR}/${TEX_NAME}.aux" 99 | 100 | [[ -n "${CMD_BIBTEX}" ]] && delete_file "${WORK_DIR}/${TEX_NAME}.bbl" 101 | 102 | [[ "${BUILD_DIR}" != "${WORK_DIR}" ]] 103 | check_err "The build directory cannot be the working directory itself" 104 | delete_dir "${BUILD_DIR}" 105 | 106 | echo "done" 107 | } 108 | 109 | prepare_bib() { 110 | [[ -n "${CMD_BIBTEX}" ]] || return 0 111 | 112 | local -r src_bib="${SRC_BIB_NAME:-}.bib" 113 | 114 | local -r tgt_bib_name="${TGT_BIB_NAME:-"${SRC_BIB_NAME:+"${SRC_BIB_NAME}-trim"}"}" 115 | [[ "${tgt_bib_name}" != "${SRC_BIB_NAME:-}" ]] 116 | check_err "Target .bib cannot be the source .bib itself" 117 | 118 | if [[ -n "${TRIMBIB_JAR}" ]] && [[ -f "${WORK_DIR}/${src_bib}" ]]; then 119 | readonly TGT_BIB="${tgt_bib_name}.bib" 120 | 121 | printf "Formatting %s ... " "${WORK_DIR}/${src_bib}" 122 | 123 | check_cmd_exists "java" 124 | java -jar "${TRIMBIB_JAR}" -i "${WORK_DIR}/${src_bib}" -d "${WORK_DIR}" \ 125 | -o "${TGT_BIB}" --overwrite "${TRIMBIB_ARGS[@]}" \ 126 | > "${WORK_DIR}/${TRIMBIB_LOG}" 2>&1 127 | check_err "Failed to format '${WORK_DIR}/${src_bib}'" 128 | 129 | echo "done" 130 | info "Formatted bib: ${WORK_DIR}/${TGT_BIB}" 131 | info "Log of bib formatting: ${WORK_DIR}/${TRIMBIB_LOG}" 132 | 133 | else # no bib formatting to perform 134 | if [[ -f "${WORK_DIR}/${tgt_bib_name}.bib" ]]; then 135 | readonly TGT_BIB="${tgt_bib_name}.bib" 136 | elif [[ -f "${WORK_DIR}/${src_bib}" ]]; then 137 | readonly TGT_BIB="${src_bib}" 138 | else 139 | check_err "Failed to find .bib file" 140 | fi 141 | fi 142 | 143 | ln -s "${WORK_DIR}/${TGT_BIB}" "${BUILD_DIR}/${TGT_BIB}" 144 | 145 | find_and_link_files_by_ext "bst" "${WORK_DIR}" "${BUILD_DIR}" || true 146 | } 147 | 148 | compile() { 149 | compile_tex 150 | [[ -n "${CMD_BIBTEX}" ]] && compile_bib && compile_tex && compile_tex 151 | 152 | if [[ "${CMD_LATEX}" = "latex" ]]; then 153 | find_and_link_subdirs "${WORK_DIR}" "${BUILD_DIR}" || true 154 | 155 | find_and_link_files_by_regex ".*\.(eps|ps|pdf|jpg|jpeg|png|bmp)$" \ 156 | "${WORK_DIR}" "${BUILD_DIR}" || true 157 | 158 | ( 159 | cd "${BUILD_DIR}" 160 | dvips -P pdf -t letter -o "${TEX_NAME}.ps" "${TEX_NAME}.dvi" 161 | ps2pdf -dPDFSETTINGS#/prepress -dCompatibilityLevel#1.4 \ 162 | -dSubsetFonts#true -dEmbedAllFonts#true \ 163 | "${TEX_NAME}.ps" "${TEX_NAME}.pdf" 164 | ) 165 | fi 166 | } 167 | 168 | compile_tex() { 169 | case "${CMD_LATEX}" in 170 | "latex"|"xelatex") 171 | ${CMD_LATEX} -output-directory="${BUILD_DIR}" \ 172 | -aux-directory="${BUILD_DIR}" "${TEX_NAME}.tex" 173 | ;; 174 | "pdflatex") 175 | ${CMD_LATEX} --shell-escape \ 176 | -output-directory "${BUILD_DIR}" "${TEX_NAME}.tex" 177 | ;; 178 | *) 179 | err "unknown latex command '${CMD_LATEX}'" 180 | exit 127 181 | ;; 182 | esac 183 | check_err "Failed to compile '${TEX_NAME}.tex'" 184 | } 185 | 186 | compile_bib() { 187 | ( 188 | cd "${BUILD_DIR}" 189 | case "${CMD_BIBTEX}" in 190 | "bibtex") 191 | ${CMD_BIBTEX} "${TEX_NAME}.aux" 192 | ;; 193 | "biber") 194 | ${CMD_BIBTEX} "${TEX_NAME}" 195 | ;; 196 | *) 197 | err "Unknown bib command '${CMD_BIBTEX}'" 198 | exit 127 199 | ;; 200 | esac 201 | ) 202 | check_err "Failed to compile '\\\\bibliography{${TGT_BIB%.*}}'" 203 | } 204 | 205 | deliver() { 206 | mv "${BUILD_DIR}/${TEX_NAME}.pdf" "${WORK_DIR}/${PDF_NAME}.pdf" 207 | mv "${BUILD_DIR}/${TEX_NAME}.aux" "${WORK_DIR}/${TEX_NAME}.aux" 208 | 209 | [[ -n "${CMD_BIBTEX}" ]] && 210 | mv "${BUILD_DIR}/${TEX_NAME}.bbl" "${WORK_DIR}/${TEX_NAME}.bbl" 211 | 212 | readonly CMD_MD5SUM="$(cmd_md5sum)" 213 | [[ "$(command -v "${CMD_MD5SUM}")" ]] && 214 | ${CMD_MD5SUM} "${WORK_DIR}/${PDF_NAME}.pdf" > "${WORK_DIR}/${PDF_NAME}.md5" 215 | } 216 | 217 | finish() { 218 | local -r pdf_bytes="$(file_size_bytes "${PDF_NAME}.pdf")" 219 | info "------------------------------------------------------------------------" 220 | info_bold_green "BUILD SUCCESSFUL" 221 | info "------------------------------------------------------------------------" 222 | info "Output: ${WORK_DIR}/${PDF_NAME}.pdf (${pdf_bytes} bytes)" 223 | info "Finished at: $(date +"%T %Z, %-d %B %Y")" 224 | info "Total time: $(timer "${__START_TIME}")" 225 | info "------------------------------------------------------------------------" 226 | } 227 | 228 | ####################################### 229 | # Check and process command-line arguments. 230 | # Globals: 231 | # 232 | # Arguments: 233 | # Command-line arguments 234 | # Returns: 235 | # Variables and flags set according to the command-line arguments 236 | ####################################### 237 | check_args() { 238 | # unset variables of option flags 239 | unset -v FLAG_ARG_CLEAN_ONLY 240 | unset -v FLAG_ARG_SET_PDF_NAME 241 | 242 | # process each command-line argument 243 | for arg in "$@"; do 244 | case "${arg}" in 245 | # Print help message 246 | '--help'|'-h'|'-?' ) 247 | print_usage 248 | exit 0 249 | ;; 250 | # Option for clearning all generated files 251 | '--clean'|'-c' ) 252 | deal_with_arg_opt "--clean" "FLAG_ARG_CLEAN_ONLY" 253 | ;; 254 | '--pdf-name'|'-o' ) 255 | deal_with_arg_opt "--pdf-name" "FLAG_ARG_SET_PDF_NAME" 256 | ;; 257 | # Unknown options 258 | '-'* ) 259 | err "Unknown command argument(s) '${arg}' (see '--help' for usage)" 260 | exit 126 261 | ;; 262 | # Default: assign variable 263 | * ) 264 | arg_set_opt_var "--pdf-name" "FLAG_ARG_SET_PDF_NAME" "ARG_PDF_NAME" "${arg}" || 265 | arg_set_pos_var "${arg}" # KEEP THIS AT THE TAIL 266 | ;; 267 | esac 268 | done 269 | 270 | # sanity check 271 | check_dangling_arg_opt "--pdf-name" "FLAG_ARG_SET_PDF_NAME" 272 | } 273 | 274 | print_usage() { 275 | cat < specify filename of the generated .pdf 282 | 283 | EndOfMsg 284 | } 285 | 286 | # Execution (SHOULDN'T EDIT AFTER THIS LINE!) 287 | main "$@" 288 | [[ "$0" != "${BASH_SOURCE[0]}" ]] || exit 0 289 | -------------------------------------------------------------------------------- /nusthesis.cls: -------------------------------------------------------------------------------- 1 | %% nusthesis.cls 2017-11-17 2 | %% Copyright (C) 2017 Qian Lin. 3 | % 4 | % This file is modified based ucbthesis.cls. 5 | % 6 | %% ucbthesis.cls 2014-04-11 7 | %% Copyright (C) 1988-2014 Daniel Gildea, BBF, Ethan Munson, Paul Vojta. 8 | % 9 | % This work may be distributed and/or modified under the 10 | % conditions of the LaTeX Project Public License, either version 1.3 11 | % of this license or (at your option) any later version. 12 | % The latest version of this license is in 13 | % http://www.latex-project.org/lppl.txt 14 | % and version 1.3 or later is part of all distributions of LaTeX 15 | % version 2003/12/01 or later. 16 | 17 | \NeedsTeXFormat{LaTeX2e} 18 | \ProvidesClass{nusthesis}[2017/11/17 v1.0 National University of Singapore Thesis Class] 19 | 20 | % **************************************** 21 | % * OPTIONS * 22 | % **************************************** 23 | % 24 | % The Graduate Division requirements essentially require that theses be 25 | % formatted as if the oneside option had been used. In the memoir class, 26 | % however, twoside is the default. The following code relies on the memoir 27 | % class for oneside/twoside formatting, but changes the default to oneside. 28 | % Ideas for this code were adapted from an answer on stackexchange, 29 | % http://tex.stackexchange.com/questions/12933/new-options-and-loaded-class-options-bug 30 | % (accessed on 12 September 2011). 31 | 32 | \newcommand\thes@sidedness{-1} 33 | \DeclareOption{oneside} 34 | {\renewcommand\thes@sidedness{1}\PassOptionsToClass{\CurrentOption}{memoir}} 35 | \DeclareOption{twoside} 36 | {\renewcommand\thes@sidedness{2}\PassOptionsToClass{\CurrentOption}{memoir} 37 | \newcommand*{\pagedoublesided}{}} 38 | 39 | % Changing the default point size from 10pt to 12pt uses a similar procedure, 40 | % but it's messier. 41 | 42 | \newcommand\thes@ptsize{0} 43 | \DeclareOption{9pt} 44 | {\renewcommand\thes@ptsize{9}\PassOptionsToClass{\CurrentOption}{memoir}} 45 | \DeclareOption{10pt} 46 | {\renewcommand\thes@ptsize{10}\PassOptionsToClass{\CurrentOption}{memoir}} 47 | \DeclareOption{11pt} 48 | {\renewcommand\thes@ptsize{11}\PassOptionsToClass{\CurrentOption}{memoir}} 49 | \DeclareOption{12pt} 50 | {\renewcommand\thes@ptsize{12}\PassOptionsToClass{\CurrentOption}{memoir}} 51 | \DeclareOption{14pt} 52 | {\renewcommand\thes@ptsize{14}\PassOptionsToClass{\CurrentOption}{memoir}} 53 | \DeclareOption{17pt} 54 | {\renewcommand\thes@ptsize{17}\PassOptionsToClass{\CurrentOption}{memoir}} 55 | \DeclareOption{20pt} 56 | {\renewcommand\thes@ptsize{20}\PassOptionsToClass{\CurrentOption}{memoir}} 57 | \DeclareOption{25pt} 58 | {\renewcommand\thes@ptsize{25}\PassOptionsToClass{\CurrentOption}{memoir}} 59 | \DeclareOption{30pt} 60 | {\renewcommand\thes@ptsize{30}\PassOptionsToClass{\CurrentOption}{memoir}} 61 | \DeclareOption{36pt} 62 | {\renewcommand\thes@ptsize{36}\PassOptionsToClass{\CurrentOption}{memoir}} 63 | \DeclareOption{48pt} 64 | {\renewcommand\thes@ptsize{48}\PassOptionsToClass{\CurrentOption}{memoir}} 65 | \DeclareOption{60pt} 66 | {\renewcommand\thes@ptsize{60}\PassOptionsToClass{\CurrentOption}{memoir}} 67 | \DeclareOption{*pt} 68 | {\renewcommand\thes@ptsize{99}\PassOptionsToClass{\CurrentOption}{memoir}} 69 | 70 | % Other options are passed on to the memoir class. 71 | 72 | \DeclareOption*{\PassOptionsToClass{\CurrentOption}{memoir}} 73 | 74 | % The \ProcessOptions command causes the execution of every option command 75 | % FOO which is declared and for which the user typed the FOO option in his 76 | % \documentclass. For every undeclared option BAR there will be a warning 77 | % message. (BBF 10/31/94) 78 | 79 | \ProcessOptions\relax 80 | 81 | \ifnum\thes@sidedness<0 82 | \PassOptionsToClass{oneside}{memoir} 83 | \renewcommand\thes@sidedness{1} 84 | \fi 85 | 86 | \ifnum\thes@ptsize=0 87 | \PassOptionsToClass{12pt}{memoir} 88 | \renewcommand\thes@ptsize{12} 89 | \fi 90 | 91 | % Now load the memoir class, and configure it appropriately. 92 | 93 | \LoadClass{memoir} 94 | 95 | \setlrmarginsandblock{1.2in}{*}{*} 96 | \@tempdima=1in \advance\@tempdima 25pt \advance\@tempdima\normalbaselineskip 97 | \@tempdimb=.75in \advance\@tempdimb 30pt 98 | \setulmarginsandblock{\@tempdima}{\@tempdimb}{*} 99 | 100 | \AtBeginDocument{\checkandfixthelayout} 101 | 102 | % The Grad. Division requires that "Placement of page numbers must be 103 | % at the center of bottom." 104 | 105 | \pagestyle{simple} 106 | \makeevenhead{simple}{\leftmark}{}{} 107 | \makeoddhead{simple}{}{}{\rightmark} 108 | \makeevenfoot{simple}{}{\thepage}{} 109 | \makeoddfoot{simple}{}{\thepage}{} 110 | \aliaspagestyle{book}{simple} 111 | \aliaspagestyle{part}{simple} 112 | \aliaspagestyle{chapter}{simple} 113 | \aliaspagestyle{title}{simple} 114 | 115 | % Issue warnings if the settings are not appropriate for a final copy 116 | 117 | \ifnum\thes@sidedness=2\relax 118 | \ifdraftdoc\else 119 | \ClassWarningNoLine{nusthesis}{^^J\@spaces 120 | ****** Use the twoside option only for drafts. \@spaces\@spaces ******} 121 | \fi\fi 122 | 123 | \ifnum\thes@ptsize<12\relax 124 | \ifdraftdoc\else 125 | \ClassWarningNoLine{nusthesis}{^^J\@spaces 126 | ****** Use the \thes@ptsize pt option only for drafts. \@spaces\@spaces 127 | ******^^J\@spaces 128 | ****** The Graduate Division requires 12-point type ******^^J\@spaces 129 | ****** or larger for the final version.\space\@spaces\@spaces\@spaces 130 | ******} 131 | \fi\fi 132 | 133 | % For some environments we switch back to single-spacing, also 134 | % provides \dsp in case you need double-spacing where single-spacing 135 | % is otherwise used. 136 | 137 | \newcommand\ssp{\SingleSpacing} 138 | \newcommand\dsp{\setSpacing{1.37}} 139 | 140 | % For clear page 141 | 142 | \let\origdoublepage\cleardoublepage 143 | \newcommand{\clearemptydoublepage}{% 144 | \clearpage{\pagestyle{empty}\origdoublepage}} 145 | 146 | \newcommand{\intendclearpage}{ 147 | \ifdefined\pagedoublesided\clearemptydoublepage\else\clearpage\fi} 148 | 149 | % Table of contents, lists of figures, and lists of tables should always 150 | % be single-spaced. If one wants them to be double-spaced instead (in a 151 | % double-spaced document), the original macros are available as 152 | % \memoirtableofcontents, \memoirlistoffigures, and \memoirlistoftables. 153 | 154 | \let\memoirtableofcontents=\tableofcontents 155 | \renewcommand\tableofcontents{\begin{SingleSpace}\memoirtableofcontents 156 | \end{SingleSpace}} 157 | 158 | \let\memoirlistoffigures=\listoffigures 159 | \renewcommand\listoffigures{\begin{SingleSpace}\memoirlistoffigures 160 | \end{SingleSpace}} 161 | 162 | \let\memoirlistoftables=\listoftables 163 | \renewcommand\listoftables{\begin{SingleSpace}\memoirlistoftables 164 | \end{SingleSpace}} 165 | 166 | 167 | % Customized names: 168 | \newcommand\acknowledgename{Acknowledgments} 169 | \newcommand\declearname{Declaration} 170 | 171 | % **************************************** 172 | % * FRONT MATTER * 173 | % **************************************** 174 | % 175 | 176 | % DECLARATIONS 177 | % 178 | % These macros are used to declare arguments needed for the 179 | % construction of the front matter. 180 | 181 | % The year the degree will be officially conferred 182 | \def\degreeyear#1{\gdef\@degreeyear{#1}} 183 | 184 | % The full (unabbreviated) name of the degree 185 | \def\degree#1{\gdef\@degree{#1}} 186 | 187 | % All previous degrees: one per line in chronological order 188 | \def\prevdegrees#1{\gdef\@prevdegrees{#1}} 189 | 190 | % The name of your supervisors 191 | \def\supervisor#1{\gdef\@supervisor{#1}} 192 | \def\cosupervisor#1{\gdef\@cosupervisor{#1}} 193 | \def\anothercosupervisor#1{\gdef\@anothercosupervisor{#1}} 194 | 195 | % The names of your thesis examiners, one per line 196 | \def\examiners#1{\gdef\@examiners{#1}} 197 | 198 | % The name of your degree's field (e.g. Psychology, Computer Science) 199 | \def\field#1{\gdef\@field{#1}} 200 | 201 | % The declaration date 202 | \def\declaredate#1{\gdef\@declaredate{#1}} 203 | 204 | % The declaration signature 205 | \def\declaresign#1{\gdef\@declaresign{#1}} 206 | 207 | % The alwayssingle environment ensures that front matter is always 208 | % single column even in a double-column document. 209 | 210 | \newenvironment{alwayssingle} 211 | {\if@twocolumn \@restonecoltrue\onecolumn \else \@restonecolfalse\newpage \fi} 212 | {\if@restonecol \twocolumn \else \newpage \fi} 213 | 214 | % \maketitle outputs the complete titlepage. It requires all the 215 | % above macros. 216 | 217 | % Set the font that will be used in the front matter headings 218 | \def\fmfont{\fontsize\@xiipt{14.5}\selectfont} 219 | 220 | % Set the block letter that will be used in the title page 221 | \def\blocklt#1{\textbf{\MakeUppercase{#1}}} 222 | 223 | \def\maketitle{ 224 | {\ssp 225 | \makeatletter 226 | \setlength{\@tempdima}{28pt}\advance\@tempdima-\baselineskip 227 | \parskip=\@tempdima minus 4pt 228 | \makeatother 229 | \begin{alwayssingle} 230 | \hrule height 0pt 231 | % Fix things so that they're vertically centered 232 | % \@tempdima = 2 * ((\stockheight-\textheight) / 2 - \uppermargin) - \topskip 233 | \@tempdima=\stockheight 234 | \advance\@tempdima-\textheight 235 | \advance\@tempdima-2\uppermargin 236 | \advance\@tempdima-\topskip 237 | \vspace{\@tempdima} 238 | \vfill 239 | \let\footnotesize\small 240 | \let\footnoterule\relax 241 | \thispagestyle{empty} 242 | \setcounter{page}{1} 243 | 244 | \begin{center} 245 | \blocklt{\@title}\par 246 | \vspace{14pt minus 4pt} 247 | by \par 248 | \blocklt{\@author} 249 | \ifdefined \@prevdegrees 250 | \par\vspace{-10pt}\textit{(\@prevdegrees)} 251 | \fi\par 252 | \vspace{28pt minus 8pt} 253 | \blocklt{A thesis submitted for the degree of} \par 254 | \blocklt{\@degree}\par 255 | in \par 256 | \blocklt{\@field}\par 257 | in the \par 258 | \blocklt{Graduate Division} \par 259 | of the \par 260 | \blocklt{National University of Singapore} \par 261 | \vspace{28pt minus 8pt} 262 | \blocklt{\@degreeyear} \par 263 | \vspace{14pt minus 4pt} 264 | \ifdefined \@cosupervisor 265 | Supervisors: \par\vspace{-10pt} 266 | {\@supervisor}, Main Supervisor \\ 267 | {\@cosupervisor}, Co-Supervisor 268 | \ifdefined \@anothercosupervisor 269 | \\{\@anothercosupervisor}, Co-Supervisor 270 | \fi 271 | \else 272 | Supervisor: \par\vspace{-10pt} 273 | {\@supervisor} 274 | \fi\par 275 | \ifdefined \@examiners 276 | \vspace{5pt} 277 | Examiners: \par\vspace{-10pt} 278 | {\@examiners}\par 279 | \fi 280 | \end{center} 281 | \vfill 282 | \hrule height 0pt 283 | \end{alwayssingle} 284 | 285 | \setcounter{footnote}{0} 286 | }} 287 | 288 | % DECLARATION 289 | % 290 | % The declaration environment puts a large, bold, centered 291 | % "Declaration" label at the top of the page. 292 | 293 | \def\declarationpage{% 294 | \intendclearpage 295 | \thispagestyle{empty} 296 | \begin{alwayssingle} 297 | \begin{center} 298 | {\Large \bfseries \declearname}\par 299 | \vspace{1in} 300 | {\large 301 | I hereby declare that this thesis is my original work and it has\par 302 | been written by me in its entirety. I have duly\par 303 | acknowledged all the sources of information which have\par 304 | been used in the thesis.\par 305 | \vspace{1.5em} 306 | This thesis has also not been submitted for any\par 307 | degree in any university previously.\par 308 | \ifdefined \@declaresign 309 | \vspace{1.2in} 310 | \begin{figure}[!h] 311 | \centering\includegraphics[height=1in]{\@declaresign} 312 | \end{figure} 313 | \vspace{-0.4in} 314 | \else 315 | \vspace{2.1in} 316 | \fi 317 | $\rule{15em}{0.15mm}$ \par 318 | \vspace{.5em} 319 | {\normalsize\@author}\par 320 | \ifdefined\@declaredate 321 | {\normalsize\@declaredate}\par 322 | \fi 323 | } 324 | \end{center} 325 | \end{alwayssingle} 326 | \intendclearpage 327 | } 328 | 329 | % ABSTRACT 330 | % 331 | % The ABSTRACT environment allows for multi-page abstracts which, 332 | % in accordance with UC rules, is numbered separately from the rest 333 | % of the rest of the thesis in Arabic. 334 | 335 | \def\abstract{ 336 | \intendclearpage 337 | \phantomsection\addcontentsline{toc}{chapter}{\abstractname} 338 | \begin{alwayssingle} 339 | \begin{center}{ 340 | \ssp\fmfont 341 | {\large \bfseries \abstractname}\par 342 | \vspace{.5in} 343 | \@title\par 344 | \vspace{.1in} 345 | by\par 346 | \vspace{.1in} 347 | \@author\par 348 | \vspace{.1in} 349 | {\@degree} in \@field\par 350 | \vspace{.1in} 351 | National University of Singapore\par 352 | } 353 | \vspace{.1in} 354 | \end{center} 355 | } 356 | 357 | \def\endabstract{\par\vfil\null\end{alwayssingle}} 358 | 359 | % DEDICATION 360 | % 361 | % The dedication environment just makes sure the dedication gets its 362 | % own page. 363 | 364 | \newenvironment{dedication} 365 | {\intendclearpage 366 | \begin{alwayssingle} 367 | \null\vfil 368 | \begin{center}\itshape\Large} 369 | {\end{center} 370 | \vfil\null 371 | \end{alwayssingle}} 372 | 373 | % Convenient for short dedication 374 | \newcommand{\dedicate}[1]{\begin{dedication}#1\end{dedication}} 375 | 376 | % ACKNOWLEDGEMENTS 377 | % 378 | % The acknowledgments environment puts a large, bold, centered 379 | % "Acknowledgements" label at the top of the page. 380 | 381 | \newenvironment{acknowledgments} 382 | {\intendclearpage 383 | \phantomsection\addcontentsline{toc}{chapter}{\acknowledgename} 384 | \begin{alwayssingle} 385 | \begin{center} 386 | {\large \bfseries \acknowledgename} 387 | \end{center} 388 | } 389 | {\end{alwayssingle}} 390 | 391 | % FRONTMATTER environment 392 | % 393 | % The FRONTMATTER environment makes sure that page numbering is set 394 | % correctly (roman, lower-case, starting at 3) for the front matter 395 | % that follows the abstract. It also resets page-numbering for 396 | % the remainder of the thesis (arabic, starting at 1). 397 | 398 | \renewenvironment{frontmatter} 399 | {\setcounter{page}{1}\renewcommand{\thepage}{\roman{page}}} 400 | {\intendclearpage 401 | \newpage\renewcommand{\thepage}{\arabic{page}}\setcounter{page}{1}} 402 | 403 | % Re-defining \tableofcontents, \listoffigures and \listoftables to 404 | % avoid self-referencing. 405 | 406 | \renewcommand{\tableofcontents}{ 407 | \intendclearpage 408 | \phantomsection\pdfbookmark[chapter]{\contentsname}{toc} 409 | \chapter*{\contentsname}\vspace{2em}\makeatletter\@starttoc{toc}\makeatother} 410 | 411 | \renewcommand{\listoffigures}{ 412 | \intendclearpage 413 | \phantomsection\addcontentsline{toc}{chapter}{List of Figures} 414 | \chapter*{List of Figures}\vspace{2em}\makeatletter\@starttoc{lof}\makeatother} 415 | 416 | \renewcommand{\listoftables}{ 417 | \intendclearpage 418 | \phantomsection\addcontentsline{toc}{chapter}{List of Tables} 419 | \chapter*{List of Tables}\vspace{2em}\makeatletter\@starttoc{lot}\makeatother} 420 | 421 | \usepackage[sf]{titlesec} 422 | \titleformat{\chapter}[display]{\normalfont\huge\bfseries\ssp}{\chaptertitlename\ \thechapter}{20pt}{\Huge} 423 | \titleformat{\section}{\normalfont\Large\bfseries\ssp}{\thesection}{1em}{} 424 | \titleformat{\subsection}{\normalfont\large\bfseries\ssp}{\thesubsection}{1em}{} 425 | \titleformat{\subsubsection}{\normalfont\normalsize\bfseries\ssp}{\thesubsubsection}{1em}{} 426 | \titleformat{\paragraph}[runin]{\normalfont\normalsize\bfseries\ssp}{\theparagraph}{1em}{} 427 | \titleformat{\subparagraph}[runin]{\normalfont\normalsize\bfseries\ssp}{\thesubparagraph}{1em}{} 428 | 429 | \titlespacing*{\chapter}{0pt}{3.5ex}{2.5ex} 430 | \titlespacing*{\section}{0pt}{.5ex plus .2ex minus .2ex}{1.5ex plus .2ex} 431 | \titlespacing*{\subsection}{0pt}{.3ex plus .1ex minus .1ex}{1ex plus .2ex} 432 | \titlespacing*{\subsubsection}{0pt}{.2ex}{.5ex plus .1ex} 433 | \titlespacing*{\paragraph} {0pt}{.2ex plus .05ex minus .05ex}{1em} 434 | \titlespacing*{\subparagraph}{\parindent}{.2ex plus .05ex minus .05ex}{1em} 435 | 436 | \usepackage{epsfig, epstopdf, graphicx} 437 | \usepackage{amssymb, mathrsfs, amsfonts} 438 | \usepackage[cmex10]{amsmath} 439 | \usepackage[mathscr]{euscript} 440 | 441 | \usepackage[T1]{fontenc} 442 | \usepackage{lmodern} 443 | \usepackage[scaled=0.85]{beramono} 444 | 445 | \endinput 446 | -------------------------------------------------------------------------------- /exp/ch-Rice/taste_with_freshness.eps: -------------------------------------------------------------------------------- 1 | %!PS-Adobe-2.0 EPSF-2.0 2 | %%Title: taste_with_freshness.eps 3 | %%Creator: gnuplot 5.0 patchlevel 0 4 | %%CreationDate: Thu Nov 30 23:15:15 2017 5 | %%DocumentFonts: (atend) 6 | %%BoundingBox: 50 50 230 188 7 | %%EndComments 8 | %%BeginProlog 9 | /gnudict 256 dict def 10 | gnudict begin 11 | % 12 | % The following true/false flags may be edited by hand if desired. 13 | % The unit line width and grayscale image gamma correction may also be changed. 14 | % 15 | /Color true def 16 | /Blacktext false def 17 | /Solid false def 18 | /Dashlength 1 def 19 | /Landscape false def 20 | /Level1 false def 21 | /Level3 false def 22 | /Rounded false def 23 | /ClipToBoundingBox false def 24 | /SuppressPDFMark false def 25 | /TransparentPatterns false def 26 | /gnulinewidth 5.000 def 27 | /userlinewidth gnulinewidth def 28 | /Gamma 1.0 def 29 | /BackgroundColor {-1.000 -1.000 -1.000} def 30 | % 31 | /vshift -46 def 32 | /dl1 { 33 | 10.0 Dashlength userlinewidth gnulinewidth div mul mul mul 34 | Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if 35 | } def 36 | /dl2 { 37 | 10.0 Dashlength userlinewidth gnulinewidth div mul mul mul 38 | Rounded { currentlinewidth 0.75 mul add } if 39 | } def 40 | /hpt_ 31.5 def 41 | /vpt_ 31.5 def 42 | /hpt hpt_ def 43 | /vpt vpt_ def 44 | /doclip { 45 | ClipToBoundingBox { 46 | newpath 50 50 moveto 230 50 lineto 230 188 lineto 50 188 lineto closepath 47 | clip 48 | } if 49 | } def 50 | % 51 | % Gnuplot Prolog Version 5.0 (Dec 2014) 52 | % 53 | %/SuppressPDFMark true def 54 | % 55 | /M {moveto} bind def 56 | /L {lineto} bind def 57 | /R {rmoveto} bind def 58 | /V {rlineto} bind def 59 | /N {newpath moveto} bind def 60 | /Z {closepath} bind def 61 | /C {setrgbcolor} bind def 62 | /f {rlineto fill} bind def 63 | /g {setgray} bind def 64 | /Gshow {show} def % May be redefined later in the file to support UTF-8 65 | /vpt2 vpt 2 mul def 66 | /hpt2 hpt 2 mul def 67 | /Lshow {currentpoint stroke M 0 vshift R 68 | Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def 69 | /Rshow {currentpoint stroke M dup stringwidth pop neg vshift R 70 | Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def 71 | /Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R 72 | Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def 73 | /UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def 74 | /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def 75 | /DL {Color {setrgbcolor Solid {pop []} if 0 setdash} 76 | {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def 77 | /BL {stroke userlinewidth 2 mul setlinewidth 78 | Rounded {1 setlinejoin 1 setlinecap} if} def 79 | /AL {stroke userlinewidth 2 div setlinewidth 80 | Rounded {1 setlinejoin 1 setlinecap} if} def 81 | /UL {dup gnulinewidth mul /userlinewidth exch def 82 | dup 1 lt {pop 1} if 10 mul /udl exch def} def 83 | /PL {stroke userlinewidth setlinewidth 84 | Rounded {1 setlinejoin 1 setlinecap} if} def 85 | 3.8 setmiterlimit 86 | % Classic Line colors (version 5.0) 87 | /LCw {1 1 1} def 88 | /LCb {0 0 0} def 89 | /LCa {0 0 0} def 90 | /LC0 {1 0 0} def 91 | /LC1 {0 1 0} def 92 | /LC2 {0 0 1} def 93 | /LC3 {1 0 1} def 94 | /LC4 {0 1 1} def 95 | /LC5 {1 1 0} def 96 | /LC6 {0 0 0} def 97 | /LC7 {1 0.3 0} def 98 | /LC8 {0.5 0.5 0.5} def 99 | % Default dash patterns (version 5.0) 100 | /LTw {PL [] 1 setgray} def 101 | /LTb {BL [] LCb DL} def 102 | /LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def 103 | /LT0 {PL [] LC0 DL} def 104 | /LT1 {PL [2 dl1 3 dl2] LC1 DL} def 105 | /LT2 {PL [1 dl1 1.5 dl2] LC2 DL} def 106 | /LT3 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC3 DL} def 107 | /LT4 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def 108 | /LT5 {PL [4 dl1 2 dl2] LC5 DL} def 109 | /LT6 {PL [1.5 dl1 1.5 dl2 1.5 dl1 1.5 dl2 1.5 dl1 6 dl2] LC6 DL} def 110 | /LT7 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC7 DL} def 111 | /LT8 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC8 DL} def 112 | /SL {[] 0 setdash} def 113 | /Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def 114 | /Dia {stroke [] 0 setdash 2 copy vpt add M 115 | hpt neg vpt neg V hpt vpt neg V 116 | hpt vpt V hpt neg vpt V closepath stroke 117 | Pnt} def 118 | /Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V 119 | currentpoint stroke M 120 | hpt neg vpt neg R hpt2 0 V stroke 121 | } def 122 | /Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M 123 | 0 vpt2 neg V hpt2 0 V 0 vpt2 V 124 | hpt2 neg 0 V closepath stroke 125 | Pnt} def 126 | /Crs {stroke [] 0 setdash exch hpt sub exch vpt add M 127 | hpt2 vpt2 neg V currentpoint stroke M 128 | hpt2 neg 0 R hpt2 vpt2 V stroke} def 129 | /TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M 130 | hpt neg vpt -1.62 mul V 131 | hpt 2 mul 0 V 132 | hpt neg vpt 1.62 mul V closepath stroke 133 | Pnt} def 134 | /Star {2 copy Pls Crs} def 135 | /BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M 136 | 0 vpt2 neg V hpt2 0 V 0 vpt2 V 137 | hpt2 neg 0 V closepath fill} def 138 | /TriUF {stroke [] 0 setdash vpt 1.12 mul add M 139 | hpt neg vpt -1.62 mul V 140 | hpt 2 mul 0 V 141 | hpt neg vpt 1.62 mul V closepath fill} def 142 | /TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M 143 | hpt neg vpt 1.62 mul V 144 | hpt 2 mul 0 V 145 | hpt neg vpt -1.62 mul V closepath stroke 146 | Pnt} def 147 | /TriDF {stroke [] 0 setdash vpt 1.12 mul sub M 148 | hpt neg vpt 1.62 mul V 149 | hpt 2 mul 0 V 150 | hpt neg vpt -1.62 mul V closepath fill} def 151 | /DiaF {stroke [] 0 setdash vpt add M 152 | hpt neg vpt neg V hpt vpt neg V 153 | hpt vpt V hpt neg vpt V closepath fill} def 154 | /Pent {stroke [] 0 setdash 2 copy gsave 155 | translate 0 hpt M 4 {72 rotate 0 hpt L} repeat 156 | closepath stroke grestore Pnt} def 157 | /PentF {stroke [] 0 setdash gsave 158 | translate 0 hpt M 4 {72 rotate 0 hpt L} repeat 159 | closepath fill grestore} def 160 | /Circle {stroke [] 0 setdash 2 copy 161 | hpt 0 360 arc stroke Pnt} def 162 | /CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def 163 | /C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def 164 | /C1 {BL [] 0 setdash 2 copy moveto 165 | 2 copy vpt 0 90 arc closepath fill 166 | vpt 0 360 arc closepath} bind def 167 | /C2 {BL [] 0 setdash 2 copy moveto 168 | 2 copy vpt 90 180 arc closepath fill 169 | vpt 0 360 arc closepath} bind def 170 | /C3 {BL [] 0 setdash 2 copy moveto 171 | 2 copy vpt 0 180 arc closepath fill 172 | vpt 0 360 arc closepath} bind def 173 | /C4 {BL [] 0 setdash 2 copy moveto 174 | 2 copy vpt 180 270 arc closepath fill 175 | vpt 0 360 arc closepath} bind def 176 | /C5 {BL [] 0 setdash 2 copy moveto 177 | 2 copy vpt 0 90 arc 178 | 2 copy moveto 179 | 2 copy vpt 180 270 arc closepath fill 180 | vpt 0 360 arc} bind def 181 | /C6 {BL [] 0 setdash 2 copy moveto 182 | 2 copy vpt 90 270 arc closepath fill 183 | vpt 0 360 arc closepath} bind def 184 | /C7 {BL [] 0 setdash 2 copy moveto 185 | 2 copy vpt 0 270 arc closepath fill 186 | vpt 0 360 arc closepath} bind def 187 | /C8 {BL [] 0 setdash 2 copy moveto 188 | 2 copy vpt 270 360 arc closepath fill 189 | vpt 0 360 arc closepath} bind def 190 | /C9 {BL [] 0 setdash 2 copy moveto 191 | 2 copy vpt 270 450 arc closepath fill 192 | vpt 0 360 arc closepath} bind def 193 | /C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill 194 | 2 copy moveto 195 | 2 copy vpt 90 180 arc closepath fill 196 | vpt 0 360 arc closepath} bind def 197 | /C11 {BL [] 0 setdash 2 copy moveto 198 | 2 copy vpt 0 180 arc closepath fill 199 | 2 copy moveto 200 | 2 copy vpt 270 360 arc closepath fill 201 | vpt 0 360 arc closepath} bind def 202 | /C12 {BL [] 0 setdash 2 copy moveto 203 | 2 copy vpt 180 360 arc closepath fill 204 | vpt 0 360 arc closepath} bind def 205 | /C13 {BL [] 0 setdash 2 copy moveto 206 | 2 copy vpt 0 90 arc closepath fill 207 | 2 copy moveto 208 | 2 copy vpt 180 360 arc closepath fill 209 | vpt 0 360 arc closepath} bind def 210 | /C14 {BL [] 0 setdash 2 copy moveto 211 | 2 copy vpt 90 360 arc closepath fill 212 | vpt 0 360 arc} bind def 213 | /C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill 214 | vpt 0 360 arc closepath} bind def 215 | /Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto 216 | neg 0 rlineto closepath} bind def 217 | /Square {dup Rec} bind def 218 | /Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def 219 | /S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def 220 | /S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def 221 | /S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def 222 | /S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def 223 | /S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def 224 | /S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill 225 | exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def 226 | /S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def 227 | /S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill 228 | 2 copy vpt Square fill Bsquare} bind def 229 | /S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def 230 | /S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def 231 | /S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill 232 | Bsquare} bind def 233 | /S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill 234 | Bsquare} bind def 235 | /S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def 236 | /S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill 237 | 2 copy vpt Square fill Bsquare} bind def 238 | /S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill 239 | 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def 240 | /S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def 241 | /D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def 242 | /D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def 243 | /D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def 244 | /D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def 245 | /D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def 246 | /D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def 247 | /D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def 248 | /D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def 249 | /D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def 250 | /D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def 251 | /D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def 252 | /D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def 253 | /D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def 254 | /D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def 255 | /D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def 256 | /D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def 257 | /DiaE {stroke [] 0 setdash vpt add M 258 | hpt neg vpt neg V hpt vpt neg V 259 | hpt vpt V hpt neg vpt V closepath stroke} def 260 | /BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M 261 | 0 vpt2 neg V hpt2 0 V 0 vpt2 V 262 | hpt2 neg 0 V closepath stroke} def 263 | /TriUE {stroke [] 0 setdash vpt 1.12 mul add M 264 | hpt neg vpt -1.62 mul V 265 | hpt 2 mul 0 V 266 | hpt neg vpt 1.62 mul V closepath stroke} def 267 | /TriDE {stroke [] 0 setdash vpt 1.12 mul sub M 268 | hpt neg vpt 1.62 mul V 269 | hpt 2 mul 0 V 270 | hpt neg vpt -1.62 mul V closepath stroke} def 271 | /PentE {stroke [] 0 setdash gsave 272 | translate 0 hpt M 4 {72 rotate 0 hpt L} repeat 273 | closepath stroke grestore} def 274 | /CircE {stroke [] 0 setdash 275 | hpt 0 360 arc stroke} def 276 | /Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def 277 | /DiaW {stroke [] 0 setdash vpt add M 278 | hpt neg vpt neg V hpt vpt neg V 279 | hpt vpt V hpt neg vpt V Opaque stroke} def 280 | /BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M 281 | 0 vpt2 neg V hpt2 0 V 0 vpt2 V 282 | hpt2 neg 0 V Opaque stroke} def 283 | /TriUW {stroke [] 0 setdash vpt 1.12 mul add M 284 | hpt neg vpt -1.62 mul V 285 | hpt 2 mul 0 V 286 | hpt neg vpt 1.62 mul V Opaque stroke} def 287 | /TriDW {stroke [] 0 setdash vpt 1.12 mul sub M 288 | hpt neg vpt 1.62 mul V 289 | hpt 2 mul 0 V 290 | hpt neg vpt -1.62 mul V Opaque stroke} def 291 | /PentW {stroke [] 0 setdash gsave 292 | translate 0 hpt M 4 {72 rotate 0 hpt L} repeat 293 | Opaque stroke grestore} def 294 | /CircW {stroke [] 0 setdash 295 | hpt 0 360 arc Opaque stroke} def 296 | /BoxFill {gsave Rec 1 setgray fill grestore} def 297 | /Density { 298 | /Fillden exch def 299 | currentrgbcolor 300 | /ColB exch def /ColG exch def /ColR exch def 301 | /ColR ColR Fillden mul Fillden sub 1 add def 302 | /ColG ColG Fillden mul Fillden sub 1 add def 303 | /ColB ColB Fillden mul Fillden sub 1 add def 304 | ColR ColG ColB setrgbcolor} def 305 | /BoxColFill {gsave Rec PolyFill} def 306 | /PolyFill {gsave Density fill grestore grestore} def 307 | /h {rlineto rlineto rlineto gsave closepath fill grestore} bind def 308 | % 309 | % PostScript Level 1 Pattern Fill routine for rectangles 310 | % Usage: x y w h s a XX PatternFill 311 | % x,y = lower left corner of box to be filled 312 | % w,h = width and height of box 313 | % a = angle in degrees between lines and x-axis 314 | % XX = 0/1 for no/yes cross-hatch 315 | % 316 | /PatternFill {gsave /PFa [ 9 2 roll ] def 317 | PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate 318 | PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec 319 | TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse 320 | clip 321 | currentlinewidth 0.5 mul setlinewidth 322 | /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def 323 | 0 0 M PFa 5 get rotate PFs -2 div dup translate 324 | 0 1 PFs PFa 4 get div 1 add floor cvi 325 | {PFa 4 get mul 0 M 0 PFs V} for 326 | 0 PFa 6 get ne { 327 | 0 1 PFs PFa 4 get div 1 add floor cvi 328 | {PFa 4 get mul 0 2 1 roll M PFs 0 V} for 329 | } if 330 | stroke grestore} def 331 | % 332 | /languagelevel where 333 | {pop languagelevel} {1} ifelse 334 | dup 2 lt 335 | {/InterpretLevel1 true def 336 | /InterpretLevel3 false def} 337 | {/InterpretLevel1 Level1 def 338 | 2 gt 339 | {/InterpretLevel3 Level3 def} 340 | {/InterpretLevel3 false def} 341 | ifelse } 342 | ifelse 343 | % 344 | % PostScript level 2 pattern fill definitions 345 | % 346 | /Level2PatternFill { 347 | /Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} 348 | bind def 349 | /KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def 350 | << Tile8x8 351 | /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} 352 | >> matrix makepattern 353 | /Pat1 exch def 354 | << Tile8x8 355 | /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke 356 | 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} 357 | >> matrix makepattern 358 | /Pat2 exch def 359 | << Tile8x8 360 | /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L 361 | 8 8 L 8 0 L 0 0 L fill} 362 | >> matrix makepattern 363 | /Pat3 exch def 364 | << Tile8x8 365 | /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L 366 | 0 12 M 12 0 L stroke} 367 | >> matrix makepattern 368 | /Pat4 exch def 369 | << Tile8x8 370 | /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L 371 | 0 -4 M 12 8 L stroke} 372 | >> matrix makepattern 373 | /Pat5 exch def 374 | << Tile8x8 375 | /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L 376 | 0 12 M 8 -4 L 4 12 M 10 0 L stroke} 377 | >> matrix makepattern 378 | /Pat6 exch def 379 | << Tile8x8 380 | /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L 381 | 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} 382 | >> matrix makepattern 383 | /Pat7 exch def 384 | << Tile8x8 385 | /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L 386 | 12 0 M -4 8 L 12 4 M 0 10 L stroke} 387 | >> matrix makepattern 388 | /Pat8 exch def 389 | << Tile8x8 390 | /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L 391 | -4 0 M 12 8 L -4 4 M 8 10 L stroke} 392 | >> matrix makepattern 393 | /Pat9 exch def 394 | /Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def 395 | /Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def 396 | /Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def 397 | /Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def 398 | /Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def 399 | /Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def 400 | /Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def 401 | } def 402 | % 403 | % 404 | %End of PostScript Level 2 code 405 | % 406 | /PatternBgnd { 407 | TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse 408 | } def 409 | % 410 | % Substitute for Level 2 pattern fill codes with 411 | % grayscale if Level 2 support is not selected. 412 | % 413 | /Level1PatternFill { 414 | /Pattern1 {0.250 Density} bind def 415 | /Pattern2 {0.500 Density} bind def 416 | /Pattern3 {0.750 Density} bind def 417 | /Pattern4 {0.125 Density} bind def 418 | /Pattern5 {0.375 Density} bind def 419 | /Pattern6 {0.625 Density} bind def 420 | /Pattern7 {0.875 Density} bind def 421 | } def 422 | % 423 | % Now test for support of Level 2 code 424 | % 425 | Level1 {Level1PatternFill} {Level2PatternFill} ifelse 426 | % 427 | /Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont 428 | dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall 429 | currentdict end definefont pop 430 | % 431 | /MFshow { 432 | { dup 5 get 3 ge 433 | { 5 get 3 eq {gsave} {grestore} ifelse } 434 | {dup dup 0 get findfont exch 1 get scalefont setfont 435 | [ currentpoint ] exch dup 2 get 0 exch R dup 5 get 2 ne {dup dup 6 436 | get exch 4 get {textshow} {stringwidth pop 0 R} ifelse }if dup 5 get 0 eq 437 | {dup 3 get {2 get neg 0 exch R pop} {pop aload pop M} ifelse} {dup 5 438 | get 1 eq {dup 2 get exch dup 3 get exch 6 get stringwidth pop -2 div 439 | dup 0 R} {dup 6 get stringwidth pop -2 div 0 R 6 get 440 | textshow 2 index {aload pop M neg 3 -1 roll neg R pop pop} {pop pop pop 441 | pop aload pop M} ifelse }ifelse }ifelse } 442 | ifelse } 443 | forall} def 444 | /Gswidth {dup type /stringtype eq {stringwidth} {pop (n) stringwidth} ifelse} def 445 | /MFwidth {0 exch { dup 5 get 3 ge { 5 get 3 eq { 0 } { pop } ifelse } 446 | {dup 3 get{dup dup 0 get findfont exch 1 get scalefont setfont 447 | 6 get Gswidth pop add} {pop} ifelse} ifelse} forall} def 448 | /MLshow { currentpoint stroke M 449 | 0 exch R 450 | Blacktext {gsave 0 setgray MFshow grestore} {MFshow} ifelse } bind def 451 | /MRshow { currentpoint stroke M 452 | exch dup MFwidth neg 3 -1 roll R 453 | Blacktext {gsave 0 setgray MFshow grestore} {MFshow} ifelse } bind def 454 | /MCshow { currentpoint stroke M 455 | exch dup MFwidth -2 div 3 -1 roll R 456 | Blacktext {gsave 0 setgray MFshow grestore} {MFshow} ifelse } bind def 457 | /XYsave { [( ) 1 2 true false 3 ()] } bind def 458 | /XYrestore { [( ) 1 2 true false 4 ()] } bind def 459 | Level1 SuppressPDFMark or 460 | {} { 461 | /SDict 10 dict def 462 | systemdict /pdfmark known not { 463 | userdict /pdfmark systemdict /cleartomark get put 464 | } if 465 | SDict begin [ 466 | /Title (taste_with_freshness.eps) 467 | /Subject (gnuplot plot) 468 | /Creator (gnuplot 5.0 patchlevel 0) 469 | /Author (a0095805) 470 | % /Producer (gnuplot) 471 | % /Keywords () 472 | /CreationDate (Thu Nov 30 23:15:15 2017) 473 | /DOCINFO pdfmark 474 | end 475 | } ifelse 476 | end 477 | % 478 | % Support for boxed text - Ethan A Merritt May 2005 479 | % 480 | /InitTextBox { userdict /TBy2 3 -1 roll put userdict /TBx2 3 -1 roll put 481 | userdict /TBy1 3 -1 roll put userdict /TBx1 3 -1 roll put 482 | /Boxing true def } def 483 | /ExtendTextBox { Boxing 484 | { gsave dup false charpath pathbbox 485 | dup TBy2 gt {userdict /TBy2 3 -1 roll put} {pop} ifelse 486 | dup TBx2 gt {userdict /TBx2 3 -1 roll put} {pop} ifelse 487 | dup TBy1 lt {userdict /TBy1 3 -1 roll put} {pop} ifelse 488 | dup TBx1 lt {userdict /TBx1 3 -1 roll put} {pop} ifelse 489 | grestore } if } def 490 | /PopTextBox { newpath TBx1 TBxmargin sub TBy1 TBymargin sub M 491 | TBx1 TBxmargin sub TBy2 TBymargin add L 492 | TBx2 TBxmargin add TBy2 TBymargin add L 493 | TBx2 TBxmargin add TBy1 TBymargin sub L closepath } def 494 | /DrawTextBox { PopTextBox stroke /Boxing false def} def 495 | /FillTextBox { gsave PopTextBox 1 1 1 setrgbcolor fill grestore /Boxing false def} def 496 | 0 0 0 0 InitTextBox 497 | /TBxmargin 20 def 498 | /TBymargin 20 def 499 | /Boxing false def 500 | /textshow { ExtendTextBox Gshow } def 501 | % 502 | %%EndProlog 503 | %%Page: 1 1 504 | gnudict begin 505 | gsave 506 | doclip 507 | 50 50 translate 508 | 0.050 0.050 scale 509 | 0 setgray 510 | newpath 511 | (Helvetica) findfont 140 scalefont setfont 512 | BackgroundColor 0 lt 3 1 roll 0 lt exch 0 lt or or not {BackgroundColor C 1.000 0 0 3600.00 2772.00 BoxColFill} if 513 | 1.000 UL 514 | LTb 515 | LCb setrgbcolor 516 | 602 671 M 517 | 63 0 V 518 | stroke 519 | 518 671 M 520 | [ [(Helvetica) 140.0 0.0 true true 0 ( 0)] 521 | ] -46.7 MRshow 522 | 1.000 UL 523 | LTb 524 | LCb setrgbcolor 525 | 602 1022 M 526 | 63 0 V 527 | stroke 528 | 518 1022 M 529 | [ [(Helvetica) 140.0 0.0 true true 0 ( 20)] 530 | ] -46.7 MRshow 531 | 1.000 UL 532 | LTb 533 | LCb setrgbcolor 534 | 602 1374 M 535 | 63 0 V 536 | stroke 537 | 518 1374 M 538 | [ [(Helvetica) 140.0 0.0 true true 0 ( 40)] 539 | ] -46.7 MRshow 540 | 1.000 UL 541 | LTb 542 | LCb setrgbcolor 543 | 602 1725 M 544 | 63 0 V 545 | stroke 546 | 518 1725 M 547 | [ [(Helvetica) 140.0 0.0 true true 0 ( 60)] 548 | ] -46.7 MRshow 549 | 1.000 UL 550 | LTb 551 | LCb setrgbcolor 552 | 602 2076 M 553 | 63 0 V 554 | stroke 555 | 518 2076 M 556 | [ [(Helvetica) 140.0 0.0 true true 0 ( 80)] 557 | ] -46.7 MRshow 558 | 1.000 UL 559 | LTb 560 | LCb setrgbcolor 561 | 602 2427 M 562 | 63 0 V 563 | stroke 564 | 518 2427 M 565 | [ [(Helvetica) 140.0 0.0 true true 0 ( 100)] 566 | ] -46.7 MRshow 567 | 1.000 UL 568 | LTb 569 | LCb setrgbcolor 570 | 1060 671 M 571 | stroke 572 | 1018 559 M 573 | currentpoint gsave translate -30 rotate 0 0 moveto 574 | [ [(Helvetica) 140.0 0.0 true true 0 (White)] 575 | ] -46.7 MLshow 576 | grestore 577 | 1.000 UL 578 | LTb 579 | LCb setrgbcolor 580 | 1517 671 M 581 | stroke 582 | 1475 559 M 583 | currentpoint gsave translate -30 rotate 0 0 moveto 584 | [ [(Helvetica) 140.0 0.0 true true 0 (Brown)] 585 | ] -46.7 MLshow 586 | grestore 587 | 1.000 UL 588 | LTb 589 | LCb setrgbcolor 590 | 1975 671 M 591 | stroke 592 | 1933 559 M 593 | currentpoint gsave translate -30 rotate 0 0 moveto 594 | [ [(Helvetica) 140.0 0.0 true true 0 (Chicken)] 595 | ] -46.7 MLshow 596 | grestore 597 | 1.000 UL 598 | LTb 599 | LCb setrgbcolor 600 | 2432 671 M 601 | stroke 602 | 2390 559 M 603 | currentpoint gsave translate -30 rotate 0 0 moveto 604 | [ [(Helvetica) 140.0 0.0 true true 0 (Duck)] 605 | ] -46.7 MLshow 606 | grestore 607 | 1.000 UL 608 | LTb 609 | LCb setrgbcolor 610 | 2890 671 M 611 | stroke 612 | 2848 559 M 613 | currentpoint gsave translate -30 rotate 0 0 moveto 614 | [ [(Helvetica) 140.0 0.0 true true 0 (Fried)] 615 | ] -46.7 MLshow 616 | grestore 617 | 1.000 UL 618 | LTb 619 | LCb setrgbcolor 620 | 1.000 UL 621 | LTb 622 | LCb setrgbcolor 623 | 602 2603 N 624 | 602 671 L 625 | 2745 0 V 626 | 0 1932 V 627 | -2745 0 V 628 | Z stroke 629 | 1.000 UP 630 | 1.000 UL 631 | LTb 632 | LCb setrgbcolor 633 | LCb setrgbcolor 634 | 112 1637 M 635 | currentpoint gsave translate -270 rotate 0 0 moveto 636 | [ [(Helvetica) 140.0 0.0 true true 0 (Delicious Score)] 637 | ] -46.7 MCshow 638 | grestore 639 | LTb 640 | LCb setrgbcolor 641 | 1974 98 M 642 | [ [(Helvetica) 140.0 0.0 true true 0 (Type of Rice)] 643 | ] -46.7 MCshow 644 | LTb 645 | % Begin plot #1 646 | 1.000 UL 647 | LTb 648 | 1.00 0.65 0.00 C LCb setrgbcolor 649 | 1370 2397 M 650 | [ [(Helvetica) 120.0 0.0 true true 0 (Fresh)] 651 | ] -40.0 MRshow 652 | 1.000 UL 653 | LTb 654 | 1.00 0.65 0.00 C 1 1442 2362 207 71 BoxColFill 655 | LCb setrgbcolor 656 | 1442 2362 N 657 | 207 0 V 658 | 0 70 V 659 | -207 0 V 660 | 0 -70 V 661 | Z stroke 662 | 1.000 UL 663 | LTb 664 | 1.00 0.65 0.00 C 1 1002 671 116 1318 BoxColFill 665 | LCb setrgbcolor 666 | 1002 671 N 667 | 0 1317 V 668 | 115 0 V 669 | 0 -1317 V 670 | -115 0 V 671 | Z stroke 672 | 1.000 UL 673 | LTb 674 | 1.00 0.65 0.00 C 1 1460 671 115 1143 BoxColFill 675 | LCb setrgbcolor 676 | 1460 671 N 677 | 0 1142 V 678 | 114 0 V 679 | 0 -1142 V 680 | -114 0 V 681 | Z stroke 682 | 1.000 UL 683 | LTb 684 | 1.00 0.65 0.00 C 1 1917 671 116 1670 BoxColFill 685 | LCb setrgbcolor 686 | 1917 671 N 687 | 0 1669 V 688 | 115 0 V 689 | 0 -1669 V 690 | -115 0 V 691 | Z stroke 692 | 1.000 UL 693 | LTb 694 | 1.00 0.65 0.00 C 1 2375 671 115 1582 BoxColFill 695 | LCb setrgbcolor 696 | 2375 671 N 697 | 0 1581 V 698 | 114 0 V 699 | 0 -1581 V 700 | -114 0 V 701 | Z stroke 702 | 1.000 UL 703 | LTb 704 | 1.00 0.65 0.00 C 1 2832 671 116 1494 BoxColFill 705 | LCb setrgbcolor 706 | 2832 671 N 707 | 0 1493 V 708 | 115 0 V 709 | 0 -1493 V 710 | -115 0 V 711 | Z stroke 712 | 1.000 UL 713 | LTb 714 | 1.00 0.65 0.00 C % End plot #1 715 | % Begin plot #2 716 | 1.000 UL 717 | LTb 718 | 0.00 0.00 1.00 C LCb setrgbcolor 719 | 1370 2254 M 720 | [ [(Helvetica) 120.0 0.0 true true 0 (Overnight)] 721 | ] -40.0 MRshow 722 | 1.000 UL 723 | LTb 724 | 0.00 0.00 1.00 C 1442 2219 207 71 80 -45 1 PatternFill 725 | LCb setrgbcolor 726 | 1442 2219 N 727 | 207 0 V 728 | 0 70 V 729 | -207 0 V 730 | 0 -70 V 731 | Z stroke 732 | 1.000 UL 733 | LTb 734 | 0.00 0.00 1.00 C 1117 671 115 1143 80 -45 1 PatternFill 735 | LCb setrgbcolor 736 | 1117 671 N 737 | 0 1142 V 738 | 114 0 V 739 | 0 -1142 V 740 | -114 0 V 741 | Z stroke 742 | 1.000 UL 743 | LTb 744 | 0.00 0.00 1.00 C 1574 671 116 704 80 -45 1 PatternFill 745 | LCb setrgbcolor 746 | 1574 671 N 747 | 0 703 V 748 | 115 0 V 749 | 0 -703 V 750 | -115 0 V 751 | Z stroke 752 | 1.000 UL 753 | LTb 754 | 0.00 0.00 1.00 C 2032 671 115 1406 80 -45 1 PatternFill 755 | LCb setrgbcolor 756 | 2032 671 N 757 | 0 1405 V 758 | 114 0 V 759 | 0 -1405 V 760 | -114 0 V 761 | Z stroke 762 | 1.000 UL 763 | LTb 764 | 0.00 0.00 1.00 C 2489 671 116 1055 80 -45 1 PatternFill 765 | LCb setrgbcolor 766 | 2489 671 N 767 | 0 1054 V 768 | 115 0 V 769 | 0 -1054 V 770 | -115 0 V 771 | Z stroke 772 | 1.000 UL 773 | LTb 774 | 0.00 0.00 1.00 C 2947 671 115 1441 80 -45 1 PatternFill 775 | LCb setrgbcolor 776 | 2947 671 N 777 | 0 1440 V 778 | 114 0 V 779 | 0 -1440 V 780 | -114 0 V 781 | Z stroke 782 | 1.000 UL 783 | LTb 784 | 0.00 0.00 1.00 C % End plot #2 785 | 2.000 UL 786 | LTb 787 | LCb setrgbcolor 788 | 1.000 UL 789 | LTb 790 | LCb setrgbcolor 791 | 602 2603 N 792 | 602 671 L 793 | 2745 0 V 794 | 0 1932 V 795 | -2745 0 V 796 | Z stroke 797 | 1.000 UP 798 | 1.000 UL 799 | LTb 800 | LCb setrgbcolor 801 | stroke 802 | grestore 803 | end 804 | showpage 805 | %%Trailer 806 | %%DocumentFonts: Helvetica 807 | -------------------------------------------------------------------------------- /exp/ch-Rice/taste_with_meals.eps: -------------------------------------------------------------------------------- 1 | %!PS-Adobe-2.0 EPSF-2.0 2 | %%Title: taste_with_meals.eps 3 | %%Creator: gnuplot 5.0 patchlevel 0 4 | %%CreationDate: Thu Nov 30 23:15:15 2017 5 | %%DocumentFonts: (atend) 6 | %%BoundingBox: 50 50 230 188 7 | %%EndComments 8 | %%BeginProlog 9 | /gnudict 256 dict def 10 | gnudict begin 11 | % 12 | % The following true/false flags may be edited by hand if desired. 13 | % The unit line width and grayscale image gamma correction may also be changed. 14 | % 15 | /Color true def 16 | /Blacktext false def 17 | /Solid false def 18 | /Dashlength 1 def 19 | /Landscape false def 20 | /Level1 false def 21 | /Level3 false def 22 | /Rounded false def 23 | /ClipToBoundingBox false def 24 | /SuppressPDFMark false def 25 | /TransparentPatterns false def 26 | /gnulinewidth 5.000 def 27 | /userlinewidth gnulinewidth def 28 | /Gamma 1.0 def 29 | /BackgroundColor {-1.000 -1.000 -1.000} def 30 | % 31 | /vshift -46 def 32 | /dl1 { 33 | 10.0 Dashlength userlinewidth gnulinewidth div mul mul mul 34 | Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if 35 | } def 36 | /dl2 { 37 | 10.0 Dashlength userlinewidth gnulinewidth div mul mul mul 38 | Rounded { currentlinewidth 0.75 mul add } if 39 | } def 40 | /hpt_ 31.5 def 41 | /vpt_ 31.5 def 42 | /hpt hpt_ def 43 | /vpt vpt_ def 44 | /doclip { 45 | ClipToBoundingBox { 46 | newpath 50 50 moveto 230 50 lineto 230 188 lineto 50 188 lineto closepath 47 | clip 48 | } if 49 | } def 50 | % 51 | % Gnuplot Prolog Version 5.0 (Dec 2014) 52 | % 53 | %/SuppressPDFMark true def 54 | % 55 | /M {moveto} bind def 56 | /L {lineto} bind def 57 | /R {rmoveto} bind def 58 | /V {rlineto} bind def 59 | /N {newpath moveto} bind def 60 | /Z {closepath} bind def 61 | /C {setrgbcolor} bind def 62 | /f {rlineto fill} bind def 63 | /g {setgray} bind def 64 | /Gshow {show} def % May be redefined later in the file to support UTF-8 65 | /vpt2 vpt 2 mul def 66 | /hpt2 hpt 2 mul def 67 | /Lshow {currentpoint stroke M 0 vshift R 68 | Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def 69 | /Rshow {currentpoint stroke M dup stringwidth pop neg vshift R 70 | Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def 71 | /Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R 72 | Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def 73 | /UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def 74 | /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def 75 | /DL {Color {setrgbcolor Solid {pop []} if 0 setdash} 76 | {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def 77 | /BL {stroke userlinewidth 2 mul setlinewidth 78 | Rounded {1 setlinejoin 1 setlinecap} if} def 79 | /AL {stroke userlinewidth 2 div setlinewidth 80 | Rounded {1 setlinejoin 1 setlinecap} if} def 81 | /UL {dup gnulinewidth mul /userlinewidth exch def 82 | dup 1 lt {pop 1} if 10 mul /udl exch def} def 83 | /PL {stroke userlinewidth setlinewidth 84 | Rounded {1 setlinejoin 1 setlinecap} if} def 85 | 3.8 setmiterlimit 86 | % Classic Line colors (version 5.0) 87 | /LCw {1 1 1} def 88 | /LCb {0 0 0} def 89 | /LCa {0 0 0} def 90 | /LC0 {1 0 0} def 91 | /LC1 {0 1 0} def 92 | /LC2 {0 0 1} def 93 | /LC3 {1 0 1} def 94 | /LC4 {0 1 1} def 95 | /LC5 {1 1 0} def 96 | /LC6 {0 0 0} def 97 | /LC7 {1 0.3 0} def 98 | /LC8 {0.5 0.5 0.5} def 99 | % Default dash patterns (version 5.0) 100 | /LTw {PL [] 1 setgray} def 101 | /LTb {BL [] LCb DL} def 102 | /LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def 103 | /LT0 {PL [] LC0 DL} def 104 | /LT1 {PL [2 dl1 3 dl2] LC1 DL} def 105 | /LT2 {PL [1 dl1 1.5 dl2] LC2 DL} def 106 | /LT3 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC3 DL} def 107 | /LT4 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def 108 | /LT5 {PL [4 dl1 2 dl2] LC5 DL} def 109 | /LT6 {PL [1.5 dl1 1.5 dl2 1.5 dl1 1.5 dl2 1.5 dl1 6 dl2] LC6 DL} def 110 | /LT7 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC7 DL} def 111 | /LT8 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC8 DL} def 112 | /SL {[] 0 setdash} def 113 | /Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def 114 | /Dia {stroke [] 0 setdash 2 copy vpt add M 115 | hpt neg vpt neg V hpt vpt neg V 116 | hpt vpt V hpt neg vpt V closepath stroke 117 | Pnt} def 118 | /Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V 119 | currentpoint stroke M 120 | hpt neg vpt neg R hpt2 0 V stroke 121 | } def 122 | /Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M 123 | 0 vpt2 neg V hpt2 0 V 0 vpt2 V 124 | hpt2 neg 0 V closepath stroke 125 | Pnt} def 126 | /Crs {stroke [] 0 setdash exch hpt sub exch vpt add M 127 | hpt2 vpt2 neg V currentpoint stroke M 128 | hpt2 neg 0 R hpt2 vpt2 V stroke} def 129 | /TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M 130 | hpt neg vpt -1.62 mul V 131 | hpt 2 mul 0 V 132 | hpt neg vpt 1.62 mul V closepath stroke 133 | Pnt} def 134 | /Star {2 copy Pls Crs} def 135 | /BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M 136 | 0 vpt2 neg V hpt2 0 V 0 vpt2 V 137 | hpt2 neg 0 V closepath fill} def 138 | /TriUF {stroke [] 0 setdash vpt 1.12 mul add M 139 | hpt neg vpt -1.62 mul V 140 | hpt 2 mul 0 V 141 | hpt neg vpt 1.62 mul V closepath fill} def 142 | /TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M 143 | hpt neg vpt 1.62 mul V 144 | hpt 2 mul 0 V 145 | hpt neg vpt -1.62 mul V closepath stroke 146 | Pnt} def 147 | /TriDF {stroke [] 0 setdash vpt 1.12 mul sub M 148 | hpt neg vpt 1.62 mul V 149 | hpt 2 mul 0 V 150 | hpt neg vpt -1.62 mul V closepath fill} def 151 | /DiaF {stroke [] 0 setdash vpt add M 152 | hpt neg vpt neg V hpt vpt neg V 153 | hpt vpt V hpt neg vpt V closepath fill} def 154 | /Pent {stroke [] 0 setdash 2 copy gsave 155 | translate 0 hpt M 4 {72 rotate 0 hpt L} repeat 156 | closepath stroke grestore Pnt} def 157 | /PentF {stroke [] 0 setdash gsave 158 | translate 0 hpt M 4 {72 rotate 0 hpt L} repeat 159 | closepath fill grestore} def 160 | /Circle {stroke [] 0 setdash 2 copy 161 | hpt 0 360 arc stroke Pnt} def 162 | /CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def 163 | /C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def 164 | /C1 {BL [] 0 setdash 2 copy moveto 165 | 2 copy vpt 0 90 arc closepath fill 166 | vpt 0 360 arc closepath} bind def 167 | /C2 {BL [] 0 setdash 2 copy moveto 168 | 2 copy vpt 90 180 arc closepath fill 169 | vpt 0 360 arc closepath} bind def 170 | /C3 {BL [] 0 setdash 2 copy moveto 171 | 2 copy vpt 0 180 arc closepath fill 172 | vpt 0 360 arc closepath} bind def 173 | /C4 {BL [] 0 setdash 2 copy moveto 174 | 2 copy vpt 180 270 arc closepath fill 175 | vpt 0 360 arc closepath} bind def 176 | /C5 {BL [] 0 setdash 2 copy moveto 177 | 2 copy vpt 0 90 arc 178 | 2 copy moveto 179 | 2 copy vpt 180 270 arc closepath fill 180 | vpt 0 360 arc} bind def 181 | /C6 {BL [] 0 setdash 2 copy moveto 182 | 2 copy vpt 90 270 arc closepath fill 183 | vpt 0 360 arc closepath} bind def 184 | /C7 {BL [] 0 setdash 2 copy moveto 185 | 2 copy vpt 0 270 arc closepath fill 186 | vpt 0 360 arc closepath} bind def 187 | /C8 {BL [] 0 setdash 2 copy moveto 188 | 2 copy vpt 270 360 arc closepath fill 189 | vpt 0 360 arc closepath} bind def 190 | /C9 {BL [] 0 setdash 2 copy moveto 191 | 2 copy vpt 270 450 arc closepath fill 192 | vpt 0 360 arc closepath} bind def 193 | /C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill 194 | 2 copy moveto 195 | 2 copy vpt 90 180 arc closepath fill 196 | vpt 0 360 arc closepath} bind def 197 | /C11 {BL [] 0 setdash 2 copy moveto 198 | 2 copy vpt 0 180 arc closepath fill 199 | 2 copy moveto 200 | 2 copy vpt 270 360 arc closepath fill 201 | vpt 0 360 arc closepath} bind def 202 | /C12 {BL [] 0 setdash 2 copy moveto 203 | 2 copy vpt 180 360 arc closepath fill 204 | vpt 0 360 arc closepath} bind def 205 | /C13 {BL [] 0 setdash 2 copy moveto 206 | 2 copy vpt 0 90 arc closepath fill 207 | 2 copy moveto 208 | 2 copy vpt 180 360 arc closepath fill 209 | vpt 0 360 arc closepath} bind def 210 | /C14 {BL [] 0 setdash 2 copy moveto 211 | 2 copy vpt 90 360 arc closepath fill 212 | vpt 0 360 arc} bind def 213 | /C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill 214 | vpt 0 360 arc closepath} bind def 215 | /Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto 216 | neg 0 rlineto closepath} bind def 217 | /Square {dup Rec} bind def 218 | /Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def 219 | /S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def 220 | /S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def 221 | /S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def 222 | /S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def 223 | /S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def 224 | /S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill 225 | exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def 226 | /S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def 227 | /S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill 228 | 2 copy vpt Square fill Bsquare} bind def 229 | /S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def 230 | /S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def 231 | /S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill 232 | Bsquare} bind def 233 | /S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill 234 | Bsquare} bind def 235 | /S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def 236 | /S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill 237 | 2 copy vpt Square fill Bsquare} bind def 238 | /S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill 239 | 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def 240 | /S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def 241 | /D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def 242 | /D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def 243 | /D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def 244 | /D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def 245 | /D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def 246 | /D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def 247 | /D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def 248 | /D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def 249 | /D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def 250 | /D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def 251 | /D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def 252 | /D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def 253 | /D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def 254 | /D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def 255 | /D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def 256 | /D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def 257 | /DiaE {stroke [] 0 setdash vpt add M 258 | hpt neg vpt neg V hpt vpt neg V 259 | hpt vpt V hpt neg vpt V closepath stroke} def 260 | /BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M 261 | 0 vpt2 neg V hpt2 0 V 0 vpt2 V 262 | hpt2 neg 0 V closepath stroke} def 263 | /TriUE {stroke [] 0 setdash vpt 1.12 mul add M 264 | hpt neg vpt -1.62 mul V 265 | hpt 2 mul 0 V 266 | hpt neg vpt 1.62 mul V closepath stroke} def 267 | /TriDE {stroke [] 0 setdash vpt 1.12 mul sub M 268 | hpt neg vpt 1.62 mul V 269 | hpt 2 mul 0 V 270 | hpt neg vpt -1.62 mul V closepath stroke} def 271 | /PentE {stroke [] 0 setdash gsave 272 | translate 0 hpt M 4 {72 rotate 0 hpt L} repeat 273 | closepath stroke grestore} def 274 | /CircE {stroke [] 0 setdash 275 | hpt 0 360 arc stroke} def 276 | /Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def 277 | /DiaW {stroke [] 0 setdash vpt add M 278 | hpt neg vpt neg V hpt vpt neg V 279 | hpt vpt V hpt neg vpt V Opaque stroke} def 280 | /BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M 281 | 0 vpt2 neg V hpt2 0 V 0 vpt2 V 282 | hpt2 neg 0 V Opaque stroke} def 283 | /TriUW {stroke [] 0 setdash vpt 1.12 mul add M 284 | hpt neg vpt -1.62 mul V 285 | hpt 2 mul 0 V 286 | hpt neg vpt 1.62 mul V Opaque stroke} def 287 | /TriDW {stroke [] 0 setdash vpt 1.12 mul sub M 288 | hpt neg vpt 1.62 mul V 289 | hpt 2 mul 0 V 290 | hpt neg vpt -1.62 mul V Opaque stroke} def 291 | /PentW {stroke [] 0 setdash gsave 292 | translate 0 hpt M 4 {72 rotate 0 hpt L} repeat 293 | Opaque stroke grestore} def 294 | /CircW {stroke [] 0 setdash 295 | hpt 0 360 arc Opaque stroke} def 296 | /BoxFill {gsave Rec 1 setgray fill grestore} def 297 | /Density { 298 | /Fillden exch def 299 | currentrgbcolor 300 | /ColB exch def /ColG exch def /ColR exch def 301 | /ColR ColR Fillden mul Fillden sub 1 add def 302 | /ColG ColG Fillden mul Fillden sub 1 add def 303 | /ColB ColB Fillden mul Fillden sub 1 add def 304 | ColR ColG ColB setrgbcolor} def 305 | /BoxColFill {gsave Rec PolyFill} def 306 | /PolyFill {gsave Density fill grestore grestore} def 307 | /h {rlineto rlineto rlineto gsave closepath fill grestore} bind def 308 | % 309 | % PostScript Level 1 Pattern Fill routine for rectangles 310 | % Usage: x y w h s a XX PatternFill 311 | % x,y = lower left corner of box to be filled 312 | % w,h = width and height of box 313 | % a = angle in degrees between lines and x-axis 314 | % XX = 0/1 for no/yes cross-hatch 315 | % 316 | /PatternFill {gsave /PFa [ 9 2 roll ] def 317 | PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate 318 | PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec 319 | TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse 320 | clip 321 | currentlinewidth 0.5 mul setlinewidth 322 | /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def 323 | 0 0 M PFa 5 get rotate PFs -2 div dup translate 324 | 0 1 PFs PFa 4 get div 1 add floor cvi 325 | {PFa 4 get mul 0 M 0 PFs V} for 326 | 0 PFa 6 get ne { 327 | 0 1 PFs PFa 4 get div 1 add floor cvi 328 | {PFa 4 get mul 0 2 1 roll M PFs 0 V} for 329 | } if 330 | stroke grestore} def 331 | % 332 | /languagelevel where 333 | {pop languagelevel} {1} ifelse 334 | dup 2 lt 335 | {/InterpretLevel1 true def 336 | /InterpretLevel3 false def} 337 | {/InterpretLevel1 Level1 def 338 | 2 gt 339 | {/InterpretLevel3 Level3 def} 340 | {/InterpretLevel3 false def} 341 | ifelse } 342 | ifelse 343 | % 344 | % PostScript level 2 pattern fill definitions 345 | % 346 | /Level2PatternFill { 347 | /Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} 348 | bind def 349 | /KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def 350 | << Tile8x8 351 | /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} 352 | >> matrix makepattern 353 | /Pat1 exch def 354 | << Tile8x8 355 | /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke 356 | 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} 357 | >> matrix makepattern 358 | /Pat2 exch def 359 | << Tile8x8 360 | /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L 361 | 8 8 L 8 0 L 0 0 L fill} 362 | >> matrix makepattern 363 | /Pat3 exch def 364 | << Tile8x8 365 | /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L 366 | 0 12 M 12 0 L stroke} 367 | >> matrix makepattern 368 | /Pat4 exch def 369 | << Tile8x8 370 | /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L 371 | 0 -4 M 12 8 L stroke} 372 | >> matrix makepattern 373 | /Pat5 exch def 374 | << Tile8x8 375 | /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L 376 | 0 12 M 8 -4 L 4 12 M 10 0 L stroke} 377 | >> matrix makepattern 378 | /Pat6 exch def 379 | << Tile8x8 380 | /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L 381 | 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} 382 | >> matrix makepattern 383 | /Pat7 exch def 384 | << Tile8x8 385 | /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L 386 | 12 0 M -4 8 L 12 4 M 0 10 L stroke} 387 | >> matrix makepattern 388 | /Pat8 exch def 389 | << Tile8x8 390 | /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L 391 | -4 0 M 12 8 L -4 4 M 8 10 L stroke} 392 | >> matrix makepattern 393 | /Pat9 exch def 394 | /Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def 395 | /Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def 396 | /Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def 397 | /Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def 398 | /Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def 399 | /Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def 400 | /Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def 401 | } def 402 | % 403 | % 404 | %End of PostScript Level 2 code 405 | % 406 | /PatternBgnd { 407 | TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse 408 | } def 409 | % 410 | % Substitute for Level 2 pattern fill codes with 411 | % grayscale if Level 2 support is not selected. 412 | % 413 | /Level1PatternFill { 414 | /Pattern1 {0.250 Density} bind def 415 | /Pattern2 {0.500 Density} bind def 416 | /Pattern3 {0.750 Density} bind def 417 | /Pattern4 {0.125 Density} bind def 418 | /Pattern5 {0.375 Density} bind def 419 | /Pattern6 {0.625 Density} bind def 420 | /Pattern7 {0.875 Density} bind def 421 | } def 422 | % 423 | % Now test for support of Level 2 code 424 | % 425 | Level1 {Level1PatternFill} {Level2PatternFill} ifelse 426 | % 427 | /Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont 428 | dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall 429 | currentdict end definefont pop 430 | % 431 | /MFshow { 432 | { dup 5 get 3 ge 433 | { 5 get 3 eq {gsave} {grestore} ifelse } 434 | {dup dup 0 get findfont exch 1 get scalefont setfont 435 | [ currentpoint ] exch dup 2 get 0 exch R dup 5 get 2 ne {dup dup 6 436 | get exch 4 get {textshow} {stringwidth pop 0 R} ifelse }if dup 5 get 0 eq 437 | {dup 3 get {2 get neg 0 exch R pop} {pop aload pop M} ifelse} {dup 5 438 | get 1 eq {dup 2 get exch dup 3 get exch 6 get stringwidth pop -2 div 439 | dup 0 R} {dup 6 get stringwidth pop -2 div 0 R 6 get 440 | textshow 2 index {aload pop M neg 3 -1 roll neg R pop pop} {pop pop pop 441 | pop aload pop M} ifelse }ifelse }ifelse } 442 | ifelse } 443 | forall} def 444 | /Gswidth {dup type /stringtype eq {stringwidth} {pop (n) stringwidth} ifelse} def 445 | /MFwidth {0 exch { dup 5 get 3 ge { 5 get 3 eq { 0 } { pop } ifelse } 446 | {dup 3 get{dup dup 0 get findfont exch 1 get scalefont setfont 447 | 6 get Gswidth pop add} {pop} ifelse} ifelse} forall} def 448 | /MLshow { currentpoint stroke M 449 | 0 exch R 450 | Blacktext {gsave 0 setgray MFshow grestore} {MFshow} ifelse } bind def 451 | /MRshow { currentpoint stroke M 452 | exch dup MFwidth neg 3 -1 roll R 453 | Blacktext {gsave 0 setgray MFshow grestore} {MFshow} ifelse } bind def 454 | /MCshow { currentpoint stroke M 455 | exch dup MFwidth -2 div 3 -1 roll R 456 | Blacktext {gsave 0 setgray MFshow grestore} {MFshow} ifelse } bind def 457 | /XYsave { [( ) 1 2 true false 3 ()] } bind def 458 | /XYrestore { [( ) 1 2 true false 4 ()] } bind def 459 | Level1 SuppressPDFMark or 460 | {} { 461 | /SDict 10 dict def 462 | systemdict /pdfmark known not { 463 | userdict /pdfmark systemdict /cleartomark get put 464 | } if 465 | SDict begin [ 466 | /Title (taste_with_meals.eps) 467 | /Subject (gnuplot plot) 468 | /Creator (gnuplot 5.0 patchlevel 0) 469 | /Author (a0095805) 470 | % /Producer (gnuplot) 471 | % /Keywords () 472 | /CreationDate (Thu Nov 30 23:15:15 2017) 473 | /DOCINFO pdfmark 474 | end 475 | } ifelse 476 | end 477 | % 478 | % Support for boxed text - Ethan A Merritt May 2005 479 | % 480 | /InitTextBox { userdict /TBy2 3 -1 roll put userdict /TBx2 3 -1 roll put 481 | userdict /TBy1 3 -1 roll put userdict /TBx1 3 -1 roll put 482 | /Boxing true def } def 483 | /ExtendTextBox { Boxing 484 | { gsave dup false charpath pathbbox 485 | dup TBy2 gt {userdict /TBy2 3 -1 roll put} {pop} ifelse 486 | dup TBx2 gt {userdict /TBx2 3 -1 roll put} {pop} ifelse 487 | dup TBy1 lt {userdict /TBy1 3 -1 roll put} {pop} ifelse 488 | dup TBx1 lt {userdict /TBx1 3 -1 roll put} {pop} ifelse 489 | grestore } if } def 490 | /PopTextBox { newpath TBx1 TBxmargin sub TBy1 TBymargin sub M 491 | TBx1 TBxmargin sub TBy2 TBymargin add L 492 | TBx2 TBxmargin add TBy2 TBymargin add L 493 | TBx2 TBxmargin add TBy1 TBymargin sub L closepath } def 494 | /DrawTextBox { PopTextBox stroke /Boxing false def} def 495 | /FillTextBox { gsave PopTextBox 1 1 1 setrgbcolor fill grestore /Boxing false def} def 496 | 0 0 0 0 InitTextBox 497 | /TBxmargin 20 def 498 | /TBymargin 20 def 499 | /Boxing false def 500 | /textshow { ExtendTextBox Gshow } def 501 | % 502 | %%EndProlog 503 | %%Page: 1 1 504 | gnudict begin 505 | gsave 506 | doclip 507 | 50 50 translate 508 | 0.050 0.050 scale 509 | 0 setgray 510 | newpath 511 | (Helvetica) findfont 140 scalefont setfont 512 | BackgroundColor 0 lt 3 1 roll 0 lt exch 0 lt or or not {BackgroundColor C 1.000 0 0 3600.00 2772.00 BoxColFill} if 513 | 1.000 UL 514 | LTb 515 | LCb setrgbcolor 516 | 602 448 M 517 | 63 0 V 518 | stroke 519 | 518 448 M 520 | [ [(Helvetica) 140.0 0.0 true true 0 ( 0)] 521 | ] -46.7 MRshow 522 | 1.000 UL 523 | LTb 524 | LCb setrgbcolor 525 | 602 840 M 526 | 63 0 V 527 | stroke 528 | 518 840 M 529 | [ [(Helvetica) 140.0 0.0 true true 0 ( 20)] 530 | ] -46.7 MRshow 531 | 1.000 UL 532 | LTb 533 | LCb setrgbcolor 534 | 602 1232 M 535 | 63 0 V 536 | stroke 537 | 518 1232 M 538 | [ [(Helvetica) 140.0 0.0 true true 0 ( 40)] 539 | ] -46.7 MRshow 540 | 1.000 UL 541 | LTb 542 | LCb setrgbcolor 543 | 602 1623 M 544 | 63 0 V 545 | stroke 546 | 518 1623 M 547 | [ [(Helvetica) 140.0 0.0 true true 0 ( 60)] 548 | ] -46.7 MRshow 549 | 1.000 UL 550 | LTb 551 | LCb setrgbcolor 552 | 602 2015 M 553 | 63 0 V 554 | stroke 555 | 518 2015 M 556 | [ [(Helvetica) 140.0 0.0 true true 0 ( 80)] 557 | ] -46.7 MRshow 558 | 1.000 UL 559 | LTb 560 | LCb setrgbcolor 561 | 602 2407 M 562 | 63 0 V 563 | stroke 564 | 518 2407 M 565 | [ [(Helvetica) 140.0 0.0 true true 0 ( 100)] 566 | ] -46.7 MRshow 567 | 1.000 UL 568 | LTb 569 | LCb setrgbcolor 570 | 945 448 M 571 | 0 63 V 572 | stroke 573 | 945 308 M 574 | [ [(Helvetica) 140.0 0.0 true true 0 (1)] 575 | ] -46.7 MCshow 576 | 1.000 UL 577 | LTb 578 | LCb setrgbcolor 579 | 1288 448 M 580 | 0 63 V 581 | stroke 582 | 1288 308 M 583 | [ [(Helvetica) 140.0 0.0 true true 0 (2)] 584 | ] -46.7 MCshow 585 | 1.000 UL 586 | LTb 587 | LCb setrgbcolor 588 | 1631 448 M 589 | 0 63 V 590 | stroke 591 | 1631 308 M 592 | [ [(Helvetica) 140.0 0.0 true true 0 (3)] 593 | ] -46.7 MCshow 594 | 1.000 UL 595 | LTb 596 | LCb setrgbcolor 597 | 1975 448 M 598 | 0 63 V 599 | stroke 600 | 1975 308 M 601 | [ [(Helvetica) 140.0 0.0 true true 0 (4)] 602 | ] -46.7 MCshow 603 | 1.000 UL 604 | LTb 605 | LCb setrgbcolor 606 | 2318 448 M 607 | 0 63 V 608 | stroke 609 | 2318 308 M 610 | [ [(Helvetica) 140.0 0.0 true true 0 (5)] 611 | ] -46.7 MCshow 612 | 1.000 UL 613 | LTb 614 | LCb setrgbcolor 615 | 2661 448 M 616 | 0 63 V 617 | stroke 618 | 2661 308 M 619 | [ [(Helvetica) 140.0 0.0 true true 0 (6)] 620 | ] -46.7 MCshow 621 | 1.000 UL 622 | LTb 623 | LCb setrgbcolor 624 | 3004 448 M 625 | 0 63 V 626 | stroke 627 | 3004 308 M 628 | [ [(Helvetica) 140.0 0.0 true true 0 (7)] 629 | ] -46.7 MCshow 630 | 1.000 UL 631 | LTb 632 | LCb setrgbcolor 633 | 1.000 UL 634 | LTb 635 | LCb setrgbcolor 636 | 602 2603 N 637 | 602 448 L 638 | 2745 0 V 639 | 0 2155 V 640 | -2745 0 V 641 | Z stroke 642 | 1.000 UP 643 | 1.000 UL 644 | LTb 645 | LCb setrgbcolor 646 | LCb setrgbcolor 647 | 112 1525 M 648 | currentpoint gsave translate -270 rotate 0 0 moveto 649 | [ [(Helvetica) 140.0 0.0 true true 0 (Delicious Score)] 650 | ] -46.7 MCshow 651 | grestore 652 | LTb 653 | LCb setrgbcolor 654 | 1974 98 M 655 | [ [(Helvetica) 140.0 0.0 true true 0 (# of Meals)] 656 | ] -46.7 MCshow 657 | LTb 658 | % Begin plot #1 659 | 1.000 UP 660 | 1.500 UL 661 | LTb 662 | 1.00 0.00 0.00 C LCb setrgbcolor 663 | 2840 2422 M 664 | [ [(Helvetica) 120.0 0.0 true true 0 (White)] 665 | ] -40.0 MRshow 666 | 1.000 UP 667 | 1.500 UL 668 | LTb 669 | 1.00 0.00 0.00 C 2912 2422 M 670 | 279 0 V 671 | 945 1917 M 672 | 343 -294 V 673 | 343 -293 V 674 | 344 -98 V 675 | 2318 938 L 676 | 343 -98 V 677 | 343 -98 V 678 | 945 1917 Box 679 | 1288 1623 Box 680 | 1631 1330 Box 681 | 1975 1232 Box 682 | 2318 938 Box 683 | 2661 840 Box 684 | 3004 742 Box 685 | 3051 2422 Box 686 | % End plot #1 687 | % Begin plot #2 688 | 1.000 UP 689 | 1.500 UL 690 | LTb 691 | 1.00 0.65 0.00 C LCb setrgbcolor 692 | 2840 2265 M 693 | [ [(Helvetica) 120.0 0.0 true true 0 (Brown)] 694 | ] -40.0 MRshow 695 | 1.000 UP 696 | 1.500 UL 697 | LTb 698 | 1.00 0.65 0.00 C 2912 2265 M 699 | 279 0 V 700 | 945 1721 M 701 | 343 -587 V 702 | 1631 938 L 703 | 344 -98 V 704 | 343 -98 V 705 | 343 -98 V 706 | 343 -39 V 707 | 945 1721 Circle 708 | 1288 1134 Circle 709 | 1631 938 Circle 710 | 1975 840 Circle 711 | 2318 742 Circle 712 | 2661 644 Circle 713 | 3004 605 Circle 714 | 3051 2265 Circle 715 | % End plot #2 716 | % Begin plot #3 717 | 1.200 UP 718 | 1.500 UL 719 | LTb 720 | 0.00 1.00 0.00 C LCb setrgbcolor 721 | 2840 2108 M 722 | [ [(Helvetica) 120.0 0.0 true true 0 (Chicken)] 723 | ] -40.0 MRshow 724 | 1.200 UP 725 | 1.500 UL 726 | LTb 727 | 0.00 1.00 0.00 C 2912 2108 M 728 | 279 0 V 729 | 945 2309 M 730 | 343 -98 V 731 | 343 -98 V 732 | 344 -98 V 733 | 343 -294 V 734 | 343 -196 V 735 | 343 -293 V 736 | 945 2309 TriU 737 | 1288 2211 TriU 738 | 1631 2113 TriU 739 | 1975 2015 TriU 740 | 2318 1721 TriU 741 | 2661 1525 TriU 742 | 3004 1232 TriU 743 | 3051 2108 TriU 744 | % End plot #3 745 | % Begin plot #4 746 | 1.000 UP 747 | 1.500 UL 748 | LTb 749 | 0.00 0.00 1.00 C LCb setrgbcolor 750 | 2840 1951 M 751 | [ [(Helvetica) 120.0 0.0 true true 0 (Duck)] 752 | ] -40.0 MRshow 753 | 1.000 UP 754 | 1.500 UL 755 | LTb 756 | 0.00 0.00 1.00 C 2912 1951 M 757 | 279 0 V 758 | 945 2211 M 759 | 343 -196 V 760 | 343 -196 V 761 | 344 -196 V 762 | 343 -195 V 763 | 343 -196 V 764 | 343 -196 V 765 | 945 2211 Crs 766 | 1288 2015 Crs 767 | 1631 1819 Crs 768 | 1975 1623 Crs 769 | 2318 1428 Crs 770 | 2661 1232 Crs 771 | 3004 1036 Crs 772 | 3051 1951 Crs 773 | % End plot #4 774 | % Begin plot #5 775 | 1.200 UP 776 | 1.500 UL 777 | LTb 778 | 0.93 0.51 0.93 C LCb setrgbcolor 779 | 2840 1794 M 780 | [ [(Helvetica) 120.0 0.0 true true 0 (Fried)] 781 | ] -40.0 MRshow 782 | 1.200 UP 783 | 1.500 UL 784 | LTb 785 | 0.93 0.51 0.93 C 2912 1794 M 786 | 279 0 V 787 | 945 2113 M 788 | 343 -294 V 789 | 343 -98 V 790 | 344 -196 V 791 | 343 -195 V 792 | 343 -294 V 793 | 343 -98 V 794 | 945 2113 Pent 795 | 1288 1819 Pent 796 | 1631 1721 Pent 797 | 1975 1525 Pent 798 | 2318 1330 Pent 799 | 2661 1036 Pent 800 | 3004 938 Pent 801 | 3051 1794 Pent 802 | % End plot #5 803 | 2.000 UL 804 | LTb 805 | LCb setrgbcolor 806 | 1.000 UL 807 | LTb 808 | LCb setrgbcolor 809 | 602 2603 N 810 | 602 448 L 811 | 2745 0 V 812 | 0 2155 V 813 | -2745 0 V 814 | Z stroke 815 | 1.000 UP 816 | 1.000 UL 817 | LTb 818 | LCb setrgbcolor 819 | stroke 820 | grestore 821 | end 822 | showpage 823 | %%Trailer 824 | %%DocumentFonts: Helvetica 825 | --------------------------------------------------------------------------------