I’m trying to build a sort of “template” for myself in which I want to load a bibliography, without necessarily showing it. I’m currently using this code snippet to determine, whether or not to show it:
As you can see, the bibliography file will be loaded, but remains hidden, while there are no citations.
The problem is, that it still shows up in the outline.
Thank you! Now I feel kinda stupid, especially since I used the title parameter in at least two other snippets
Well, I hope this might help someone else, too!
I read through the section and adjusted the code formatting and title accordingly. I hope this is what you meant, but a pointer to what specifically you dislike would be helpful nonetheless.
To answer the question in the post title: You can avoid having the bibliography in the outline by doing
#show bibliography: set heading(outlined: false)
This way you can still have a title for the bibliography section. (The other solution of setting the title to none works fine for the specific use case though.)
Thanks for the detailed response! I opted to go with your second suggestion.
While looking through the “setup” or “template” part of my document, I’ve found 2 other places where I used [] instead of {} and changed those as well.
I’m guessing that using [] to provide a string to a property or variable is considered bad practice?
In my first response, I actually meant that a pointer to what part of my formatting was faulty would have been nice, but I guess I found the right mistakes :P
I explained all the key points in details in the issue. One line markup snippet doesn’t have extra spaces created, therefore not bad. It’s the way for smart quotes, references etc.
hide() will not display the bibliography, but still occupy space. That can have negative effects when e.g. the last page is almost full, so the hidden bibliography forces an extra empty page. (In this concrete case, if you remove the heading the empty bibliography shouldn’t use space anyway, but in general that can be an issue.)
using show bibliography: none will load the bib file, but remove the heading and rendered bibliography from the document, so you get both at the same time.