website/posts/writing-resume-org.html

264 lines
9.9 KiB
HTML
Raw Normal View History

<!doctype html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<title>
Open Thoughts
</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="Judah Sotomayor" />
<meta property="og:title" content="Writing a Resume with Org-Mode">
<meta property="og:url" content="https://judah.freedomland.xyz//posts/writing-resume-org.html">
<meta name="twitter:card" content="summary_large_image">
<link rel="stylesheet" href="https://judah.freedomland.xyz//static/style.css" type="text/css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Lora&family=Space+Mono&display=swap" />
</head>
<body>
<header>
<h1>
<a href="https://judah.freedomland.xyz//">
Open Thoughts
</a>
</h1>
<a href="#main" class="visually-hidden">jump to main content</a>
<nav>
<ul class="menu">
<li><a href="https://judah.freedomland.xyz//about">about</a></li>
<li><a href="https://judah.freedomland.xyz//">blog</a></li>
</ul>
</nav>
</header>
<main id="main">
<article class="post">
<h1 class="post__title">
Writing a Resume with Org-Mode
</h1>
<section class="post__meta">
Jan 09, 2024
</section>
<section>
<div id="table-of-contents" role="doc-toc">
<h2>Table of Contents</h2>
<div id="text-table-of-contents" role="doc-toc">
<ul>
<li><a href="#setup">1. Setup</a>
<ul>
<li><a href="#installing-the-template">1.1. Installing the Template</a></li>
<li><a href="#preparing-org-mode">1.2. Preparing Org-Mode</a>
<ul>
<li><a href="#custom-class-org">1.2.1. Custom Class</a></li>
<li><a href="#lualatex-as-pdf-processor">1.2.2. Lualatex as PDF Processor</a></li>
<li><a href="#ox-extra-for-ignore-tags">1.2.3. ox-extra for ":ignore:" tags</a></li>
</ul>
</li>
<li><a href="#creating-the-macros">1.3. Creating the Macros</a></li>
</ul>
</li>
<li><a href="#writing-your-resume">2. Writing your Resume</a></li>
<li><a href="#future-improvements">3. Future improvements.</a></li>
</ul>
</div>
</div>
<p>
I use org-mode as my document production software.
This means that I produce everything in Org.
Notes, papers, presentations, and now my resume.
</p>
<p>
When I began looking at resume production with Org, I noticed the lack of straightforward packages and user guides.
I'm sure there's something out there, but I sure couldn't find it.
</p>
<p>
The simplest raw-org method I found is the use of <a href="https://orgmode.org/manual/Macro-Replacement.html">macros</a>, along with a custom export-template.
This approach is nice because it can be adaptede to any standard LaTeX template.
In my case, <a href="https://github.com/dnl-blkv/mcdowell-cv/blob/master/mcdowellcv.cls">McDowell CV</a> by Daniil Belyakov is perfect.
</p>
<div id="outline-container-setup" class="outline-2">
<h2 id="setup"><span class="section-number-2">1.</span> Setup</h2>
<div class="outline-text-2" id="text-setup">
</div>
<div id="outline-container-installing-the-template" class="outline-3">
<h3 id="installing-the-template"><span class="section-number-3">1.1.</span> Installing the Template</h3>
<div class="outline-text-3" id="text-1-1">
<p>
First, get the <code>.cls</code> for your desired template.
If it's on texlive, just install it the usual way.
Since the template I want is on Github, I'll just put the <code>.cls</code> into <code>/home/user/texmf/tex/latex/</code>.
</p>
</div>
</div>
<div id="outline-container-preparing-org-mode" class="outline-3">
<h3 id="preparing-org-mode"><span class="section-number-3">1.2.</span> Preparing Org-Mode</h3>
<div class="outline-text-3" id="text-preparing-org-mode">
</div>
<div id="outline-container-custom-class-org" class="outline-4">
<h4 id="custom-class-org"><span class="section-number-4">1.2.1.</span> Custom Class</h4>
<div class="outline-text-4" id="text-custom-class-org">
<p>
I add a custom entry to <code>org-latex-classes</code> to make use of McDowellcv:
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp">(add-to-list 'org-latex-classes
'(<span class="org-string">"mcdowellcv"</span>
<span class="org-string">"\\documentclass[]{mcdowellcv}</span>
<span class="org-string"> \\usepackage{amsmath}</span>
<span class="org-string"> \\usepackage[]{multicol}</span>
<span class="org-string"> \\usepackage[hidelinks]{hyperref}</span>
<span class="org-string"> [NO-DEFAULT-PACKAGES]</span>
<span class="org-string"> [NO-PACKAGES]"</span>
(<span class="org-string">"\\section{%s}"</span> . <span class="org-string">"\\section*{%s}"</span>)
(<span class="org-string">"\\subsection{%s}"</span> . <span class="org-string">"\\subsection*{%s}"</span>)
(<span class="org-string">"\\subsubsection{%s}"</span> . <span class="org-string">"\\subsubsection*{%s}"</span>)
(<span class="org-string">"\\paragraph{%s}"</span> . <span class="org-string">"\\paragraph*{%s}"</span>)
(<span class="org-string">"\\subparagraph{%s}"</span> . <span class="org-string">"\\subparagraph*{%s}"</span>)))
</pre>
</div>
<p>
Note that I prevent Org-mode from adding any extra packages to this.
Then I custom-add the <code>multicol</code> and <code>hyperref</code> packages.
</p>
</div>
</div>
<div id="outline-container-lualatex-as-pdf-processor" class="outline-4">
<h4 id="lualatex-as-pdf-processor"><span class="section-number-4">1.2.2.</span> Lualatex as PDF Processor</h4>
<div class="outline-text-4" id="text-1-2-2">
<p>
This template requires lualatex a its pdf producer.
While you could set this as a per-document setting, I like it well enough for everything.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp">(after! ox-latex
(<span class="org-keyword">setq</span> org-latex-pdf-process
'(<span class="org-string">"lualatex --output-directory=/home/user/Documents -shell-escape -interaction nonstopmode %f"</span>)))
</pre>
</div>
</div>
</div>
<div id="outline-container-ox-extra-for-ignore-tags" class="outline-4">
<h4 id="ox-extra-for-ignore-tags"><span class="section-number-4">1.2.3.</span> ox-extra for ":ignore:" tags</h4>
<div class="outline-text-4" id="text-1-2-3">
<p>
I want to be able to ignore headings on export.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"> (use-package! ox-extra
<span class="org-builtin">:after</span> (org)
<span class="org-builtin">:config</span>
(ox-extras-activate '(latex-header-blocks ignore-headlines)))
(add-to-list 'org-tags-exclude-from-inheritance <span class="org-string">"ignore"</span>)
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-creating-the-macros" class="outline-3">
<h3 id="creating-the-macros"><span class="section-number-3">1.3.</span> Creating the Macros</h3>
<div class="outline-text-3" id="text-1-3">
<p>
At the top of my resume file I use a config block to keep my macro definitions tidy:
</p>
<div class="org-src-container">
<pre class="src src-org"><span class="org-org-drawer">:CONFIG:</span>
<span class="org-org-meta-line">#+LATEX_CLASS: mcdowellcv</span>
<span class="org-org-meta-line">#+OPTIONS: toc:nil title:nil</span>
<span class="org-org-meta-line">#+MACRO: cvsection \begin{cvsection}{$1}</span>
<span class="org-org-meta-line">#+MACRO: end-cvsection \end{cvsection}</span>
<span class="org-org-meta-line">#+MACRO: cvsubsection \begin{cvsubsection}{$1}{$2}{$3}</span>
<span class="org-org-meta-line">#+MACRO: end-cvsubsection \end{cvsubsection}</span>
<span class="org-org-drawer">:END:</span>
</pre>
</div>
<p>
Other options can be set here as well, of course.
</p>
<p>
If you're using some other resume template, or even some unrelated LaTeX template,
you can see how easy it would be to adapt the macro workflow.
</p>
</div>
</div>
</div>
<div id="outline-container-writing-your-resume" class="outline-2">
<h2 id="writing-your-resume"><span class="section-number-2">2.</span> Writing your Resume</h2>
<div class="outline-text-2" id="text-2">
<p>
After you've set up your macros, use is simple.
You use standard org headlines with the <code>ignore</code> tag to structure your document, and then macros to manage the cv content.
<img src="https://judah.freedomland.xyz//static/img/edu-record-sample.svg" alt="image" />
Notice that I separate the ending macros using another header line.
I'm not sure why that's necessary, but when I attempt to remove it, export breaks.
</p>
<p>
I like to keep my resume on a single sheet.
This requires some content juggling, but it forces me to filter out everything that is unimportant.
Of course, being young I have little content and so I can fit just about everything.
</p>
<p>
If you're in school, the careers department can almost certainly help you out with more specific style guides.
</p>
</div>
</div>
<div id="outline-container-future-improvements" class="outline-2">
<h2 id="future-improvements"><span class="section-number-2">3.</span> Future improvements.</h2>
<div class="outline-text-2" id="text-3">
<p>
Back when configuring the <a href="#custom-class-org">custom class</a> you may have noticed the rows of cons cells underneath the header-string.
These define what each level of org-header is to translate into.
If you're paying attention you've also noticed that McDowellCV provides a set of commands <code>cvsection</code> and <code>cvsubsection</code> that would work perfectly in this scenario.
You're right, except that these commands require extra properties to specify dates and other features.
</p>
<p>
At some point I'll figure out how to pass parameters into them through the default header-export mechanism.
For now I'm comfortable with my macros.
</p>
</div>
</div>
</section>
</article>
</main>
<footer>
Made with &#x2665; and&nbsp;
<a href="https://emacs.love/weblorg" target="_blank">
weblorg
</a>
</footer>
</body>
</html>