summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-10-19 03:01:07 +0000
committerNorbert Preining <norbert@preining.info>2023-10-19 03:01:07 +0000
commit05e4c0a34b97237b4cd2f3fb0d5cd03e73b8e55e (patch)
treefc7502cefdd6bcd7e39361b7b5cfe5b650eeba11 /macros
parentf4a002c5b54c3f9678105cef89c2cd0b4f41577a (diff)
CTAN sync 202310190301
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdfbin1153426 -> 1259752 bytes
-rw-r--r--macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex156
-rw-r--r--macros/latex/contrib/proflycee/tex/ProfLycee.sty3
-rw-r--r--macros/latex/contrib/proflycee/tex/proflycee-tools-recreat.tex95
-rw-r--r--macros/latex/contrib/unbtex/README.md5
-rw-r--r--macros/latex/contrib/unbtex/abntex2eng-alf.bst2159
-rw-r--r--macros/latex/contrib/unbtex/unbtex-example.pdfbin1176887 -> 1177269 bytes
-rw-r--r--macros/latex/contrib/unbtex/unbtex-example.tex73
-rw-r--r--macros/latex/contrib/unbtex/unbtex-example/apendice-a.tex4
-rw-r--r--macros/latex/contrib/unbtex/unbtex-example/capitulo2.tex4
-rw-r--r--macros/latex/contrib/unbtex/unbtex-example/referencias.bib24
-rw-r--r--macros/latex/contrib/unbtex/unbtex.cls7
-rw-r--r--macros/texinfo/latest/texi2dvi90
-rw-r--r--macros/texinfo/latest/texi2pdf4
14 files changed, 2505 insertions, 119 deletions
diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf
index d30b6e2c4f..5dfac0ad10 100644
--- a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf
+++ b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex
index 976a0f42c5..94e0d61436 100644
--- a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex
+++ b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex
@@ -5,8 +5,8 @@
% arara: lualatex: {shell: yes, synctex: no, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)')
\documentclass[a4paper,french,11pt]{article}
-\def\PLversion{2.7.8}
-\def\PLdate{8 octobre 2023}
+\def\PLversion{2.7.9}
+\def\PLdate{18 octobre 2023}
\usepackage{amsfonts}
\usepackage{ProfLycee}
\useproflyclib{piton,minted,pythontex,ecritures}
@@ -144,12 +144,12 @@
keywordstyle={\color{violet}},%
classoffset=2,%
alsoletter={-},%
- morekeywords={\ResolutionApprochee,\SolutionTVI,\CalculTermeRecurrence,\ToileRecurrence,\SolutionSeuil,\IntegraleApprochee,\GrilleTikz,\AxesTikz,\AxexTikz,\AxeyTikz,\FenetreTikz,\FenetreSimpleTikz,\DeclareFonctionTikz,\CourbeTikz,\OrigineTikz,\SplineTikz,\TangenteTikz,\MiniSchemaSignes,\MiniSchemaSignesTkzTab,\IntegraleApprocheeTikz,\CartoucheCapytale,\PaveTikz,\TetraedreTikz,\CercleTrigo,\AffPoint,\AffVecteur,\TrouveEqCartPlan,\TrouveEqParamDroite,\TrouveEqCartDroite,\TrouveNorme,\TrouveDistancePtPlan,\EquationReduite,\CalculsRegLin,\PointsRegLin,\NuagePointsTikz,\PointMoyenTikz,\BoiteMoustaches,\BoiteMoustachesAxe,\Histogramme,\CalcBinomP,\CalcBinomC,\BinomP,\BinomC,\CalcPoissP,\CalcPoissC,\PoissonP,\PoissonC,\CalcGeomP,\CalcGeomC,\GeomP,\GeomC,\CalcHypergeomP,\CalcHypergeomP,\HypergeomP,\HypergeomC,\CalcNormC,\NormaleC,\CalcExpoC,\ExpoC,\ArbreProbasTikz,\LoiNormaleGraphe,\LoiExpoGraphe,\NbAlea,\VarNbAlea,\TirageAleatoireEntiers,\Arrangement,\Combinaison,\ConversionDecBin,\ConversionBinHex,\ConversionVersDec,\ConversionHexBin,\ConversionBaseDix,\ConversionDepuisBaseDix,\PresentationPGCD,\EquationDiophantienne,\ConversionFraction,\SimplificationRacine,\EcritureEnsemble,\EcritureTrinome,\MesurePrincipale,\LigneTrigo,\SudoMaths,\FonctionRepartTikz,\IntervalleFF,\IntervalleFO,\IntervalleOF,\IntervalleOO,\RepereOij,\RepereOuv,\RepereOijk,\ReperePlan,\RepereEspace,\jfalg,\jfexp,\LoiNormale,\LoiBinomiale,\LoiPoisson,\LoiExpo,\LoiUnif,\Courbe,\Suite,\CoordPtPl,\CoordPtEsp,\CoordVecPl,\CoordVecEsp,\MatDeux,\Vecteur,\Esper,\Varianc,\EcType,\dx,\Integrale,\Modulo,\Arrondi,\CodePythonLstFichier,\CodePythonLstFichierAlt,\colorlet,\PtsDiscontinuite,\ListeDiviseurs,\ArbreDiviseurs
+ morekeywords={\ResolutionApprochee,\SolutionTVI,\CalculTermeRecurrence,\ToileRecurrence,\SolutionSeuil,\IntegraleApprochee,\GrilleTikz,\AxesTikz,\AxexTikz,\AxeyTikz,\FenetreTikz,\FenetreSimpleTikz,\DeclareFonctionTikz,\CourbeTikz,\OrigineTikz,\SplineTikz,\TangenteTikz,\MiniSchemaSignes,\MiniSchemaSignesTkzTab,\IntegraleApprocheeTikz,\CartoucheCapytale,\PaveTikz,\TetraedreTikz,\CercleTrigo,\AffPoint,\AffVecteur,\TrouveEqCartPlan,\TrouveEqParamDroite,\TrouveEqCartDroite,\TrouveNorme,\TrouveDistancePtPlan,\EquationReduite,\CalculsRegLin,\PointsRegLin,\NuagePointsTikz,\PointMoyenTikz,\BoiteMoustaches,\BoiteMoustachesAxe,\Histogramme,\CalcBinomP,\CalcBinomC,\BinomP,\BinomC,\CalcPoissP,\CalcPoissC,\PoissonP,\PoissonC,\CalcGeomP,\CalcGeomC,\GeomP,\GeomC,\CalcHypergeomP,\CalcHypergeomP,\HypergeomP,\HypergeomC,\CalcNormC,\NormaleC,\CalcExpoC,\ExpoC,\ArbreProbasTikz,\LoiNormaleGraphe,\LoiExpoGraphe,\NbAlea,\VarNbAlea,\TirageAleatoireEntiers,\Arrangement,\Combinaison,\ConversionDecBin,\ConversionBinHex,\ConversionVersDec,\ConversionHexBin,\ConversionBaseDix,\ConversionDepuisBaseDix,\PresentationPGCD,\EquationDiophantienne,\ConversionFraction,\SimplificationRacine,\EcritureEnsemble,\EcritureTrinome,\MesurePrincipale,\LigneTrigo,\SudoMaths,\FonctionRepartTikz,\IntervalleFF,\IntervalleFO,\IntervalleOF,\IntervalleOO,\RepereOij,\RepereOuv,\RepereOijk,\ReperePlan,\RepereEspace,\jfalg,\jfexp,\LoiNormale,\LoiBinomiale,\LoiPoisson,\LoiExpo,\LoiUnif,\Courbe,\Suite,\CoordPtPl,\CoordPtEsp,\CoordVecPl,\CoordVecEsp,\MatDeux,\Vecteur,\Esper,\Varianc,\EcType,\dx,\Integrale,\Modulo,\Arrondi,\CodePythonLstFichier,\CodePythonLstFichierAlt,\colorlet,\PtsDiscontinuite,\ListeDiviseurs,\ArbreDiviseurs,\FractaleTikz,\EtapesFloconKoch
},%
keywordstyle={\color{CouleurVertForet}},%
classoffset=3,%
alsoletter={-},%
- morekeywords={minimum-decimal-digits,scale,nonamssymb,build,Precision,Intervalle,Variable,NomFct,NomSol,va,vb,Stretch,Balayage,Calculatrice,Majuscule,No,UNo,NomSuite,Simple,Exact,Conclusion,Sens,ResultatBrut,Methode,NbSubDiv,AffFormule,Expr,Signe,Variables,Affp,Affs,Epaisseur,Police,ElargirOx,ElargirOy,Labelx,Labely,AffLabel,PosLabelx,PosLabely,EchelleFleche,TypeFleche,PosGrad,HautGrad,AffGrad,AffOrigine,Annee,Trigo,Dfrac,Style,Coeffs,AffPoints,TaillePoints,xl,xr,Code,Racines,Largeur,Hauteur,Cadre,Fct,Nom,PosLabel,DecalLabel,TailleLabel,AffTermes,RemplirbOpacite,CouleurRemplissage,Lignes,Gobble,Alignement,Filigrane,BarreTitre,CouleurNombres,Centre,EspacementVertical,Label,Titre,Profondeur,Angle,Fuite,Sommets,Math,Aff,Plein,Cube,Alpha,Beta,Rayon,Marge,TailleValeurs,TailleAngles,CouleurFond,Decal,MoinsPi,AffAngles,AffTraits,AffValeurs,Equationcos,Equationsin,sin,cos,AffTraitsEq,CouleurSol,OptionCoeffs,SimplifCoeffs,Facteur,OptionCoeffs,Reel,Oppose,Rgras,SimplifCoeffs,VectDirecteur,NomCoeffa,NomCoeffb,NomCoeffr,NomCoeffrd,NomXmin,NomXmax,Ox,Oy,xg,yg,AffNom,Elevation,Moyenne,AffMoyenne,Pointilles,Valeurs,Elargir,Min,Max,DebutOx,FinOx,ListeCouleurs,ElargirX,ElargirY,LabelX,LabelY,GradX,GradY,AffEffectifs,PosEffectifs,Opacite,AffBornes,GrilleV,PoliceAxes,PoliceEffectifs,EpaisseurTraits,Unite,EspaceNiveau,EspaceFeuille,Type,PoliceProbas,InclineProbas,Fleche,StyleTrait,EpaisseurTrait,CouleurAire,CouleurCourbe,AfficheM,AfficheCadre,ValMin,ValMax,NbVal,Sep,Tri,Repetition,Notation,NotationAncien,Formule,AffBase,Details,BaseDep,Zeros,DecalH,DecalV,Noeud,Rect,CouleurRes,DecalRect,Rectangle,CouleurResultat,AfficheConclusion,AfficheDelimiteurs,Lettre,Inconnues,Entier,Cadres,PresPGCD,Mathpunct,Option,Alea,Anegatif,Crochets,Brut,Etapes,Epaisseurg,CouleurCase,CouleurTexte,NbSubCol,NbLig,NbCol,Legendes,PoliceLeg,ListeLegV,ListeLegH,DecalLegende,Couleur,Uno,Grille,ExtraGrilleY,PosLegende,Pointilles,Extremite,Frac,PremLigne,Type,Pos,Echelle,AffNom,EspaceNiveau,CouleurDetails,Fleches,EspaceFeuille,Details},%
+ morekeywords={minimum-decimal-digits,scale,nonamssymb,build,Precision,Intervalle,Variable,NomFct,NomSol,va,vb,Stretch,Balayage,Calculatrice,Majuscule,No,UNo,NomSuite,Simple,Exact,Conclusion,Sens,ResultatBrut,Methode,NbSubDiv,AffFormule,Expr,Signe,Variables,Affp,Affs,Epaisseur,Police,ElargirOx,ElargirOy,Labelx,Labely,AffLabel,PosLabelx,PosLabely,EchelleFleche,TypeFleche,PosGrad,HautGrad,AffGrad,AffOrigine,Annee,Trigo,Dfrac,Style,Coeffs,AffPoints,TaillePoints,xl,xr,Code,Racines,Largeur,Hauteur,Cadre,Fct,Nom,PosLabel,DecalLabel,TailleLabel,AffTermes,RemplirbOpacite,CouleurRemplissage,Lignes,Gobble,Alignement,Filigrane,BarreTitre,CouleurNombres,Centre,EspacementVertical,Label,Titre,Profondeur,Angle,Fuite,Sommets,Math,Aff,Plein,Cube,Alpha,Beta,Rayon,Marge,TailleValeurs,TailleAngles,CouleurFond,Decal,MoinsPi,AffAngles,AffTraits,AffValeurs,Equationcos,Equationsin,sin,cos,AffTraitsEq,CouleurSol,OptionCoeffs,SimplifCoeffs,Facteur,OptionCoeffs,Reel,Oppose,Rgras,SimplifCoeffs,VectDirecteur,NomCoeffa,NomCoeffb,NomCoeffr,NomCoeffrd,NomXmin,NomXmax,Ox,Oy,xg,yg,AffNom,Elevation,Moyenne,AffMoyenne,Pointilles,Valeurs,Elargir,Min,Max,DebutOx,FinOx,ListeCouleurs,ElargirX,ElargirY,LabelX,LabelY,GradX,GradY,AffEffectifs,PosEffectifs,Opacite,AffBornes,GrilleV,PoliceAxes,PoliceEffectifs,EpaisseurTraits,Unite,EspaceNiveau,EspaceFeuille,Type,PoliceProbas,InclineProbas,Fleche,StyleTrait,EpaisseurTrait,CouleurAire,CouleurCourbe,AfficheM,AfficheCadre,ValMin,ValMax,NbVal,Sep,Tri,Repetition,Notation,NotationAncien,Formule,AffBase,Details,BaseDep,Zeros,DecalH,DecalV,Noeud,Rect,CouleurRes,DecalRect,Rectangle,CouleurResultat,AfficheConclusion,AfficheDelimiteurs,Lettre,Inconnues,Entier,Cadres,PresPGCD,Mathpunct,Option,Alea,Anegatif,Crochets,Brut,Etapes,Epaisseurg,CouleurCase,CouleurTexte,NbSubCol,NbLig,NbCol,Legendes,PoliceLeg,ListeLegV,ListeLegH,DecalLegende,Couleur,Uno,Grille,ExtraGrilleY,PosLegende,Pointilles,Extremite,Frac,PremLigne,Type,Pos,Echelle,AffNom,EspaceNiveau,CouleurDetails,Fleches,EspaceFeuille,Details,LongueurCote,AlignV,Offset,Remplir,Etape,Depart,Contour,Remplissage},%
keywordstyle={\color{orange!75!black}}
}
}
@@ -904,6 +904,10 @@ Elles sont présentées de manière \textit{succincte}, mais elles sont présent
%sudomaths
\SudoMaths[options]{liste}
\begin{EnvSudoMaths}[options]{grille}...\end{EnvSudoMaths}
+
+%fractales
+\FractaleTikz(*)[clés]<options tikz>
+\EtapesFloconKoch[clés]{étapes}
\end{PresCodeTexPL}
\newpage
@@ -7926,6 +7930,146 @@ La grille, créée en \TikZ, est portée par le rectangle de \og coins \fg{} $(0
\newpage
+\section{Quelques fractales, en \TikZ}\label{fractales}
+
+\subsection{Introduction}
+
+\begin{tipblock}
+\cmaj{2.7.9} L'idée est de proposer de quoi représenter quelques fractales, créées avec la librairie \ctex{lindenmayersystems}.
+
+\smallskip
+
+Pour le moment, il est possible de :
+
+\begin{itemize}
+ \item tracer un flocon de Koch à une étape donnée ;
+ \item tracer un triangle de Sierpinski \textit{classique} ;
+ \item présenter différentes étapes successives des flocons de Koch.
+\end{itemize}
+\vspace*{-\baselineskip}\leavevmode
+\end{tipblock}
+
+\begin{importantblock}
+Les figures sont créées en \TikZ, et peuvent être autonomes (sans environnement \ctex{tikzpicture}).
+
+Pour le triangle de Sierpinski, la forme \textit{générale} est \textit{bloquée} pour avoir un rendu \textit{classique}.
+\end{importantblock}
+
+\subsection{Flocon de Koch et triangle de Sierpinski}
+
+\begin{tipblock}
+La commande pour créer un flocon de Koch ou un triangle de Sierpinski est \ctex{\textbackslash FractaleTikz}.
+
+Les éléments de personnalisation sont présentés un peu plus bas.
+\end{tipblock}
+
+\begin{PresCodeTexPL}{listing only}
+%Flocon de Koch, autonome
+\FractaleTikz[Type=Koch,clés]<options tikz>
+
+%Flocon de Koch, dans un environnement tikz
+\begin{tikzpicture}
+ \FractaleTikz*[Type=Koch,clés]
+\end{tikzpicture}
+\end{PresCodeTexPL}
+
+\begin{PresCodeTexPL}{listing only}
+%Triangle de Sierpinski, autonome
+\FractaleTikz[Type=Sierp,clés]<options tikz>
+
+%Flocon de Koch, dans un environnement tikz
+\begin{tikzpicture}
+ \FractaleTikz[Type=Sierp,clés]
+\end{tikzpicture}
+\end{PresCodeTexPL}
+
+\begin{cautionblock}
+Les \Cle{clés} disponibles pour cette commande sont :
+
+\begin{itemize}
+ \item la clé \Cle{Epaisseur} pour fixer l'épaisseur des tracés ; \hfill~défaut \Cle{0.6pt}
+ \item la clé \Cle{Type}, parmi \Cle{Koch / Sierp} pour choisir le type de fractale ; \hfill~défaut \Cle{Koch}
+ \item la clé \Cle{Couleur} pour fixer la couleur des tracés ; \hfill~défaut \Cle{black}
+ \item la clé \Cle{LongueurCote} (en cm) pour fixer la longueur des côtés ; \hfill~défaut \Cle{3}
+ \item la clé \Cle{Etape} (pour \Cle{Type=Koch}, et limitée à 7) pour fixer l'étape ; \hfill~défaut \Cle{1}
+ \item le booléen \Cle{remplir} pour remplir la fractale ; \hfill~défaut \Cle{false}
+ \item la clé \Cle{Remplissage} pour fixer la couleur de remplissage ; \hfill~défaut \Cle{lightgray}
+ \item la clé \Cle{Depart} pour fixer le point de départ ; \hfill~défaut \Cle{(0,0)}
+ \item le booléen \Cle{AlignV} (pour \Cle{Type=Koch}) pour forcer l'alignement de la \textit{base} ; \hfill~défaut \Cle{false}
+ \item le booléen \Cle{Contour} (pour \Cle{Type=Sierp}) pour afficher le contour. \hfill~défaut \Cle{false}
+\end{itemize}
+\vspace*{-\baselineskip}\leavevmode
+\end{cautionblock}
+
+\begin{PresCodeTexPL}{}
+%Koch par défaut
+\FractaleTikz
+\end{PresCodeTexPL}
+
+\begin{PresCodeTexPL}{}
+%Koch par défaut
+\FractaleTikz[Etape=4,LongueurCote=4,Remplir,Remplissage=teal!5,Couleur=red,Epaisseur=1pt]
+\end{PresCodeTexPL}
+
+\begin{PresCodeTexPL}{}
+%dans un environnement tikz
+\begin{tikzpicture}
+ \FractaleTikz*[Etape=0]
+ \FractaleTikz*[Depart={(4,0)},Etape=1,Remplir,Remplissage=yellow!25]
+ \FractaleTikz*[Depart={(8,0)},Etape=2,Remplir,Remplissage=orange!25]
+ \FractaleTikz*[Depart={(12,0)},Etape=3,Remplir,Remplissage=red!25]
+\end{tikzpicture}
+\end{PresCodeTexPL}
+
+\begin{PresCodeTexPL}{}
+%Sierpinski par défaut
+\FractaleTikz[Type=Sierp]
+\end{PresCodeTexPL}
+
+\begin{PresCodeTexPL}{}
+%Sierpinski par défaut
+\FractaleTikz[Type=Sierp,LongueurCote=4,Couleur=blue,Remplir,Remplissage=red!5,Contour]
+\end{PresCodeTexPL}
+
+\subsection{Affichage de plusieurs étapes pour les flocons de Koch}
+
+\begin{tipblock}
+L'idée est de présenter des étapes successives pour le flocon de Koch.
+
+À noter que les \textit{bases} des flocons sont, dans ce cas, correctement alignées !
+\end{tipblock}
+
+\begin{PresCodeTexPL}{listing only}
+%commande autonome, l'environnement tikz est créé
+\EtapesFloconKoch[clés]{étapes}
+\end{PresCodeTexPL}
+
+\begin{cautionblock}
+Les \Cle{clés} disponibles sont reprises (pour celles dépendant de \Cle{Type=Koch} !) de la commande \ctex{\textbackslash FractaleTikz}, avec en plus :
+
+\begin{itemize}
+ \item la clé \Cle{Offset} pour fixer une espacement horizontal entre les figures. \hfill~défaut \Cle{2pt}
+\end{itemize}
+
+L'argument obligatoire, et entre \ctex{\{...\}}, permet de spécifier les étapes à afficher, sous la forme \TikZ{} :
+
+\begin{itemize}
+ \item \ctex{n1,n2,n3} pour spécifier une liste d'étapes ;
+ \item \ctex{n1,...,n2} pour spécifier une plage d'étapes.
+\end{itemize}
+\vspace*{-\baselineskip}\leavevmode
+\end{cautionblock}
+
+\begin{PresCodeTexPL}{}
+\EtapesFloconKoch{0,...,4}
+\end{PresCodeTexPL}
+
+\begin{PresCodeTexPL}{}
+\EtapesFloconKoch[Offset=5mm,Couleur=red,Remplir,Remplissage=violet!25]{0,2,4,6}
+\end{PresCodeTexPL}
+
+\newpage
+
\phantom{t}\par\vfill\par
\begin{PART}
\begin{center}
@@ -7938,7 +8082,9 @@ La grille, créée en \TikZ, est portée par le rectangle de \og coins \fg{} $(0
\part{Historique}
-{\small \bverb|v 2.7.8|~:~~~~Conversion présentée hexa/bin (page \pageref{convhexbin})} + Liste et arbres de diviseurs (page \pageref{listediv})
+{\small \bverb|v 2.7.9|~:~~~~Ajout de quelques fractales (Koch + Sierpinski) (page \pageref{fractales})}
+
+{\small \bverb|v 2.7.8|~:~~~~Conversion présentée hexa/bin (page \pageref{convhexbin}) + Liste et arbres de diviseurs (page \pageref{listediv})}
{\small \bverb|v 2.7.7|~:~~~~Points de discontinuité pour des splines (page \pageref{discont})}
diff --git a/macros/latex/contrib/proflycee/tex/ProfLycee.sty b/macros/latex/contrib/proflycee/tex/ProfLycee.sty
index 8c89863d8c..176a4fd187 100644
--- a/macros/latex/contrib/proflycee/tex/ProfLycee.sty
+++ b/macros/latex/contrib/proflycee/tex/ProfLycee.sty
@@ -3,7 +3,8 @@
% or later, see http://www.latex-project.org/lppl.txtf
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ProfLycee}[2023/10/06 2.7.8 Aide pour l'utilisation de LaTeX en lycee]
+\ProvidesPackage{ProfLycee}[2023/10/18 2.7.9 Aide pour l'utilisation de LaTeX en lycee]
+% 2.7.9 Ajout de fractales (Koch + Sierpenski)
% 2.7.8 Conversion hexa->bin présentée
% 2.7.7 Ajout d'une commande pour matérialiser des points de discontinuité
% 2.7.6 Amélioration de la gestion de la console piton
diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-recreat.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-recreat.tex
index a90d17e0dc..8578cf58a6 100644
--- a/macros/latex/contrib/proflycee/tex/proflycee-tools-recreat.tex
+++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-recreat.tex
@@ -243,4 +243,99 @@
\end{tikzpicture}
}
+%=====FRACTALES
+\usetikzlibrary{lindenmayersystems}
+
+\pgfdeclarelindenmayersystem{FloconKoch}{
+ \rule{F -> F-F++F-F}}
+\pgfdeclarelindenmayersystem{TriangleSierpinski}{
+ \rule{F -> G-F-G}
+ \rule{G -> F+G+F}}
+
+\defKV[tikzfract]{%
+ Epaisseur=\def\fracttikzthick{#1},%
+ Type=\def\fracttikztype{#1},%
+ Couleur=\def\fracttikzcolor{#1},%
+ LongueurCote=\def\fracttikzlg{#1},%
+ Etape=\def\fracttikzstep{#1},%
+ Remplissage=\def\fracttikzfill{#1},%
+ Depart=\def\fracttikzdepart{#1},%
+ Offset=\def\fracttikzoffset{#1}
+}
+
+\setKVdefault[tikzfract]{%
+ Epaisseur=0.6pt,%
+ Type=Koch,%
+ Couleur=black,%
+ LongueurCote=3,%
+ Etape=1,%
+ Remplir=false,%
+ Remplissage=lightgray,%
+ Depart={(0,0)},%
+ Contour=false,%
+ AlignV=false,%
+ Offset=2pt
+}
+
+\NewDocumentCommand\FractaleTikz{ s O{} D<>{} }{%
+ \restoreKV[tikzfract]%
+ \setKV[tikzfract]{#2}%
+ \def\fracttikzlgstep{\fpeval{(\fracttikzlg)/(3^\fracttikzstep)}}%
+ \IfStrEq{\fracttikztype}{Sierp}%
+ {%
+ \def\fracttikzlgstep{\fpeval{(\fracttikzlg)/(128)}}%
+ }{}%
+ \IfBooleanF{#1}{\begin{tikzpicture}[#3]}
+ \ifboolKV[tikzfract]{Remplir}%
+ {%
+ \IfStrEq{\fracttikztype}{Koch}%
+ {%
+ \ifboolKV[tikzfract]{AlignV}%
+ {%
+ \node at ($(1/3*\fracttikzlg,0)+(-60:1/3*\fracttikzlg)$) {} ;
+ }{}%
+ \draw[line width =\fracttikzthick,shift=\fracttikzdepart,draw=\fracttikzcolor,fill=\fracttikzfill,l-system={FloconKoch,step=\fracttikzlgstep cm,angle=60,axiom=F++F++F,order=\fracttikzstep}] lindenmayer system -- cycle;
+ }{}%
+ \IfStrEq{\fracttikztype}{Sierp}%
+ {%
+ \ifboolKV[tikzfract]{Contour}%
+ {%
+ \draw[shift=\fracttikzdepart,line width=\fracttikzthick,\fracttikzcolor] (0,0) -- (60:\fracttikzlg cm) -- (\fracttikzlg cm,0) -- cycle ;
+ \clip (0,0) -- (60:\fracttikzlg cm) -- (\fracttikzlg cm,0) -- cycle ;
+ }{}%
+ \draw[line width=\fracttikzthick,shift=\fracttikzdepart,draw=\fracttikzcolor,fill=\fracttikzfill,l-system={TriangleSierpinski,step=\fracttikzlgstep cm,angle=60,axiom=F,order=8}]
+ lindenmayer system -- cycle;
+ }{}%
+ }%
+ {%
+ \IfStrEq{\fracttikztype}{Koch}%
+ {%
+ \ifboolKV[tikzfract]{AlignV}%
+ {%
+ \node at ($(1/3*\fracttikzlg,0)+(-60:1/3*\fracttikzlg)$) {} ;
+ }{}%
+ \draw [line width=\fracttikzthick,shift=\fracttikzdepart,\fracttikzcolor,l-system={FloconKoch,step=\fracttikzlgstep cm,angle=60,axiom=F++F++F,order=\fracttikzstep}] lindenmayer system -- cycle;
+ }{}%
+ \IfStrEq{\fracttikztype}{Sierp}%
+ {%
+ \ifboolKV[tikzfract]{Contour}%
+ {%
+ \draw[shift=\fracttikzdepart,line width=\fracttikzthick,\fracttikzcolor] (0,0) -- (60:\fracttikzlg cm) -- (\fracttikzlg cm,0) -- cycle ;
+ \clip (0,0) -- (60:\fracttikzlg cm) -- (\fracttikzlg cm,0) -- cycle ;
+ }{}%
+ \draw[line width=\fracttikzthick,shift=\fracttikzdepart,\fracttikzcolor,l-system={TriangleSierpinski,step=\fracttikzlgstep cm,angle=60,axiom=F,order=8}]
+ lindenmayer system -- cycle;
+ }{}%
+ }%
+ \IfBooleanF{#1}{\end{tikzpicture}}%
+}
+
+\NewDocumentCommand\EtapesFloconKoch{ O{} D<>{} m }{%
+ \restoreKV[tikzfract]%
+ \setKV[tikzfract]{#1}%
+ \foreach \i in {#3} {%
+ \FractaleTikz[AlignV,#1,Etape=\i]<#2>\hspace{\fracttikzoffset}%
+ }
+}
+
\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/unbtex/README.md b/macros/latex/contrib/unbtex/README.md
index 1ba57809fa..ad040dc031 100644
--- a/macros/latex/contrib/unbtex/README.md
+++ b/macros/latex/contrib/unbtex/README.md
@@ -1,6 +1,6 @@
# UnBTeX: A class for bachelor, master, and doctoral thesis at the
University of Brasilia (UnB), Brazil.
-Version 1.3 2023/10/17
+Version 1.3 2023/10/18
Copyright (C) 2021-2023 by Henrique C. Ferreira <hcferreira@unb.br>
@@ -53,6 +53,9 @@ Here is a history of changes:
. The indentation of lists of figures and tables have been corrected
. The cleveref package is now being used for cross-references instead
of the autoref command
+ 1.3.1 (2023-10-18):
+ . The abtex2eng-alf.bst file was included to format bibliographic
+ references in ABNT style for documents written in English.
## Overleaf
diff --git a/macros/latex/contrib/unbtex/abntex2eng-alf.bst b/macros/latex/contrib/unbtex/abntex2eng-alf.bst
new file mode 100644
index 0000000000..1e5d8cc611
--- /dev/null
+++ b/macros/latex/contrib/unbtex/abntex2eng-alf.bst
@@ -0,0 +1,2159 @@
+%%
+%% abntex2eng-alf.bst bibliography style file is adapted from abntex-alf.bst to
+%% format bibliographic references in ABNT style for documents written in English,
+%% following sugestions avaliable at https://github.com/abntex/abntex2/issues/97
+%%
+%% abntex2-alf.bst, v-1.9.7 laurocesar
+%% Copyright 2012-2018 by abnTeX2 group at http://www.abntex.net.br/
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is the abnTeX2 team, led
+%% by Lauro César Araujo. Further information are available on
+%% http://www.abntex.net.br/
+
+ENTRY
+ { address author
+ booktitle booksubtitle
+ chapter conference-number conference-year conference-location
+ edition editor editortype
+ dimensions furtherresp
+ howpublished illustrated institution
+ isbn issn journal key month note marginnote number organization
+ org-short pages pagename
+ publisher reprinted-from reprinted-text school
+ series subtitle section title type url urlaccessdate
+ volume year year-presented
+ abnt-and-type
+ abnt-doi abnt-dont-use-etal
+ abnt-etal-cite abnt-etal-list abnt-etal-text abnt-emphasize abnt-experimental
+ abnt-full-initials
+ abnt-last-names abnt-ldots-type
+ abnt-missing-year abnt-cite-style abnt-no-etal-label abnt-note
+ abnt-repeated-author-omit abnt-repeated-title-omit
+ abnt-show-options abnt-refinfo abnt-thesis-year abnt-url-package
+ abnt-title-command
+ abnt-verbatim-entry
+ iso-abbreviation iso-author-punctuation iso-date-place
+ }{}{ label extra.label year.label}
+
+%revision string
+STRINGS { abnt.bst.revision }
+
+%general purpose strings
+STRINGS { r s t }
+
+%variables needed to implement the various abnt options
+STRINGS {abnt.etal.text abnt.emphasize previous.author previous.title}
+INTEGERS {abnt.alf abnt.cite.style abnt.doi
+ abnt.experimental abnt.etal.cite abnt.etal.list
+ abnt.full.initials
+ abnt.last.names abnt.ldots.type
+ abnt.missing.year
+ abnt.refinfo abnt.repeated.author.omit abnt.repeated.title.omit
+ abnt.show.options abnt.and.type
+ abnt.title.command
+ abnt.thesis.year
+ abnt.url.package abnt.verbatim.entry
+ iso.abbreviation iso.author.punctuation iso.date.place
+ repeated.author}
+
+%needed for title formatting
+INTEGERS { title.lenght title.pos first.word no.bracket}
+STRINGS { title.char}
+
+%needed for controlling the sentence position
+INTEGERS {output.state before.all mid.sentence after.sentence after.block }
+
+%needed for url identification
+INTEGERS {url.type}
+
+%static values for options
+%values for abnt.doi
+FUNCTION {abnt.doi.expand.to.url} {#0} %expands a doi address to its url correspondent
+FUNCTION {abnt.doi.link} {#1} %links doi to its url correspondent
+FUNCTION {abnt.doi.leave.as.is} {#2} %shows doi as is, external viewer will have
+ %to know what to do with a "doi:" document
+
+%values for url types
+FUNCTION {unknown.url} {#0}
+FUNCTION {http.url} {#1}
+FUNCTION {file.url} {#2}
+FUNCTION {ftp.url} {#3}
+FUNCTION {doi.url} {#4}
+FUNCTION {mailto.url} {#5}
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+
+%output.nonnull decides what is written before the argument s, if a comma, period etc.
+FUNCTION {output.nonnull}
+{ 's := %the argument is written into s
+ output.state mid.sentence =
+ { ", " * write$ } %mid.sentence first write comma
+ { output.state after.block =
+ { add.period$ write$ newline$ }
+ { output.state before.all = 'write$
+ { add.period$ " " * write$ }
+ if$}
+ if$
+ mid.sentence 'output.state := }
+ if$
+ s %now comes s
+}
+FUNCTION {output.nonnull.dash}
+{ 's := %the argument is written into s
+ output.state mid.sentence =
+ { " --- " * write$ } %mid.sentence first write comma
+ { output.state after.block =
+ { add.period$ write$ newline$ write$}
+ { output.state before.all = 'write$
+ { add.period$ " " * write$ }
+ if$}
+ if$
+ mid.sentence 'output.state := }
+ if$
+ s %now comes s
+}
+FUNCTION {output} %does nothing or calls output.nonull
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.dash} %does nothing or calls output.nonull
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull.dash
+ if$
+}
+FUNCTION {output.check} %like ouput, but complains if t empty
+{ 't :=
+ duplicate$ empty$
+ { pop$ "campo " t * " vazio em " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank} { " " * before.all 'output.state :=}
+
+FUNCTION {date.block} {new.block}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { abnt.emphasize "{" * swap$ * "}" * }
+ if$
+}
+
+
+FUNCTION {tie.or.space.prefix} %if text length less than 3 chars. uses a tie
+{ duplicate$ text.length$ #5 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {no.space} { { "" } swap$ }
+
+
+FUNCTION {space.word} { " " swap$ * " " * }
+
+FUNCTION {bbl.and}
+{ abnt.and.type #0 = {" and "} 'skip$ if$
+abnt.and.type #1 = {" \& "} 'skip$ if$}
+FUNCTION {bbl.chapter} { "chap." }
+FUNCTION {bbl.colon} {": "}
+FUNCTION {bbl.editors} { "Eds." }
+FUNCTION {bbl.editor} { "Ed." }
+FUNCTION {bbl.edby} { "edited by" }
+FUNCTION {bbl.edition} { "ed." }
+FUNCTION {bbl.empty} {""}
+FUNCTION {bbl.etal}{abnt.etal.text "" = {""} {" " abnt.etal.text *} if$}
+FUNCTION {bbl.doi.url} {"http://dx.doi.org/"}
+FUNCTION {bbl.in}{ "In" iso.abbreviation 'skip$ { bbl.colon *} if$}
+FUNCTION {bbl.ldots} %#0 use nothing, #1 use \ldots, #2 use $\ldots$, 3# use {...}
+{abnt.ldots.type
+{abnt.ldots.type #1 = {"\ldots"} 'skip$ if$
+abnt.ldots.type #2 = {"$\ldots$"} 'skip$ if$
+abnt.ldots.type #3 = {"{...}"} 'skip$ if$}
+{""} %for #0 use nothing
+if$}
+FUNCTION {bbl.master} { "Master of Science" }
+FUNCTION {bbl.missing.year}
+{abnt.missing.year
+{"[s.d.]"} %#1
+{""} %#0
+if$}
+FUNCTION {bbl.monography} { "Monography" }
+FUNCTION {bbl.mthesis} { "Dissertation" }
+FUNCTION {bbl.no.address} {"[S.l.]"}
+FUNCTION {bbl.no.address.no.publisher} {"[S.l.: s.n.]"}
+FUNCTION {bbl.no.publisher} {"[s.n.]"}
+FUNCTION {bbl.number} { iso.abbreviation {"no."} {"n."} if$ }
+FUNCTION {bbl.nr} { "n." }
+FUNCTION {bbl.of} { "of" }
+FUNCTION {bbl.phd} { "Doctor in Philosophy" }
+FUNCTION {bbl.phdthesis} { "Thesis" }
+FUNCTION {bbl.pages}
+{pagename empty$
+{ "p." }
+{pagename}
+if$
+}
+FUNCTION {bbl.page} { bbl.pages }
+FUNCTION {bbl.reprint} {"Reprint from"}
+FUNCTION {bbl.semicolon} { "; "}
+FUNCTION {bbl.same.field} {"\underline{\ \ \ \ \ \ \ \ }"}
+FUNCTION {bbl.techrep} { "Technical Report" }
+FUNCTION {bbl.url.accessdate}
+{iso.abbreviation { "Cited "} {"Accessed on: "} if$}
+FUNCTION {bbl.url.available}
+{ iso.abbreviation {"Available from Internet: "} {"Available at: "} if$}
+FUNCTION {bbl.void} {""}
+FUNCTION {bbl.volume} { iso.abbreviation {"vol."} {"v."} if$ }
+
+
+MACRO {jan} {"Jan."}
+MACRO {feb} {"Feb."}
+MACRO {mar} {"Mar."}
+MACRO {apr} {"Apr."}
+MACRO {may} {"May"}
+MACRO {jun} {"Jun."}
+MACRO {jul} {"Jul."}
+MACRO {aug} {"Aug."}
+MACRO {sep} {"Sep."}
+MACRO {oct} {"Oct."}
+MACRO {nov} {"Nov."}
+MACRO {dec} {"Dec."}
+
+
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+FUNCTION {str.to.int}
+{ duplicate$ is.num
+ {chr.to.int$ #48 -}
+ 'skip$
+ if$
+}
+FUNCTION {bibinfo.check} %usage: field "field" bibinfo.check
+{ swap$ duplicate$ missing$
+ {pop$ pop$ ""}
+ { duplicate$ empty$
+ {swap$ pop$}
+ {swap$ pop$}
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {swap$ "faltando " swap$ * " em " * cite$ * warning$ pop$ ""}
+ { duplicate$ empty$
+ {swap$ "vazio " swap$ * " em " * cite$ * warning$}
+ {swap$ pop$}
+ if$
+ }
+ if$
+}
+
+FUNCTION {write.field.verbatim}
+{
+duplicate$ missing$
+ {pop$ pop$}
+ {
+ s text.length$ #0 >
+ {s "," * newline$ write$ "" 's :=}
+ 'skip$
+ if$
+ swap$
+ "={" * swap$ * "}" *
+ s swap$ * 's :=
+ }
+if$
+}
+
+FUNCTION {write.entry.verbatim1}
+{
+ "address" address write.field.verbatim
+ "author" author write.field.verbatim
+ "booktitle" booktitle write.field.verbatim
+ "booksubtitle" booksubtitle write.field.verbatim
+ "chapter" chapter write.field.verbatim
+ "conference-number" conference-number write.field.verbatim
+ "conference-year" conference-year write.field.verbatim
+ "conference-location" conference-location write.field.verbatim
+ "edition" edition write.field.verbatim
+ "editor" editor write.field.verbatim
+ "editortype" editortype write.field.verbatim
+ "dimensions" dimensions write.field.verbatim
+ "furtherresp" furtherresp write.field.verbatim
+ "howpublished" howpublished write.field.verbatim
+ "illustrated" illustrated write.field.verbatim
+ "institution" institution write.field.verbatim
+ "isbn" isbn write.field.verbatim
+ "issn" issn write.field.verbatim
+ "journal" journal write.field.verbatim
+}
+FUNCTION {write.entry.verbatim2}
+{
+ "key" key write.field.verbatim
+ "month" month write.field.verbatim
+ "note" note write.field.verbatim
+ "marginnote" marginnote write.field.verbatim
+ "number" number write.field.verbatim
+ "organization" organization write.field.verbatim
+ "org-short" org-short write.field.verbatim
+ "pages" pages write.field.verbatim
+ "pagename" pagename write.field.verbatim
+ "publisher" publisher write.field.verbatim
+ "reprinted-from" reprinted-from write.field.verbatim
+ "reprinted-text" reprinted-text write.field.verbatim
+ "school" school write.field.verbatim
+ "series" series write.field.verbatim
+ "subtitle" subtitle write.field.verbatim
+ "section" section write.field.verbatim
+ "title" title write.field.verbatim
+ "type" type write.field.verbatim
+}
+FUNCTION {write.entry.verbatim3}
+{
+ "url" url write.field.verbatim
+ "urlaccessdate" urlaccessdate write.field.verbatim
+ "volume" volume write.field.verbatim
+ "year" year write.field.verbatim
+ "abnt-emphasize" abnt-emphasize write.field.verbatim
+ "abnt-experimental" abnt-experimental write.field.verbatim
+ "abnt-doi" abnt-doi write.field.verbatim
+ "abnt-dont-use-etal" abnt-dont-use-etal write.field.verbatim
+ "abnt-full-initials" abnt-full-initials write.field.verbatim
+ "abnt-ldots-type" abnt-ldots-type write.field.verbatim
+ "abnt-missing-year" abnt-missing-year write.field.verbatim
+ "abnt-cite-style" abnt-cite-style write.field.verbatim
+ "abnt-no-etal-label" abnt-no-etal-label write.field.verbatim
+ %abnt-note
+ "abnt-repeated-author-omit" abnt-repeated-author-omit write.field.verbatim
+ "abnt-repeated-title-omit" abnt-repeated-title-omit write.field.verbatim
+ "abnt-show-options" abnt-show-options write.field.verbatim
+ "abnt-refinfo" abnt-refinfo write.field.verbatim
+ "abnt-thesis-year" abnt-thesis-year write.field.verbatim
+ "abnt-title-command" abnt-title-command write.field.verbatim
+ "abnt-url-package" abnt-url-package write.field.verbatim
+ "abnt-verbatim-entry" abnt-verbatim-entry write.field.verbatim
+}
+
+FUNCTION {write.entry.verbatim}
+{"" 's := "" 't :=
+ abnt.verbatim.entry
+ {"{\footnotesize\begin{verbatim}" newline$ write$
+ "@" type$ * "{" * cite$ * 's :=
+ write.entry.verbatim1
+ write.entry.verbatim2
+ write.entry.verbatim3
+ s "" = {"}"} {s "}" *} if$
+ newline$ write$
+ "\end{verbatim}}" newline$ write$}
+ {newline$}
+if$}
+
+STRINGS { bibinfo}
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {get.person} {"{vv }{ll}{, jj}{, ff}" format.name$}
+FUNCTION {get.last.name} {#1 "{ll}" format.name$}
+FUNCTION {get.first.name} {#1 "{ff}" format.name$}
+FUNCTION {get.von} {#1 "{vv}" format.name$}
+FUNCTION {get.jr} {#1 "{jj}" format.name$}
+FUNCTION {is.composed.von}
+ {get.person
+ get.von duplicate$ empty$ {pop$ #0}
+ {duplicate$
+ get.first.name empty$ not
+ swap$ get.last.name empty$ not and
+ } if$
+ }
+
+FUNCTION {recompose.name}
+ {get.person duplicate$ duplicate$ duplicate$
+ get.von #1 "{ll }" format.name$ swap$
+ get.last.name *
+ swap$ #1 "{, ff}" format.name$ *
+ swap$ get.von #1 "{ ff}" format.name$ *
+ }
+
+
+FUNCTION {format.single.name}
+{
+s nameptr get.person 'r :=
+abnt.last.names
+ {r #1 "{ll}{ jj}" format.name$ "u" change.case$
+ abnt.full.initials
+ {r #1 "{, ff}{ vv}" format.name$ *}
+ {r #1 "{, f.}{ vv}" format.name$ *}
+ if$}
+ {%r #1 is.composed.von {r #1 recompose.name 'r :=} 'skip$ if$
+ r #1 "{ll}" format.name$
+ #1 "{ll}" format.name$
+ r #1 "{ jj}" format.name$ * "u" change.case$
+ abnt.full.initials
+ {r #1 "{, ff}{ vv}" format.name$ *
+ r #1 "{ll}" format.name$
+ #1 "{ ff}{ vv}" format.name$ *}
+ {iso.author.punctuation
+ {r #1 "{, f{}}{ vv}" format.name$ *}
+ {r #1 "{, f.}{ vv}" format.name$ *} if$
+ r #1 "{ll}" format.name$
+ #1 "{ f.}{ vv}" format.name$ *}
+ if$}
+
+if$
+}
+FUNCTION {format.names}
+{ 'bibinfo := duplicate$ empty$ 'skip$
+ {'s :=
+ "" 't :=
+ #1 'nameptr := s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { format.single.name
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {nameptr #1 #1 + = numnames abnt.etal.list > and
+ {abnt.etal.list {"others" 't := #1 'namesleft :=} 'skip$ if$ }
+ 'skip$
+ if$
+ namesleft #1 >
+ { "; " * t * }
+ { numnames #2 >
+ { "" * }
+ 'skip$
+ if$
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ { bbl.etal *}
+ { "; " * t *}
+ if$ }
+ if$ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft := }
+ while$
+ } if$
+}
+
+%from plain.bst
+FUNCTION {format.names.plain}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #20 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { bbl.etal * }
+ { bbl.and * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+FUNCTION {format.names.ed} {format.names}
+
+FUNCTION {format.authors}
+{
+author "author" format.names
+}
+
+FUNCTION {format.authors.plain}
+{
+author format.names.plain
+}
+
+FUNCTION {get.bbl.editor} { editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+
+FUNCTION {format.book.pages}
+{ pages "pages" bibinfo.check duplicate$ empty$
+ 'skip$
+ { "~" * bbl.pages * }
+ if$
+}
+FUNCTION {format.dimensions}
+{ dimensions empty$
+ 'skip$
+ { dimensions output}
+ if$
+}
+FUNCTION {format.furtherresp}
+{ furtherresp empty$
+ 'skip$
+ { furtherresp output}
+ if$
+}
+FUNCTION {format.illustrated}
+{ illustrated missing$
+ 'skip$
+ {illustrated empty$
+ {"il." output}
+ {illustrated output}
+ if$}
+ if$
+}
+FUNCTION {format.isbn}
+{ isbn "isbn" bibinfo.check duplicate$ empty$
+ 'skip$
+ {new.block "ISBN " swap$ *}
+ if$
+}
+
+FUNCTION {format.issn}
+{ issn "issn" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {new.block "ISSN " swap$ *}
+ if$
+}
+
+FUNCTION {format.note}
+{ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check }
+ if$
+}
+
+FUNCTION {format.howpublished}
+{ howpublished empty$
+ { "" }
+ { howpublished #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$ }
+ if$
+ howpublished #2 global.max$ substring$ * "howpublished" bibinfo.check }
+ if$
+}
+
+
+%ABNT styles require that the title acts as an author if
+%typical author fields are absent. In this case the first
+%word is uppercase. Our main problem is to establish what
+%the first word actually is since portuguese uses accents.
+%For example: Fun{\c c}\ão (Função) is a whole word but contains a
+%space, but if we write Fun\c{c}\ão \c is converted to uppercase...
+%You get the problem, don't you?
+FUNCTION {format.title.as.author}
+{ 's := %holds the title
+ #1 'title.pos := %our position in the title
+ #1 'first.word := %boolean, true if we already have the first word
+ #1 'no.bracket := %boolean, false if we are inside a {}
+ "" 't := %holds the first title.pos characters of the title
+ {first.word}
+ {s title.pos #1 substring$ 'title.char :=
+ %checks if the character is a {
+ title.char "{" = {#0 'no.bracket :=} 'skip$ if$
+ %if we are in a bracket
+ no.bracket 'skip$ {title.char "}" = {#1 'no.bracket :=} 'skip$ if$} if$
+ type$ "journalpart" =
+ {title.char "." = title.char ":" = or title.char "!" = or
+ title.char "," = or title.char ";" = or title.char "?" = or}
+ {title.char " " =}
+ if$ s t = or no.bracket and
+ {#0 'first.word :=
+ t title.char * "u" change.case$
+ title.pos #1 + 'title.pos :=
+ s title.pos global.max$ substring$ * 's :=}
+ {title.pos #1 + 'title.pos := t title.char * 't :=}
+ if$
+ }
+ while$
+s
+}
+
+
+%compares current title with the title of the previous entry
+FUNCTION {compare.title}
+{abnt.repeated.title.omit
+ {duplicate$ "" = 'skip$
+ {duplicate$ previous.title = repeated.author and
+ {duplicate$ 'previous.title := pop$ bbl.same.field}
+ {duplicate$ 'previous.title :=}
+ if$}
+ if$}
+ 'skip$
+ if$
+}
+
+FUNCTION {apply.title.command}
+{abnt.title.command
+ {duplicate$ empty$ 'skip$
+ {"\bibtextitlecommand{" type$ * "}{" * swap$ * "}" *}
+ if$}
+ 'skip$ if$
+}
+
+FUNCTION {format.title}
+{author empty$ editor empty$ and organization empty$ and
+ {title format.title.as.author}
+ {title duplicate$ empty$ {pop$ ""} {"t" change.case$} if$}
+ if$
+ subtitle empty$ 'skip$ {subtitle ": " swap$ * "t" change.case$ *} if$
+ apply.title.command
+ compare.title
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in} { bbl.in " " * }
+
+FUNCTION {format.month}
+{ month empty$ 'skip$
+ {month "month" bibinfo.check}
+ if$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { bbl.missing.year }
+ { "existe o campo month (mês) mas não o campo year (ano) em " cite$ * warning$ month}
+ if$}
+ { month empty$
+ { year n.dashify}
+ { month " " * year * }
+ if$}
+ if$
+}
+FUNCTION {format.btitle}
+{author empty$ editor empty$ and organization empty$ and
+ {title format.title.as.author "title" bibinfo.check duplicate$ empty$ 'skip$ {} if$
+ subtitle empty$ 'skip$ {subtitle ": " swap$ * "t" change.case$ *} if$}
+ {title "title" bibinfo.check emphasize duplicate$ empty$ 'skip$ {} if$
+ subtitle empty$ 'skip$ {subtitle ": " swap$ * "t" change.case$ *} if$}
+if$
+apply.title.command
+compare.title
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "não posso usar ambos " swap$ * " os campos em " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.volume} %leaves formatted or empty volume on the stack
+{volume duplicate$ empty$
+ 'skip$
+ {volume #1 #1 substring$ is.num
+ {bbl.volume swap$ tie.or.space.prefix * *}
+ 'skip$
+ if$}
+ if$
+}
+
+FUNCTION {format.number} %leaves formatted or empty number on the stack
+{ number duplicate$ empty$
+ 'skip$
+ {bbl.number swap$ tie.or.space.prefix * *}
+ if$
+}
+
+FUNCTION {format.patent.number}
+{ number
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { format.volume
+ number empty$ 'skip$ {output format.number} if$
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ bbl.of space.word * swap$
+ emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.bvolume.if.no.series}
+{ series empty$
+ { format.bvolume }
+ { "" }
+ if$
+}
+
+
+FUNCTION {format.number.or.volume}
+{number empty$
+ {format.volume}
+ {number} %we use the pure number here without leading "n."
+ if$
+}
+
+FUNCTION {format.volume.and.number}
+{format.volume output
+ format.number
+}
+
+FUNCTION {format.volume.number.series}
+{ number empty$ volume empty$ and
+ { series empty$
+ { "" }
+ {" (" series "series" bibinfo.check * ")" *}
+ if$}
+ { series empty$
+ {""} %{ format.number.or.volume }
+ { " (" series "series" bibinfo.check * ", " *
+ format.number.or.volume * ")" * }
+ if$ }
+ if$
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {output.state mid.sentence = { "l" } { "t" } if$ change.case$
+ "edition" bibinfo.check
+ edition #1 #1 substring$ is.num {". " * bbl.edition * } 'skip$ if$}
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ { n.dashify bbl.pages swap$}
+ { bbl.page swap$ }
+ if$
+ tie.or.space.prefix "pages" bibinfo.check * * }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages empty$ {""}
+ { pages n.dashify bbl.pages
+ swap$ tie.or.space.prefix "pages" bibinfo.check * *}
+ if$
+}
+
+FUNCTION {get.url.type}
+{s #1 #5 substring$ "http:" = {http.url}
+ {s #1 #6 substring$ "https:" = {http.url}
+ {s #1 #5 substring$ "file:" = {file.url}
+ {s #1 #4 substring$ "ftp:" = {ftp.url}
+ {s #1 #4 substring$ "doi:" = {doi.url}
+ {s #1 #7 substring$ "mailto:" = {mailto.url} {unknown.url} if$}
+ if$}
+ if$}
+ if$}
+ if$}
+ if$
+ 'url.type :=
+}
+
+FUNCTION {expand.doi}
+{s
+url.type doi.url =
+ {#5 global.max$ substring$ bbl.doi.url swap$ *}
+ 'skip$ if$
+}
+
+INTEGERS {url.pos url.length}
+FUNCTION {filter.url.tex}
+{s text.length$ #1 + 'url.length :=
+ #1 'url.pos := "" 't :=
+ {url.pos url.length <}
+ {s url.pos #1 substring$
+ duplicate$ "_" = {pop$ "\underline{\ }" } 'skip$ if$
+ duplicate$ "%" = {pop$ "\%" } 'skip$ if$
+ duplicate$ "&" = {pop$ "\&" } 'skip$ if$
+ duplicate$ "~" = {pop$ "\~{}" } 'skip$ if$
+ duplicate$ "/" = {pop$ "\-/" } 'skip$ if$
+ duplicate$ "." = {pop$ "\-." } 'skip$ if$
+ duplicate$ "\" = {pop$ "{\textbackslash}" } 'skip$ if$
+ duplicate$ "#" = {pop$ "\#" } 'skip$ if$
+ duplicate$ "_" = {pop$ "\_" } 'skip$ if$
+ t swap$ * 't :=
+ url.pos #1 + 'url.pos :=
+ }
+ while$
+t
+}
+FUNCTION {filter.url.html}
+{s text.length$ #1 + 'url.length :=
+ #1 'url.pos := "" 't :=
+ {url.pos url.length <}
+ {s url.pos #1 substring$
+ duplicate$ "%" = {pop$ "\%" } 'skip$ if$
+ duplicate$ "#" = {pop$ "\#" } 'skip$ if$
+ duplicate$ "_" = {pop$ "\_" } 'skip$ if$
+ t swap$ * 't :=
+ url.pos #1 + 'url.pos :=
+ }
+ while$
+t
+}
+
+FUNCTION {compose.url}
+{'s :=
+ get.url.type
+ bbl.url.available
+ abnt.url.package #0 =
+ { "$<$" *
+ abnt.doi abnt.doi.expand.to.url = 'expand.doi {s} if$
+ * "$>$" *} 'skip$ if$
+ abnt.url.package #1 =
+ { "\url{" * filter.url.html * "}" *} 'skip$ if$
+ abnt.url.package #2 =
+ {url.type http.url =
+ {"\htmladdnormallink{$<$" * filter.url.tex * "$>$}{" * filter.url.html * "}" *}
+ 'skip$ if$
+ url.type doi.url = url.type ftp.url = or url.type mailto.url = or
+ {"\htmladdnormallink{$<$" *
+ abnt.doi abnt.doi.expand.to.url = 'expand.doi {s} if$
+ * "$>$}{" *
+ abnt.doi abnt.doi.leave.as.is = {s} 'expand.doi if$
+ * "}" * }
+ 'skip$ if$
+ url.type unknown.url =
+ {"$<$" * filter.url.tex * "$>$" *}
+ 'skip$ if$} 'skip$ if$
+}
+FUNCTION {format.url}
+{ url empty$ 'skip$
+ {url compose.url output new.sentence }
+ if$
+ urlaccessdate duplicate$ empty$ 'skip$
+ { bbl.url.accessdate swap$ *}
+ if$
+ "urlaccessdate" bibinfo.check output new.sentence
+}
+
+FUNCTION {format.conference.info}
+{ conference-number empty$
+ 'skip$
+ {conference-number "." * output}
+ if$
+ conference-year empty$
+ 'skip$
+ {conference-year output}
+ if$
+ conference-location empty$
+ 'skip$
+ {conference-location output}
+ if$
+ new.sentence
+}
+
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check }
+ if$
+ chapter tie.or.space.prefix "chapter" bibinfo.check * *
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$ }
+ if$
+}
+
+FUNCTION {format.booktitle}
+{author empty$ editor empty$ and organization empty$ and
+ {booktitle format.title.as.author "booktitle" bibinfo.check duplicate$ empty$ 'skip$ {} if$
+ booksubtitle empty$ 'skip$ {booksubtitle ": " swap$ * "t" change.case$ *
+ apply.title.command} if$}
+ {booktitle "booktitle" bibinfo.check emphasize duplicate$ empty$ 'skip$ {} if$
+ booksubtitle empty$ 'skip$ {booksubtitle ": " swap$ * "t" change.case$ *
+ apply.title.command} if$}
+if$
+}
+FUNCTION {format.editors}
+{ editor empty$
+ {"inbook" type$ = 'bbl.same.field 'skip$ if$}
+ {author empty$
+ {editor "editor" format.names " (" *
+ editortype empty$ {bbl.editor} {editortype} if$
+ ")" * * }
+ {"inbook" type$ =
+ {bbl.same.field }
+ {editor "editor" format.names " (" *
+ editortype empty$ {bbl.editor} {editortype} if$
+ ")" * *}
+ if$}
+ if$}
+ if$
+}
+FUNCTION {format.in.ed.booktitle}
+{ editor empty$
+ {organization empty$ not author empty$ not and %if one of two not empty
+ {word.in organization "u" change.case$ * output
+ format.conference.info
+ booktitle empty$ {""} {new.sentence format.booktitle} if$}
+ {word.in
+ organization empty$ author empty$ and 'skip$
+ {"inbook" type$ = {bbl.same.field * output new.sentence ""}
+ 'skip$ if$ } if$
+ booktitle empty$ 'skip$ {format.booktitle *} if$}
+ if$}
+ {word.in format.editors * output
+ booktitle empty$ {""} {new.sentence format.booktitle} if$}
+ if$
+ output
+ new.sentence
+}
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "todos os campos relevantes estão vazios ou faltando em " cite$ * warning$ }
+ 'skip$
+ if$
+}
+FUNCTION {format.type}
+{ type "type" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {new.block "" swap$ * }
+ if$
+}
+
+
+FUNCTION {format.year}
+{year empty$
+ { "campo year vazio ou faltando em " cite$ *
+ abnt.missing.year {" (vou colocar [s.d.])" *} 'skip$ if$ warning$
+ abnt.missing.year {", " } {""} if$ bbl.missing.year *}
+ {year n.dashify "year" bibinfo.check}
+if$
+}
+
+FUNCTION {format.year.presented}
+{year-presented empty$
+ {""}
+ {year-presented n.dashify}
+if$
+}
+
+FUNCTION {format.field.address}
+{ 't :=
+ address empty$ organization empty$ and url empty$ and t empty$ and
+ {bbl.no.address.no.publisher}
+ {address empty$
+ %if an url is present we don't give a missing address "[s.l.]" notice
+ {url empty$ {bbl.no.address ": "} {"" ""} if$}
+ {address ": "}
+ if$
+ t empty$
+ {%if an organization is present then it is OK not to have a publisher
+ organization empty$ {* bbl.no.publisher * } 'pop$ if$}
+ {* t * }
+ if$}
+ if$
+}
+
+FUNCTION {format.address}
+{address empty$
+ { bbl.no.address}
+ { address}
+ if$
+}
+
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.check format.field.address}
+
+FUNCTION {format.publisher.address.relax}
+{publisher empty$ address empty$ and {""}
+ {publisher "publisher" bibinfo.check format.field.address}
+if$}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.field.address}
+
+%retains current authorship for future use
+FUNCTION {compare.authorship}
+{abnt.repeated.author.omit
+ {duplicate$ "" = 'skip$
+ {duplicate$ previous.author =
+ {duplicate$ 'previous.author :=
+ pop$ bbl.same.field
+ #1 'repeated.author :=}
+ {duplicate$ 'previous.author :=
+ #0 'repeated.author :=}
+ if$}
+ if$}
+ 'skip$
+ if$
+}
+
+FUNCTION {format.author.or.organization}
+{ author empty$
+ { organization empty$ 'skip$
+ { organization "u" change.case$ "organization" bibinfo.check output}
+ if$}
+ { format.authors output.nonnull }
+ if$
+ compare.authorship
+}
+
+
+FUNCTION {format.editor.or.organization}
+{ editor empty$
+ { organization empty$ 'skip$
+ { organization "u" change.case$ "organization" bibinfo.check output}
+ if$}
+ { format.editors output.nonnull }
+ if$
+ compare.authorship
+}
+
+FUNCTION {format.author.or.editor.or.organization}
+{ author empty$
+ { editor empty$
+ { organization empty$
+ 'skip$
+ { organization "u" change.case$ "organization" bibinfo.check output}
+ if$}
+ { format.editors output.nonnull }
+ if$}
+ { format.authors output.nonnull }
+ if$
+ compare.authorship
+}
+
+FUNCTION {format.reprint}
+{ reprinted-text missing$
+ {""}
+ {reprinted-text empty$
+ {bbl.reprint} {reprinted-text} if$
+ bbl.colon *}
+ if$
+}
+
+FUNCTION {format.journal}
+{
+ format.reprint
+ journal emphasize *
+}
+
+
+%generates the first label in \abntrefinfo to be used with \citeonline
+FUNCTION {format.names.for.label1} %abnt-alf only
+{ 's := "" 't :=
+ #1 'nameptr := s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {abnt.last.names
+ {s nameptr "{ll}{ jj}" format.name$}
+ {s nameptr "{ll}" format.name$ #1 "{ll}" format.name$
+ s nameptr "{ jj}" format.name$ *}
+ if$
+ 't :=
+ nameptr #1 >
+ {namesleft #1 >
+ { numnames abnt.etal.cite > abnt.etal.cite #0 = not and
+ {#0 'namesleft := abnt.etal.cite {bbl.etal *} 'skip$ if$}
+ {", " * t * } if$ }
+ { t "others" =
+ {abnt.etal.cite {bbl.etal *} 'skip$ if$}
+ {numnames nameptr =
+ {bbl.and * t *}
+ 'skip$ if$}
+ if$
+ }
+ if$ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft := }
+ while$
+}
+
+%generates the second label in \abntrefinfo to be used with \cite
+FUNCTION {format.names.for.label2} %abnt-alf only
+{ 's := "" 't :=
+ #1 'nameptr := s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {abnt.last.names
+ {s nameptr "{ll}{ jj}" format.name$}
+ {s nameptr "{ll}" format.name$ #1 "{ll}" format.name$
+ s nameptr "{ jj}" format.name$ *}
+ if$
+ abnt.cite.style #0 = {"u" change.case$} 'skip$ if$ 't :=
+ nameptr #1 >
+ {namesleft #1 >
+ { numnames abnt.etal.cite >
+ {#0 'namesleft := abnt.etal.cite {bbl.etal *} 'skip$ if$}
+ {"; " * t * } if$ }
+ { t "OTHERS" = t "others" = or
+ {abnt.etal.cite {bbl.etal *} 'skip$ if$}
+ {numnames nameptr = { bbl.semicolon * t *} 'skip$ if$}
+ if$
+ }
+ if$ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft := }
+ while$
+}
+
+FUNCTION {format.title.for.label}
+{ 's :=
+ #1 'title.pos := #1 'first.word :=
+ "" 't :=
+ {first.word}
+ {s title.pos #1 substring$ 'title.char :=
+ title.char "." = title.char ":" = or title.char ";" = or
+ title.char "," = or title.char " " = or s t = or
+ {#0 'first.word :=
+ title.pos #1 + 'title.pos :=}
+ {title.pos #1 + 'title.pos := t title.char * 't :=}
+ if$
+ }
+ while$
+s t = %title equals first word, dont use bbl.ldots
+ {t "}{" * t
+ abnt.cite.style #0 = {"u" change.case$ * } 'skip$ if$}
+ {t bbl.ldots * "}{" * t
+ abnt.cite.style #0 = {"u" change.case$} 'skip$ if$ * bbl.ldots *}
+if$
+}
+
+%cvs keys have the general form $key: value $
+INTEGERS {key.pos value.pos}
+FUNCTION {extract.cvs.key} %we borrow the functionality of format.title.for.label
+{ 's := %holds the entire cvs string
+ #1 'key.pos :=
+ #0 'value.pos := %0= between first $ and :, 1=between : and second $, 2= at the end
+ "" 't := %holds the resulting value
+ {value.pos #0 = value.pos #1 = or}
+ { s key.pos #1 substring$ 'title.char :=
+ value.pos #0 =
+ { title.char ":" = {#1 'value.pos := key.pos #1 + 'key.pos :=} 'skip$ if$}
+ { title.char "$" =
+ {#2 'value.pos :=}
+ {t title.char * 't :=}
+ if$}
+ if$
+ key.pos #1 + 'key.pos :=
+ }
+ while$
+ t
+}
+
+%generates and extended label of type {Author}{AUTHOR}{YEAR}
+%for abnt.cite.style=1 they will be of type {Author}{Author}{YEAR}
+%final result is placed into variable label
+FUNCTION {calc.extended.label}
+{ "{"
+ author empty$ not
+ {author format.names.for.label1 * "}{" * author format.names.for.label2 *}
+ {editor empty$ not
+ {editor format.names.for.label1 * "}{" * editor format.names.for.label2 *}
+ {org-short empty$ not
+ {org-short * "}{" * org-short "u" change.case$ *}
+ {organization empty$ not
+ {organization * "}{" * organization "u" change.case$ *}
+ {title empty$ not
+ {title format.title.for.label *}
+ {"nada}{NADA" *}
+ if$}
+ if$}
+ if$}
+ if$}
+ if$
+ "}{" *
+ year empty$ 'skip$ {year *} if$
+ 'label := %place the stack into label
+ % final } will be placed in reverse.pass
+}
+%generates and simple label of type "Author YEAR"
+%final result is placed onto the stack
+FUNCTION {calc.simple.label}
+{ author empty$ not
+ {author format.names.for.label1}
+ {editor empty$ not
+ {editor format.names.for.label1}
+ {organization empty$ not
+ {organization}
+ {title empty$ not
+ {title}
+ {""}
+ if$}
+ if$}
+ if$}
+ if$
+ year empty$ 'skip$ {" " * year *} if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ abnt.alf
+ {"\bibitem[" write$
+ calc.simple.label
+ write$ "]{"}
+ {"\bibitem{"}
+ if$
+ write$ cite$ write$ "}" write$ newline$
+ abnt.refinfo #1 = {"\abntrefinfo" write$ label write$ newline$} 'skip$ if$
+ "{" write$
+ "" before.all 'output.state :=
+}
+FUNCTION {output.hiddenbibitem}
+{ newline$
+ abnt.alf
+ {"\hiddenbibitem[" write$
+ calc.simple.label
+ write$ "]{"}
+ {"\bibitem{"}
+ if$
+ write$ cite$ write$ "}" write$ newline$
+ abnt.refinfo #1 = {"\abntrefinfo" write$ label write$ newline$} 'skip$ if$
+ "{" write$
+ "" before.all 'output.state :=
+}
+FUNCTION {fin.entry}
+{ add.period$ write$
+ reprinted-from empty$ 'skip$
+ {" " reprinted-text empty$
+ {bbl.reprint} {reprinted-text} if$ * bbl.colon *
+ "\abntreprintinfo{ " * reprinted-from * "}" * write$}
+ if$
+ abnt-note empty$ 'skip$
+ {"\footnote{" abnt-note * "}" * write$} if$
+ "}" write$
+ %newline$
+ write.entry.verbatim
+}
+
+FUNCTION { abnt.display.options}
+{ 's := 't :=
+ abnt.show.options #1 = % "warn"
+ {"opção " t * " passou para " * s * warning$ } 'skip$ if$
+
+ abnt.show.options #2 = % "list"
+ {"Op\c c\~ao selecionada {\tt " t * "=}\verb+" * s * "+" * output new.sentence } 'skip$ if$
+}
+
+FUNCTION { abnt-options1 }
+ {
+ abnt-show-options empty$
+ 'skip$
+ {abnt-show-options "no" =
+ {#0} {abnt-show-options "warn" =
+ {#1} {abnt-show-options "list" =
+ {#2 } {#0 } if$} if$} if$
+ 'abnt.show.options :=} % #0 "no"; #1 "warn"; #2 "list"
+ if$
+
+ abnt.show.options #2 =
+ {output.bibitem "Mudan\c ca de estilo ap\'os este ponto com o comando \verb!\citeoption{"
+ cite$ * "}! " *
+ output new.sentence} 'skip$ if$
+
+ abnt-show-options empty$
+ 'skip$ {"abnt-show-options" abnt-show-options abnt.display.options} if$
+
+ abnt-cite-style empty$
+ 'skip$
+ {abnt-cite-style "(AUTHOR, YEAR)" =
+ {#0 'abnt.cite.style :=}
+ {abnt-cite-style "(Author, YEAR)" =
+ {#1 'abnt.cite.style :=}
+ {"opção " abnt-cite-style * " desconhecida" * warning$}
+ if$}
+ if$
+ "abnt-cite-style" abnt-cite-style abnt.display.options}if$
+
+ abnt-experimental empty$
+ 'skip$ {abnt-experimental "yes" = 'abnt.experimental :=
+ "abnt-experimental" abnt-experimental abnt.display.options} if$
+
+ abnt-emphasize duplicate$ empty$
+ 'pop$ {'abnt.emphasize :=
+ "abnt-emphasize" abnt.emphasize abnt.display.options
+ abnt-emphasize "\bf" = abnt-emphasize "\it" = or abnt-emphasize "\em" = or
+ abnt-emphasize "\bfseries" = or
+ {"não use " abnt-emphasize * " para abnt-emphasize em " * cite$ *
+ ", isto alterará TODO o texto. Use \textbf ou \emph. Veja a documentação abnt-bibtex-doc para mais detalhes." * warning$}
+ 'skip$ if$
+ } if$
+
+ abnt-doi empty$
+ 'skip$
+ {abnt-doi "expand" =
+ {abnt.doi.expand.to.url 'abnt.doi :=}
+ {abnt-doi "link" =
+ {abnt.doi.link 'abnt.doi :=}
+ {abnt-doi "doi" =
+ {abnt.doi.leave.as.is 'abnt.doi :=}
+ {"opção " abnt-doi * " desconhecida" * warning$}
+ if$}
+ if$}
+ if$
+ "abnt-doi" abnt-doi abnt.display.options}if$
+ }
+FUNCTION { abnt-options2 }
+ {
+ abnt-full-initials empty$
+ 'skip$ {abnt-full-initials "yes" = 'abnt.full.initials :=
+ "abnt-full-initials" abnt-full-initials abnt.display.options} if$
+
+ abnt-last-names empty$
+ 'skip$
+ {abnt-last-names "abnt" = {#0}
+ {abnt-last-names "bibtex" = {#1} {#0} if$} if$
+ 'abnt.last.names :=
+ "abnt-last-names" abnt-last-names abnt.display.options}
+ if$
+
+
+ abnt-ldots-type empty$
+ 'skip$
+ {abnt-ldots-type "none" = {#0}
+ {abnt-ldots-type "normal" = {#1}
+ {abnt-ldots-type "math" = {#2}
+ {abnt-ldots-type "text" = {#1} {#0}
+ if$} if$} if$} if$
+ 'abnt.ldots.type :=
+ "abnt-ldots-type" abnt-ldots-type abnt.display.options}
+ if$
+
+ abnt-missing-year empty$
+ 'skip$
+ {abnt-missing-year "void" = {#0}
+ {abnt-missing-year "sd" = {#1} {#0} if$}
+ if$
+ 'abnt.missing.year :=
+ "abnt-missing-year" abnt-missing-year abnt.display.options}
+ if$
+
+
+ abnt-and-type empty$
+ 'skip$ {abnt-and-type "and" =
+ {#0} {abnt-and-type "&" =
+ {#1} {#0} if$} if$
+ 'abnt.and.type :=
+ "abnt-and-type" abnt-and-type abnt.display.options}
+ if$
+
+ abnt-thesis-year empty$
+ 'skip$ {abnt-thesis-year "final" =
+ {#0} {abnt-thesis-year "title" =
+ {#1} {abnt-thesis-year "both" =
+ {#2} {#0} if$} if$} if$
+ 'abnt.thesis.year :=
+ "abnt-thesis-year" abnt-thesis-year abnt.display.options}
+ if$
+
+ abnt-refinfo empty$
+ 'skip$ {abnt-refinfo "yes" = 'abnt.refinfo :=
+ "abnt-refinfo" abnt-refinfo abnt.display.options} if$
+}
+FUNCTION { abnt-options3 }
+ {
+
+ abnt-dont-use-etal empty$
+ 'skip$ {abnt-dont-use-etal "yes" = {#0 'abnt.etal.list :=} 'skip$ if$
+ "Uso da opção abnt-dont-use-etal se tornou obsoleto, usamos abnt-etal-list." warning$
+ "abnt-etal-list" abnt.etal.list int.to.str$ abnt.display.options} if$
+
+ abnt-etal-cite empty$
+ 'skip$ {abnt-etal-cite str.to.int 'abnt.etal.cite :=
+ "abnt-etal-cite" abnt.etal.cite int.to.str$ abnt.display.options} if$
+
+ abnt-etal-list empty$
+ 'skip$ {abnt-etal-list str.to.int 'abnt.etal.list :=
+ "abnt-etal-list" abnt.etal.list int.to.str$ abnt.display.options} if$
+
+ abnt-etal-text missing$
+ 'skip$ {abnt-etal-text 'abnt.etal.text :=
+ "abnt-etal-text" abnt.etal.text abnt.display.options} if$
+
+ abnt-no-etal-label empty$
+ 'skip$ {abnt-no-etal-label "yes" = {#0 'abnt.etal.cite :=} 'skip$ if$
+ "Uso da opção abnt-no-etal-label se tornou obsoleto, usamos abnt-etal-cite." warning$
+ "abnt-etal-cite" abnt.etal.cite int.to.str$ abnt.display.options} if$
+
+ abnt-repeated-author-omit empty$
+ 'skip$ {abnt-repeated-author-omit "yes" =
+ {#1 'abnt.repeated.author.omit :=}
+ {#0 'abnt.repeated.author.omit := "" 'previous.author :=} if$
+ "abnt-repeated-author-omit" abnt-repeated-author-omit abnt.display.options} if$
+
+ abnt-repeated-title-omit empty$ 'skip$
+ {abnt-repeated-title-omit "yes" =
+ {#1 'abnt.repeated.title.omit :=}
+ {#0 'abnt.repeated.title.omit := "" 'previous.title :=} if$
+ "abnt-repeated-title-omit" abnt-repeated-title-omit abnt.display.options
+ abnt.repeated.author.omit not abnt.repeated.title.omit and
+ {"Use abnt-repeated-title-omit=yes junto com abnt-repeated-author-omit=yes"
+ warning$} 'skip$ if$} if$
+
+ abnt-title-command empty$
+ 'skip$ {abnt-title-command "yes" =
+ {#1 'abnt.title.command :=}
+ {#0 'abnt.title.command :=} if$
+ "abnt-title-command" abnt-title-command abnt.display.options} if$
+
+ abnt-url-package empty$ 'skip$
+ {abnt-url-package "url" =
+ {#1 'abnt.url.package :=}
+ {abnt-url-package "hyperref" = {#2 'abnt.url.package :=} 'skip$ if$}
+ if$
+ "abnt-url-package" abnt-url-package abnt.display.options}
+ if$
+
+ abnt-verbatim-entry empty$
+ 'skip$ {abnt-verbatim-entry "yes" = 'abnt.verbatim.entry :=
+ "abnt-verbatim-entry" abnt-verbatim-entry abnt.display.options} if$
+
+ abnt.show.options #2 = 'fin.entry 'skip$ if$
+ }
+
+%we had to break this function in two parts because of the following message:
+%Sorry---you've exceeded BibTeX's single function space 100
+%(That was a fatal error)
+FUNCTION { iso-options1 }
+ {
+ iso-abbreviation empty$
+ 'skip$ {iso-abbreviation "standard" = 'iso.abbreviation :=
+ "iso-abbreviation" iso-abbreviation abnt.display.options} if$
+ iso-author-punctuation empty$
+ 'skip$ {iso-author-punctuation "void" = 'iso.author.punctuation :=
+ "iso-author-punctuation" iso-author-punctuation abnt.display.options} if$
+ iso-date-place empty$
+ 'skip$ {iso-date-place "ISO" = 'iso.date.place :=
+ "iso-date-place" iso-date-place abnt.display.options} if$
+ }
+
+FUNCTION { abnt-options }
+ {
+ abnt-options1
+ abnt-options2
+ abnt-options3
+ iso-options1
+ }
+
+FUNCTION { iso-options } { abnt-options }
+
+FUNCTION { iso.year.label }
+{ iso.date.place
+ { abnt.alf
+ {year.label output new.sentence}
+ 'skip$ if$}
+ 'skip$ if$}
+
+FUNCTION { iso.date }
+{ iso.date.place
+ { abnt.alf
+ 'skip$
+ {year output new.sentence}
+ if$}
+ 'skip$ if$}
+
+FUNCTION { non.iso.date }
+ {iso.date.place 'skip$ {format.date output} if$}
+
+FUNCTION {article}
+{ output.bibitem
+ format.author.or.organization new.sentence
+ iso.year.label
+ format.title "title" output.check new.block
+ format.journal output
+ iso.date.place {format.year output} 'skip$ if$
+ %iso.date.place {format.date output} 'skip$ if$
+ %iso.date.place {abnt.alf 'skip$ {format.year output new.sentence} if$}
+ % {format.year output new.sentence} if$
+ section "section" bibinfo.check output.dash
+ publisher "publisher" bibinfo.check output
+ address "address" bibinfo.check output
+ format.volume output
+ format.number output
+ format.pages output
+ non.iso.date
+ format.issn output new.block
+ format.note output new.block
+ format.url
+ fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+ format.author.or.editor.or.organization new.sentence
+ iso.year.label
+ format.type output new.sentence
+ format.btitle "title" output.check new.sentence
+ format.furtherresp new.sentence
+ format.edition output new.sentence
+ format.publisher.address output
+ iso.date.place {abnt.alf 'skip$ {format.year output new.sentence} if$}
+ {format.year output new.sentence} if$
+ format.volume output new.sentence
+ format.book.pages output
+ format.illustrated
+ format.dimensions new.sentence
+ format.howpublished output new.sentence
+ format.volume.number.series output new.sentence
+ format.note output
+ format.issn output %pode parecer curioso, mas revistas inteiras são tratadas como livro
+ format.isbn output new.sentence
+ format.url
+ fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.author.or.editor.or.organization new.sentence
+ iso.year.label
+ format.type output new.sentence
+ format.btitle "title" output.check new.sentence
+ format.edition output new.sentence
+ address "address" bibinfo.check output
+ format.bvolume output
+ %format.date output new.sentence
+ iso.date.place {abnt.alf 'skip$ {format.year output new.sentence} if$}
+ {format.year output new.sentence} if$
+ format.book.pages output new.sentence
+ format.volume.number.series output new.sentence
+ format.note output
+ format.isbn output new.sentence
+ format.url
+ fin.entry
+}
+
+FUNCTION {hidden}
+{ output.hiddenbibitem
+ fin.entry}
+
+FUNCTION {inbook}
+{ output.bibitem
+ format.author.or.organization new.sentence
+ iso.year.label
+ format.title "title" output.check new.block
+ format.in.ed.booktitle
+ format.furtherresp new.sentence
+ format.edition output new.sentence
+ format.publisher.address output
+ %format.year output new.sentence
+ iso.date.place {abnt.alf 'skip$ {format.year output new.sentence} if$}
+ {format.year output new.sentence} if$
+ format.bvolume.if.no.series output
+ format.volume.number.series output
+ format.chapter.pages output new.sentence
+ format.isbn output new.block
+ format.note output new.block
+ format.url
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.author.or.organization new.sentence
+ iso.year.label
+ format.title "title" output.check new.sentence
+ format.in.ed.booktitle
+ format.edition output new.sentence
+ format.publisher.address output
+ %format.year output
+ iso.date.place {abnt.alf 'skip$ {format.year output new.sentence} if$}
+ {format.year output} if$
+ format.volume.number.series output new.sentence
+ format.bvolume.if.no.series output
+ format.chapter.pages output new.sentence
+ format.isbn output new.block
+ format.note output new.block
+ format.url
+ fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.author.or.organization new.sentence
+ iso.year.label
+ format.title "title" output.check new.sentence
+ format.in.ed.booktitle
+ format.publisher.address output
+ %format.year output new.sentence
+ iso.date.place {abnt.alf 'skip$ {format.year output new.sentence} if$}
+ {format.year output new.sentence} if$
+ format.bvolume.if.no.series output
+ format.volume.number.series output
+ format.pages output
+ format.isbn output
+ format.issn output new.sentence
+ format.note output new.sentence
+ format.url
+ fin.entry
+}
+FUNCTION {journalpart}
+{ output.bibitem
+ format.author.or.editor.or.organization new.sentence
+ iso.year.label
+ format.type output new.sentence
+ format.btitle "title" output.check new.sentence
+ format.furtherresp new.sentence
+ format.edition output new.sentence
+ format.publisher.address output
+ format.volume output
+ format.number output
+ %format.date output new.sentence
+ iso.date.place {abnt.alf 'skip$ {format.year output new.sentence} if$}
+ {format.date output new.sentence} if$
+ format.book.pages output
+ format.illustrated
+ format.dimensions new.sentence
+ format.note output
+ format.issn output %pode parecer curioso, mas revistas inteiras são tratadas como livro
+ format.isbn output new.sentence
+ format.url
+ fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ format.author.or.editor.or.organization new.sentence
+ iso.year.label
+ format.btitle "title" output.check new.block
+ format.furtherresp new.sentence
+ format.edition output new.sentence
+ format.address output
+ %format.date output new.sentence
+ iso.date.place {abnt.alf 'skip$ {format.year output new.sentence} if$}
+ {format.year output new.sentence} if$
+ format.bvolume.if.no.series output
+ format.book.pages output new.sentence
+ format.volume.number.series output new.sentence
+ format.note output new.sentence
+ format.url
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.author.or.editor.or.organization new.sentence
+ iso.year.label
+ format.type output
+ format.btitle output new.sentence
+ format.furtherresp new.sentence
+ format.publisher.address.relax output
+ %format.date output new.block
+ iso.date.place {abnt.alf 'skip$ {format.year output new.sentence} if$}
+ {format.year output new.sentence} if$
+ format.book.pages output new.sentence
+ format.illustrated
+ format.dimensions new.sentence
+ format.howpublished output new.block
+ format.volume.number.series output new.sentence
+ format.note output new.block
+ format.url
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {patent}
+{ output.bibitem
+ format.editor.or.organization new.sentence
+ iso.year.label
+ format.authors.plain output new.sentence
+ format.btitle output new.sentence
+ format.furtherresp new.sentence
+ %format.date output new.block
+ iso.date.place {abnt.alf 'skip$ {format.year output new.sentence} if$}
+ {format.year output new.sentence} if$
+ format.patent.number output
+ format.howpublished output new.block
+ format.note output new.block
+ format.url
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {format.thesis.type}
+{ type$ "phdthesis" =
+ {bbl.phdthesis}
+ {type$ "mastersthesis" =
+ {bbl.mthesis}
+ {type$ "monography" =
+ {bbl.monography}
+ {bbl.void}
+ if$}
+ if$}
+ if$
+ type empty$
+ {type missing$
+ {type$ "phdthesis" =
+ { " (" bbl.phd * ")" *}
+ {type$ "mastersthesis" = { " (" bbl.master * ")" *} {pop$ ""} if$}
+ if$}
+ {""}
+ if$}
+ {type$ "thesis" =
+ {type}
+ {" (" type * ")" * "type" bibinfo.check}
+ if$}
+ if$
+ * %joins first and second part of this function
+}
+FUNCTION {thesis}
+{ output.bibitem
+ format.authors "author" output.check new.block
+ iso.year.label
+ format.btitle "title" output.check new.block
+ abnt.thesis.year #1 = abnt.thesis.year #2 = or
+ {format.date "year" output.check new.sentence} 'skip$ if$
+ format.year.presented output new.sentence
+ format.book.pages output new.sentence
+ format.thesis.type output.nonnull
+ school "school" bibinfo.warn output.dash
+ address "address" bibinfo.check output
+ abnt.thesis.year #0 = abnt.thesis.year #2 = or
+ {format.date "year" output.check new.sentence} 'skip$ if$
+ format.note output new.block
+ format.url
+ fin.entry
+}
+
+FUNCTION {phdthesis} { thesis }
+FUNCTION {mastersthesis} { thesis }
+FUNCTION {monography} { thesis }
+
+FUNCTION {proceedings}
+{ output.bibitem
+ iso.year.label
+ format.editor.or.organization
+ format.conference.info
+ format.btitle "title" output.check
+ format.bvolume output
+ format.volume.number.series output
+ editor empty$
+ { publisher empty$
+ 'skip$
+ { new.sentence format.publisher.address output format.year output}
+ if$
+ }
+ { publisher empty$
+ { new.sentence
+ format.organization.address output format.year output}
+ { new.sentence
+ organization "organization" bibinfo.check output
+ format.publisher.address output format.year output}
+ if$ }
+ if$
+ new.sentence format.book.pages output new.sentence
+ format.isbn output
+ format.issn output new.block
+ format.note output new.block
+ format.url
+ fin.entry
+}
+
+FUNCTION {techreport} {manual}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.author.or.editor.or.organization new.sentence
+ iso.year.label
+ format.title "title" output.check new.sentence
+ format.note "note" output.check new.sentence
+ %format.date output new.sentence
+ iso.date.place {abnt.alf 'skip$ {format.year output new.sentence} if$}
+ {format.year output new.sentence} if$
+ format.url
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+READ
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { format.single.name 't :=
+ nameptr #1 >
+ {
+ nameptr #3
+ #1 + =
+ numnames #3
+ > and
+ { "others" 't :=
+ #1 'namesleft := }
+ 'skip$
+ if$
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" * }
+ { t sortify * }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+FUNCTION {any.sort}
+{ author empty$
+ { organization empty$
+ { editor empty$
+ { title empty$
+ { key empty$
+ { "para ordenar, precisa dos campos author, organization, editor, title ou key in " cite$ * warning$ ""}
+ { key sortify }
+ if$}
+ { title sortify}
+ if$}
+ { editor sort.format.names }
+ if$}
+ { organization sortify }
+ if$}
+ { author sort.format.names }
+if$
+}
+
+FUNCTION {presort}
+{
+ any.sort
+ " " * year field.or.null sortify * " " * title field.or.null
+ sort.format.title * #1 entry.max$ substring$
+ %for non-alpha style we drop a void sort.key such that SORT has no effect
+ abnt.alf 'skip$ {pop$ ""} if$ 'sort.key$ :=
+ year empty$ {""} {year} if$ 'year.label :=
+ calc.extended.label
+}
+
+FUNCTION {set.default.abnt.variables}
+{ %if you change abnt-num to abnt-alf by hand you need also to change
+ %the name of RCSfile by hand, otherwise cvs takes care of it.
+ %
+ "$RCSfile: abnt-alf.bst,v $ " extract.cvs.key
+ %
+ "abnt-alf.bst,v " = 'abnt.alf := % #1 para abnt-alf #0 para abnt-num
+ "$Revision: v-1.9.7 $" extract.cvs.key 'abnt.bst.revision :=
+ #0 'abnt.and.type := % #0 "and"; #1 "&"
+ "\emph" 'abnt.emphasize :=
+ #0 'abnt.cite.style := %default norm version for NBR10520
+ %#0 \cite=(AUTHOR, YEAR)
+ %#1 \cite=(Author, YEAR)
+ #0 'abnt.experimental :=
+ abnt.doi.expand.to.url 'abnt.doi :=
+ #3 'abnt.etal.cite :=
+ #3 'abnt.etal.list :=
+ "et al." 'abnt.etal.text :=
+ #0 'abnt.full.initials :=
+ #0 'abnt.last.names := %#0 abnt-style, #1 bibtex-style
+ #1 'abnt.ldots.type := %#0 use nothing, #1 use \ldots, #2 use $\ldots$, 3# use {...}
+ #0 'abnt.missing.year := %#0 "void"; #1 "[s.d.]"
+ #0 'repeated.author :=
+ #0 'abnt.repeated.author.omit :=
+ #0 'abnt.repeated.title.omit :=
+ #1 'abnt.refinfo :=
+ #0 'abnt.show.options := % #0 "no"; #1 "warn"; #2 "list"
+ #0 'abnt.thesis.year := % #0 "final"; #1 "title"; #2 "both"
+ #0 'abnt.title.command := % #0 "no"; #1 "yes"
+ #0 'abnt.url.package := % #0 "none"'; #2 "url"; #2 "hyperref"
+ #0 'abnt.verbatim.entry :=
+}
+FUNCTION {set.default.iso.variables}
+{ #0 'iso.abbreviation := % #0 ABNT-style; #1 ISO-style
+ #0 'iso.author.punctuation := % #0 ABNT (Smith, A. B.); #1 ISO (Smith, AB)
+ #0 'iso.date.place := % #0 ABNT-sty; #1 ISO-style
+}
+EXECUTE {set.default.abnt.variables}
+EXECUTE {set.default.iso.variables}
+FUNCTION {process.early.abnt.options}
+{%here we intercept all entries which need priority handling
+ %note: we cannot use type$ at this point
+ abnt-and-type missing$
+ abnt-experimental missing$ and
+ abnt-etal-cite missing$ and
+ abnt-etal-text missing$ and
+ abnt-ldots-type missing$ and
+ abnt-cite-style missing$ and
+ abnt-no-etal-label missing$ and
+ abnt-title-command missing$ and
+ 'skip$ {call.type$} if$
+}
+ITERATE {process.early.abnt.options}
+FUNCTION {search.reprinted}
+{ reprinted-from missing$ 'skip$
+ {"\nocite{" reprinted-from * "}" * write$ newline$
+ }
+ if$
+}
+ITERATE {search.reprinted}
+FUNCTION {abntreprintinfo}
+{"\providecommand{\abntreprintinfo}[1]{%" write$ newline$
+ " \citeonline{#1}}" write$ newline$}
+EXECUTE {abntreprintinfo}
+ITERATE {presort}
+SORT
+STRINGS { last.label next.extra}
+INTEGERS { last.extra.num }
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * 'label :=
+ year.label extra.label * 'year.label :=
+ extra.label 'next.extra :=
+ label "}" * 'label :=
+}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {begin.bib}
+{
+ abnt.alf
+ {"\setlength{\labelsep}{0pt}" write$}
+ 'skip$
+ if$
+ "\begin{thebibliography}{}" write$ newline$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ abnt.refinfo #1 =
+ {"\providecommand{\abntrefinfo}[3]{}" write$ newline$}
+ 'skip$ if$
+ "\providecommand{\abntbstabout}[1]{}" write$ newline$
+ abnt.title.command
+ {"\providecommand{\bibtextitlecommand}[2]{#2}" write$ newline$}
+ 'skip$ if$
+ "\abntbstabout{" abnt.bst.revision * "}" * write$ newline$
+ %Se você não usa abntcite e precisa que a margem direita não
+ %seja justificada, descomente a linha seguinte
+ %alternativamente coloque \bibliography{abnt-nrj,...
+% "\setlength{\rightskip}{0pt plus 2cm}" write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+FUNCTION {process.entry}{call.type$}
+ITERATE {process.entry}
+FUNCTION {end.bib}
+{ newline$ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+FUNCTION {apresentacao}
+{ "+---------------------------------------------------------+"
+ "| http://www.abntex.net.br/ |"
+ "| Em caso de dúvidas ou problemas com este estilo procure |"
+ abnt.alf
+ {"| Estilo bibliográfico abntex2-alf.bst versão " abnt.bst.revision * " |" *}
+ {"| Estilo bibliográfico abntex2-num.bst versão " abnt.bst.revision * " |" *}
+ if$
+ "+---------------------------------------------------------+"
+ stack$
+}
+EXECUTE{apresentacao}
diff --git a/macros/latex/contrib/unbtex/unbtex-example.pdf b/macros/latex/contrib/unbtex/unbtex-example.pdf
index 28d6d900ef..c6ef433f41 100644
--- a/macros/latex/contrib/unbtex/unbtex-example.pdf
+++ b/macros/latex/contrib/unbtex/unbtex-example.pdf
Binary files differ
diff --git a/macros/latex/contrib/unbtex/unbtex-example.tex b/macros/latex/contrib/unbtex/unbtex-example.tex
index 3765e66942..420c6b3b5d 100644
--- a/macros/latex/contrib/unbtex/unbtex-example.tex
+++ b/macros/latex/contrib/unbtex/unbtex-example.tex
@@ -1,7 +1,7 @@
%%
%% UnBTeX: A class for bachelor, master, and doctoral thesis at the
%% University of Brasilia (UnB), Brazil
-%% Version 1.3 2023/10/17
+%% Version 1.3.1 2023/10/18
%% Copyright (C) 2021-2023 by Henrique C. Ferreira <hcferreira@unb.br>
%%
%% This class file may be distributed and/or modified under the conditions
@@ -38,23 +38,8 @@
% Bibliografia nas normas da ABNT, formato autor-data
% O formato autor-data facilita a leitura, sobretudo de trabalhos com muitas páginas
-\usepackage[brazilian,hyperpageref]{backref} % Paginas com as citações na lista de referências
-\usepackage[alf,bibjustif]{abntex2cite}
-% Configurações do pacote backref
-% Usado sem a opção hyperpageref de backref
-\renewcommand{\backrefpagesname}{Citado na(s) página(s):~}
-% Texto padrão antes do número das páginas
-\renewcommand{\backref}{}
-% Define os textos da citação
-\renewcommand*{\backrefalt}[4]{
- \ifcase #1 %
- Nenhuma citação no texto.%
- \or
- Citado na página #2.%
- \else
- Citado #1 vezes nas páginas #2.%
- \fi}%
-% ---
+\RequirePackage[english,brazilian,hyperpageref]{backref} % Paginas com as citações na lista de referências
+\RequirePackage[alf,bibjustif]{abntex2cite}
% Referências cruzadas automáticas, dependendo do tipo de referência (figuras, tabelas, equações, etc.)
\RequirePackage[nameinlink,noabbrev,english,brazilian]{cleveref}
@@ -140,7 +125,7 @@
% Local e data
\local{Brasília}
-\dia{17}
+\dia{18}
\mes{outubro}
\ano{2023}
@@ -162,9 +147,9 @@
% Membros da banca
\membrodabancai{Prof. Dr. Lourenço Nassib Chehab, UnB/FT/ENE} % Membro 1 - Geralmente é o orientador
\membrodabancaifuncao{Orientador} % Em português mesmo que o trabalho seja em inglês.
-\membrodabancaii{Prof. Dr. Roberto Aureliano Salmeron, UnB/FT/ENM} % Membro 2
+\membrodabancaii{Prof. Dr. Wilson Gonçalves de Almeida, UnB/FT/ENE} % Membro 2
\membrodabancaiifuncao{Examinador interno}
-\membrodabancaiii{Prof. Dr. Anísio Spínola Teixeira, UnB/FT/CIC} % Membro 3
+\membrodabancaiii{Prof. Dr. João Guedes de Campos Barros, UnB/FT/ENE} % Membro 3
\membrodabancaiiifuncao{Examinador interno}
\membrodabancaiv{} % deixar vazio se não tiver o quarto membro
\membrodabancaivfuncao{Examinador externo}
@@ -201,6 +186,34 @@
\renewcommand{\apendicename}{Appendix}
}
+% Configurações do pacote backref
+% Usado sem a opção hyperpageref de backref
+
+\IfStrEq*{\languagename}{brazil}{
+\renewcommand{\backrefpagesname}{Citado na(s) página(s):~}
+% Texto padrão antes do número das páginas
+\renewcommand{\backref}{}
+% Define os textos da citação
+\renewcommand*{\backrefalt}[4]{
+ \ifcase #1 %
+ Nenhuma citação no texto.%
+ \or
+ Citado na p. #2.%
+ \else
+ Citado nas pp. #2.%
+ \fi}%
+ }{
+\renewcommand*{\backrefalt}[4]{%
+ \ifcase #1 %
+ No citations.%
+ \or
+ Cit. on p. #2.%
+ \else
+ Cit. on pp. #2.%
+ \fi}
+}
+% ---
+
% ------------------------------------------------------------------------
% ELEMENTOS PRÉ-TEXTUAIS
% ------------------------------------------------------------------------
@@ -358,7 +371,7 @@ This is the english abstract.
% ---
%{\SingleSpacing
\setlength{\nomitemsep}{-\parsep}
-\printnomenclature[1.25cm]
+\printnomenclature[1.2cm]
% A opção do comando \printnomenclature define a largura da primeira coluna das listas
\cleardoublepage
% ---
@@ -417,20 +430,14 @@ This is the english abstract.
% Referências bibliográficas
% ---
-%\defbibheading{bibliography}[\bibname]{\chapter*{#1}}
-%\cleardoublepage
-%\phantomsection
-%\tocprintchapternonum
-%\addcontentsline{toc}{chapter}{\texorpdfstring{\bibname}{\bibname}}
-%\printbibliography
-%\markboth{}{}
-% ---
-
% Arquivos com as referências bibliográficas
+\IfStrEq*{\languagename}{english}{
+\bibliographystyle{abntex2eng-alf}
+}{
+\bibliographystyle{abntex2-alf}
+}
\bibliography{unbtex-example/referencias,unbtex-example/references}
-%\defbibheading{bibliography}[\refname]{\section*{#1}\sectionmark{\refname}}
-
% ---
% Apêndices
% ---
diff --git a/macros/latex/contrib/unbtex/unbtex-example/apendice-a.tex b/macros/latex/contrib/unbtex/unbtex-example/apendice-a.tex
index b986afb359..e70fab3bb4 100644
--- a/macros/latex/contrib/unbtex/unbtex-example/apendice-a.tex
+++ b/macros/latex/contrib/unbtex/unbtex-example/apendice-a.tex
@@ -2,7 +2,7 @@
\chapter{Citações}
% ----------------------------------------------------------
-Este modelo usa Bib\LaTeX\ para configurar as referências. Os arquivo referencias.bib e references.bib contêm várias entradas de bibliografia como modelos \cite{article,book,booklet,inbook}. Esses modelos podem ser utilizados para incluir outras entradas e citá-las por meio do seguinte comando:
+Este modelo usa Bib\TeX\ para configurar as referências. Os arquivo referencias.bib e references.bib contêm várias entradas de bibliografia como modelos \cite{article,book,booklet,inbook}. Esses modelos podem ser utilizados para incluir outras entradas e citá-las por meio do seguinte comando:
\begin{verbatim}
\cite{nome_da_entrada}
\end{verbatim}
@@ -48,7 +48,7 @@ for preparation of his book series ``The Art of Computer Programming''. TEX
has been made freely available by Knuth.
\end{citacao}
\end{verbatim}
-Naturalmente, a referência \verb|grennwade93| deve estar definida no arquivo BibTeX (aqui, \verb|references.bib|). Confira o resultado:
+Naturalmente, a referência \verb|grennwade93| deve estar definida no arquivo Bib\TeX\ (aqui, \verb|references.bib|). Confira o resultado:
\begin{citacao}{\cite{greenwade93}}
TEX is a typesetting program designed for high-quality composition of material that contains a lot of mathematical and technical expressions. It has been adopted by many authors and publishers who generate technical books and papers. It was created by Professor Donald E. Knuth of Stanford University, originally for preparation of his book series ``The Art of Computer Programming''. TEX has been made freely available by Knuth.
\end{citacao} \ No newline at end of file
diff --git a/macros/latex/contrib/unbtex/unbtex-example/capitulo2.tex b/macros/latex/contrib/unbtex/unbtex-example/capitulo2.tex
index 707e5ddbc3..148be47e04 100644
--- a/macros/latex/contrib/unbtex/unbtex-example/capitulo2.tex
+++ b/macros/latex/contrib/unbtex/unbtex-example/capitulo2.tex
@@ -518,7 +518,7 @@ Além disso, o manual possui informações adicionais sobre as normas ABNT obser
\section{Referências bibliográficas}
% ---
-Para referências bibliográficas que seguem as normas da ABNT são utilizados os pacotes \textsf{biblatex} e \textsf{biblatex-abnt}. Consulte os manuais \citeonline{biblatex} e \citeonline{biblatexabnt} para obter informações sobre como utilizar as referências bibliográficas.
+A formatação das referências bibliográficas conforme as regras da ABNT são um dos principais objetivos do \abnTeX. Consulte os manuais \citeonline{abntex2cite} e \citeonline{abntex2cite-alf} para obter informações sobre como utilizar as referências bibliográficas.
Embora as normas da ABNT permitam citações utilizando o formato numérico, é recomendado o uso do sistema autor-ano em trabalhos acadêmicos. A razão é que a leitura por parte do avaliador fica mais simples. Basta ver o nome e o ano para se lembrar rapidamente da referência, sem precisar recorrer frequentemente à lista de referências, que fica no final do texto, tornando a leitura mais agradável.
@@ -542,7 +542,7 @@ neste modo quando houver conversão para letras maiúsculas.
\begin{center}
\begin{tabular}{ll}\hline\hline
-acento & \textsf{bibtex}\\
+acento & bibtex\\
à á ã & \verb+\`a+ \verb+\'a+ \verb+\~a+\\
í & \verb+{\'\i}+\\
ç & \verb+{\c c}+\\
diff --git a/macros/latex/contrib/unbtex/unbtex-example/referencias.bib b/macros/latex/contrib/unbtex/unbtex-example/referencias.bib
index a0b5ab4e88..101f20ada7 100644
--- a/macros/latex/contrib/unbtex/unbtex-example/referencias.bib
+++ b/macros/latex/contrib/unbtex/unbtex-example/referencias.bib
@@ -1,7 +1,5 @@
%%
%% Arquivo utilizado no projeto abnTeX
-%% O uso do biblatex no UnBTeX permitiu que o texto do arquivo bib
-%% recebesse acentua{\c c}\~ao no padr\~ao pt-br
%%
@book{ibge1993,
@@ -94,6 +92,28 @@
Title = {Configura{\c c}\~ao},
Year = {2012}}
+@manual{abntex2cite,
+ Annote = {Este documento {\'e} derivado do \cite{abnt-bibtex-doc}},
+ Author = {Lauro C{\'e}sar Araujo},
+ Date-Added = {2013-01-09 10:37:45 +0000},
+ Date-Modified = {2015-04-27 22:43:38 +0000},
+ Organization = {Equipe abnTeX2},
+ Title = {O pacote abntex2cite: Estilos bibliogr{\'a}ficos compat{\'\i}veis com a ABNT NBR 6023},
+ Url = {http://www.abntex.net.br/},
+ Year = {2015},
+ Bdsk-Url-1 = {http://www.abntex.net.br/}}
+
+@manual{abntex2cite-alf,
+ Annote = {Este documento {\'e} derivado do \cite{abnt-bibtex-alf-doc}},
+ Author = {Lauro C{\'e}sar Araujo},
+ Date-Added = {2013-01-09 10:37:45 +0000},
+ Date-Modified = {2015-04-27 22:43:44 +0000},
+ Organization = {Equipe abnTeX2},
+ Title = {O pacote abntex2cite: t{\'o}picos espec{\'\i}ficos da ABNT NBR 10520:2002 e o estilo bibliogr{\'a}fico alfab{\'e}tico (sistema autor-data)},
+ Url = {http://www.abntex.net.br/},
+ Year = {2015},
+ Bdsk-Url-1 = {http://www.abntex.net.br/}}
+
@manual{memoir,
Address = {Normandy Park, WA},
Author = {Peter Wilson and Lars Madsen},
diff --git a/macros/latex/contrib/unbtex/unbtex.cls b/macros/latex/contrib/unbtex/unbtex.cls
index 4a78051380..1ee91df2a5 100644
--- a/macros/latex/contrib/unbtex/unbtex.cls
+++ b/macros/latex/contrib/unbtex/unbtex.cls
@@ -1,7 +1,7 @@
%%
%% UnBTeX: A class for bachelor, master, and doctoral thesis at the
%% University of Brasilia (UnB), Brazil
-%% Version 1.3 2023/10/17
+%% Version 1.3.1 2023/10/18
%% Copyright (C) 2021-2023 by Henrique C. Ferreira <hcferreira@unb.br>
%%
%% This class file may be distributed and/or modified under the conditions
@@ -17,11 +17,12 @@
%% This package consists of the following source file:
%% unbtex.cls
%% Template files:
-%% unbtex-example.pdf, unbtex-example.tex and files within unbtex-example directory
+%% unbtex-example.pdf, unbtex-example.tex and files within unbtex-example
+%% directory
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{unbtex}[2023/10/17 v1.3 Modelo da Universidade de Brasília baseado em abnTeX2]
+\ProvidesClass{unbtex}[2023/10/18 v1.3.1 Modelo da Universidade de Brasília baseado em abnTeX2]
% ---
% Repassa todos os parâmetros a classe abntex2,
diff --git a/macros/texinfo/latest/texi2dvi b/macros/texinfo/latest/texi2dvi
index f7fff97611..e65b4cfec7 100644
--- a/macros/texinfo/latest/texi2dvi
+++ b/macros/texinfo/latest/texi2dvi
@@ -1,7 +1,7 @@
#! /bin/sh
# texi2dvi --- produce DVI (or PDF) files from Texinfo (or (La)TeX) sources.
#
-# Copyright 1992-2022 Free Software Foundation, Inc.
+# Copyright 1992-2023 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -36,7 +36,7 @@ set -e
program=`echo $0 | $SED -e 's!.*/!!'`
build_mode=${TEXI2DVI_BUILD_MODE:-local}
-build_dir=${TEXI2DVI_BUILD_DIRECTORY:-.}
+build_dir=${TEXI2DVI_BUILD_DIRECTORY:-}
orig_pwd=`pwd`
@@ -151,12 +151,10 @@ Build modes:
--tidy same as --build=tidy
-c, --clean same as --build=clean
--build-dir=DIR specify where the tidy compilation is performed;
- implies --tidy;
- defaults to TEXI2DVI_BUILD_DIRECTORY [$build_dir]
+ implies --tidy
The MODE specifies where the TeX compilation takes place, and, as a
-consequence, how auxiliary files are treated. The build mode can also
-be set using the environment variable TEXI2DVI_BUILD_MODE.
+consequence, how auxiliary files are treated.
Valid values of MODE are:
\`local' compile in the current directory, leaving all the auxiliary
@@ -166,6 +164,10 @@ Valid values of MODE are:
\`clean' same as \`tidy', but remove the auxiliary directory afterwards.
Every compilation therefore requires the full cycle.
+The build mode can also be set using the environment variable
+TEXI2DVI_BUILD_MODE. The tidy build directory can also be set using
+the environment variable TEXI2DVI_BUILD_DIRECTORY.
+
The values of these environment variables are used to run the
corresponding commands, if they are set:
@@ -195,9 +197,9 @@ EOF
version ()
{
cat <<EOF
-texi2dvi (GNU Texinfo 7.0.1)
+texi2dvi (GNU Texinfo 7.1)
-Copyright (C) 2022 Free Software Foundation, Inc.
+Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
@@ -1200,10 +1202,9 @@ to tex itself simply not working."
# (running missing) and then we end up with things like '"-I"',
# and "-I" (including the quotes) is not an option name. This
# happens with gettext 0.14.5, at least.
- $SED "$comment_iftex" "$command_line_filename" \
- | eval $makeinfo --footnote-style=end -I "$in_dir" $run_mi_includes \
- -o /dev/null --macro-expand=- \
- | $SED "$uncomment_iftex" >"$in_src"
+ eval $makeinfo -c TEXINFO_OUTPUT_FORMAT=plaintexinfo --iftex --no-ifinfo \
+ --footnote-style=end -I "$in_dir" $run_mi_includes \
+ "$command_line_filename" >"$in_src"
# Continue only if everything succeeded.
if test $? -ne 0 \
|| test ! -r "$in_src"; then
@@ -1214,59 +1215,6 @@ to tex itself simply not working."
fi
}
-# Unfortunately, makeinfo --iftex --no-ifinfo doesn't work well enough
-# in versions before 5.0, as makeinfo can't parse the TeX commands
-# inside @tex blocks, so work around with sed.
-#
-# This sed script preprocesses Texinfo sources in order to keep the
-# iftex sections only. We want to remove non-TeX sections, and comment
-# (with `@c _texi2dvi') TeX sections so that makeinfo does not try to
-# parse them. Nevertheless, while commenting TeX sections, don't
-# comment @macro/@end macro so that makeinfo does propagate them.
-# Similarly, preserve the @top node to avoid makeinfo complaining about
-# it being missed. Comment it out after preprocessing, so that it does
-# not appear in the generated document.
-#
-# We assume that `@c _texi2dvi' or `@c (_texi2dvi)' starting a line is
-# not present in the document. Additionally, conditionally defined
-# macros inside the @top node may end up with the wrong value, although
-# this is unlikely in practice.
-#
-comment_iftex=\
-'/^@tex/,/^@end tex/{
- s/^/@c _texi2dvi/
-}
-/^@iftex/,/^@end iftex/{
- s/^/@c _texi2dvi/
- /^@c _texi2dvi@macro/,/^@c _texi2dvi@end macro/{
- s/^@c _texi2dvi//
- }
-}
-/^@ifnottex/,/^@end ifnottex/{
- s/^/@c (_texi2dvi)/
- /^@c (_texi2dvi)@node Top/,/^@c (_texi2dvi)@end ifnottex/ {
- /^@c (_texi2dvi)@end ifnottex/b
- s/^@c (_texi2dvi)//
- }
-}
-/^@ifinfo/,/^@end ifinfo/{
- /^@node/p
- /^@menu/,/^@end menu/p
- t
- s/^/@c (_texi2dvi)/
-}
-s/^@ifnotinfo/@c _texi2dvi@ifnotinfo/
-s/^@end ifnotinfo/@c _texi2dvi@end ifnotinfo/'
-
-# Uncomment @iftex blocks by removing any leading `@c texi2dvi' (repeated
-# copies can sneak in via macro invocations). Likewise, comment out
-# the @top node inside a @ifnottex block.
-uncomment_iftex=\
-'s/^@c _texi2dvi\(@c _texi2dvi\)*//
-/^@c (_texi2dvi)@ifnottex/,/^@c (_texi2dvi)@end ifnottex/{
- s/^/@c (_texi2dvi)/
-}'
-
# insert_commands - Insert $textra commands at the beginning of the file.
# Recommended to be used for @finalout, @smallbook, etc.
@@ -1748,7 +1696,7 @@ while test x"$1" != x"$arg_sep"; do
-~ ) verbose "Option -~ is obsolete: texi2dvi ignores it.";;
-b | --batch) ;; # Obsolete
--build) shift; build_mode=$1;;
- --build-dir) shift; build_dir=$1; build_mode=tidy;;
+ --build-dir) shift; build_dir=$1;;
-c | --clean) build_mode=clean;;
-D | --debug) debug=true;;
-e | -E | --expand) expand=true;;
@@ -1797,6 +1745,11 @@ done
# Pop the token
shift
+# If build_dir given, switch from --local to --tidy
+if test x"$build_dir" != x"" && test x"$build_mode" = x"local" ; then
+ build_mode=tidy
+fi
+
# $tidy: compile in a t2d directory.
# $clean: remove all the aux files.
case $build_mode in
@@ -1902,7 +1855,8 @@ do
# in compiling this document.
case $build_dir in
'' | . ) t2ddir=$out_noext.t2d ;;
- *) # Avoid collisions between multiple occurrences of the same
+ *) ensure_dir "$build_dir"
+ # Avoid collisions between multiple occurrences of the same
# file, so depend on the output path. Remove leading `./',
# at least to avoid creating a file starting with `.!', i.e.,
# an invisible file. The sed expression is fragile if the cwd
@@ -1914,7 +1868,7 @@ do
# Remove it at exit if clean mode.
trap "cleanup" 0 1 2 15
- ensure_dir "$build_dir" "$t2ddir"
+ ensure_dir "$t2ddir"
# Sometimes there are incompatibilities between auxiliary files for
# DVI and PDF. The contents can also change whether we work on PDF
diff --git a/macros/texinfo/latest/texi2pdf b/macros/texinfo/latest/texi2pdf
index 373d201319..2d2824613c 100644
--- a/macros/texinfo/latest/texi2pdf
+++ b/macros/texinfo/latest/texi2pdf
@@ -21,9 +21,9 @@ test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"'
# obliged to.
if test "x$1" = x--version; then
cat <<EOF
-texi2pdf (GNU Texinfo 7.0.1)
+texi2pdf (GNU Texinfo 7.1)
-Copyright (C) 2022 Free Software Foundation, Inc.
+Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.