asciidoctor / asciidoctor-latex

:triangular_ruler: Add LaTeX features to AsciiDoc & convert AsciiDoc to LaTeX
http://asciidoctor.org
Other
111 stars 26 forks source link

Add support for docinfo files in LaTeX backend #11

Open mojavelinux opened 9 years ago

mojavelinux commented 9 years ago

Add support for docinfo files in the LaTeX backend. docinfo gives the author a hook to inject extra content into the header and footer of the generated document. This is how the author could add additional LaTeX typesetting, packages and so forth.

The docinfo files would be named as follows:

The details of resolving, locating and reading the docinfo file are handled internally. What the LaTeX converter needs to be concerned with is where the content is inserted in the generated document.

You can see how it's done in the HTML5 backend here: https://github.com/asciidoctor/asciidoctor/blob/master/lib/asciidoctor/converter/html5.rb#L128

edusantana commented 9 years ago

I don't know if it helps, but:

These are the files witch dbaltex uses to generate the revision history, exctracintg info from docbook revhistory tag defined in docinfo from asciidoc.

For an example, you can see this docinfo that generates the table in this pdf. The latex code for this generation was:

%% ----------------------
%% Revision History Table
%% ----------------------
\renewcommand{\DBKrevhistory}{
\begin{DBKrevtable}
~\par
v0.7.0~\par

& ~\par
13/05/2015
& ~\par

& ~\par
 Vitor, Larissa 
\tabularnewline
\hline
~\par
v0.6.0~\par

& ~\par
06/05/2015
& ~\par
 \href{https://github.com/ufpb-computacao/analise-e-projeto-sistemas-livro/issues/7}{Inclus�o do Cap�tulo sobre Diagrama de Atividade;} \href{https://github.com/ufpb-computacao/analise-e-projeto-sistemas-livro/issues/8}{Inclus�o do Cap�tulo sobre Diagrama de Estado;} \href{https://github.com/ufpb-computacao/analise-e-projeto-sistemas-livro/issues/9}{Inclus�o de partes para agrupar os cap�tulos por vis�es;} \href{https://github.com/ufpb-computacao/analise-e-projeto-sistemas-livro/issues/10}{Possibilitando enviar mensagens individualizadas para os alunos atrav�s do livro;}  
& ~\par
Vitor, Larissa, Eduardo 
\tabularnewline
\hline
~\par
v0.5.0~\par

& ~\par
28/03/2015
& ~\par
 \href{https://github.com/ufpb-computacao/analise-e-projeto-sistemas-livro/issues/6}{Inclus�o de cap�tulo: vis�o comportamental;}  
& ~\par
Vitor, Larissa
\tabularnewline
\hline
~\par
v0.4.0~\par

& ~\par
28/03/2015
& ~\par
 \href{https://github.com/ufpb-computacao/analise-e-projeto-sistemas-livro/issues/5}{Inclus�o do Cap�tulo de Caso de Uso;}  
& ~\par
Vitor, Larissa
\tabularnewline
\hline
~\par
v0.3.0~\par

& ~\par
20/03/2015
& ~\par
 \href{https://github.com/ufpb-computacao/analise-e-projeto-sistemas-livro/issues/3}{Inclus�o do Cap�tulo de Diagrama de Classes;} \href{https://github.com/ufpb-computacao/analise-e-projeto-sistemas-livro/issues/4}{Inclus�o do Cap�tulo sobre Diagrama de Objetos;}  
& ~\par
Larissa, Vitor, Eduardo
\tabularnewline
\hline
~\par
v0.1.0~\par

& ~\par
13/03/2015
& ~\par
 \href{https://github.com/ufpb-computacao/analise-e-projeto-sistemas-livro/issues/1}{Elabora��o da Unidade B;} 
& ~\par
Vitor, Eduardo
\tabularnewline
\hline

\end{DBKrevtable}}