Similarly to #198, would it be possible to enable Markdown formatting in title of publications? (particularly useful for italics)
Any developments in that direction? Or where in the code should edit this?
@swvanderlaan
Any developments in that direction? Or where in the code should edit this?
You may edit layouts/partials/publication_li_{simple,classic,detailed}.html
change
<span itemprop="name">{{ .Title }}</span>
in each file to
<span itemprop="name">{{ .Title | markdownify }}</span>
and in layouts/publication/single.html, too.
_Personally, I don't like to have the title markdownified, at least not by default, even for some titles containing italic math variables (I also have a lot of such titles)_
Keep in mind, the title that you provide for a publication (or talk, or anything similar) will get passed along as the
Also, if you add Markdown formatting to publication titles, pay attention to what it does to the section pager (the automatic links to the next or previous publication).
Very good comment @theodore-s-beers. This actually makes me reconsider whether I really want that—in other words, does the benefit of having italics in title really overrides the side effects?
I'm closing this for now. Happy to re-consider exploring this option in the future if there's more demand for it.
Just going to bump this thread-- it would be very nice to italicize portions of titles (e.g. species names) or insert sub-scripted values (e.g. chemical formulas)
Another reason for enabling Markdown formatting is LaTeX markup for em dashes. For example, -- is rendered as em dash – in other fields which leads to inconsistencies:

=> Notice the double single dash -- instead of em dash – in the title.
A workaround in the current version of the theme (just for li_citation.html):
diff --git a/layouts/partials/li_citation.html b/layouts/partials/li_citation.html
index 4a34adf..939ff38 100644
--- a/layouts/partials/li_citation.html
+++ b/layouts/partials/li_citation.html
@@ -8,7 +8,7 @@
{{ partial "page_metadata_authors" . }}
</span>
({{- .Date.Format "2006" -}}).
- <a href="{{ .RelPermalink }}" itemprop="name">{{ .Title }}</a>.
+ <a href="{{ .RelPermalink }}" itemprop="name">{{ .Title | markdownify }}</a>.
{{ if .Params.publication_short }}
{{- .Params.publication_short | markdownify -}}.
{{ else if .Params.publication }}
@@ -22,7 +22,7 @@
<span itemprop="author" class="article-metadata li-cite-author">
{{ partial "page_metadata_authors" . }}
</span>.
- <a href="{{ .RelPermalink }}" itemprop="name">{{ .Title }}</a>.
+ <a href="{{ .RelPermalink }}" itemprop="name">{{ .Title | markdownify }}</a>.
{{ if .Params.publication_short }}
{{- .Params.publication_short | markdownify -}},
{{ else if .Params.publication }}
As a biologist I would also love this for species names in the title. Otherwise it looks like I've got poor attention to detail if my species names are not italicised in my own publication titles.
I'm happy for it not to be enabled by default, but to at least have the option. Then individuals can decide if the benefits outweigh the costs.
Again, be careful with side effects if you make these changes. I mentioned the HTML
I would also love to have this to italicize part of the text in the title! A few of my co-author papers do have species names in the title and it will be nice to be able to display those correctly.
I was thinking about this recently, since I was using Pandoc to convert Markdown to HTML for another project, and I realized that it's capable of handling italics in titles—parsing where possible, and ignoring it (and removing the asterisks or underscores!) for the <title> element. But I don't know if that's possible with Blackfriday.
One work around for bold or italics is Unicode via a tool like: https://yaytext.com/bold-italic/. Note that this hard codes serif/sans serif for the font and breaks searching for that font. There could be other consequences to doing this that I don't know about.
I like that idea. It keeps compatibility with the HTML <title></title> attribute, at least for major desktop browsers (open question: are there other/mobile browsers that don't support UTF8 in their title?).
I also started to replace LaTeX markup with unicode characters for that reason (e.g., -- => –).
Most helpful comment
Just going to bump this thread-- it would be very nice to italicize portions of titles (e.g. species names) or insert sub-scripted values (e.g. chemical formulas)