Two requests in regard to: export of table of content and search for notes without title

Hi @matteo!

Probably you remeber our talk from yesterday. Don’t worry, i have given up and i am not going to ask for “real titles” again :wink:

I will use the h1-header for titles like it is usual in bear. If i should run out of heading levels in rare cases, i can create fake headings and can edit them in exported docx.document. That’s what i’ve done as well in ulysses. I like to phrase two requests that would solve two issues/flaws for me:

  1. On export of a note to pdf the complete table of content is displayed in the pdf reader even if the heading with highest level just appears one time and at the top of text body. As that is an unusual display of a toc (to be foldable at the only top node) an option to exclude that top heading on export from being shown in toc of pdf would help

  2. If a note starts with a heading form h1-level until h6-level it makes sense that this is regarded/treated as the title of the note. Therefore it makes sense that the starting heading is also shown and represented as title in the preview of the notes list in second pane. But if it is a note without headings or without headings at the very beginning (f.e. written for quick capture of thought without bothering to have a title) it makes sense to regard the note as untitled. Two reasons for that:

    • When i perform a search on titles (via @title in searchbar) my search results will not be bloated with notes that just starts with a paragraph.

    • An entry in first pane directly under notes->untagged called untitled would help to find all the notes without title respectively heading. So i get an overview and can decide which notes to edit by setting a title/heading or to delete

      Edit: That would actually require to quit the current behaviour of the very first line

For part 2, are you saying, the first header should be considered as the title of the note? I have also had feature request for that and would be great to have it, though I have found that YAML format can now achieve what I want to do less the tags :D.

In the former talk i asked for a real title created by pandocs metadata block. In the meantime after rethinking i even believe that could lead to an usability nightmare because i like to merge notes together, means: a title would appear several times in a note what doesn’t make sense. Thanks matteo for causing my rethinking.

But to answer your question: i schould have better phrased it. To say it differently: When a note starts with a paragraph or when it doesn’t contain a header it should be considered as untitled. And that note should be findable as untitled note. in bear it is not possible to link to a note that doesn’t start in the first line - on the other side if you start with the first line the whole sentence is taken as name and bloats the search results when searching inside titles. Currently the title story i openend overhelms me.

I agree with you that i also would like to put some stuff at the beginning of the note, mainly the tags that are related to the whole note. makes more sense than at the bottom of the note. Placing them in the beginning it causes too big tags and they become the name of the note. I like your idea that the first heading is the name and therefore the title of the note

So to clear things up, what you and I think it would be nice is to

  • make the first H1 as the title of the note rather than the first line of the note,
    and if there is no H1,
  • there is a @untitled search filter/ or filter in the tag bar to be able to search all notes without title.

What would you do if a note starts with a header of level 2 f.e.?

When writing pieces or chunks of text (wich should be merged together at a later time) that indeed can happen? And why should a beginning h2-header should rather be untitled than the name of the note it initiates?

Or perhaps the first any form of header? but then I guess this setup cannot be implemented. Those level of headers can be up at any point of the note, unlike H1 which would most likely to be towards the start of the note. Also, if your first intention is to merge a note to the other later on, won’t that note be ‘untitled’ anyways? It would be the latter part of the big notes? I suppose those kind of notes would be normally grouped somewhere using tags.

When we implemented the PDF’s TOC we had some issues understanding what’s the standard here. My main references are Preview and Acrobat Reader but both seem to present foldable subheaders. What reader are you using?

2 Likes

That topic is more complex than i thought. That’s what i meant with overhelming. I need time to think about that topic and your points more thoroughly.

@trix180

It might be that i have phrased my point misleading. The outlines are displayed correctly in your screenshots: There is one header h1 in the exported document and it is displayed correctly. But this h1-header appears just one time in the table of content. If h1 would appear two times and more for sure i would like to have it exported. But in the screenshots it appears just one time, acts as title and is not necessary for the table of content.

With unusual i meant: actually there is no toc (when all nodes collapsed) that just contain one and only entry. I do not mean that in technical sense but in conventional sense

I’m a little confused about the h1 things but, let’s see if I got it. Considering this is the outcome of Bear 2 welcome note exported into PDF do you consider it better than the previous screenshot?

I currently have no time as I am at work. I see that you do not get my point. Due to my english I will try to express myself with screenshots to show what I mean. I think I will do that tomorrow

no worries, we have time to sort this out.

My understanding is that since the one and only Header 1 would be considered as the title of the note and would be shown on the title of the export, if there are no other H1, an unnecessary hierarchy is created upon export.
Say there is a textbook PDF, then its title won’t show up on the TOC and the most top hierarchy will be Chapter 1, Chapter 2 and so on. On the other hand, Bear will have the title in the TOC, since it is one of the headings.
So her request seems to be, if there is one and only H1 heading, regard it as the title and remove it from the TOC at export (or have an option to) such that the top level of the TOC (in your case) would be ==The Editor==, The *Note* list and so on.

1 Like

Thank you for finding the correct words. That is what I meant :hugs:

1 Like

Actually, yes, the hierarchy on the left (Preview) is what she meant. (I think you forgot/did not find need to edit the TOC in Acrobat)

Unfortunately no, apparently that’s how Acrobat renders the same TOC you see in Preview.
I possibly have to premise PDFs come with a special syntax for expressing the document outline, but it’s rendered in a different way by Preview and Acrobat.

Also, If you check the first screenshot you’ll notice Acrobat’s TOC renders two h1.

1 Like

You mean me with „she“? Take a closer look at my picture in profile. It was painted 10 years ago when my girlfriend at that time felt in love. Now she is my wife :wink:

The whole confusion bases upon that a title inside bear is a hybrid being. A title of a note refers to the whole document/page/note whereas a heading refers to a section of a text and therefore belongs in the table of content. In bear however the heading 1 is used frequently as title. I also have seen notes in screenshots that starts with heading one as title and that continue at some point with the usage of further headings from level 1. Call me pedantic but that is totally illogical for me if the same heading refers to the whole note and at the same time to it’s section

In another thread where I asked among other things for real titles created by pandocs metadata block („%“ rather than „#“) matteo told me that the usage of the very first line won‘t be changed. So I decided to accept the H1-heading as title and to use it just one time so that I have after all 5 further heading levels to structure my text. To understand my need I must say that I am not only using bear as notes and pkm app but also as app for writing (ulysses was replaced by bear) and for storing my texts. It is wonderful to find special sections in a text by tags. Ultimetaly this led to this thread where i asked for the exclusion of one and only H1 header from tic on export.

The more I think about this stuff the more complex and confusing it get. If you just regard the editor you can differentiate between the title and h1 header. But when it comes to the second pane another element is introduced: the name of a note. A note could be whatever you put in the first line: a header, no matter what level, or a whole paragraph if it is just pure simple text. That name is called title inside of notes list. An @title search will prove that. That leads to the confusing thing that a note has a title which you consider untitled when you watch it in editor: no heading but just pure text.

Actually the best idea comes from you: take as name the first appearing of h1. I added to take as name the first appearing heading, no matter what level. But we also have quick notes without any heading. In that case the behaviour of the first line causes that the whole first paragraph is choosen as name for the note and therefore bloats the @title search. To prevent this I found the workaround to start such quick notes with „enter“. Bear treats these notes then indeed as such without notes. And that in turn leads to the inability to link to such notes in other notes by crosslinks. Your case is that you are not able to put some useful information at the beginning of the note without the effect that these infos become the name and title of the note

Do you know what I mean with complex? Actually I believe that this is not solvable without dedicated places for all that stuff. But that wouldn‘t then be a bearish editor

(Edited typos)

1 Like

Ahhh sorry, I haven’t look at the profile pic good enough. I somehow have a tendency of calling anyone “she” if I don’t assume their gender. Sorry for that, and your wife has a lovely drawing skill :smiley:

1 Like

Oh yes, I have missed that.

Sorry for being confused about the screenshots: i was wondering and did’t see the difference. What i see in the screenshot of apples preview app from latest screenshot is what i would like to have. And you said that is how bear 2 exports the toc? In the evening i am going to test the export

The first screenshot I posted is how Bear 2 is exporting the TOC now. The second screenshot is a quick test I made yesterday but I’m considering shipping it with the next beta update because looks like a better solution.

2 Likes