Napkin · Manual

Napkin is a notes app that calculates, on Mac, iPhone and iPad. Every note is a plain Markdown file; lines ending in => show their result right behind the arrow. This manual describes the Mac app; what differs on iPhone and iPad is in chapter 9.

1. Creating and finding notes

The field above the list both searches and creates:

  1. Type a few letters – the list keeps only notes whose title or text contains every word. As in nvALT, the field completes the first title that starts with what you typed and opens that note; keep typing to replace the completion, or delete it.
  2. ↑ and ↓ walk through the list while the keyboard stays in the field, which shows the selected note's title.
  3. Press Return to go into the note shown – or, if no note has this title, to create it. Tab also goes into the note.
  4. Escape clears the search.

Whenever the search field gets the keyboard (a click, ⌘L), its text is selected, so the next letter starts a new search. A word starting with # searches by tag, see Tags and songs.

The words you search for are marked subtly in the open note; a note opened from a search shows the first one. To search inside a note, press ⌘F: every match is marked, ⌘G and ⇧⌘G go to the next and previous.

Renaming: double-click a note, click and hold, press Return on the selected note, or use File > Rename Note. Return keeps the new title, Escape cancels. Deleted notes go to the Trash; Edit > Undo (⌘Z) brings the last one back, with its dates and tags. In the note, ⌘Z first undoes your typing; once there is nothing left to undo there, it brings back the note.

The eye button in the toolbar shows or hides the preview on the right. It starts hidden; Napkin remembers your choice. Drag the line between editor and preview to share the space.

Show in Finder, in a note's context menu, opens a Finder window with its file.

Hidden notes

File > Hide Note (⇧⌘H, also in the context menu) takes a note out of the list without deleting it. View > Show Hidden Notes (⇧⌘.) lists them again, dimmed and marked with a crossed-out eye. A search always finds hidden notes; opening one shows hidden notes. File > Show Note makes it an ordinary note again. The marks live in the file .napkin-hidden in the notes folder, and sync with it.

List and layout

The View menu chooses what the list shows: each note's first line, the date it was created, the date it last changed. View > Vertical Layout (⌥⌘L) puts the list above the note as a table, as in nvALT; drag the line between them to share the space.

View > Sort By orders the list by date modified, date created or title, either way round. In the vertical layout, a click on a column header does the same, and a second click turns the order round. ↑ and ↓ follow the order shown.

View > Appearance follows the system, or keeps Napkin light or dark. List, editor and preview each have a slightly different background.

Deleting a note (⌘⌫) opens the one below it, or the one above at the end of the list.

2. Tags and songs

A tag is a label on a note, such as Song, Recipe or Tax 2026. A note can have several.

Songs: #song lists the notes tagged Song and every note with chords (see chords), tagged or not. So a song sheet is found as a song as soon as it has its first chord.

Tags are the Finder tags of the note's file. They travel with the file through iCloud Drive and other sync services, survive saving, renaming and importing, and show in the Finder and the Files app; a tag set in the Finder shows in Napkin.

A search for #song lists the note “Campfire” with the tag Song; the bar above the note shows the tag

3. Calculating

Results

End a line with =>. Napkin writes the result behind it and keeps it up to date as you type:

1 + 2 * 3 => 7
(1 + 2) * 3 => 9
2 ^ 10 => 1024

Variables

A line name = expression defines a variable from that line on. Names may contain spaces. A definition can show its value as well:

rent = 1100
food = 420
income = 3000
left = income - rent - food => 1480
per day = left / 30 => 49.33333333

Between a number and a name the times sign may be left out: 2x is 2 * x.

Functions

f(x) = x^2 + 1
f(4) => 17
area(w, h) = w * h
area(3, 4) => 12

Built in are sqrt, abs, round (also round(x, 2) for two decimals), floor, ceil, sin, cos, tan, asin, acos, atan, ln, log (base 10), exp, min and max, and the constants pi and e.

Napkin works out the examples’ variables and functions: 1480, 49.33333333, 17 and 12 appear in blue behind the arrows

Equations

A line A = B that is not a definition is an equation. Napkin solves it for its unknown, which is defined from that line on:

6x = 30
x => 5
vat = 1.19
vat * net = 119 => net = 100
speed * 2 h = 100 km => speed = 50 km/h
2^n = 1024 => n = 10
x^2 = 2 => x = -1.414213562, 1.414213562

Linear equations are solved exactly, including the unknown's unit; others numerically, with every real solution between about −1,000,000 and 1,000,000. When an equation has several solutions they are listed, and the unknown stays open. When every name is already defined, the equation is only checked: 1 + 1 = 2 => true.

Systems of equations

Equations with several unknowns are gathered until there are as many equations as unknowns, then solved together. Every equation of the system shows the solution:

apples + pears = 5 => apples = 3, pears = 2
3 * apples + 2 * pears = 13 => apples = 3, pears = 2

Linear systems are solved. When the equations contradict each other or do not pin the unknowns down, Napkin says so.

Napkin solves the examples’ equations: net = 100, speed = 50 km/h, n = 10, apples = 3, pears = 2

Comments

Text after # on a calculation line is a comment: rent = 1100 # per month. It is not calculated and stays behind the result.

Unknowns stay as they are

When a name is not defined, Napkin works out what it can and keeps the rest: 2 * y + 3 * 4 => 2y + 12.

What is not calculated

Prose, headings and code blocks (between ```) are left alone. List items such as - rent = 1100 count as definitions.

4. Units

Write the unit after the number. Adding converts into the unit on the left; in or to converts into any unit:

5 km + 300 m => 5.3 km
26.2 miles in km => 42.1648128 km
10 km / 2 h => 5 km/h
36 km/h in m/s => 10 m/s
speed = 50 km/h
speed * 30 min => 25 km
1.5 GB in MB => 1500 MB

When units do not fit together, Napkin shows a note instead of a result, such as error: cannot add km and kg.

Napkin converts the examples’ units: 5.3 km, 42.1648128 km, 5 km/h, 10 m/s, 25 km, 1500 MB

5. Plots

A line with plot(…) draws a plot right under it – in the editor and in the preview:

plot([3, 5, 4, 8])            a list of numbers
f(x) = x^2 - 2
plot(f)                        from -10 to 10
plot(f, -3, 3)                 your own range
plot(sin, cos, -pi, pi)        several curves
plot(x^2 + 1, 0, 2)            an expression in x

At poles, as with 1/x, the curve breaks instead of joining up. When a plot cannot be drawn, the reason appears in red underneath.

Two plots right under their lines: the parabola f from -3 to 3, then sine and cosine from -pi to pi

6. Markdown, tables and chords

Notes are Markdown. The editor styles them as you write; the Markdown marks stay visible, but faded:

Tables

| Item   | Price |
|--------|------:|
| Coffee |  3.20 |
| Cake   |  4.50 |

A colon in the line under the header aligns a column: ---: to the right, :---: centred. Tables lined up with tabs, as in many nvALT notes, show as tables too.

Lines whose columns are separated by tabs or several spaces become a Markdown table with Convert to Table in the context menu (or the Format menu); the first line becomes the header. Convert to Table without Header puts an empty header row above them instead – Markdown needs one, but Napkin shows neither it in the preview nor in the note list.

The table in the editor on the left, in the preview on the right; below it total => 7.7

Chords

Chords go in brackets right before the syllable they belong to, as in ChordPro:

Smoke goes [G]up and the [C]stars come out,
[G]someone hums what the [D]song's about,

The preview, print and PDF set each chord above its syllable; the editor colours them. Napkin takes a bracket for a chord only when it reads as one – [G], [Am7], [F#m], [H], [D/F#], [Bb] – so [x] in a task list, [[links]] and [text](address) stay what they are. A note with chords counts as a song for #song.

The song with chords in brackets in the editor on the left, and in the preview on the right with each chord above its syllable

Formatting keys

⌘B, ⌘I and ⌘K (Format menu) put the marks for bold, italic and links around the selection – a second time, they take them away.

Lines wrap at the edge of the editor; tabs are two characters wide.

7. Printing and PDF

File > Print… (⌘P) and File > Export as PDF… set the note as the preview shows it: headings, tables, results, plots and chords, on proper pages.

8. Folder and sync

Every note is a file Title.md in your notes folder; the window's subtitle shows which folder. At the first start Napkin asks where the notes should live and suggests its own folder in iCloud Drive, called “Napkin” (with the Napkin icon in the Finder). Napkin on your other Macs, iPhone and iPad finds it by itself: take the suggestion everywhere and your notes are the same everywhere, with nothing to set up. You can pick another folder instead. If your notes were in a plain folder in iCloud Drive (as with Napkin 1.0 and 1.1), Napkin offers once to move them into its folder, with their dates, tags and hidden marks. File > Choose Notes Folder… (⇧⌘O) changes it later – for example to a folder in Dropbox or Nextcloud – and Napkin asks whether to move your notes there. The service the folder belongs to does the syncing; Napkin itself connects to nothing.

9. iPhone and iPad

Napkin for iPhone and iPad is the same purchase as Napkin for Mac. It works with the same notes: at the first start, tap Use iCloud and it shows the notes your Mac has. Choose Another Folder picks a folder in Files instead, for example a Dropbox folder your Mac uses. Or keep the notes on the device only.

Stage view

For playing a song or reading a text aloud: the Stage View button above a note (a play symbol in a frame) shows it rendered, full screen, chords above their syllables. Tap ▶ and the page scrolls up by itself; the slider between tortoise and hare sets the speed, and Napkin remembers it for each note. The controls step aside while it plays – tap the page to bring them back. Drag the page to jump ahead or back; the scrolling goes on from there and stops at the end. The text is as large as the screen allows: the longest line fills the width, also after turning the device. The two A buttons make it smaller or larger from there. The screen stays on while the stage view is open.

The stage view on an iPhone: the song large and full screen, with play, speed and text size at the bottom

Not on iPhone and iPad yet: the preview beside the editor, printing, and the built-in help.

10. Importing notes

File > Import Notes… (⇧⌘I) takes every text and Markdown file of a folder in as a note, with the file name as title and the original dates it was created and last changed; Finder tags come along. Identical notes already here are skipped; a different note with a taken title gets a number. Older Latin-1 and UTF-16 files are converted.

From nvALT, export first with File > Export… as plain text into an empty folder. Importing the same folder again adds nothing twice.

11. Help, updates and languages

Help > Napkin Help (⌘?) opens the help as notes: the examples calculate as in any note, and you can change and try them; nothing is saved. More topics are in the Help menu.

Problems: Help > Report a Problem… opens a mail to us in your mail app. After a crash, the version downloaded here offers to attach the crash report; nothing is sent until you send the mail.

Updates: the App Store version updates through the App Store. The version downloaded here looks for new versions with Napkin > Check for Updates… – and, if you allow it at the second launch, regularly by itself.

Napkin speaks English, German, French and Spanish, following your Mac's language: menus, messages, results such as true or error: no solution for x, the Welcome note and the help. Calculations are written the same way in every language – decimal point, in for conversions, English function names – so a note means the same on every Mac.

12. Keyboard shortcuts

Questions? See Support.