emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt Price <moptop99@gmail.com>
To: ckelty ckelty <ckelty@gmail.com>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: getting close on latex letterheads [was: letterhead and signature in odt export]
Date: Thu, 1 Nov 2018 08:47:42 -0400	[thread overview]
Message-ID: <CAN_Dec9H=h8uDAdC3H_pfQvsEsahYkZDNGgRtRQahPMSYZrxdQ@mail.gmail.com> (raw)
In-Reply-To: <2FD78D67-FE7A-4114-BE48-0DCE7F435E35@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 5686 bytes --]

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 <ckelty@gmail.com> wrote:

> Matt,
>
>
> > On Oct 30, 2018, at 6:26 PM, Matt Price <moptop99@gmail.com> 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: \def\@maketitle{
#+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

[-- Attachment #2: Type: text/html, Size: 6569 bytes --]

  reply	other threads:[~2018-11-01 12:47 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-30  5:55 letterhead and signature in odt export Matt Price
2018-10-30  6:54 ` Eric S Fraga
2018-10-30 12:34   ` Matt Price
2018-10-30 13:28     ` Eric S Fraga
2018-10-30 14:29       ` Jeff Filipovits
2018-10-30 15:56         ` ckelty ckelty
2018-10-31  1:26           ` Matt Price
2018-10-31  1:30             ` Matt Price
2018-10-31  3:04               ` Alan L Tyree
2018-10-31  3:50             ` ckelty ckelty
2018-11-01 12:47               ` Matt Price [this message]
2018-11-01 13:58                 ` getting close on latex letterheads [was: letterhead and signature in odt export] Eric S Fraga
2018-11-02  2:28                   ` Matt Price
2018-10-31 14:53             ` letterhead and signature in odt export John Kitchin
2018-10-30 21:41         ` Tim Cross
2018-10-31  1:21           ` Matt Price
2018-11-01 21:11             ` Tim Cross
2018-10-30  7:31 ` Christian Moe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAN_Dec9H=h8uDAdC3H_pfQvsEsahYkZDNGgRtRQahPMSYZrxdQ@mail.gmail.com' \
    --to=moptop99@gmail.com \
    --cc=ckelty@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).