0

I use the following TeX class to format my master thesis. Along with this development, one of the requirements is:

  • Set library-page-details (adapted translation to Portuguese "fichacatalografica") immediately after title-page (adapted translation to Portuguese "folhaderosto");

My current attempts regard understanding the command \folhaderosto: at its end, there is the following line content:

\if@openright\cleardoublepage\else\clearpage\fi%

After some research, I am able to understand, this is precisely what I look for except for the if-clause \if@openright: it requires the environment book, which does not apply in our situation.

Although I am out of options to alter the code snippet, my final goal is to provide the two strings (version_type, catalographic_file_path) to command \folhaderosto.

I thank you for reading until here.

4
  • The Ficha catalográfica is a one-page pdf file. Where do you want to add version_type? Jan 6, 2023 at 15:29
  • Oh, version_type is a string "Reviewed", "Original", "42.42.42", "Whatever": Take a look at forked version: github.com/alloyha/TheXis/blob/…
    – Bruno Lobo
    Jan 6, 2023 at 19:15
  • Ficha catalográfica will fill a page. What do you want to do with the string version_type? Jan 6, 2023 at 20:28
  • I will add it somewhere on the \folhaderosto output. It is not relevant in this context, as you already noticed. The most relevant part here is to custom print the title-page with custom back-page.
    – Bruno Lobo
    Jan 6, 2023 at 20:31

1 Answer 1

1

Try this code.

The file EPUSP-Catalogacao-na-Fonte.pdf is in the working directory and was generated using the web page Catalogação-na-publicação

It is a one page pdf file and is attached on the back of the title page.

a

\documentclass[twosideprint]{politex}

% ========== Packages ==========
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amsthm,amsfonts,amssymb}
\usepackage{graphicx,cite,enumerate}


% ========== Language options ==========
\usepackage[brazil]{babel}

% ========== Lorem ipsum ==========
\usepackage{blindtext}

% ========== Opções do documento ==========
% Título
\titulo{Título}

% Autor
\autor{Nome Sobrenome}

% Orientador / Coorientador
\orientador{Nome do orientador}
\coorientador{Nome do coorientador (opcional)}

% Tipo de documento
\dissertacao{Engenharia Elétrica}
% Departamento e área de concentração
\departamento{Nome do departamento}
\areaConcentracao{Área de concentração}

% Local
\local{São Paulo}

% Ano
\data{2013} 

% *************************************** added <<<<<<<<<<<<<<<<<<
\newcommand{\Catalogacaonapublicacao}{EPUSP-Catalogacao-na-Fonte}% pdf file with Catalogação-na-publicação <<<<

\newcommand{\librarydata}[1]{%
\begingroup 
\includepdf[pages={1}]{#1.pdf}
\endgroup       
}

\usepackage{pdfpages} % to include pdf pages
\usepackage{xpatch}

\makeatletter
\xpatchcmd{\folhaderosto}
{\if@openright\cleardoublepage\else\clearpage\fi}
{\newpage\librarydata{\Catalogacaonapublicacao}\if@openright\cleardoublepage\else\clearpage\fi}
{}{}
\makeatother
% ***************************************


\begin{document}
% ========== Capa e folhas de rosto ==========
\capa
\falsafolhaderosto{Original}
\folhaderosto{Original}

% ========== Ficha catalográfica ==========
% Fazer solicitação no site:
%   http://www.poli.usp.br/en/bibliotecas/servicos/catalogacao-na-publicacao.html


% ========== Dedicatória (opcional) ==========
\dedicatoria{Dedicatória}


% ========== Agradecimentos ==========
\begin{agradecimentos}

Thanks...

\end{agradecimentos}


% ========== Epígrafe (opcional) ==========
\epigrafe{%
    \emph{``Epígrafe''}
    \begin{flushright}
        -{}- Autor
    \end{flushright}
}


% ========== Resumo ==========
\begin{resumo}
Resumo...
%
\\[3\baselineskip]
%
\textbf{Palavras-Chave} -- Palavra, Palavra, Palavra, Palavra, Palavra.
\end{resumo}


% ========== Abstract ==========
\begin{abstract}
Abstract...
%
\\[3\baselineskip]
%
\textbf{Keywords} -- Word, Word, Word, Word, Word.
\end{abstract}


% ========== Listas (opcional) ==========
\listadefiguras
\listadetabelas

\sumario

% ========== Elementos textuais ==========

\part{Introdução}
    
\chapter{Capítulo com epígrafe}
\capepigrafe[0.5\textwidth]{``Frase espirituosa de um autor famoso''}{Autor famoso}

\blindtext

\begin{citacaoLonga}
    \blindtext
\end{citacaoLonga}

\blindtext

\blinddocument

% ========== Apêndices (opcional) ==========
\apendice
\chapter{}
\chapter{Beta}


% ========== Anexos (opcional) ==========
\anexo
\chapter{Alpha}
\chapter{}

\end{document

The class politex is based on the class report which allows two side print.

4
  • It works like a charm. I will incorporate your on code repository alloyha/TheXIs. :-)
    – Bruno Lobo
    Jan 7, 2023 at 0:17
  • It seems a great feature to set this single library-page as optional, since we may want first to not publish it. Is it possible in the current configuration you provide?
    – Bruno Lobo
    Jan 7, 2023 at 0:29
  • @Bruno Peixoto As I understand the page is mandatory. Meanwhile, you can put a dummy blank pdf file to replace it. Jan 7, 2023 at 13:12
  • Yes, it is mandatory. I will use a single-page stub for the issue. Thanks for the quick answer
    – Bruno Lobo
    Jan 7, 2023 at 13:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .