
Eu sei que já tem pelo menos uma dúvida aqui sobre como montar uma planilha de aprovação. Porém, a pergunta que trago agora é um pouco diferente, porque a questão em si diz respeito a como automatizar o número de membros da comissão examinadora. Muitas vezes, dependendo do programa ao qual o aluno está filiado, a comissão pode ser composta por três, quatro, cinco ou mais membros. Assim, gostaria de compor um código no qual pudesse informar no preâmbulo do documento as seguintes informações: 1 - informar o número de membros da comissão examinadora; 2 – digite o nome do primeiro integrante; 3 - informar a titulação do primeiro membro; 4 - informar a instituição do primeiro associado, e assim sucessivamente. É claro que os itens 2, 3 e 4 seriam repetidos conforme eu informasse o número de membros presentes na comissão. Seria possível criar tal código?
Abaixo, apresento um exemplo mínimo.
\documentclass[12pt,a4paper]{memoir}
\parindent0pt
\setSpacing{1.5}
\abnormalparskip{0.2\baselineskip}%
\setlength{\parindent}{1.5cm}%
\renewcommand*{\footnoterule}{\kern -3pt \hrule width 50mm \kern
2.6pt}%
\setlrmarginsandblock{30mm}{20mm}{*}%
\setulmarginsandblock{30mm}{20mm}{*}%
\setheadfoot{\baselineskip}{2\baselineskip}
\setheaderspaces{20.0mm}{*}{*}%
\setmarginnotes{2.0mm}{16mm}{5.0mm}%
\setcolsepandrule{3.5mm}{0.15mm}
\setfootins{\bigskipamount}{\bigskipamount}
\checkandfixthelayout[fixed]
\newcommand{\committeemembernumber}[1]{#1}
\newcommand{\memberonename}[1]{\gdef\thememberonename{#1}}
\newcommand{\memberoneinstitute}[1]{\gdef\thememberoneinstitute{#1}}
\newcommand{\membertwoname}[1]{\gdef\themembertwoname{#1}}
\newcommand{\membertwoinstitute}[1]{\gdef\themembertwoinstitute{#1}}
\newcommand{\memberthreename}[1]{\gdef\thememberthreename{#1}}
\newcommand{\memberthreeinstitute}[1]{\gdef\thememberthreeinstitute{#1}}
\newcommand{\memberfourname}[1]{\gdef\thememberfourname{#1}}
\newcommand{\memberfourinstitute}[1]{\gdef\thememberfourinstitute{#1}}
\newcommand{\memberfivename}[1]{\gdef\thememberfivename{#1}}
\newcommand{\memberfiveinstitute}[1]{\gdef\thememberfiveinstitute{#1}}
\title{Approval sheet: an example for the LaTeX}
\author{Alexsandro Lucena Mota}
\date{2020}
%\committeemembernumber{3}
\memberonename{Prof.~MA. Sir Isaac Newton}
\memberoneinstitute{Trinity College -- University of Cambrigde}
\membertwoname{Prof.~PhD. Albert Einstein}
\membertwoinstitute{Institute for Advanced Study (IAS)}
\memberthreename{Prof. PhD. Paul Adrien Maurice Dirac}
\memberthreeinstitute{Florida State University}
\memberfourname{Prof. PhD. Richard Phillips Feynman}
\memberfourinstitute{California Institute of Technology -- Caltech}
\memberfivename{Prof. PhD. Murray Gell-Mann}
\memberfiveinstitute{California Institute of Technology -- Caltech}
\begin{document}
\thispagestyle{empty}
\begin{center}
{\large \theauthor\par}
\vspace{\baselineskip}
{\Large
\begin{OnehalfSpace}%
\bfseries\thetitle\par%
\end{OnehalfSpace}%
}
\vspace{0.0cm}
\end{center}
\begin{flushright}%
\begin{minipage}{0.55\textwidth}%
\begin{SingleSpacing}%
{\small Doctoral thesis presented at Postgraduate
Program in Physics of the Universidade Federal do
Maranhão as prerequisite to obtain the Doctoral
degree.}\par
{\small {\bfseries Research line:} Topological
field theory with Lorentz symmetry breaking.}\par%
\end{SingleSpacing}%
\end{minipage}%
\end{flushright}
\vspace{\baselineskip}
Approval in: \rule[0.0cm]{3cm}{0.04cm}~
\rule[0.0cm]{1cm}{0.04cm},~\thedate.\par
\vspace{\baselineskip}
\begin{center}
{\Large Examining Committee}\par%
\vspace{\baselineskip}
\begin{SingleSpacing}
\rule{12cm}{0.04cm}\par%
\thememberonename\par%
\thememberoneinstitute\par
\vspace{1.9\baselineskip}
\rule{12cm}{0.04cm}\par
\themembertwoname\par%
\themembertwoinstitute\par
\vspace{1.9\baselineskip}
\rule{12cm}{0.04cm}\par
\thememberthreename\par
\thememberthreeinstitute\par
\vspace{1.9\baselineskip}
\rule{12cm}{0.04cm}\par
\thememberfourname\par%
\thememberfourinstitute\par
\vspace{1.9\baselineskip}
\rule{12cm}{0.04cm}\par
\thememberfivename\par
\thememberfiveinstitute\par
\end{SingleSpacing}
\end{center}
\end{document}
Este código fornece o seguinte documento PDF:
Responder1
Aqui está uma maneira de fazer isso. A ideia básica é ter um único comando:
\member{<name>}{<institute>}
Isso atribuirá automaticamente os membros do comitê e controlará quantos deles existem. Em seguida, cada nome/afiliação de comitê recebe um nome exclusivo usando o contador que monitora os membros. Isso é feito usando o \csgdef
wrapper \csname ... \endcsname
fornecido pelo etoolbox
pacote. Em seguida, usamos esse contador e um loop (usando o pgffor
pacote) para produzir o número certo de linhas de membros (limitado, é claro, pela quantidade de espaço que você tem na página).
\documentclass[12pt,a4paper]{memoir}
\parindent0pt
\setSpacing{1.5}
\abnormalparskip{0.2\baselineskip}%
\setlength{\parindent}{1.5cm}%
\renewcommand*{\footnoterule}{\kern -3pt \hrule width 50mm \kern
2.6pt}%
\setlrmarginsandblock{30mm}{20mm}{*}%
\setulmarginsandblock{30mm}{20mm}{*}%
\setheadfoot{\baselineskip}{2\baselineskip}
\setheaderspaces{20.0mm}{*}{*}%
\setmarginnotes{2.0mm}{16mm}{5.0mm}%
\setcolsepandrule{3.5mm}{0.15mm}
\setfootins{\bigskipamount}{\bigskipamount}
\checkandfixthelayout[fixed]
\usepackage{etoolbox}
\usepackage{pgffor}
\newcounter{committee}
\newcommand{\member}[2]{\stepcounter{committee}\csgdef{member\thecommittee}{#1}
\csgdef{institute\thecommittee}{#2}}
\title{Approval sheet: an example for the LaTeX}
\author{Alexsandro Lucena Mota}
\date{2020}
\member{Prof.~MA. Sir Isaac Newton}{Trinity College -- University of Cambridge}
\member{Prof.~PhD. Albert Einstein}{Institute for Advanced Study (IAS)}
\member{Prof. PhD. Paul Adrien Maurice Dirac}{Florida State University}
\member{Prof. PhD. Richard Phillips Feynman}{California Institute of Technology -- Caltech}
\member{Prof. PhD. Murray Gell-Mann}{California Institute of Technology -- Caltech}
\begin{document}
\thispagestyle{empty}
\begin{center}
{\large \theauthor\par}
\vspace{\baselineskip}
{\Large
\begin{OnehalfSpace}%
\bfseries\thetitle\par%
\end{OnehalfSpace}%
}
\vspace{0.0cm}
\end{center}
\begin{flushright}%
\begin{minipage}{0.55\textwidth}%
\begin{SingleSpacing}%
{\small Doctoral thesis presented at Postgraduate
Program in Physics of the Universidade Federal do
Maranhão as prerequisite to obtain the Doctoral
degree.}\par
{\small {\bfseries Research line:} Topological
field theory with Lorentz symmetry breaking.}\par%
\end{SingleSpacing}%
\end{minipage}%
\end{flushright}
\vspace{\baselineskip}
Approval in: \rule[0.0cm]{3cm}{0.04cm}~
\rule[0.0cm]{1cm}{0.04cm},~\thedate.\par
\vspace{\baselineskip}
\begin{center}
{\Large Examining Committee}\par%
\vspace{\baselineskip}
\begin{SingleSpacing}
\foreach \x in {1,...,\value{committee}}{
\rule{12cm}{0.04cm}\par%
\csuse{member\x}\par%
\csuse{institute\x}\par
\vspace{1.9\baselineskip}
}
\end{SingleSpacing}
\end{center}
\end{document}