Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow basic markup syntax in the comments tab #6194

Closed
smihael opened this issue Mar 28, 2020 · 6 comments · Fixed by #6232
Closed

Allow basic markup syntax in the comments tab #6194

smihael opened this issue Mar 28, 2020 · 6 comments · Fixed by #6232

Comments

@smihael
Copy link

smihael commented Mar 28, 2020

Currently once can write comments within the entry editor. I would suggest to support and highlight basic markdown syntax or generate a comment preview instead of the entry preview in the right pane of the tab.

AlexanderGirgis added a commit to AlexanderGirgis/jabref that referenced this issue Mar 29, 2020
Add MarkdownFormatter using https://github.com/vsch/flexmark-java/ to format markdown.
To configure Markdown in custom previews add the "Markdown" formatter.
Markdown is enabled by default for the comment field as requested in JabRef#6194
@koppor koppor self-assigned this Mar 31, 2020
AlexanderGirgis added a commit to AlexanderGirgis/jabref that referenced this issue Apr 1, 2020
Add MarkdownFormatter using https://github.com/vsch/flexmark-java/ to format markdown.
To configure Markdown in custom previews add the "Markdown" formatter.
Markdown is enabled by default for the comment field as requested in JabRef#6194
@koppor koppor assigned koppor and unassigned koppor Apr 1, 2020
koppor pushed a commit that referenced this issue Apr 3, 2020
Add MarkdownFormatter using https://github.com/vsch/flexmark-java/ to format markdown.
To configure Markdown in custom previews add the "Markdown" formatter.

Markdown is enabled by default for the comment field as requested in #6194
@teertinker
Copy link
Contributor

This feature is really great! Finally I don't have to fiddle with html tags and replace formatters to get something similar. An extension to the abstract field would be nice.

koppor pushed a commit that referenced this issue Sep 15, 2022
201e022 Update trends-journals.csl (#6224)
46e6eed Update nottingham-trent-university-library-harvard.csl (#6220)
684bb48 Update politix.csl (#6199)
c484b0b Update mcgill-fr.csl (#6198)
cbcf2f2 Update mary-ann-liebert-vancouver.csl (#6218)
47174f0 Create journal-of-dairy-research.csl (#6195)
fdd1eac Update harvard-anglia-ruskin-university.csl (#6196)
9e384d6 Create estonian-journal-of-earth-sciences.csl (#6194)
afba9b7 Delete moore-theological-college.csl as per university (#6197)
644549f Create acta-medica-philippina.csl (#6192)
6566114 Update rassegna-degli-archivi-di-stato.csl (#6186)
3509a2f Update universidade-federal-de-sergipe-departamento-de-engenharia-de-… (#6187)
de4845f Update mary-ann-liebert-vancouver.csl (#6213)
16828b6 Update ucl-university-college-apa.csl (#6172)
c08613b Update ucl-university-college-harvard.csl (#6173)
028bad4 Create sociologia-ruralis.csl (#6170)
77d428c Update journal-of-plankton-research.csl (#6169)
92e1022 Update and rename dependent/journal-of-the-national-cancer-institute.… (#6168)
120efb1 Update journal of hearing science
e503477 Create new-harts-rules-the-oxford-style-guide-author-date.csl (#6163)
49ab318 Create the-depositional-record.csl (#6159)
f4f6920 Update and rename laser-and-photonics-reviews.csl to dependent/laser-… (#6165)
d8ca4bc Update united-states-international-trade-commission.csl (#6162)

git-subtree-dir: buildres/csl/csl-styles
git-subtree-split: 201e022
@lrhammond
Copy link

Sorry if this is a stupid question, but do you know how I can use this in the current version of JabRef? I can't find anything under 'Markdown' when I search for preview styles in the relevant preferences section. Thanks for any help!

@Siedlerchr
Copy link
Member

make sure you have "Customized preview style" enabled and selected Then it will be rendered automatically:
grafik

@lrhammond
Copy link

Hmmm... that doesn't seem to work for me. Maybe it's because I already had a customised preview style set before? In particular, it currently is:

\begin{author}\format[Authors(FirstLast,Initials,Comma,And),HTMLChars]{\author}<BR>,\end{author}
\begin{title}"\format[HTMLChars]{\title},"\end{title}<BR>

\begin{journal}<em>\format[HTMLChars]{\journal}</em>\end{journal}
\begin{chapter}\format[HTMLChars]{\chapter}<BR>, \end{chapter}
\begin{booktitle}in <em>\format[HTMLChars]{\booktitle}</em>\end{booktitle}

\begin{volume}<i>, (\volume</i>\end{volume}\begin{number}<i>:\number</i>\end{number}\begin{pages}<i>)</i>, Pages \format[FormatPagesForHTML]{\pages}\end{pages}

\begin{editor}, \format[Authors(FirstLast,Initials,Comma,And),HTMLChars]{\editor} <i>(\format[IfPlural(Eds.,Ed.)]{\editor})</i><BR>\end{editor}

\begin{school}, <em>\format[HTMLChars]{\school}, </em>\end{school}
\begin{institution}, <em>\format[HTMLChars]{\institution}, </em>\end{institution}

\begin{publisher}. <em>\format[HTMLChars]{\publisher}</em>\end{publisher}
\begin{year}. \year\end{year}.

\begin{note} \note.\end{note}

This gives the following text:

Screenshot 2023-08-19 at 9 34 57 pm

Could you possibly let me know what it says on your customised preview style at the moment? Maybe simply copying that across will fix the issue. Thanks very much for your help! :)

@Siedlerchr
Copy link
Member

Siedlerchr commented Aug 19, 2023

Ah I see, now i remember that you have to enable the Markdown formatter for the field:
You would need to add this somewhere (I am using Jabref's default style):

\begin{comment}<BR><BR><b>Comment: </b>\format[Markdown,HTMLChars]{\comment}\end{comment}

grafik

@lrhammond
Copy link

Fantastic, that worked – thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

6 participants