emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] getting close on latex letterheads [was: letterhead and signature in


From: Matt Price
Subject: [O] getting close on latex letterheads [was: letterhead and signature in odt export]
Date: Thu, 1 Nov 2018 08:47:42 -0400

OK, so I'm getting close to being able to do this. My almost-working  example doc is at the bottom of this email, I have a question about suppressing the headline text.

On Tue, Oct 30, 2018 at 11:50 PM ckelty ckelty <address@hidden> wrote:
Matt,


> On Oct 30, 2018, at 6:26 PM, Matt Price <address@hidden> wrote:
>
> Hi again Chris!
>
> OK, so I understand a little bit of this. I would like to keep all my letters in subheadings in a single org doc, and just export once. This version requires a fair amount of latex in every subtree.

Unless I am misunderstanding, you should be able to restrict what you export to your subtree with a C-s (C-c C-e C-s l o) and just have one file with the Latex Headers at the top… or you can do what Tim suggested and put it in org-latex-classes variable (but I don’t know how to do that).

I think I may actually understand this now.  See my example below, which almost works.

>
> Also... where should I go to learn more about latex (I have beengoogling, I've found some places, am wondering what the *best* place is)? It appears I am approaching adulthood and am ready to learn how to use it, after years of resisting :-/
>

Ahhh… that way lies madness.  Welcome.  I would learn as little LaTeX as necessary and allow org to do the rest.  ShareLatex, Overleaf, and StackExchange are all fine starting points

I'm definitely learning something, though yes, I feel a bit like the Mad Hatter.

So I am pretty close.  As you suggested, turns out I can put almost all the latex in the document header.  The only thing that still needs to go into the letter body is the \mysig command that I have defined in the header.

This works fine if I have no headlines in the letter text, but if I try to export a subtree, then I guess the headline gets read as a title, and either org or latex inserts it immediately after my custom \maketitle command.  

It seems to me then that I either have to always set the export_title property of subheadings to the empty string; add a temporary filter to ox-latex; or just write my own derived backend that does al lthis work for me, and maybe add a keybinding for that to make it easier to access (my export dispatcher is getting pretty crowded...).  Setting #+OPTIONS: title:nil does not seem ot have any effect :-(

Still, maybe some of y'all have ideas on how to improve what I've already got, which is below. Thanks again!

#+STARTUP: indent
#+LANGUAGE: en
#+OPTIONS: num:nil  toc:nil ':t
#+AUTHOR
#+EMAIL: Your Email Here
#+LATEX_HEADER: \usepackage[utf8]{inputenc}
#+LATEX_HEADER: \usepackage[T1]{fontenc}
#+LATEX_HEADER: \usepackage{graphicx}
#+LATEX_HEADER: \usepackage{float}
#+LATEX_HEADER: \usepackage{wrapfig}
#+LATEX_HEADER: \usepackage{rotating}
#+LATEX_HEADER: \usepackage[normalem]{ulem}
#+LATEX_HEADER: \usepackage{hyperref}
#+LATEX_HEADER: \usepackage{setspace}
#+LATEX_HEADER: \usepackage{libertine}
#+LATEX_HEADER: \usepackage[left=1.0in,right=1.0in]{geometry}
#+LATEX_HEADER: \setlength{\parskip}{1em}
#+LATEX_HEADER: \setlength{\parindent}{0pt}
#+LATEX_HEADER: \newenvironment{temphelvet}{\fontfamily{phv}\selectfont}{\par}
#+LATEX_HEADER: \makeatletter
#+LATEX_HEADER: address@hidden
#+LATEX_HEADER: \begin{minipage}{0.14\textwidth}
#+LATEX_HEADER: \includegraphics[width=1.8cm]{./Pictures/1000020100000107000001CF636AB597708AB63A.png}
#+LATEX_HEADER: \end{minipage}
#+LATEX_HEADER: \begin{minipage}{0.86\textwidth}
#+LATEX_HEADER: \begin{temphelvet}
#+LATEX_HEADER: {\huge University of Toronto}   
#+LATEX_HEADER: \vspace{-2pt}
#+LATEX_HEADER: \hrule
#+LATEX_HEADER: \vspace{3pt}
#+LATEX_HEADER: \textbf{\textsc{dept. of history}}  \newline
#+LATEX_HEADER: {\small \textsc{ Rm. 2074 sidney smith, 100 st. george street}, TORONTO, ONTARIO  M5S 3G3  CANADA \newline
#+LATEX_HEADER: \textsc{Telephone 416-978-3363    Fax 416-978-4810} }
#+LATEX_HEADER: \end{temphelvet}
#+LATEX_HEADER: \end{minipage}
#+LATEX_HEADER: \hfill}
#+LATEX_HEADER: \makeatother
#+LATEX_HEADER: \newcommand{\mysig}{
#+LATEX_HEADER: Please do not hesitate to contact me with any questions or concerns.\\
#+LATEX_HEADER: Sincerely,\\
#+LATEX_HEADER: \fromsig{\includegraphics[scale=1]{my-sig.png}} \\
#+LATEX_HEADER: \fromname{Matt Price}
#+LATEX_HEADER: }
#

#+LATEX_HEADER_EXTRA:  \maketitle
# #+LATEX_HEADER_EXTRA: \onehalfspacing


* Frankie
I had the pleasure of teaching Frankie Goes To Hollywood in my 4th year seminar in Spring of 1987. Frankie stood out then as now as one of the loudest students I had ever encountered. At the same time, Frankie's work forced me to confront my own inability to *relax*. After years of psychotherapy, I now believe that that seminar was one of the best parts of my life.  All the "trauma" Frankie caused me turn out to have been excellent learning experiences.

It is thus with great pleasure that my therapist, I mean I, recommend Frankie for your stupid fellowship.

\mysig 

* Joey
Joey Ramone was a student in my class "School's out for Summer" at /Rock and Roll High School/ some time in the late 1970's, I can't remember the year exactly. Since the students burned the school down, and left me without a job, I really can't see why the would have asked me for a letter of reference, but I'm so alone and desolate that I agreed to write him one. However, I really don't have a single good thing to say about him.  I know you're not reading these letters anyway, though, so I suppose I can say whatever I want here. That Long Island school board still owes me money!

\mysig




reply via email to

[Prev in Thread] Current Thread [Next in Thread]