3

I'm using the latest org-plus-contrib package from the org ELPA archive under emacs 24.5 (Linux and OSX). I needed to have a custom title which includes a logo PNG in documents I export from org to PDF. I use the hitec document class as the bae article class.

I don't always need to generate this custom title, so rather than define a new custom class, I add the following to one of my org template files I use when creating a new document. The solution mostly works, but I'm not sure if my approach is really that good and would like to get some feedback or suggestions.

My requirement is to have the title include a PNG logo on the left and have the title, subtitle, author and date on the right (flushright). This is what I have in my latex preamble

\makeatletter
\def\@maketitle{
  \begin{minipage}[c][4cm][t]{\linewidth}
    \begin{minipage}[t][4cm][c]{4cm}
      \includegraphics{/home/tcross/Pictures/unelogo_medium.png}
    \end{minipage}
    \begin{minipage}[t][5cm][c]{10cm}
      \flushright
      \Large \textbf{\@title} \\
      \vspace{16pt}
      \large \@author \\
      \normalsize \@date
    \end{minipage}
  \end{minipage}}
\makeatother

What I do is define a minipage and then inside this minipage, I define two more minipages which are set to be side by side with the left minipage containing the logo and the right minipage containing the title, author, date etc.

This mostly works. I do need to tweak the left minipage a little to get the logo positioned closer to the left margin, but apart from that it seems to work OK (so far).

What I'm wondering is whether this is the best way to structure this title and logo requirement? I thought about using other possible techniques, such as a frame box etc, but reading the manual, there seemed to be other restrictions which might have been a problem.

I've been a LaTeX user for a long time, but up until now, I've just used the default styles. This is the first time I've attempted to modify something like the article title page style in a generic manner which wold work for all my future org documents which need this type of title. I don't necessarily understand exactly how this all works - I got to this point by looking at existing style files and doing a git of googling etc.

2
  • Is this really an org-mode question, or is it just about latex? You might get better answers from the TeX stackexchange site.
    – erikstokes
    Dec 24, 2015 at 15:34
  • Yes, it is focused on LaTeX, but I wasn't sure if there may have been a better way of doing this sort of customization when your using org-mode. My solution adds the titlepage definiton using #+LATEX_HEADER, which is fine. I may post this to the tex group as well just to see if the specific latex is OK or can be made better.
    – Tim X
    Dec 25, 2015 at 21:23

1 Answer 1

1

What I'm wondering is whether this is the best way to structure this title and logo requirement?

Not sure what all the requirements are, but it appears you have not mixed the usual float environments inside minipage. That's a good thing, especially if you want to fine tune placements later. Go with what you already have. I would stop adding any more packages that may re-introduce floating objects inside the minipage.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.