Skip to content

Commit

Permalink
Merge pull request #1 from gpontesss/fix-chapter-images-positioning
Browse files Browse the repository at this point in the history
fix chapter images positioning
  • Loading branch information
gpontesss authored Mar 15, 2023
2 parents e6040fc + 530bccc commit cd44618
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- uses: teatimeguest/setup-texlive-action@v2
- name: install xelatex and dependencies
run: |
sudo apt-get install inkscape texlive-xetex texlive-lang-portuguese latexmk
sudo apt-get install inkscape texlive-xetex texlive-lang-portuguese
- name: install project fonts
run: |
./scripts/install-font.sh "Gentium Book Plus" "EB Garamond"
Expand Down
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
OUTDIR = out
TEX = latexmk
TEXARGS = -output-directory=$(OUTDIR) -shell-escape -xelatex
TEX = xelatex
TEXARGS = -output-directory=$(OUTDIR) -shell-escape
DEPS = $(wildcard *.tex blocks/*.tex)

.PHONY: all
all: $(OUTDIR)/main.pdf

$(OUTDIR)/%.pdf: %.tex $(DEPS) | $(OUTDIR)
@$(TEX) $(TEXARGS) $<
# runs twice, to aways ensure TOC is properly generated
@$(TEX) $(TEXARGS) $< -o $@
@$(TEX) $(TEXARGS) $< -o $@

$(OUTDIR):
@mkdir -p $@
Expand Down
8 changes: 3 additions & 5 deletions blocks/akathist-sweetest-lord-jesus-christ.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

\begin{document}

\cleardoubleevenpage{}
\pagestyle{empty}
\includesvg[width=\textwidth]{icons/transfiguration}
\chapter{Acatiste ao Nosso Dulcíssimo Senhor Jesus Cristo}
\pagestyle{headings}
\begin{chapterimg}[width=\textwidth]{icons/transfiguration}
\chapter{Acatiste ao Nosso Dulcíssimo Senhor Jesus Cristo}
\end{chapterimg}

\section*{Kontákion 1}

Expand Down
8 changes: 3 additions & 5 deletions blocks/akathist-theotokos.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

\begin{document}

\cleardoubleevenpage{}
\pagestyle{empty}
\includesvg[width=\textwidth]{icons/platytera}
\chapter{Acatiste à Mãe de Deus}
\pagestyle{headings}
\begin{chapterimg}[width=\textwidth]{icons/platytera}
\chapter{Acatiste à Mãe de Deus}
\end{chapterimg}

\section*{Kontákion 1, tom 8}

Expand Down
8 changes: 3 additions & 5 deletions blocks/canon-guardian-angel.tex
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
\documentclass{subfiles}
\begin{document}

\cleardoubleevenpage{}
\pagestyle{empty}
\includesvg[width=\textwidth]{icons/st-michael}
\chapter{Cânone ao Anjo Guardião}
\pagestyle{headings}
\begin{chapterimg}[width=.9\textwidth]{icons/st-michael}
\chapter{Cânone ao Anjo Guardião}
\end{chapterimg}

\section*{Tropário, Tom 6}

Expand Down
7 changes: 3 additions & 4 deletions blocks/matins.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

\begin{document}

\pagestyle{empty}
{\centering\includesvg[height=\textheight]{icons/tree-of-life-cross}}
\Chapter{Orações Matinais}{}
\pagestyle{headings}
\begin{chapterimg}[height=.9\textheight]{icons/tree-of-life-cross}
\Chapter{Orações Matinais}{}
\end{chapterimg}

\dotextit{%
Tendo despertado do sono, antes de qualquer outra ação, levante-se
Expand Down
7 changes: 3 additions & 4 deletions blocks/supplicatory-canon-christ.tex
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
\documentclass{subfiles}
\begin{document}

\pagestyle{empty}
{\centering\includesvg[height=\textheight]{icons/crucifixion}}
\Chapter{Canône de Arrependimento}{A Nosso Senhor Jesus Cristo}
\pagestyle{headings}
\begin{chapterimg}[height=\textheight]{icons/crucifixion}
\Chapter{Canône de Arrependimento}{A Nosso Senhor Jesus Cristo}
\end{chapterimg}

\section*{ODE 1, Tom 2}

Expand Down
7 changes: 3 additions & 4 deletions blocks/supplicatory-canon-theotokos.tex
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
\documentclass{subfiles}
\begin{document}

\pagestyle{empty}
\includesvg[width=\textwidth]{icons/hail-full-of-grace}
\Chapter{Canône de Súplica}{À Santíssima Mãe de Deus}
\pagestyle{headings}
\begin{chapterimg}[width=\textwidth]{icons/hail-full-of-grace}
\Chapter{Canône de Súplica}{À Santíssima Mãe de Deus}
\end{chapterimg}

\section*{Tropário, tom 4}

Expand Down
10 changes: 9 additions & 1 deletion main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@
\def\param{#1}%
\ifx\param\empty}

\newenvironment{chapterimg}[2][]{%
\pagestyle{empty}
\ifthispageodd{}{\cleardoubleevenpage{}}
{\vspace*{\fill}%
\centering\includesvg[#1]{#2}%
\vspace*{\fill}}}
{\pagestyle{headings}}

% stylization of chapters and sections =========================================

\RedeclareSectionCommand[
Expand Down Expand Up @@ -164,7 +172,7 @@
\raggedbottom{}

\tableofcontents{}
\pagebreak{}
\cleardoubleevenpage{}
\pagestyle{headings}

\subfile{blocks/matins.tex}
Expand Down

0 comments on commit cd44618

Please sign in to comment.