Closed HughP closed 7 years ago
does < b r > (remove spaces) work?
neither <br>
nor <br/>
break the lines or create paragraphs. Oh, I also tried the markdown method of two spaces and then a return. but the return character kills hugo and the site won't render. aka the command line spits out an error.
The IEEE/Springer journals and proceedings I read all tend to enforce a single paragraph abstract. What is your use case for needing line breaks in the abstract - is this common in other fields such as medicine?
I work in linguistics, technology, and language study. Just a quick look through my first 30 citations in Endnote revealed 2 with lists in the abstract. That was actually my use case, needing lists, not additional paragraphs.
Here are some proper abstracts with multiple paragraphs not just lists:
on a technical level I tried to add the markdownify code to abstract but that did not solve my issue. any pointers or ideas?
Resolved with the following code (also see comment in #201 as there are 3 places in the theme that need to have the | markdownify
filter applied):
<div class="pub-abstract" itemprop="text">
{{ if .Params.abstract_short }}
{{ .Params.abstract_short | markdownify }}
{{ else }}
{{ .Params.abstract | markdownify }}
{{ end }}
</div>
Hi HughP; I am a newbie in this. Can you please let me know which one is the simplest solution to make separate paragraphs and how exactly should I do. I have downloaded my_website following steps on George's website. I do not see anything in my_website > Layouts. However, there are bunch of .html files in my_website>themes>academic>layout. Please help!
Hi @ShaminderSingh - this fork does what you want. It markdownifys abstracts in layouts/partials/publication_li_detailed.html and layouts/publication/single.html
The requested behaviour (parsing Markdown in abstracts) has now been added in #238.
This worked! Thank you!
I see that indeed Markdown can now be used in the abstract (as long as it remains a single line). So what is the way to go for a list? If I write: "1. First item.<br />1. Second item."
, it combines everything in a single li
element:
<ol>
<li>First item.<br />2. Second item</li>
</ol>
How can I have a true list, with different li
elements? (I tried using \n
or other escape characters without success)
@basille List in abstract is possible using following code:
abstract = """- item 1 \n- test 2 \n- test 3"""
Or numbered list:
abstract = """1. item 1 \n2. test 2 \n3. test 3"""
Excellent, thanks @gcushen. I thought I tried the use of \n
, but I seem to have missed it.
Greetings,
I am trying to use Markdown in the abstract field. is this permissible? the specific issue is that I want to use two paragraphs but I don't know how to break them. I have tried
\n
and\s\s
. I don't know where to go with this.