tag:support.markedapp.com,2011-09-11:/discussions/problems/152341-marked-2-uses-bear-note-identifier-as-title-for-pdf-exportMarked: Discussion 2019-04-30T11:14:05Ztag:support.markedapp.com,2011-09-11:Comment/471623582019-04-09T19:11:35Z2019-04-09T19:11:35ZMarked 2 uses Bear note identifier as %title for PDF export<div><p>Is Bear exporting metadata with the note? If no title meta is provided,<br>
it should technically be using the first H1 anyway.</p>
<p>-Brett</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/471623582019-04-09T19:45:54Z2019-04-30T11:14:05ZMarked 2 uses Bear note identifier as %title for PDF export<div><p>The 'Keep tags during export' is [on] in the Bear preferences. There's no Bear preference (afaik) for toggling export metadata.</p>
<p>I'm using Bear's native integration with Marked via the Bear Menubar: Note > Preview in Marked</p></div>robinlandytag:support.markedapp.com,2011-09-11:Comment/471623582019-04-09T19:53:58Z2019-04-09T19:53:58ZMarked 2 uses Bear note identifier as %title for PDF export<div><p>I'll have to look into this further. You do have the option of adding a<br>
line at the top of the file to force the title for a note:</p>
<p>title: Title of Note</p>
<p>-Brett</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/471623582019-04-09T20:04:14Z2019-04-30T11:14:05ZMarked 2 uses Bear note identifier as %title for PDF export<div><p>I tried using that - but it doesn't appear to make a difference (see attached screenshot)</p>
<p>Also, note that Bear forces the use of category tags in each note (in this example #blog) as a filing method. (See: <a href="https://bear.app/faq/Tags%20&%20Linking/Nested%20Tags/">https://bear.app/faq/Tags%20&%20Linking/Nested%20Tags/</a>)</p>
<p>Is it possible to add Bear-specific setting to Marked to ignore category tags so that that they don't appear in Marked?</p></div>robinlandytag:support.markedapp.com,2011-09-11:Comment/471623582019-04-09T20:42:53Z2019-04-09T20:42:53ZMarked 2 uses Bear note identifier as %title for PDF export<div><p>How would I ever determine what was a category tag and what was a<br>
headline?</p>
<p>-Brett</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/471623582019-04-09T20:43:59Z2019-04-09T20:43:59ZMarked 2 uses Bear note identifier as %title for PDF export<div><p>In your screenshot you show "title: Title" inside the h1. To work as<br>
Meta it has to come before the h1, at the very top of the note. Maybe<br>
that's not even possible with Bear…</p>
<p>-Brett</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/471623582019-04-10T10:36:34Z2019-04-30T11:14:05ZMarked 2 uses Bear note identifier as %title for PDF export<div><p>Although it's not Bear's default behaviour, it is possible to insert a line before the first H1. However, this seems to result in a completely blank preview in Marked (i.e. the entire content of the Bear note is missing) and the Marked title is still the note ID, rather than the title.</p>
<p>Screenshot attached: blank Marked window next to the Bear note with a title line inserted before first H1</p></div>robinlandytag:support.markedapp.com,2011-09-11:Comment/471623582019-04-10T11:09:33Z2019-04-10T11:09:33ZMarked 2 uses Bear note identifier as %title for PDF export<div><p>I'll have to dig in and see exactly what Markdown Bear is producing.</p>
<ul>
<li>Brett</li>
</ul></div>Bretttag:support.markedapp.com,2011-09-11:Comment/471623582019-04-10T16:17:57Z2019-04-10T16:17:57ZMarked 2 uses Bear note identifier as %title for PDF export<div><p>So I tested with the metadata and it actually seems to work fine. You need to make sure there's no formatting, that it's the very first line, and that it's followed by a blank line. Also note that this will only work if using the MultiMarkdown processor.</p>
<p>As far as using the first H1 as the title, it's something I'd considered in the past but haven't implemented. I think it's a good idea, though, so hopefully I'll be able to incorporate it into a future update.</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/471623582019-04-10T16:21:40Z2019-04-10T16:21:40ZMarked 2 uses Bear note identifier as %title for PDF export<div><p>Actually, I take it back about MultiMarkdown. I'd forgotten that I actually incorporated handling for that with Discount (GFM) as well. The difference is that the metadata will also show up in your document, but you can use HTML comments to hide it, e.g.</p>
<pre>
<code><!--
title: My Document Title
-->
# My Document Title
content</code>
</pre>
<p>-Brett</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/471623582019-04-10T16:36:15Z2019-04-30T11:14:05ZMarked 2 uses Bear note identifier as %title for PDF export<div><p>Thanks for your help with this. Yes - I've got it working now too with your instructions. I think the blank line was the missing ingredient (Note: if I omit the blank line, then Marked still shows a completely empty preview)</p>
<p>Using first H1 as %title would be a great feature.</p></div>robinlandytag:support.markedapp.com,2011-09-11:Comment/471623582019-04-10T16:42:03Z2019-04-10T16:42:03ZMarked 2 uses Bear note identifier as %title for PDF export<div><p>Yeah, without the blank line it basically considers everything following<br>
it to be part of the metadata. Which would lead to a really messed up<br>
title :).</p>
<p>-Brett</p></div>Brett