Hi, I have been experimenting and reading LaTeX and XSL code and done some googling to try to have a custom front page in my documents generated by asciidoc through dblatex. I know it may be a bit off topic on asciidoc itself, but I guess dblatex is a backend frequently used.
What do I want: Normally the first page contains only the title of the document. This is not good enough for my purposes so I try to put some more decoration onto the page. Company logo and several other things that a scientific paper writer frowns upon. I don't. So here is my simple input file mytitle.txt: --- 8< --- // a2x: -k -v -f pdf -d article // a2x: --dblatex-opts "-d" // a2x: --dblatex-opts "-p mystyle.xsl" // a2x: --dblatex-opts "-s mystyle.sty" = A custom title Svenn Are Bjerkem <[email protected]> v0.1, Oct 2010: Initial version == Rationale I want to have a company logo on my title page and in my headings --- >8 --- Here is mystyle.xsl to control dblatex: --- 8< --- <?xml version='1.0' encoding="iso-8859-1"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'> <!-- control table of document collaborators. 0=hide, 1=show --> <xsl:param name="doc.collab.show">1</xsl:param> <!-- control the dblatex logo on front page. 0=hide, 1=show --> <xsl:param name="doc.publisher.show">0</xsl:param> </xsl:stylesheet> --- >8 --- Here is the mystyle.sty file, which is based on material that I found on the net. --- 8< --- %% Just use the original package and pass the options \RequirePackageWithOptions{docbook} %% Redefine the paragraph layout \setlength\parskip{\medskipamount} \setlength\parindent{10pt} \newcommand{\HRule}{\rule{\linewidth}{0.5mm}} \renewcommand{\maketitle}{\begin{titlepage}% \begin{center}% % Upper part of the page \includegraphics[width=0.15\textwidth]{./mycompanylogo}\\[1cm] \textsc{\LARGE University of Beer}\\[1.5cm] \textsc{\Large Final year project}\\[0.5cm] % Title \HRule \\[0.4cm] { \huge \bfseries Lager brewing techniques}\\[0.4cm] \HRule \\[1.5cm] % Author and supervisor \begin{minipage}{0.4\textwidth}% \begin{flushleft} \large \emph{Author:}\\ John \textsc{Smith} \end{flushleft} \end{minipage} \begin{minipage}{0.4\textwidth} \begin{flushright} \large \emph{Supervisor:} \\ Dr.~Mark \textsc{Brown} \end{flushright} \end{minipage} \vfill % Bottom of the page {\large \today} \end{center}% \end{titlepage}% }% --- >8 --- The %'s at the end of the lines are mine in a desperate try to look like the article.cls version of \maketitle that I try to override. mycompanylogo is a png file containing the image to include. Ok, this is run plain and simple: $> a2x mytitle.txt and a2x ends with: mytitle_tmp.tex:56: Undefined control sequence \edhead. mytitle_tmp.tex:56: leading text: \tableofcontents mytitle_tmp.tex:64: Undefined control sequence \edhead. mytitle_tmp.tex:64: leading text: \end{document} /tmp/tmpFYb4ts not removed Error: pdflatex compilation failed So I enter that tmp directory and do $> . env_tex $> pdflatex mytitle_tmp.tex Which reports: ! Undefined control sequence. <argument> \DBKreference {} \edhead l.56 \tableofcontents I now type 'Q' on the LaTeX commandline to enter quiet mode. A pdf is actually generated containing my custom title page with logo and nice lines and names and date. No page number, as I wanted. Then follows the Contents page numbered i and the first section on the next page numbered 1. The revision table and the collaborators table is missing, and I guess that is a result of the error message from LaTeX above. I feel so near a working solution, but I am completely out of ideas what to do next. I have found how to create custom local dblatex styles that can be included in the asciidoc. I have found how to override a latex command, but I do not understand why that override disturbs the next command \tableofcontents. I don't dear to ask in a LaTeX group, because the article.cls is not something to mess around with from what I find in my searches. I don't know which language is worse to understand: XSLT or LaTeX, but they are close competitors. I need some advice where to look for my needle. It sure is a haystack. -- Svenn -- You received this message because you are subscribed to the Google Groups "asciidoc" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/asciidoc?hl=en.
