A blog about everything by Jack Baty

Printing my Journelly journal

An early attempt at exporting my Journelly journal to PDF
Printing my Journelly journal

I have a well-established monthly routine for getting my org-journal exported to a nice PDF for printing. Converting this process to my Journelly journal needed to happen in order for me to seriously consider switching.

It needs a lot more work, but here's how I did it this time.

Create monthly file

First, copy and paste the month's entries from my Journelly.org file to a new file, e.g. 2025-04.org.

Add my usual export front matter to the file...

#+title: Journal - April 2025
#+date:
#+setupfile: ~/Documents/Notes/org/_SETUP/EXPORT
#+setupfile: ~/Documents/Notes/org/_SETUP/jack-latex-journal-twocolumn.setup
#+latex_class_options: [10pt,twocolumn]

The EXPORT file has a bunch of settings for handling the Org export...

#+AUTHOR: Jack Baty
#+OPTIONS: toc:nil num:nil <:nil ':t
#+OPTIONS: *:t -:t ::t <:nil H:4 \n:nil ^:{} arch:headline
#+OPTIONS: broken-links:t c:nil creator:nil
#+OPTIONS: author:t title:t date:t
#+OPTIONS: d:t e:t email:nil f:t inline:t num:nil
#+OPTIONS: p:nil pri:nil prop:nil stat:nil tags:nil tasks:nil tex:t
#+OPTIONS: timestamp:nil toc:nil todo:nil |:t
#+SELECT_TAGS: export
#+EXCLUDE_TAGS: noexport nolatex

The .setup file is my variation on the default Pandoc template. I haven't touched it in years, so I don't remember how all of it works. Still...

jack-latex-journal-twocolumn.setup

+LaTeX_CLASS: org-plain-latex+LaTeX_CLASS_OPTIONS: [letterpaper, 10pt]+LATEX_HEADER: \usepackage{lmodern} % Ensures we have the right font+LaTeX_CLASS_OPTIONS: [twocolumn,portrait]+LATEX_HEADER: \usepackage[T1]{fontenc}+LATEX_HEADER: \usepackage[AUTO]{inputenc}+LATEX_HEADER: \usepackage{graphicx}+LATEX_HEADER: \usepackage{amsmath, amsthm, amssymb}+LATEX_HEADER: \usepackage[table, xcdraw]{xcolor}

% Colorizing links in a nicer way.

+LATEX_HEADER: \definecolor{bblue}{HTML}{0645AD}+LATEX_HEADER: \usepackage[colorlinks]{hyperref}+LATEX_HEADER: \hypersetup{colorlinks, linkcolor=blue, urlcolor=bblue}

% Moving up the title.

+LATEX_HEADER: \usepackage{titling}+LATEX_HEADER: \setlength{\droptitle}{-6em}+LATEX_HEADER: \setlength{\parindent}{0pt}+LATEX_HEADER: \setlength{\parskip}{1em}+LATEX_HEADER: \usepackage[stretch=10]{microtype}+LATEX_HEADER: \usepackage{hyphenat}+LATEX_HEADER: \usepackage{ragged2e}+LATEX_HEADER: \usepackage{subfig} % Subfigures (not needed in Org I think)+LATEX_HEADER: \usepackage{hyperref} % Links+LATEX_HEADER: \usepackage{listings} % Code highlighting

% Disables flush alighment on the right side. Personal preference.
% #+LATEX_HEADER: \RaggedRight

% Page geometry

+LATEX_HEADER: \usepackage[top=1cm, bottom=1.5cm, left=2.5cm, right=2cm,includehead,includefoot]{geometry}+LATEX_HEADER: \setlength{\columnsep}{5mm} % Column separation width

% Line spacing (enable to increase a tad)
% #+LATEX_HEADER: \renewcommand{\baselinestretch}{1.15}

% Page numbering - this disables it

#+LATEX_HEADER: \pagenumbering{gobble}

% Spacing, titling, text setting.

+LATEX_HEADER: \usepackage[explicit]{titlesec}

% Title customization

+LATEX_HEADER: \pretitle{\begin{center}\fontsize{20pt}{20pt}\selectfont}+LATEX_HEADER: \posttitle{\par\end{center}}+LATEX_HEADER: \preauthor{\begin{center}\vspace{-6bp}\fontsize{14pt}{14pt}\selectfont}+LATEX_HEADER: \postauthor{\par\end{center}\vspace{-20bp}}+LATEX_HEADER: \predate{\begin{center}\fontsize{12pt}{12pt}\selectfont}+LATEX_HEADER: \postdate{\par\end{center}\vspace{0em}}

% Section/subsection headings:

%Section

+LATEX_HEADER: \titlespacing\section{0pt}{5pt}{0pt} % left margin, space before section header, space after section header

%Subsection

+LATEX_HEADER: \titlespacing\subsection{0pt}{5pt}{-2pt} % left margin, space before subsection header, space after subsection header

%Subsubsection

+LATEX_HEADER: \titlespacing\subsubsection{0pt}{5pt}{-2pt} % left margin, space before subsection header, space after subsection header

% List spacing

+LATEX_HEADER: \usepackage{enumitem}+LATEX_HEADER: \setlist{itemsep=-2pt} % or \setlist{noitemsep} to leave space around whole list%Section#+LATEX_HEADER: \titleformat{\section} {\Large}{\thesection}{1em}{\textbf{#1}} % Section header formatting#+LATEX_HEADER: \titlespacing\section{0pt}{5pt}{-5pt} % left margin, space before section header, space after section header%Subsection#+LATEX_HEADER: \titleformat{\subsection} {\large}{\thesubsection}{1em}{\textbf{#1}}

\titlespacing\subsection{0pt}{5pt}{-5pt} % left margin, space before subsection header, space after subsection header

%Subsubsection#+LATEX_HEADER: \titleformat{\subsubsection} {\large}{\thesubsubsection}{1em}{#1}

\titlespacing\subsubsection{0pt}{5pt}{-5pt} % left margin, space before subsection header, space after subsection header

Sort entries

Journelly creates entries in reverse-chronological order, so the order needs to be reversed. This is easily done by selecting all the entries and running M-x org-sort and choosing "time".

Reformat headings and dates during exports

Another issue is that each Journelly entry begins as a top-level Org heading containing an org-formatted timestamp and location, like so...

* [2025-04-10 Thu 05:54] @ Computer
* [2025-04-09 Wed 06:31] @ Computer
* [2025-04-08 Tue 12:52] @ Mom and Dad's

That wouldn't look great as headings in a PDF, so I needed to reformat the dates during export. It turned out to be trickier than expected. Org has hooks that do most anything during exports, but I struggled with it. The lisp I eventually found in this post helped me get the exported dates to render as e.g. "Saturday, May 3, 2025"

(with-eval-after-load 'ox
  (add-to-list 'org-export-filter-timestamp-functions
               #'env-filter-timestamp))


(defun env-filter-timestamp (string _backend _comm)
  "Remove [<>] around time-stamps from STRING.
  The filter receives the entire output
timestamp as STRING and then processes it before saving."
  (if (string-match-p ":" string)
      (format-time-string "%A, %B %-e, %Y"
                          (org-time-string-to-time string))
    (format-time-string "%A, %B %-e, %Y"
                        (org-time-string-to-time string))))

I use a quick M-x regexp-replace to remove the location: @.* part of the headings.

Export!

Then it's a matter of running the export via the export dispatch in Emacs. For me, that means C-c C-e l o and boom, there's a nice PDF of my month's Journelly entries. Here's a less-than-ideal sample page from April that doesn't include too much personal info:

The odd thing with this is that when I exported, all the images were rendered upside-down. I had to go into Photo Mechanic and run "Apply JPEG Rotation" on the images. This is probably due to adding photos on the iPhone, but I'd like to figure out how to avoid this step in the future.

This all worked fine for my first export. It's close enough, but I'll want to automate as much as possible. I have a month to figure it out 😄.

Member discussion