mirror of
https://github.com/org-roam/org-roam
synced 2025-08-13 13:13:31 -05:00
120 lines
5.2 KiB
HTML
120 lines
5.2 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html>
|
|
<!-- Copyright (C) 2020-2020 Jethro Kuan <jethrokuan95@gmail.com>
|
|
|
|
You can redistribute this document and/or modify it under the terms
|
|
of the GNU General Public License as published by the Free Software
|
|
Foundation, either version 3 of the License, or (at your option) any
|
|
later version.
|
|
|
|
This document is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
General Public License for more details.
|
|
-->
|
|
<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<title>Titles (Org-roam User Manual)</title>
|
|
|
|
<meta name="description" content="Titles (Org-roam User Manual)">
|
|
<meta name="keywords" content="Titles (Org-roam User Manual)">
|
|
<meta name="resource-type" content="document">
|
|
<meta name="distribution" content="global">
|
|
<meta name="Generator" content="makeinfo">
|
|
<link href="index.html#Top" rel="start" title="Top">
|
|
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
|
<link href="Anatomy-of-an-Org_002droam-File.html#Anatomy-of-an-Org_002droam-File" rel="up" title="Anatomy of an Org-roam File">
|
|
<link href="Tags.html#Tags" rel="next" title="Tags">
|
|
<link href="Anatomy-of-an-Org_002droam-File.html#Anatomy-of-an-Org_002droam-File" rel="prev" title="Anatomy of an Org-roam File">
|
|
<style type="text/css">
|
|
<!--
|
|
a.summary-letter {text-decoration: none}
|
|
blockquote.indentedblock {margin-right: 0em}
|
|
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
|
|
blockquote.smallquotation {font-size: smaller}
|
|
div.display {margin-left: 3.2em}
|
|
div.example {margin-left: 3.2em}
|
|
div.lisp {margin-left: 3.2em}
|
|
div.smalldisplay {margin-left: 3.2em}
|
|
div.smallexample {margin-left: 3.2em}
|
|
div.smalllisp {margin-left: 3.2em}
|
|
kbd {font-style: oblique}
|
|
pre.display {font-family: inherit}
|
|
pre.format {font-family: inherit}
|
|
pre.menu-comment {font-family: serif}
|
|
pre.menu-preformatted {font-family: serif}
|
|
pre.smalldisplay {font-family: inherit; font-size: smaller}
|
|
pre.smallexample {font-size: smaller}
|
|
pre.smallformat {font-family: inherit; font-size: smaller}
|
|
pre.smalllisp {font-size: smaller}
|
|
span.nolinebreak {white-space: nowrap}
|
|
span.roman {font-family: initial; font-weight: normal}
|
|
span.sansserif {font-family: sans-serif; font-weight: normal}
|
|
ul.no-bullet {list-style: none}
|
|
-->
|
|
</style>
|
|
<link rel="stylesheet" type="text/css" href="assets/page.css">
|
|
|
|
|
|
</head>
|
|
|
|
<body lang="en">
|
|
<a name="Titles"></a>
|
|
<div class="header">
|
|
<p>
|
|
Next: <a href="Tags.html#Tags" accesskey="n" rel="next">Tags</a>, Up: <a href="Anatomy-of-an-Org_002droam-File.html#Anatomy-of-an-Org_002droam-File" accesskey="u" rel="up">Anatomy of an Org-roam File</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
|
|
</div>
|
|
<hr>
|
|
<a name="Titles-1"></a>
|
|
<h3 class="section">5.1 Titles</h3>
|
|
|
|
<p>To easily find a note, a title needs to be prescribed to a note. A note can have
|
|
many titles: this allows a note to be referred to by different names, which is
|
|
especially useful for topics or concepts with acronyms. For example, for a note
|
|
like “World War 2”, it may be desirable to also refer to it using the acronym
|
|
“WWII”.
|
|
</p>
|
|
<p>Org-roam calls ‘<samp>org-roam--extract-titles</samp>’ to extract titles. It uses the
|
|
variable ‘<samp>org-roam-title-sources</samp>’, to control how the titles are extracted. The
|
|
title extraction methods supported are:
|
|
</p>
|
|
<ol>
|
|
<li> ‘<samp>'title</samp>’: This extracts the title using the file ‘<samp>#+title</samp>’ property
|
|
</li><li> ‘<samp>'headline</samp>’: This extracts the title from the first headline in the Org file
|
|
</li><li> ‘<samp>'alias</samp>’: This extracts a list of titles using the ‘<samp>#+roam_alias</samp>’ property.
|
|
The aliases are space-delimited, and can be multi-worded using quotes
|
|
</li></ol>
|
|
|
|
<p>Take for example the following org file:
|
|
</p>
|
|
<div class="example">
|
|
<pre class="example">#+title: World War 2
|
|
#+roam_alias: "WWII" "World War II"
|
|
|
|
* Headline
|
|
</pre></div>
|
|
|
|
<table>
|
|
<thead><tr><th>Method</th><th>Titles</th></tr></thead>
|
|
<tr><td>‘<samp>'title</samp>’</td><td>’(“World War 2”)</td></tr>
|
|
<tr><td>‘<samp>'headline</samp>’</td><td>’(“Headline”)</td></tr>
|
|
<tr><td>‘<samp>'alias</samp>’</td><td>’(“WWII” “World War II”)</td></tr>
|
|
</table>
|
|
|
|
<p>One can freely control which extraction methods to use by customizing
|
|
‘<samp>org-roam-title-sources</samp>’: see the doc-string for the variable for more
|
|
information. If all methods of title extraction return no results, the file-name
|
|
is used in place of the titles for completions.
|
|
</p>
|
|
<p>If you wish to add your own title extraction method, you may push a symbol
|
|
‘<samp>'foo</samp>’ into ‘<samp>org-roam-title-sources</samp>’, and define a
|
|
‘<samp>org-roam--extract-titles-foo</samp>’ which accepts no arguments. See
|
|
‘<samp>org-roam--extract-titles-title</samp>’ for an example.
|
|
</p>
|
|
|
|
|
|
|
|
</body>
|
|
</html>
|