Skip to content

Commit

Permalink
Reorganize code
Browse files Browse the repository at this point in the history
- Enhance Makefile to use rubber when available
- Add Makefile to each subdirectory for easy build
- Move packages from Rulebook.tex to setup/packages.tex
- Move package configuratiion from Rulebook.tex to setup/config.tex
- Move page styling from Rulebook.tex to setup/styling.tex
  • Loading branch information
kyordhel committed Jan 8, 2019
1 parent 102edb4 commit 20bc7c2
Show file tree
Hide file tree
Showing 13 changed files with 527 additions and 76 deletions.
10 changes: 9 additions & 1 deletion Makefile
Expand Up @@ -99,6 +99,7 @@ RMF = rm -f
RMRF = rm -rf
DBG = echo
MSG = echo
HASRUBBER=$(shell which rubber)

## COLORS #################

Expand Down Expand Up @@ -141,7 +142,14 @@ ERROR = $(RED)
## R U L E S ##
## #################################### ##

all: dofullpdf wall mauClean
all:
ifndef HASRUBBER
$(SILENT) $(MAKE) dofullpdf
else
$(SILENT) $(MAKE) mauBuild
endif
$(SILENT) $(MAKE) wall
$(SILENT) $(MAKE) mauClean
# all: mauCleanAll mauBuild mauClean

## ##################### ##
Expand Down
81 changes: 6 additions & 75 deletions Rulebook.tex
Expand Up @@ -10,41 +10,9 @@

%%% PACKAGES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\input{./setup/packages.tex}
\usepackage[titletoc]{appendix}
\usepackage{enumitem}
\usepackage{mathtools}
\usepackage{gensymb}
\setlist{noitemsep}

%%% SubfigureSetup %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\renewcommand{\subfigtopskip}{5pt} % default is 10pt
%\renewcommand{\subfigbottomskip}{5pt} % default is 10pt
%\renewcommand{\subfigcapskip}{3pt} % default is 10pt
%\renewcommand{\subfigcapmargin}{7pt} % default is 10pt

%%% TweakList-Setup %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand{\itemhook}{% % modify itemize-spacing
\setlength{\topsep}{2pt}%
\setlength{\partopsep}{1pt}%
\setlength{\itemsep}{-1pt}%
}
\renewcommand{\enumhook}{% % modify enumerate-spacing
\setlength{\topsep}{2pt}%
\setlength{\partopsep}{1pt}%
\setlength{\itemsep}{-1pt}%
}
\renewcommand{\descripthook}{% % modify description-spacing
\setlength{\topsep}{2pt}%
\setlength{\partopsep}{1pt}%
\setlength{\itemsep}{-1pt}%
}

\setkomafont{title}{\normalfont}
\setkomafont{sectioning}{\normalfont\bfseries}
\addtokomafont{caption}{\small}
\setkomafont{captionlabel}{\small\bfseries}
\setkomafont{descriptionlabel}{\normalfont\bfseries}
\renewcommand*{\chapterformat}{\LARGE{Chapter \thechapter}}
\input{./setup/config.tex}
\input{./setup/styling.tex}


%%% MACROS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\input{./setup/active_version.tex}
Expand All @@ -57,51 +25,14 @@
\makeindex % generate index
\makeabbex % generate abbreviations

%%% DOCUMENTINFO %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\hypersetup{
pdftitle = {RoboCup@Home Rules and Regulations},
pdfsubject = {RoboCup@Home Rulebook},
pdfauthor = {RoboCup@Home Technical Committee},
pdfkeywords = {RoboCup, @Home, Rules, Competition},
colorlinks = true,
anchorcolor = blue,
linkcolor = blue,
urlcolor = blue,
}

%%% HEADINGS & PAGE STYLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\footline}{RoboCup@Home Rulebook / \rulebookVersion}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{\chaptername\ \thechapter. \ #1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection \ #1}{}\renewcommand{\currentTest}{#1}}
\fancyhf{}
\fancyhead[LE,RO]{\thepage}
\fancyhead[RE]{\sffamily\rightmark}
\fancyhead[LO]{\sffamily\leftmark}
\fancyfoot[C]{\scriptsize \sffamily \footline{}}
\fancypagestyle{plain}{
\fancyhf{}
\fancyhead[LE,RO]{\thepage}
\fancyhead[RE]{\sffamily\rightmark}
\fancyhead[LO]{\sffamily\leftmark}
\fancyfoot[C]{\scriptsize \sffamily \footline{}}
\renewcommand{\headrulewidth}{0.5 pt}
}
\fancypagestyle{empty}{
\fancyhf{}
\fancyhead{}
\fancyfoot[C]{\scriptsize \sffamily \footline{}}
\renewcommand{\headrulewidth}{0 pt}
}




%\newcommand{\sectionbreak}{\clearpage}
%\newcommand{\subsectionbreak}{\clearpage}


%%%%%%%%%%%%%%%%%%%\renewcommand{%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\input{./pages/titlepage}
Expand Down
53 changes: 53 additions & 0 deletions general_rules/Makefile
@@ -0,0 +1,53 @@
SILENT = @

all:
$(SILENT) make -C ..


dofullpdf:
$(SILENT) make dofullpdf -C ..

dopdflatex:
$(SILENT) make dopdflatex -C ..

dopdf2ps:
$(SILENT) make dopdf2ps -C ..

dobibtex:
$(SILENT) make dobibtex -C ..

domakeidx:
$(SILENT) make domakeidx -C ..

domakeadx:
$(SILENT) make domakeadx -C ..

wall:
$(SILENT) make wall: -C ..

warntex:
$(SILENT) make warntex -C ..

warn2do:
$(SILENT) make warn2do -C ..

warnspell:
$(SILENT) make warnspell -C ..

summary:
$(SILENT) make summary -C ..

clean:
$(SILENT) make clean -C ..

dirk:
$(SILENT) make dirk -C ..

mauBuild:
$(SILENT) make mauBuild -C ..

mauClean:
$(SILENT) make mauClean -C ..

mauCleanAll:
$(SILENT) make mauCleanAll -C ..
53 changes: 53 additions & 0 deletions introduction/Makefile
@@ -0,0 +1,53 @@
SILENT = @

all:
$(SILENT) make -C ..


dofullpdf:
$(SILENT) make dofullpdf -C ..

dopdflatex:
$(SILENT) make dopdflatex -C ..

dopdf2ps:
$(SILENT) make dopdf2ps -C ..

dobibtex:
$(SILENT) make dobibtex -C ..

domakeidx:
$(SILENT) make domakeidx -C ..

domakeadx:
$(SILENT) make domakeadx -C ..

wall:
$(SILENT) make wall: -C ..

warntex:
$(SILENT) make warntex -C ..

warn2do:
$(SILENT) make warn2do -C ..

warnspell:
$(SILENT) make warnspell -C ..

summary:
$(SILENT) make summary -C ..

clean:
$(SILENT) make clean -C ..

dirk:
$(SILENT) make dirk -C ..

mauBuild:
$(SILENT) make mauBuild -C ..

mauClean:
$(SILENT) make mauClean -C ..

mauCleanAll:
$(SILENT) make mauCleanAll -C ..
53 changes: 53 additions & 0 deletions pages/Makefile
@@ -0,0 +1,53 @@
SILENT = @

all:
$(SILENT) make -C ..


dofullpdf:
$(SILENT) make dofullpdf -C ..

dopdflatex:
$(SILENT) make dopdflatex -C ..

dopdf2ps:
$(SILENT) make dopdf2ps -C ..

dobibtex:
$(SILENT) make dobibtex -C ..

domakeidx:
$(SILENT) make domakeidx -C ..

domakeadx:
$(SILENT) make domakeadx -C ..

wall:
$(SILENT) make wall: -C ..

warntex:
$(SILENT) make warntex -C ..

warn2do:
$(SILENT) make warn2do -C ..

warnspell:
$(SILENT) make warnspell -C ..

summary:
$(SILENT) make summary -C ..

clean:
$(SILENT) make clean -C ..

dirk:
$(SILENT) make dirk -C ..

mauBuild:
$(SILENT) make mauBuild -C ..

mauClean:
$(SILENT) make mauClean -C ..

mauCleanAll:
$(SILENT) make mauCleanAll -C ..
53 changes: 53 additions & 0 deletions scoresheets/Makefile
@@ -0,0 +1,53 @@
SILENT = @

all:
$(SILENT) make -C ..


dofullpdf:
$(SILENT) make dofullpdf -C ..

dopdflatex:
$(SILENT) make dopdflatex -C ..

dopdf2ps:
$(SILENT) make dopdf2ps -C ..

dobibtex:
$(SILENT) make dobibtex -C ..

domakeidx:
$(SILENT) make domakeidx -C ..

domakeadx:
$(SILENT) make domakeadx -C ..

wall:
$(SILENT) make wall: -C ..

warntex:
$(SILENT) make warntex -C ..

warn2do:
$(SILENT) make warn2do -C ..

warnspell:
$(SILENT) make warnspell -C ..

summary:
$(SILENT) make summary -C ..

clean:
$(SILENT) make clean -C ..

dirk:
$(SILENT) make dirk -C ..

mauBuild:
$(SILENT) make mauBuild -C ..

mauClean:
$(SILENT) make mauClean -C ..

mauCleanAll:
$(SILENT) make mauCleanAll -C ..
53 changes: 53 additions & 0 deletions setup/Makefile
@@ -0,0 +1,53 @@
SILENT = @

all:
$(SILENT) make -C ..


dofullpdf:
$(SILENT) make dofullpdf -C ..

dopdflatex:
$(SILENT) make dopdflatex -C ..

dopdf2ps:
$(SILENT) make dopdf2ps -C ..

dobibtex:
$(SILENT) make dobibtex -C ..

domakeidx:
$(SILENT) make domakeidx -C ..

domakeadx:
$(SILENT) make domakeadx -C ..

wall:
$(SILENT) make wall: -C ..

warntex:
$(SILENT) make warntex -C ..

warn2do:
$(SILENT) make warn2do -C ..

warnspell:
$(SILENT) make warnspell -C ..

summary:
$(SILENT) make summary -C ..

clean:
$(SILENT) make clean -C ..

dirk:
$(SILENT) make dirk -C ..

mauBuild:
$(SILENT) make mauBuild -C ..

mauClean:
$(SILENT) make mauClean -C ..

mauCleanAll:
$(SILENT) make mauCleanAll -C ..

0 comments on commit 20bc7c2

Please sign in to comment.