MojoPad

Exporting

Your words are yours; MojoPad gives them plenty of exits. Everything lives under File ▸ Export Page As (the current page) and File ▸ Export Document (everything).

Current page

  • HTML… — a standalone, styled web page.
  • Markdown… — clean .md, ready for Obsidian, Joplin, and friends.
  • Plain Text… — just the words.
  • PDF… — print-quality, links intact. (⌘P prints it instead.) Long code lines wrap onto the next line on paper rather than running off the edge.
  • Word… — a real .docx. See below.

Word, for the last mile

The paper is written here and finished somewhere else. A journal wants a .docx. A supervisor returns one covered in tracked changes. A colleague does not have MojoPad and is not going to install it. That handover is the one place a wiki usually gives up, and it is what this is for.

Three ways out, depending on what you are handing over:

  • File ▸ Export Page As ▸ Word… — this page, on its own.
  • Compile…, then Word… — a folder of sections as one document, in order, with its title page and its footnotes gathered.
  • File ▸ Export Document ▸ Word Folder… — one file per page, arranged in your own folders.

What comes across. Headings keep their level, so Word's navigation pane and its Insert ▸ Table of Contents both work on your structure. Bold, italic, underline, strikethrough, super- and subscript, and inline code. Bulleted and numbered lists, nested as deep as you nested them, with checklists arriving as checked and unchecked boxes. Tables as real tables — with the first row repeating at the top of every page a long one runs onto. Pictures, at the size they are drawn rather than the size of the file. Links to the web, still clickable.

A wall of cards arrives as a wall of cards. This is the file you hand to somebody who does not have MojoPad, so it is the one place the design has to hold up on its own. Each card comes across as its own box — the colored edge down its left side, the source in small capitals, the headline, the sentence under it, and Read more still a working link that opens the story. Cards are set against whatever body size the paper is set to, so they stay in proportion on a large-print manuscript and on a tight one, and they keep their colors when the page is printed instead of dropping to white on white.

Footnotes arrive as real footnotes, at the foot of the page they belong to, numbered by Word rather than by us — so adding one in the middle renumbers the rest, and your supervisor's tracked changes land on something Word understands. A source you cite twice arrives as two notes: that is how Word works, and forcing it to share one produces a file Word will not open.

And it tells you what it could not carry. Word has no idea what a Mermaid diagram is, or a recording, or a canvas. Rather than let those vanish quietly, the export says so when it finishes — with a count, once, after the file is written: "3 diagrams did not come across". Your writing is always all there. Math is kept as its source, so it can be retyped rather than lost.

Links between your own pages are the interesting case, and the answer depends on which route you took. Exporting one page, a wiki link keeps its words and loses its link — whoever opens it does not have your wiki, and a link that goes nowhere is worse than none. Exporting a Word Folder, the pages all land together, so a link to another page becomes a link to that page's file and still works — including across folders, so a link from a page in one folder to a page in another opens it. The export says which happened.

A folder of files keeps your folders

Markdown Folder, Plain Text Folder and Word Folder write your Folders as real folders on disk. Each page's file sits inside the folder you filed it under, nested as deeply as you nested it, so the folder you choose to export into ends up looking like your sidebar. A folder you made and have not filled yet is there too, empty — as is one holding only pages you keep out of exports — so the arrangement can be rebuilt from the export alone. A page you never filed sits at the top, beside the folders, which means a wiki with no folders still comes out as one flat folder of files. The shape of a flat export is unchanged; its file names are not, since they are now tidied for the disk and numbered when two pages share one, the same as in a nested export.

Where a folder tree and a disk disagree, nothing is left out. A folder whose name your disk will not accept — one with a slash or a colon in it, or a name that is only spaces — is adjusted rather than skipped, because skipping it would tip its pages into the folder above and quietly merge two folders. Two folders whose names differ only in capitals stay two folders, even on a disk that would treat them as one. Two pages of the same name in the same folder both survive, the second numbered. A page filed in two places is written once, in the first one. Names in Japanese, Greek, Cyrillic and anything else come out as themselves, though a very long one is shortened to the length a single name is allowed — and that length is counted the way the disk counts it, so a name in one of those scripts fits fewer characters than an English one.

An export never quietly replaces work that was already there. If files already sitting in the folder you chose have the same names as ones the export is about to write, you are asked once, with a count, before anything is written; everything else in that folder is left alone. And if a page cannot be written — a name this disk refuses, or something already sitting exactly where the file goes — the rest of the export still finishes and you are told which pages were left out, rather than the export stopping part-way with everything after it missing.

If you would rather have one flat folder — because a script you have written reads that folder and expects every file at the top of it — turn off Keep your folders when exporting to a folder of files in Settings ▸ Exporting. Everything above still applies except the nesting: same pages, same names, same numbering when two collide.

A website export stays flat on purpose. Its file names are web addresses rather than filing, so nesting them would change every link you had already shared.

If the shape is not what you expected

Everything came out flat. Either the setting above is off, or the pages were never filed — check Folders in the sidebar rather than Pages, since a page can be in the wiki without being filed anywhere.

A folder came out under a different name. Its name held something the disk will not take, or was blank, so it was adjusted — look for one whose name has had a character swapped for a dash, or a folder simply called Folder. Its pages are still inside it; a folder is never skipped, because skipping one would tip its pages into the folder above and quietly merge two folders. Rename it in the sidebar and export again if you would rather it read differently.

A folder is there twice, the second numbered. You have two folders of that name in the same place — most often one made by hand and one made for you, or two that differ only in capitals. They are two folders in the sidebar too.

A page is in a folder you did not expect. It is filed in more than one, and the export writes it once, under the first. Right-click the page in Folders to see where it sits.

A deeply nested page came out higher up than it should. Either its full path was longer than the disk allows, or its folders were nested deeper than an export will go. In both cases the page moves up toward the folder you chose until it fits, and the page itself is always kept. Its file name is not cut down to make room — every name is already kept within what a single name may be, and a path too long for the disk is shortened by giving up folders rather than by shortening the name further. So look for the page under one of its parent folders, not for a truncated name.

You were asked about replacing files. The folder you chose already holds files with the same names as ones the export writes — most often because you have exported there before, or because a folder in your wiki has the same name as one already in that folder. Choose an empty folder if you would rather keep both.

A few pages were reported as not written. Each one has a name this disk will not take, or something is already sitting exactly where its file goes — a folder in your wiki with the same name as a file already in the folder you chose, for instance. Everything else was written. Rename what it names in the sidebar, or export into an empty folder, and run it again.

What happens to your links

Worth knowing before you hand a folder of notes to someone, because the two kinds of link leave differently — and on purpose.

Links to an address always survive, as ordinary Markdown links, with no setting to find. That includes the ones a custom phrase rule makes for you. There's no choice offered because there's no sensible second answer: strip a page link and the words are still there and the page is in the same export, so a reader can find it — strip an address and the destination is gone from the file entirely, with nowhere to look it up.

Links to your own pages come out as plain words unless you ask otherwise. MojoPad makes most of them for you — it recognizes a page's name as you type and links it, and redoes that every time it draws the page — so there's nothing fixed to write down, and freezing one into a file means renaming the page leaves the file saying the old thing. If you're moving to another editor that understands [[Name]], turn on Export page links as [[wikilinks]] under Settings ▸ Exporting. A link whose wording you edited comes out as [[Page Name|the words you used]], so it resolves at the other end and still reads the way you wrote it.

An export carries out what the page actually shows: if a document has automatic linking switched off, or you've unlinked a particular phrase, none of those links appear in the file either.

What a printed page looks like — its size, margins, line spacing, typeface and page numbers — is set once in Settings ▸ Files & Backups ▸ Paper, and everything printed or written to PDF obeys it: one page, a whole document, or a compiled folder. Journals ask for exactly these things; answer them here rather than in Word afterwards. ⌘P prints the page you are reading, not the app around it.

A storyboard exports as the document it describes. Send a board out through any of these — or through any whole-document export — and you get a manuscript, not a picture of a board: each card's depth becomes its heading level, its title becomes that heading, and the rest of the card becomes the prose beneath it. Nowhere does the card list itself show up. (If you'd rather keep the result in the wiki and polish it first, the board's own Send to… button makes it a page — see Storyboard.)

Whole document

  • Web Export… — a folder of linked HTML pages, with three looks: Clean (simple pages), Site (a navigation sidebar on every page), and Paper (a serif reading layout). Attachments come along; links between pages just work.
  • PDF… — one paginated PDF, pages in Folders order, each starting on a fresh sheet.
  • ePub… — a valid ePub 3 book, chapters in Folders order. Reads beautifully in Apple Books.
  • Markdown Folder… / Plain Text Folder… / Word Folder… — one file per page. In the Word folder, a link from one page to another opens the file beside it, so the wiki's connections survive the move.
  • XML Backup… — every page and its metadata in one machine-readable file. Your insurance policy against everything, including us.

Order and exclusions

Document exports follow your Folders (Table of Contents first, then everything else alphabetically, home page first). Check Skip on export in the Info palette to keep a page out of every export. Encrypted pages are always skipped. Scriptlets run during export — see Scripting: Scriptlets.

For publishing to the web on a schedule, you want Static Publishing instead.