- Typed 1 2 – Stunning Word Processing With Markdown Free
- Typed 1 2 – Stunning Word Processing With Markdown Code
- Typed 1 2 – Stunning Word Processing With Markdown Word
- Typed 1 2 – Stunning Word Processing With Markdown Letters
I have a lot of documents authored with Apple's Pages. I wanted to convert these to markdown texts with the images (mostly screen grabs). The Pages file format is a proprietary format, and so we are dependent on the limited export features that the program itself provides. So how can we do this?
Markdown is a lightweight markup language with plain-text-formatting syntax, created in 2004 by John Gruber with Aaron Swartz.Markdown is often used for formatting readme files, for writing messages in online discussion forums, and to create rich text using a plain text editor. Files for Markdown, version 3.3.1; Filename, size File type Python version Upload date Hashes; Filename, size Markdown-3.3.1-py3-none-any.whl (95.5 kB) File type Wheel Python version py3 Upload date Oct 12, 2020 Hashes View.
Apple pages
I think pages is a very nice word processor and I have been using for some time to build documents for my students, to either print out or convert to PDF for delivery on our Moodle pages.
But I don't want to print this type of material anymore. Beside, I need to update every year. Making version changes needs to happen more frequently, these documents really need to be delivered as web pages. Editing (and creating new pages) is better done with a markdown text editor.
The workflow
Pages is good at giving you options for export. You can export to PDF, Word, Plain text and ePub. But, you can't export to HTML or markdown.
The challenge then was to take the Pages document and recreate as markdown for use here on this site, so the pages can be easily maintained.
Pandoc to the rescue
I just love this Pandoc. Thanks to John Macfarlane, a Professor of Philosophy at the University of California, we can convert just about any document format to any other with this universal document converter.
You can read the details here.
Pandoc is great but it does not offer Apple's Pages as a source file format, so we need to use the Microsoft Word format as an interim. Here is what we do once we have Pandoc installed.
Export from pages to Word (make sure to use docx - the default)Locate the file just exported in the finder and change directory to there.
Here is an explanation of this terminal command:
- first we change into the folder where our Word document has been saved
- we now use pandoc with these parameters:
wrap=none
tells pandoc to not wrap the text that it finds. In other words, allow the text to flow except where there are specific paragraph breaksextract-media=images
will pull the images out of the Word document and put them into a folder called images. This will be inside a media folder that pandoc creates automatically.- then we have the input file followed by the output needed. The
.md
extension tells pandoc to create a markdown file.
Then we have a markdown file and then all of the images from the Word document, will be put into the images folder (inside a media folder). The images will be renamed image1.png, image2.png etc (if they were originally png files) or image1.jpg if they were originally JPEG files.
The Markdown file
The markdown file will now need some editing. Here is what a portion looks like:
The reason that we are not seeing markdown headings with ##
is because our pages document did not have named styles that could be converted. Not perfect, but we know that any span tag like this one is a heading, so we simply use a GREP search and replace like this:
Replaced with ##
We can remove the table of contents.
More GREP search and replace, will then help to build the image links with the correct structure and image location.
The image links have a width and height set, so we can easily replace this too.
Finally, we need to add our ALT tag text for each image.
Related Posts
Today, we're going to settle the question once and for all – which is superior? Documentation in a plain-text editor using Markdown, or creating content in a rich-text editor the WYSIWYG (what you see is what you get) way? How will it be decided, you ask? A good, clean head-to-head fight!
Mr. Mark ‘Markdown' Down
In the left corner: Mr. Mark 'Markdown' Down, lightweight champion of the world for writing web content into plain text files. You can recognize Markdown easily by his file extension .md
, but you don't need an MD to understand it – the syntax is so simple that any developer in the world can adapt to it with ease.
Mark's strengths: code handling, offline availability, minimalism and something he likes to call 'bringing it down.'
Supported by: Jekyll, your favorite text editor (e.g. Emacs), and file repositories such as Github.
Mr. Richard ‘Rich Text' Formatting
In the right corner: Richard 'Rich Text' Formatting – used by millions of casual writers who want to see their results instantly. Rich doesn't see many advantages in separating editing from viewing: 'Juggling markup syntax? What is this, the ‘90s?'
Rich's strengths: advanced content formatting skills, editor shortcuts (and he's not afraid to use them), and immediate availability of the resulting document.
Supported by: the Atlassian Confluence collaboration platform and wiki, and other cloud-based content creation tools such as Google Docs. Microsoft Word isn't a big fan, though.
Let's Get Ready To Rumble!
This match will go the full 12 rounds. Mark and Rich will flex their muscles to see who can create and publish content faster and easier.
Round #1: Getting Started
Markdown: 'Oh, this one's easy – open a new document in the text editor and start typing.' Or use an online markdown editor such as dillinger.io that supports synchronization with Dropbox, Google Drive and Github.
Rich Text: 'The same goes for me. Just create a new document, give it a title and away you go.' Before the web arrived, using a desktop text processor to format rich text was the norm. Today, rich text authoring is done collaboratively in a web browser, using a content collaboration platform such as Atlassian Confluence.
Round #2: Defining Headings and Paragraphs
Markdown: 'Enter 1 to 6 hash characters before your headers, e.g. # This is a H1
for a first-class heading, or ## This is a H2
for a subheading.' Creating a paragraph is even easier. Mark recommends: 'Write consecutive lines of text followed by a blank line to create a paragraph.'
Rich Text: 'I don't like blank lines, useless spaces or hashes. Instead, write a heading or paragraph, and assign the corresponding paragraph format.' Using the rich text approach, writers need only to select the desired heading level or paragraph format from the toolbar once.
Round #3: Using Bulleted and Numbered Lists
Markdown: 'Choose your favorite list item (*
/+
/-
) to create bullet points, or just start numbering your ordered list items (1.
, 2.
, etc.).'
If you don't want the problem in the above tweet to happen to you, you'll need to enter a tab (or four spaces) before you begin to write paragraphs within a list. Color generator online.
Rich Text: 'Hmph. That just looks like a workaround, not a real solution. To add line breaks within a list item, simply press Shift+Return
in the Confluence editor instead of pressing the Return
key.'
Round #4: Embedding Code and Block Quotes
Markdown: 'Just indent your lines of code with a tab or at least four spaces so they're recognized as code. A no-brainer, right?' Absolutely – code is automatically indented in any development environment.
Rich Text: 'I can do code examples and script listings too! Sure, you'll need to wrap Confluence's Code Block macro around them – but once that's done, you can define proper syntax highlighting for your programming/scripting language, line numbering, and more.'
Round #5: Inserting Tables
Markdown: 'Okay, so I'm not perfect. Tables are only supported by inline HTML, which you can write whenever a markup element isn't covered by Markdown's syntax.'
Rich Text: 'In the Confluence rich content editor, adding tables and managing tabular content is a breeze. https://truesup391.weebly.com/iskysoft-imedia-converter-deluxe-5-4-0-download-free.html. Just click the Table
button in Confluence's editor toolbar, and voila.'
Round #6: Images and Other Media Assets
Markdown: 'OK, I admit it – embedding images into a plain text document format isn't easy.' There are two different ways to do it:
Typed 1 2 – Stunning Word Processing With Markdown Free
- Inline (within a paragraph):
![alt text](/path/to/img.jpg 'title')
, for example!Logo (/folder/logo.jpg 'My Logo')
- Reference-style:
[id]: url/to/image 'Optional title attribute'
, for example[logo]: /folder/logo.jpg 'My Logo'
Rich Text: 'Great media support is one of the reasons why they call me ‘Rich'. Give me almost any file type, and I'll display it however you want. Scaled proportionally and aligned on the right? No problem!' In Confluence, just drag and drop an image into the editor to upload it automatically. You can also use a Multimedia macro to embed videos or other multimedia formats.
Round #7: Defining Links
Markdown: 'This is pretty similar to embedding images. There are two ways to build links:
- Either place the URL after the link text, e.g.
[link text](http://example.com/ 'Title')
, - or include it as a reference, with the ID placed behind the link text.'
Rich Text: 'Just select the link text and click the link icon in the toolbar to select a target. That's it.'
Round #8: Using the Keyboard
Markdown: 'You don't need your mouse to work with Markdown. You can do everything using your keyboard. However, this means each syntax element must be entered manually, unless you use a markdown editor with syntax completion.'
Rich Text: 'Editor autoformatting is a little-known Confluence feature that allows you to convert text-only syntax (called wiki markup) into formatted content as you type. For example, if you enter h1. Biggest heading,
it will be converted into a first level heading. The same is true for other headings, lists, text effects (bold, italic etc.) and much more – and you can do it without even touching your mouse.'
Typed 1 2 – Stunning Word Processing With Markdown Code
In addition, there are keyboard shortcuts for each formatting option, e.g. Ctrl+B
to bold a selected word or phrase in Confluence.
Round #9: Having Full Markup Control
Markdown: 'Since all content is in a plain-text format, writers have total markup control. If there's an error in the markup, you can fix it easily – assuming you know the correct Markdown syntax.'
Rich Text: 'If you are working solely in a WYSIWYG (what you see is what you get) editor, you can't fix formatting problems. It's much easier to access the markup directly – and with the free Confluence Source Editor add-on, this is a real option for wiki users, too.'
Round #10: Displaying Formatted Content
Markdown: 'Formatting? I don't need to be formatted, my content is plain text! If you want to display content in style, just hit the preview button in your Markdown editor, or run a quick text-to-HTML conversion script.'
Rich Text: 'Bah! Plain-text purist! Why don't you come and join us in the 21st century? Whatever formatting you've selected, it will look the same afterwards, or at least very similar. There's nothing else for authors to do.'
Round #11: Collaborating, Saving and Restoring
Markdown: 'You'll need to save your text file and other resources, such as images or styles, in a local directory, and/or a version control system like Git. Version control systems (VCS) are great for managing, comparing, merging and updating text-based files such as source code. They also allow developers to work with those files in multiple branches or versions at the same time. Since most software engineers already have access to a VCS, such as the Github Pages hosted service, this may not be a hurdle for them.'
Rich Text: 'To save a wiki page, just hit the Save button. Every time you edit content, a new page revision will be created automatically. You can restore older revisions of a page easily, or even manage multiple versions of your pages with the Scroll Versions add-on for Confluence.'
Round #12: Deploying Content as Website
Markdown: 'Many static site generators, such as Jekyll, allow you to build websites with your Markdown content. Jekyll doesn't require any database-driven CMS, but you'll need to be comfortable working with config files and command lines; you'll also need an understanding of source control platforms like Github. This approach might be particularly attractive for software engineers, but less tech-savvy authors may not be quite as keen.'
Rich Text: 'Rich-text wiki platforms like Confluence are geared towards users who want to write content and publish it instantly. When creating a new Confluence page, you don't need to run a build script afterwards to display the formatted content in the web browser – it's already there.'
And The Winner Is …
Typed 1 2 – Stunning Word Processing With Markdown Word
You, the writer! When creating assets such as notes, readme files or other content including large sets of documentation, you can choose the text processor best suited to your workflow.
Casual users will find it easier to write, collaborate and track changes with Confluence. If you're already familiar with version control, e.g. with Git, Markdown is also an option – particularly for software engineers. But it's difficult to compare an out-of-the-box content management solution like Confluence with a plain-text format and toolkits for building static web resources.
Typed 1 2 – Stunning Word Processing With Markdown Letters
Perhaps you want the best of both worlds – Markdown's minimalism, but with a rich-text editor's advanced formatting functionality? If so, you can use the Atlassian Confluence collaboration platform and still write using Markdown. With Confluence, you can easily insert existing Markdown content, or embed it using the Markdown macro. And by using this approach, Markdown and Confluence both come out on top – meaning everyone's a winner.
Do you use Markdown to write documentation? Do you have a different perspective on collaborative authoring? Please let us know in the comments, or drop us an email at info@k15t.com.