Whilst trying various export formats I used Text with the OPML option. If you open the resulting exported file onto Marked 2 the result is a well formatted document. Add to that you can then export from Marked into Markdown and the headings are retained. Basically an easy way to get selected notes quickly into multiple formats.
Good approach.
See also this and this, this, and this for markdown export.
Thanks Paul, really useful links, the interesting thing for me was writing normal tinderbox notes and being able to create a Markdown document (or Word or RTF) after the export whilst also retaining the Tinderbox headings intrinsically rather than merely a font change to the generic body text.
Iâm just starting to work with Marked 2, TBX and markdown again. I struggle with some settings.
Letâs start with the wonderful Tinderbox Reference by Mark:
"Tinderbox automatically communicates with the streaming preview of the application Marked2. When you select or edit a note using the Markdown prototype in Tinderbox, it will automatically be sent to the Marked2 streaming preview window.
Note it is a $Prototype value of âMarkdownâ, not the prototypeâs attribute customisations that trigger preview streaming."
I think this explanation is misleading. You could use the Markdown prototype. But this is one way to activate the streaming and it is not my favourite one (since my prototype needs a lot of individual attributes and using the Markdown prototype limits the scope to one and only one prototype - I need several). Just set $HTMLMarkdown to true and the streaming preview will work.
I use a custom template for the markdown output. Since I donât want to clutter my notes text with additional elements, I would like to add something like:
^value(MyAttribute)^
to the template. This doesnât work with the preview. If I click on the âExportâ tab of the note the value of MyAttribute is there, but the internal preview and the streaming preview ignore this.
Is it possibile to use a custom template with the streaming preview and where are the limitations?
Using my custom templates will break high ascii character in the internal preview. No issue in the streaming preview window:
Do I have to specify a charset for the template?
Thanks for your help!
Yes â you should include a charset for utf-8 in your template. The built-in template adds this automatically.
but how? Since it is a markdown template (not html) I think:
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
is not the way to go - or is it?
All notes render fine in the streaming preview window but one with the text:
"Lorem Ipsum Dolor sit amen consetetur sadipscing Elite sed. diam nonumy eirmod. tempor:in invidunt ut labore et Lore impsum dolor sit amen consetetur sadipscing (Elite sed diam nonumy).
Lorem Ipsum Dolor sit amen consetetur sadipscing Elite sed diam. nonumy eirmod sit consetetur invidunt ut labore impsum dolor amen.
role=âdialogâ and aria-modal=âfalseâ (oder âtrueâ wenn modal) sollten enthalten sein."
look like
If I remove the colon in âtempor:inâ it looks like:
any idea why?
Maybe ask Brett Terpstra how to set the text encoding in Marked 2?
I suspect that the colon is being parsed as a Markdown construct, but I canât see whyâŚ
I donât think the encoding issue happens in Marked 2 - I see the broken UTF-8 chars in TBX preview pane only.
I made some progress today with my markdown setup. Using markdown together with TBX gives me a great tool
Took me more or less a day to solve all the issues I ran into.
Streaming Preview
only the pure text of a TBX note will be processed in the streaming preview of Marked 2. No template will be used and so no option to include additional content (attributes) to the preview in Marked 2.
I can select more then one note to be displayed in the preview window, but no parent/child relation will appear in the preview window (since no template will be used). Itâs the plain text of a note only.
To pass the processed text to Marked 2 after using a template (exactly what we see in the export tab) would be a great improvement for TBX.
Since the export to an external file from TBX works fine and here the template will be used, I can open the exported file with Marked 2 and if I edit something in the note and enter the preview pane again, a new version will be exported and Marked 2 updates the window immediately. This is useful only when working with a single note.
Iâm using Pandoc as my markdown processor in TBX and Marked 2. So the $HTMLExportCommand has been set to â/usr/local/bin/pandoc -f markdown -t htmlâ
Adding a custom style (CSS) to Marked 2 also took some time - the src parameter of @font-face gave me some trouble.
Footnote:
only inline footnotes work with pandoc as markdown processor.
^[ich bin eine Fussnote]
is OK, [^ich bin eine Fussnote]
is not.
(using [^^ich bin eine Fussnote]
will not do it).
Markup Text
If I check the Markup Text option in the Export Tab control and set the Style values to some markup code:
It doesnât work in TBX. Sad because this would allow me to use styles in the text of a note and donât clutter the text with markdown stuff like â**â.
Now I got the problem that the preview pane in TBX doesnât process the markdown. If I assign my prototype the preview will not get updated at all. I have to change to a different prototype and then reselect the one I used in step 1. Then the preview will be updated but still the markdown will not be processed. Thatâs the task for the next days
I donât think the encoding issue happens in Marked 2 - I see the broken UTF-8 chars in TBX preview pane only.
In the preview pane, you do need a template â and that template should specify a charset, because (if I recall correctly) WebKit still defaults to MacRoman.
if I include a <head>
section in my template I donât have a clean Markdown document anymore - or is it a good idea to add this to my template?
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
{{ Markdown output goes here }}
</body>
</html>
(seems to be ignored by Marked 2 and fixes the high-ascii issue in TBX)
And I just solved the internal preview issue: $HTMLPreviewCommand needs a value in my prototype. Adding â/usr/local/bin/pandoc -f markdown -t htmlâ solved the rendering problem. But is it true that the internal preview renders the $text content only (like the streamed preview in Marked 2)?