Skip to content

Commit

Permalink
Fix title page width
Browse files Browse the repository at this point in the history
  • Loading branch information
danielvartan committed Sep 26, 2023
1 parent 0e50552 commit 07f3672
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 22 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ _freeze/
.Rhistory
.Rproj.user
.Ruserdata

/.quarto/
4 changes: 2 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ format:
tesesusp-pdf:
mainfont: Arial
```
[USP guidelines for creating thesis and dissertation documents](https://teses.usp.br/index.php?option=com_content&view=article&id=52&Itemid=67&lang=en) recommends a `12pt` font size for the body text without specifying a font type. Common options include `Arial` (default) and `Times New Roman`, but any font available in the [`fontspec`](https://ctan.org/pkg/fontspec) LaTeX package should suffice.
[USP guidelines for creating thesis and dissertation documents](https://teses.usp.br/index.php?option=com_content&view=article&id=52&Itemid=67&lang=en) recommends a `12pt` font size for the body text without specifying a font type. Common options include `Arial` (default) and `Times New Roman`. Any font available in your system should work.

### Language and hyphenation

Expand All @@ -98,7 +98,7 @@ At the moment, the pre-textual pages can only be configured using the `yml` conf

This template works with [Zotero](https://www.zotero.org/) and the [Better BiBTeX](https://github.com/retorquere/zotero-better-bibtex) plugin. You must have both installed to render citations.

When rendering the document, the Zotero server must be running; therefore, Zotero must be open. A pre-render script (see `R/quarto-pree-render.R`), created using the [`rbbt`](https://github.com/paleolimbot/rbbt) R package, will scan all `qmd` and `tex` files searching for BibTeX citations (e.g., @watson1953). If they match with your Zotero database, the citations will then be written to the `references.json` file.
When rendering the document, the Zotero server must be running; therefore, Zotero must be open. A pre-render script (see `R/quarto-pree-render.R`), created using the [`rbbt`](https://github.com/paleolimbot/rbbt) R package, will scan all `qmd` and `tex` files searching for BibTeX citations (e.g., `@watson1953`). If they match with your Zotero database, the citations will then be written to the `references.json` file.

<!-- How to add or remove sections. -->

Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,7 @@ format:
documents](https://teses.usp.br/index.php?option=com_content&view=article&id=52&Itemid=67&lang=en)
recommends a `12pt` font size for the body text without specifying a
font type. Common options include `Arial` (default) and
`Times New Roman`, but any font available in the
[`fontspec`](https://ctan.org/pkg/fontspec) LaTeX package should
suffice.
`Times New Roman`. Any font available in your system should work.

### Language and hyphenation

Expand Down Expand Up @@ -130,7 +128,7 @@ therefore, Zotero must be open. A pre-render script (see
`R/quarto-pree-render.R`), created using the
[`rbbt`](https://github.com/paleolimbot/rbbt) R package, will scan all
`qmd` and `tex` files searching for BibTeX citations (e.g.,
@watson1953). If they match with your Zotero database, the citations
`@watson1953`). If they match with your Zotero database, the citations
will then be written to the `references.json` file.

<!-- How to add or remove sections. -->
Expand Down
4 changes: 3 additions & 1 deletion _extensions/tesesusp/_extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ contributes:
classoption: [oneside]
mainfont: Arial
sansfont: Arial
# monofont: Noto Sans Mono
# monofont: "Roboto Mono"
# monofontoptions:
# - Scale = 0.75
fontsize: 12pt
# lang: en # Set in tesesusp.cls
# number-depth: 5 # Set in tesesusp.cls
Expand Down
4 changes: 2 additions & 2 deletions _extensions/tesesusp/tesesusp.cls
Original file line number Diff line number Diff line change
Expand Up @@ -917,8 +917,8 @@
\vspace*{\fill}

\abntex@ifnotempty{\normalfont\normalsize\imprimirpreambulo}{
\hspace{.45\textwidth}
\begin{minipage}{.5\textwidth} % page width
\hspace{0.35\textwidth}
\begin{minipage}{.6\textwidth} % page width
\SingleSpacing
\normalfont\normalsize\imprimirpreambulo
% \vspace{2\baselineskip}
Expand Down
3 changes: 3 additions & 0 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ format:
@*
latex-auto-install: true
keep-tex: true
# monofont: "Roboto Mono" # See <https://fonts.google.com>.
# monofontoptions:
# - Scale = 0.75
include-in-header: tex/include-in-header.tex
include-before-body: tex/include-before-body.tex
# include-after-body: tex/include-after-body.tex
Binary file modified docs/preview.pdf
Binary file not shown.
Binary file modified pdf/tesesusp.pdf
Binary file not shown.
21 changes: 11 additions & 10 deletions pdf/tesesusp.tex
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}\break}
\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1}

% tesesusp.cls, v-0.0.1
% tesesusp.cls, v-0.1.0

% Based on 'bntex2ppgsi.cls' and 'abntex2.csl'.
% See <https://www.overleaf.com/project/64f7bdf1641ad4a3a8482800>.
Expand Down Expand Up @@ -202,7 +202,7 @@
\definecolor{quarto-ligther-gray}{HTML}{F1F3F5}

\definecolor{bs-link-color}{HTML}{39729E}
% tesesusp.cls, v-0.0.1
% tesesusp.cls, v-0.1.0

% Based on 'bntex2ppgsi.cls', 'abntex2.csl' and on USP guidelines to create
% thesis and dissertation documents.
Expand Down Expand Up @@ -263,6 +263,7 @@

\usepackage{array}
\usepackage{float}
\usepackage{lipsum}

\floatplacement{table}{H}
\newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}
Expand Down Expand Up @@ -383,7 +384,7 @@

\begin{document}
\maketitle
% tesesusp.cls, v-0.0.1
% tesesusp.cls, v-0.1.0

% Based on 'bntex2ppgsi.cls' and 'abntex2.csl'.
% See <https://www.overleaf.com/project/64f7bdf1641ad4a3a8482800>.
Expand Down Expand Up @@ -548,7 +549,7 @@
[SURNAME], [INITIALS]. ([YEAR]). \textit{[TITLE]} [[TYPE OF THESIS]]. [SCHOOL/DEPARTMENT], University of São Paulo, São Paulo. [THESIS'S URL]
\end{flushleft}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque accumsan rutrum lacus, vitae iaculis nisi bibendum in. Nulla et pellentesque nisl. Proin mollis dui sit amet egestas fermentum. Maecenas eu odio odio. Aenean porta ipsum in mauris pharetra dapibus. Nunc dapibus libero nec dui lacinia, id ultricies lectus maximus. Mauris quis mauris in velit pulvinar rutrum. Cras congue ante in orci luctus placerat. Nullam sit amet nisi augue. Maecenas non ligula eros. Etiam nec dolor a mi bibendum auctor.
\lipsum[1]

Keywords: Keyword 1. Keyword 2. Keyword 3.
\end{resumo}
Expand All @@ -564,7 +565,7 @@
[SOBRENOME], [INICIAIS]. ([ANO]). \textit{[TÍTULO]} [[TIPO DE TESE/DISSERTAÇÃO]]. [ESCOLA/DEPARTAMENTO], Universidade de São Paulo, São Paulo. [URL DA DISSERTAÇÃO/TESE]
\end{flushleft}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque accumsan rutrum lacus, vitae iaculis nisi bibendum in. Nulla et pellentesque nisl. Proin mollis dui sit amet egestas fermentum. Maecenas eu odio odio. Aenean porta ipsum in mauris pharetra dapibus. Nunc dapibus libero nec dui lacinia, id ultricies lectus maximus. Mauris quis mauris in velit pulvinar rutrum. Cras congue ante in orci luctus placerat. Nullam sit amet nisi augue. Maecenas non ligula eros. Etiam nec dolor a mi bibendum auctor.
\lipsum[1]

Palavras-chaves: Palavra-chave 1. Palavra-chave 2. Palavra-chave 3.
\end{otherlanguage*}
Expand Down Expand Up @@ -617,7 +618,7 @@
% \tableofcontents*
\cleardoublepage

\ifdefined\Shaded\renewenvironment{Shaded}{\begin{tcolorbox}[sharp corners, breakable, colback={codebgcolor}, borderline west={3pt}{0pt}{shadecolor}, enhanced, boxrule=0pt, frame hidden]}{\end{tcolorbox}}\fi
\ifdefined\Shaded\renewenvironment{Shaded}{\begin{tcolorbox}[frame hidden, boxrule=0pt, borderline west={3pt}{0pt}{shadecolor}, colback={codebgcolor}, enhanced, sharp corners, breakable]}{\end{tcolorbox}}\fi

\renewcommand*\contentsname{Table of contents}
{
Expand All @@ -632,7 +633,7 @@ \chapter{INTRODUCTION}\label{introduction}}

\textual

\begin{tcolorbox}[enhanced jigsaw, bottomrule=.15mm, colback=white, left=2mm, bottomtitle=1mm, breakable, toprule=.15mm, leftrule=.75mm, rightrule=.15mm, colframe=quarto-callout-note-color-frame, opacityback=0, colbacktitle=quarto-callout-note-color!10!white, titlerule=0mm, coltitle=black, title=\textcolor{quarto-callout-note-color}{\faInfo}\hspace{0.5em}{Note}, toptitle=1mm, arc=.35mm, opacitybacktitle=0.6]
\begin{tcolorbox}[enhanced jigsaw, titlerule=0mm, toprule=.15mm, left=2mm, rightrule=.15mm, breakable, title=\textcolor{quarto-callout-note-color}{\faInfo}\hspace{0.5em}{Note}, bottomrule=.15mm, coltitle=black, leftrule=.75mm, colframe=quarto-callout-note-color-frame, opacitybacktitle=0.6, bottomtitle=1mm, toptitle=1mm, colbacktitle=quarto-callout-note-color!10!white, arc=.35mm, opacityback=0, colback=white]

The text below is for demonstrative purposes only.

Expand Down Expand Up @@ -786,7 +787,7 @@ \subsubsection{QUATERNARY SECTION}\label{quaternary-section}}
\hypertarget{development}{%
\chapter{DEVELOPMENT}\label{development}}

\begin{tcolorbox}[enhanced jigsaw, bottomrule=.15mm, colback=white, left=2mm, bottomtitle=1mm, breakable, toprule=.15mm, leftrule=.75mm, rightrule=.15mm, colframe=quarto-callout-warning-color-frame, opacityback=0, colbacktitle=quarto-callout-warning-color!10!white, titlerule=0mm, coltitle=black, title=\textcolor{quarto-callout-warning-color}{\faExclamationTriangle}\hspace{0.5em}{Warning}, toptitle=1mm, arc=.35mm, opacitybacktitle=0.6]
\begin{tcolorbox}[enhanced jigsaw, titlerule=0mm, toprule=.15mm, left=2mm, rightrule=.15mm, breakable, title=\textcolor{quarto-callout-warning-color}{\faExclamationTriangle}\hspace{0.5em}{Warning}, bottomrule=.15mm, coltitle=black, leftrule=.75mm, colframe=quarto-callout-warning-color-frame, opacitybacktitle=0.6, bottomtitle=1mm, toptitle=1mm, colbacktitle=quarto-callout-warning-color!10!white, arc=.35mm, opacityback=0, colback=white]

The text below is for demonstrative purposes only.

Expand Down Expand Up @@ -836,7 +837,7 @@ \section{SECONDARY SECTION}\label{secondary-section-1}}
\hypertarget{conclusion}{%
\chapter{CONCLUSION}\label{conclusion}}

\begin{tcolorbox}[enhanced jigsaw, bottomrule=.15mm, colback=white, left=2mm, bottomtitle=1mm, breakable, toprule=.15mm, leftrule=.75mm, rightrule=.15mm, colframe=quarto-callout-important-color-frame, opacityback=0, colbacktitle=quarto-callout-important-color!10!white, titlerule=0mm, coltitle=black, title=\textcolor{quarto-callout-important-color}{\faExclamation}\hspace{0.5em}{Important}, toptitle=1mm, arc=.35mm, opacitybacktitle=0.6]
\begin{tcolorbox}[enhanced jigsaw, titlerule=0mm, toprule=.15mm, left=2mm, rightrule=.15mm, breakable, title=\textcolor{quarto-callout-important-color}{\faExclamation}\hspace{0.5em}{Important}, bottomrule=.15mm, coltitle=black, leftrule=.75mm, colframe=quarto-callout-important-color-frame, opacitybacktitle=0.6, bottomtitle=1mm, toptitle=1mm, colbacktitle=quarto-callout-important-color!10!white, arc=.35mm, opacityback=0, colback=white]

The text below is for demonstrative purposes only.

Expand Down Expand Up @@ -909,7 +910,7 @@ \chapter*{\texorpdfstring{REFERENCES
\hypertarget{appendix-1}{%
\chapter{APPENDIX 1}\label{appendix-1}}

\begin{tcolorbox}[enhanced jigsaw, bottomrule=.15mm, colback=white, left=2mm, bottomtitle=1mm, breakable, toprule=.15mm, leftrule=.75mm, rightrule=.15mm, colframe=quarto-callout-tip-color-frame, opacityback=0, colbacktitle=quarto-callout-tip-color!10!white, titlerule=0mm, coltitle=black, title=\textcolor{quarto-callout-tip-color}{\faLightbulb}\hspace{0.5em}{Tip}, toptitle=1mm, arc=.35mm, opacitybacktitle=0.6]
\begin{tcolorbox}[enhanced jigsaw, titlerule=0mm, toprule=.15mm, left=2mm, rightrule=.15mm, breakable, title=\textcolor{quarto-callout-tip-color}{\faLightbulb}\hspace{0.5em}{Tip}, bottomrule=.15mm, coltitle=black, leftrule=.75mm, colframe=quarto-callout-tip-color-frame, opacitybacktitle=0.6, bottomtitle=1mm, toptitle=1mm, colbacktitle=quarto-callout-tip-color!10!white, arc=.35mm, opacityback=0, colback=white]

The text below is for demonstrative purposes only.

Expand Down
4 changes: 2 additions & 2 deletions tex/include-before-body.tex
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
[SURNAME], [INITIALS]. ([YEAR]). \textit{[TITLE]} [[TYPE OF THESIS]]. [SCHOOL/DEPARTMENT], University of São Paulo, São Paulo. [THESIS'S URL]
\end{flushleft}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque accumsan rutrum lacus, vitae iaculis nisi bibendum in. Nulla et pellentesque nisl. Proin mollis dui sit amet egestas fermentum. Maecenas eu odio odio. Aenean porta ipsum in mauris pharetra dapibus. Nunc dapibus libero nec dui lacinia, id ultricies lectus maximus. Mauris quis mauris in velit pulvinar rutrum. Cras congue ante in orci luctus placerat. Nullam sit amet nisi augue. Maecenas non ligula eros. Etiam nec dolor a mi bibendum auctor.
\lipsum[1]

Keywords: Keyword 1. Keyword 2. Keyword 3.
\end{resumo}
Expand All @@ -171,7 +171,7 @@
[SOBRENOME], [INICIAIS]. ([ANO]). \textit{[TÍTULO]} [[TIPO DE TESE/DISSERTAÇÃO]]. [ESCOLA/DEPARTAMENTO], Universidade de São Paulo, São Paulo. [URL DA DISSERTAÇÃO/TESE]
\end{flushleft}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque accumsan rutrum lacus, vitae iaculis nisi bibendum in. Nulla et pellentesque nisl. Proin mollis dui sit amet egestas fermentum. Maecenas eu odio odio. Aenean porta ipsum in mauris pharetra dapibus. Nunc dapibus libero nec dui lacinia, id ultricies lectus maximus. Mauris quis mauris in velit pulvinar rutrum. Cras congue ante in orci luctus placerat. Nullam sit amet nisi augue. Maecenas non ligula eros. Etiam nec dolor a mi bibendum auctor.
\lipsum[1]

Palavras-chaves: Palavra-chave 1. Palavra-chave 2. Palavra-chave 3.
\end{otherlanguage*}
Expand Down
3 changes: 2 additions & 1 deletion tex/include-in-header.tex
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

\vspace{0.5cm}

Area of Concentration: [AREA OF CONCENTRATION].
Area of Con.: [AREA OF CONCENTRATION].

\vspace{1cm}

Expand All @@ -59,6 +59,7 @@

\usepackage{array}
\usepackage{float}
\usepackage{lipsum}

\floatplacement{table}{H}
\newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}
Expand Down

0 comments on commit 07f3672

Please sign in to comment.