Peter’s R — Publishing to Medium
Ulysses, ProWritingAid and RStudio
Recently, I published a series of articles:
Solving prolonged waiting-times with tidymodels
During publishing, I learned a lot about how to handle the workflow between these programs to get the best results.
Writing = Ulysses
I use Ulysses for Mac frequently to write any sort of texts (blogs, scientific papers, letters etc.) because it enables distraction-free writing and I am familiar with markdown. I got into contact with markdown, when I learned to program with R. Markdown makes writing easy and the embedding of explanatory text and code within Rmarkdown documents is one part of reproducible research.
Ulysses provides a function for publishing directly to Medium.com. But I had to learn some quirks when dealing with text, code, tables, etc. together with a grammar and style checker. In my first attempts, I combined text, images and code within the Ulysses document as used when I write a text, which will be published as a PDF document. But it’s easier if I separate the different parts.
I write the text on a Ulysses sheet. I use markdown as usual.
„##“ for titles „###“ for subtitles in Medium.
Do not save images, code from RMarkdown-documents and hyperlinks in the sheet. Put images into attachments and code and hyperlinks into notes in the dashboard.
Grammar and style = ProWritingAid(PWA)
Because I am not a native English speaker, I use a grammar and style check. PWA understands plain markdown. If I save code, tables and images in the Ulysses-dashboard, I can mark my hole text-sheet, right-click and copy as Markdown. PWA can directly import this copy. After revision of the text, I put it back on a text-sheet as Markdown.
If I put code within my sheet, PWA understands the code as normal text and that causes problems.
Finalizing in Medium
After correction I send the text to Medium. Then I add the images. I use the diversion via Yoink, where I drop the images from the Ulysses dashboard and from there I put them in the right place in Medium. Because I use full-screen mode in all programs involved, the exchange of text or images is simplified by Yoink. All screenshots first go into Yoink.
Code
The insertion of the code in a Medium draft caused the most problems. On my Mac typing three back ticks, and inserting code didn’t work. After several attempts using command+option+6 opened a grey form, where I could paste the code.
Summary
- put the text in Ulysses sheets
- put code, images and hyperlinks to the dashboard
- mark and copy to ProWritingAid
- copy back to Ulysses
- send to Medium from Ulysses
- finalize in Medium
- use command+option+6 for the insertion of code
With these simple tricks, my workflow was much smoother.