Is it possible to “bold” just part of the content of an title field?


Does anyone know if it is possible to “bold” just part of the content of an title field? What would be the CSL rule?

For instance:

Africa Today: Freedom and Peace / I would like to bold just “Africa Today” / “: Freedom and Peace” should be in “normal” font.

Thanks in advance,
  • Hi. Thanks for information.

    Instead using rich-text resources (<b></b>), may you inform if there is other way of putting in "bold" direct in CSL code?

    For instance, the code <text variable="title" font-weight="bold"/> puts the whole "title" in bold. Using the character ":", could the CSL code puts bold font in which is before ":" and puts normal font in which comes after ":"?
  • no. I don't think we'll add that, either. What's the use case?
  • At the moment, neither Zotero or CSL distinguishes between main title and subtitle, so this currently can't be coded in a CSL style.
  • Thanks. The use is in the case of Brazilian (ABNT style), that determines this kind of treatment.
  • While this isn't supported, there are some solutions on the drawing board. An interesting suggestion in the archives comes from Dan, writing two and a half years ago:
    I don't suppose there's any chance that the Short Title field will always be a left-bound substring of the Title field? If so, we'd have both the full, unaltered original title and a pretty good hint as to where to look for the delimiter, and it could be manually adjusted if the initial (currently unsophisticated) logic to generate the Short Title failed.
    I'm playing with with a way to exploit this idea in MLZ (the experimental multilingual client, fueled by an extended, similarly experimental version of CSL). The design is still in flux, but here's a brief outline.

    The processor now has external abbreviation-list functionality. This allows malable short-forms like "Journal Abbreviation" and "Short Title" to be acquired from an external, style-specific database, using the full-form field as key. That makes the "Journal Abbreviation" field unnecessary, and frees up "Short Title" for the specific, limited purpose of providing an exact match to the leading portion of the "title" field, as Dan suggested. In an extended version of CSL, a matched pair of fields could be used to derive a "main-title" and a "sub-title" variable (official CSL 1.0 already does something similar with the "page-first" field, which is derived from "page"). This would give us backward compatibility in CSL: a style could either use the "title" field as at present, or test for the presence of the "main-title" and "sub-title" elements and format them as required.

    A long explanation, and not currently a part of CSL, but one idea for how we might deal with this use case down the road.
  • Hi. Many thanks for informing about the possibility of handling "bold" in title field.

    However, I found some difficulties to deal with. May you inform where the changes need to be done in CSL? How should be the code that executes this change? What is the field which determines the part of the title to be "bold"?

  • @cadudesun: My note above is about future avenues for development. There is currently no way to do what you want to do in CSL. You would have to put the <b>bold tags</b> directly into the content field, which isn't really desirable since few styles need boldface there. In the short term, your best solution is probably to add the boldface to your citations in a copy of the document at the last stage of production, after removing Zotero field codes.
  • Many thanks fbennett. I could understand now. Best, Cadu.
  • Hi! Nowadays, is there any news about the possibility to to “bold” just part of the content of an title field (actually, just when there is subtitle, the part either before a colon [:] or dash [-])?

    Illustrated as before:
    Africa Today: Freedom and Peace / I would like to bold just “Africa Today” / “: Freedom and Peace” should be in “normal” font.

  • nothing new, no - but it looks like we might do the title/subtitle division eventually, in which case this could be implemented. No ETA, though, and likely not anytime very soon.
  • Returning 5 years later to ask:
    Is there any update about the possibility to “bold” or "italicize" just part a title field when it is a subtitle (the part either before a colon [:] or dash [-])?

    From=> Africa Today: Freedom and Peace
    To=> Africa Today (bold/italicized font): Freedom and Peace (regular font)

  • No, not much closer to this I'm afraid (note that you can, of course, marks this up in Zotero itself, but then the bold/italics will be there in any citation style)
  • Zotero is a little closer in that citeproc-js now automatically parses main and subtitles based on punctuation. Zotero uses this for one feature (uppercase subtitles in APA style). More elaborate use of the distinction probably would require more formal support in CSL for separate styling or main and subtitles.

  • Just a note to mention that citeproc-js can be configured to derive virtual variables title-main and title-sub, via code on which APA already relies. The virtual variables are disabled by default. The default could be changed. From the processor tests, it looks like that would not cause difficulties.[1]

    [1] Enabling the option causes two tests to fail, but due to cleanup of incorrect formatting -- output with the option enabled is of slightly higher quality.
  • If it doesn't cause problems, that might be a useful feature to enable for unofficial style editing.
  • In Brazil the mainstream ABNT style — used by every academic/research institutions and individuals — depends on different formatting within title/subtitle.

    The Brazilian community relying on Zotero is looking forward since many years to be able to perform title/subtitle formatting. Up to know we are frustrated, needing to deal with workarounds grounded on MANUAL formatting of documents. That shortcoming gets worse when we need to update citations/references in our last formatted document version because all previous formatting is lost. And we need to start over all manual formatting.

    The other workaround suggested by @adamsmith (“…marks this up in Zotero itself, but then the bold/italics will be there in any citation style”) isn’t practical for us Brazilians, since we need to deal with ABNT as the grounded style for publication inside the country, but to publish abroad we need to change the ABNT style to APA, Vancouver etc.

    So these workarounds are driving us crazy indeed.

    Are the possibilities of improvement pointed by @fbennett and @bwiernik something that could happen soon?

    Thank you very much!
  • Hello. I have also been waiting for this implementation for a long time. It is very important for ABNT to distinguish between "title" and "subtitle" for the correct application of formatting.
    Thank you for your efforts...
Sign In or Register to comment.