Style with coloured in-text citations
Hey guys,
I've been looking all over for this but seems like it all comes down to my lack of knowledge of HTML code.
All I want is to edit the Elsevier style so that my in-text citations show up in colour (so as to better discriminate them when quickly reading through my thesis).
Where in the .cls can I edit this? I tried to understand the syntax, but I'm kinda lost. (Say for example that I'd like "color:#8A4B08")
Thanks for your help!
Damnation
I've been looking all over for this but seems like it all comes down to my lack of knowledge of HTML code.
All I want is to edit the Elsevier style so that my in-text citations show up in colour (so as to better discriminate them when quickly reading through my thesis).
Where in the .cls can I edit this? I tried to understand the syntax, but I'm kinda lost. (Say for example that I'd like "color:#8A4B08")
Thanks for your help!
Damnation
You're aware that Word allows you to highlight fields (and all Zotero citations are fields): https://wordribbon.tips.net/T006107_Controlling_Field_Shading ?
Seems crazy though, for such a simple edit to be impossible.
I find the option of highlighting the fields using Word to be very ugly, and it only lets you highlight in grey. Eww.
Thanks for your fast feedback. I guess I'm only left wit the option of changing the colour of my citations one by one.
It's honestly not at all a common request and it's very much not simple, since CSL is output agnostic, which means this would need to be translated into and implemented in different formats, not just html.
There is one more complication that would make it nearly impossible to implement this automatically. How is Zotero to "itself know" the publisher of each journal? That would require an enormous journal/publisher look-up table. This table would need to be updated regularly as new journals are released and journals change publishers. I try to maintain such a table for my database of ~16,000 journals and doing so requires significant effort. The total number of journals in the world is several orders of magnitude greater than what I work with.
As someone who personally is very interested in journals and publishers, authoring, and information-seeking behavior; I'm quite curious about how it might benefit you to keep track of the publisher of the cited items in your thesis. Please explain your thinking behind this interesting request. E-mail me directly (click on my username above) if your explanation requires more than a sentence or two.
Which is why a simple Macro would be all that's needed (and no, a citation style cannot call a macro, but a macro can read metadata embedded in the document).
In addition to this feature not being yet available, the formatting of in-text citations is also quite buggy (at least in the current version of Zotero, in Word 2016): my citations often appear with random font-faces&-sizes, that appear to reflect how my Normal style was a while ago. Zotero doesn't follow the current settings in the Normal style (not even after nudging it by switching back and forth between a few styles, or after using the Refresh button in the Zotero add-in for Word).
I love Zotero but it would be great if future versions fixed these bugs with the in-text citations, and also possibly implement this very-commonly-requested-indeed ( ;-) ) feature about the dedicated style.
Given what I know about how Word styles interact with inserted RTF (which is what Zotero does), I'm actually not sure applying a different style to in-text citations is even possible -- I think Word will just apply any style to the whole paragraph.
- Ctrl+H, the Find tab
- from Replace|Format|Font, specify the font that Zotero mistakenly applies to the in-text citatiions
- Find In -> Main Document
- manually change the font to the main one in your doc (Normal-style-based)
-Go to Word->Preferences->View and check "Field codes instead of values" (close that window)
-Press Ctrl+H (in word)
-In the replace button type the following without the brackets (^19 ADDIN) you can copy paste what's in the bracket from here anyways
-The next explanation is where the trick lies.
-There is a small "setting" button just besides the Find button with a drop down, Click it and choose Advanced Find and Replace
-In the dialogue box that appears, Select Main Document in the button box written "Highlight all items found in"
-Under the Search option select ALL
-Click Replace button and ENSURE THAT YOU CLICK THE EMPTY TEXT AREA where it is written Replace with: (Do not type anything here!!! Just click it to select it)
-At the bottom where it is written Replace, Select Format
-Then Select Style
-Scroll down to your favorite style (You should have decided before or at least modified the settings of the style you are choosing at this stage before starting all this procedure anyways)
-Choose it and click ok (Do not forget to click OK)
-Then while still under replace,
-(Just to be sure) Click the empty space where it is written Replace with:
- Click Replace all.
-Word SHOULD alert you that it has made some changes. If not Repeat the procedure above carefully!!
-Close the window and undo the field codes. This should give you what you want
"By default, Zotero stores the reference data for citations and the bibliography in Fields (Word) or Reference Marks (LibreOffice), which stores items' reference data hidden behind the formatted text.
Word and LibreOffice will highlight Fields/Reference Marks on your screen to indicate that the text is automatically generated. This can help you avoid accidentally manually typing in the fields (to edit the text shown in a Zotero citation, see Customizing Cites). These highlights are only shown on screen and won't appear if you print or save the document as a PDF.
You can change the settings for highlighting Fields/Reference Marks in your word processor:
Word for Windows: In Word Options, open “Advanced”, then set “Field shading” to “Never”, “Always”, or “When selected”.
Word for Mac: Open Word → Preferences → View and set “Field shading” to “Never”, “Always”, or “When selected”.
LibreOffice: Open Tools → Options → LibreOffice → Application Colors and check/uncheck the “Field shadings” box. You can also control the color used for field shadings."
https://www.zotero.org/support/kb/citations_highlighted
However...I do want to add an additional complication :-). I'm stuck working on a paper with a collaborator who will only use Google Docs. I'm very glad that the Zotero addon enables citation management within Google Docs, but as far as I can tell, there is no option at all for highlighting field codes or similar for Google Docs. Maybe my searching skills aren't what they once were, but generally I find its documentation/support to be dreadfully sparse compared to the decades of documentation for MS Word. I do realize this is a niche request, but if anyone has any ideas or suggestions, I'd be grateful.