Parse markup tags in titles

@fcheslack, would it be possible to parse the <i>, <sc>, <b>, <sup> and <sub> tags that are recognized by citeproc-js (http://citationstyles.org/downloads/upgrade-notes.html#rich-text-markup-within-fields) when showing titles in My Library?

[edit: thanks @adamsmith, I should have remembered to render the post as text instead of html]
  • would it be possible to parse the <i >, <sc >, <b >, <sup > and <sub > tags
  • Among the rich text markup elements, the <sc> tag is unknown to HTML. I suspect it's not very often used, but I have a nagging sense of regret every time I look at it. I'm pretty sure this can be supplemented with an alternative HTML-conformant span tag set, which would cause fewer headaches when WYSIWYG field editing comes along. Shall I look into that?
  • Definitely.
  • http://en.wikipedia.org/wiki/Small_caps#In_CSS

    As for being uncommon, I do have 8 items in my 600-item library of which the title starts with a small-caps character. The boon of studying the production of a chiral molecule, <span style="font-variant: small-caps;">L</span>-malic acid.
  • edited June 18, 2012
    Now fixed in citeproc-js release 1.0.345.

    (Edit: the recognized markup uses no space following the colon, and expects a terminal semi-colon after "small-caps". That can be adjusted or extended when the markup comes to be tied into other code.)
  • When I export to BibTex, I found the Rich Text Formatting useful to render some species names in the title italicized, this will be parsed by BibTex into \textit{}, but I found this bug:
    when I mark up two italic words in the same title, the first one get parsed, but the second one would be parsed wrongly:

    Example:
    Tagged title in Zotero:
    Correlation of T cell response and bacterial clearance in human volunteers challenged with `Helicobacter pylori` revealed by randomised controlled vaccination with Ty21a-based `Salmonella` vaccines

    Output in BibTex .bib file after export,
    Correlation of T cell response and bacterial clearance in human volunteers challenged with \textit{Helicobacter pylori} revealed by randomised controlled vaccination with Ty21a-based {\textless}i{\textgreater}Salmonella{\textless}/i{\textgreater} vaccines}

    Secondly, can Zotero add another tag which is for emphasized text, which is equivelant to \emph{} in LaTeX?
  • yes, this is a bit buggy at the moment, Aurimas is working on a fix.

    I don't think we'll add a separate emphasis tag - when would you have an emphasis in a work title?
  • edited May 20, 2013
    Ok, on rare cases in LaTeX, when the style of the bibliography is in italics, species names should stand out from other text.

    Another feature: please can you assign a dedicated shortcut key to the BibTex translator to copy the citation key only of the selected item to the clipboard, in order to paste it directly into the Text editor? that would be much appreciated. See this link to have an overview about this workflow:
    http://tex.stackexchange.com/questions/95302/is-there-any-accepted-format-for-bibtex-citation-keys/115206#115206

    Another feature would be nice if added to zotero, is the find/replace the tags of data entry in Zotero in bulk, e.g., find all italics tags and replace with caps, and so on.

    Other issue, the generated citation key author_title_year can be messy if it happens that rich text formatting by HTML tags is there. I don't know if including a title which is not fixed field, in this case, to generate citation keys is a good idea after all. One suggestion is to strip out these tags from title once detected, or customize citation key to include other disambiguation strategy other than the title. any help on this?
  • (I'm not sure how it is handled in LaTeX/BibTeX, but in the CSL processor used by Zotero, the "italics" tag in a title will flip to roman if the title as a whole is set in italics.)
  • I would also like to request some automatic formatting recognitions.
    1. Automatic bullet from "*+<space>", automatic numbering from "1." or "a." entry.
    2. Next level, previous level of bullet-ing and numbering on tab key
  • you're talking about something different: This threads is about the title field of items, where you can use mark-up which will then correctly show up in citations.
    You're talking about Notes. I believe there is a thread on this somewhere, the short version is that it's a bit tricky the way the note software (TinyMCE) is set up in Zotero.
Sign In or Register to comment.