From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Price Subject: Re: letterhead and signature in odt export Date: Tue, 30 Oct 2018 21:21:35 -0400 Message-ID: References: <87r2g7rkkw.fsf@gmail.com> <877ehzpnrv.fsf@gmail.com> <87d0rri02n.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000cc6f4d05797c1daf" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56447) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHfCI-0007v1-8D for emacs-orgmode@gnu.org; Tue, 30 Oct 2018 21:21:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gHfC8-0006En-AY for emacs-orgmode@gnu.org; Tue, 30 Oct 2018 21:21:19 -0400 Received: from mail-it1-x12b.google.com ([2607:f8b0:4864:20::12b]:52009) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gHfC7-00068Q-Vk for emacs-orgmode@gnu.org; Tue, 30 Oct 2018 21:21:16 -0400 Received: by mail-it1-x12b.google.com with SMTP id h13so3259744itl.1 for ; Tue, 30 Oct 2018 18:21:07 -0700 (PDT) In-Reply-To: <87d0rri02n.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: theophilusx@gmail.com Cc: jrfilipovits@gmail.com, Org Mode --000000000000cc6f4d05797c1daf Content-Type: text/plain; charset="UTF-8" On Tue, Oct 30, 2018 at 5:41 PM Tim Cross wrote: > > I've never delved into the XML nightmare that is ODT and stick with > latex/PDF export. > > Here is how I handled needing to have a logo and banner at the top of my > documents. Essentially, it involves using the Latex 'minipage' > environment to setup the layout and the xcolor package to handle > colours. Getting it working is somewhat trial and error, but once you > have it, it is pretty much set and forget. > > The below is an early version. I later refined it and put it into my > org-latex-classes variable, but removed it when I left the University > for a new employer. It should be fairly straight-forward to adapt to a > letter head. The only challenge will be if your Uni Marketing/PR are > very rigid re: format. In particular, fonts can be a challenge if they > have selected something unusual. > whew, OK, this is interesting. I guess you have written your own class somewhere, is that right? And even though your header is defined in latex_header it still somehow is included inside of \begin{document}? ... and if I turn this into an org latex class, then am I right that I an simply set that latex_class header at the top of a document and all of this will be handled for me autmagically on export? That would be fantastic. Gonna follow up some more in response to ckelty, whose stuff I've been working with thus far. > > #+TITLE: XXXXXXXXX > #+AUTHOR: XXXXXXX > #+DATE: \today > #+SUBTITLE: IAM Use Case > #+OPTIONS: ^:nil num:nil toc:nil tags:nil |:t > #+LATEX_CLASS: une-article > #+LATEX-OPTIONS: 12pt,a4paper > #+LATEX_HEADER: \usepackage{xcolor} > #+LATEX_HEADER_EXTRA: \definecolor{unegreen}{HTML}{7AB800} > #+LATEX_HEADER_EXTRA: \definecolor{Black}{HTML}{000000} > #+LATEX_HEADER_EXTRA: \definecolor{White}{HTML}{FFFFFF} > #+LATEX_HEADER_EXTRA: \definecolor{dimgrey}{HTML}{696969} > #+LATEX_HEADER_EXTRA: \makeatletter > #+LATEX_HEADER_EXTRA: \def\@maketitle{ > #+LATEX_HEADER_EXTRA: \noindent \begin{minipage}[c][4cm][t]{\linewidth} > #+LATEX_HEADER_EXTRA: \colorbox{Black}{% > #+LATEX_HEADER_EXTRA: \begin{minipage}[t][4cm][c]{4cm} > #+LATEX_HEADER_EXTRA: \flushleft > #+LATEX_HEADER_EXTRA: \includegraphics{~/Pictures/unelogo_medium.png} > #+LATEX_HEADER_EXTRA: \end{minipage}} > #+LATEX_HEADER_EXTRA: \colorbox{unegreen}{% > #+LATEX_HEADER_EXTRA: \begin{minipage}[t][4cm][c]{10cm} > #+LATEX_HEADER_EXTRA: \flushright > #+LATEX_HEADER_EXTRA: \Large \textbf{\color{White}{\@title}} \\ > #+LATEX_HEADER_EXTRA: \vspace{4pt} > #+LATEX_HEADER_EXTRA: \small \color{White}{\@author} \\ > #+LATEX_HEADER_EXTRA: \small \color{White}{\@date} > #+LATEX_HEADER_EXTRA: \end{minipage}} > #+LATEX_HEADER_EXTRA: \end{minipage}} > #+LATEX_HEADER_EXTRA: \makeatother > > > > Jeff Filipovits writes: > > > Would you mind sharing them? This is a problem I am trying to figure out > as > > well. > > > > On Tue, Oct 30, 2018, 9:29 AM Eric S Fraga wrote: > > > >> Matt, > >> > >> I've replied directly to you with some files. > >> -- > >> Eric S Fraga via Emacs 27.0.50, Org release_9.1.13-783-g97fac4 > >> > >> > > > -- > Tim Cross > --000000000000cc6f4d05797c1daf Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


O= n Tue, Oct 30, 2018 at 5:41 PM Tim Cross <theophilusx@gmail.com> wrote:

I've never delved into the XML nightmare that is ODT and stick with
latex/PDF export.

Here is how I handled needing to have a logo and banner at the top of my documents. Essentially, it involves using the Latex 'minipage'
environment to setup the layout and the xcolor package to handle
colours. Getting it working is somewhat trial and error, but once you
have it, it is pretty much set and forget.

The below is an early version. I later refined it and put it into my
org-latex-classes variable, but removed it when I left the University
for a new employer. It should be fairly straight-forward to adapt to a
letter head. The only challenge will be if your Uni Marketing/PR are
very rigid re: format. In particular, fonts can be a challenge if they
have selected something unusual.=C2=A0

whew, OK, this is interesting. I guess you have written your own class=20 somewhere, is that right? And even though your header is defined in=20 latex_header it still somehow is included inside of \begin{document}?=C2=A0=

... and if I turn this into an org latex cla= ss, then am I right that I an simply set that latex_class header at the top= of a document and all of this will be handled for me autmagically on expor= t? That would be fantastic.=C2=A0

Gonna follo= w up some more in response to ckelty, whose stuff I've been working wit= h thus far.

#+TITLE: XXXXXXXXX
#+AUTHOR: XXXXXXX
#+DATE: \today
#+SUBTITLE: IAM Use Case
#+OPTIONS: ^:nil num:nil toc:nil tags:nil |:t
#+LATEX_CLASS: une-article
#+LATEX-OPTIONS: 12pt,a4paper
#+LATEX_HEADER: \usepackage{xcolor}
#+LATEX_HEADER_EXTRA: \definecolor{unegreen}{HTML}{7AB800}
#+LATEX_HEADER_EXTRA: \definecolor{Black}{HTML}{000000}
#+LATEX_HEADER_EXTRA: \definecolor{White}{HTML}{FFFFFF}
#+LATEX_HEADER_EXTRA: \definecolor{dimgrey}{HTML}{696969}
#+LATEX_HEADER_EXTRA: \makeatletter
#+LATEX_HEADER_EXTRA: \def\@maketitle{
#+LATEX_HEADER_EXTRA:=C2=A0 \noindent \begin{minipage}[c][4cm][t]{\linewidt= h}
#+LATEX_HEADER_EXTRA:=C2=A0 =C2=A0 \colorbox{Black}{%
#+LATEX_HEADER_EXTRA:=C2=A0 =C2=A0 =C2=A0 \begin{minipage}[t][4cm][c]{4cm}<= br> #+LATEX_HEADER_EXTRA:=C2=A0 =C2=A0 =C2=A0 \flushleft
#+LATEX_HEADER_EXTRA:=C2=A0 =C2=A0 =C2=A0 \includegraphics{~/Pictures/unelo= go_medium.png}
#+LATEX_HEADER_EXTRA:=C2=A0 =C2=A0 \end{minipage}}
#+LATEX_HEADER_EXTRA:=C2=A0 =C2=A0 \colorbox{unegreen}{%
#+LATEX_HEADER_EXTRA:=C2=A0 =C2=A0 =C2=A0 \begin{minipage}[t][4cm][c]{10cm}=
#+LATEX_HEADER_EXTRA:=C2=A0 =C2=A0 =C2=A0 =C2=A0 \flushright
#+LATEX_HEADER_EXTRA:=C2=A0 =C2=A0 =C2=A0 =C2=A0 \Large \textbf{\color{Whit= e}{\@title}} \\
#+LATEX_HEADER_EXTRA:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\vspace{4pt}
#+LATEX_HEADER_EXTRA:=C2=A0 =C2=A0 =C2=A0 =C2=A0 \small \color{White}{\@aut= hor} \\
#+LATEX_HEADER_EXTRA:=C2=A0 =C2=A0 =C2=A0 =C2=A0 \small \color{White}{\@dat= e}
#+LATEX_HEADER_EXTRA:=C2=A0 =C2=A0 =C2=A0 \end{minipage}}
#+LATEX_HEADER_EXTRA:=C2=A0 =C2=A0 \end{minipage}}
#+LATEX_HEADER_EXTRA: \makeatother



Jeff Filipovits <jrfilipovits@gmail.com> writes:

> Would you mind sharing them? This is a problem I am trying to figure o= ut as
> well.
>
> On Tue, Oct 30, 2018, 9:29 AM Eric S Fraga <esflists@gmail.com> wrote:
>
>> Matt,
>>
>> I've replied directly to you with some files.
>> --
>> Eric S Fraga via Emacs 27.0.50, Org release_9.1.13-783-g97fac4
>>
>>


--
Tim Cross
--000000000000cc6f4d05797c1daf--