Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
note_templates [2022/02/22 13:15] – [Variables] dstillmannote_templates [2022/07/19 01:59] – 6.0.10 changes regarding default 'quotes' behavior dstillman
Line 1: Line 1:
 ====== Note Templates ====== ====== Note Templates ======
- 
-**This is draft documentation for the [[pdf_reader_preview|new PDF reader and note editor]] in Zotero 6, currently in beta.** 
  
 ===== Annotations ===== ===== Annotations =====
Line 9: Line 7:
 Templates support basic HTML, with variables within curly brackets. Here's the default template for highlights: Templates support basic HTML, with variables within curly brackets. Here's the default template for highlights:
  
-<code><p>{{highlight quotes='true'}} {{citation}} {{comment}}</p></code>+<code><p>{{highlight}} {{citation}} {{comment}}</p></code>
  
-You can see that, by default, highlight annotations are added as a single paragraph, with the highlighted text in typographic quotes followed by the citation and any comment.+You can see that, by default, highlight annotations are added as a single paragraph, with the highlighted text followed by the citation and any comment. Quotation marks are automatically added around the highlight.
  
 If you prefer to have the highlight text in a blockquote, it's a simple change: If you prefer to have the highlight text in a blockquote, it's a simple change:
Line 23: Line 21:
 <code><blockquote>{{highlight}}</blockquote><p>{{citation}}</p>{{if comment}}<p>{{comment}}</p>{{endif}}</code> <code><blockquote>{{highlight}}</blockquote><p>{{citation}}</p>{{if comment}}<p>{{comment}}</p>{{endif}}</code>
  
-Conditionals can also be used to test for specific values. Here, text highlighted in red becomes a header, text highlighted in blue becomes a blockquote, and all other highlights use a single paragraph:+Conditionals can also be used to test for specific values. Here, text highlighted in red becomes a header without quotation marks, text highlighted in blue becomes a blockquote, and all other highlights use a single paragraph:
  
 <code>{{if color == '#ff6666'}} <code>{{if color == '#ff6666'}}
- <h2>{{highlight}}</h2>+ <h2>{{highlight quotes='false'}}</h2>
 {{elseif color == '#2ea8e5'}} {{elseif color == '#2ea8e5'}}
  {{if comment}}<p>{{comment}}:</p>{{endif}}<blockquote>{{highlight}}</blockquote><p>{{citation}}</p>  {{if comment}}<p>{{comment}}:</p>{{endif}}<blockquote>{{highlight}}</blockquote><p>{{citation}}</p>
 {{else}} {{else}}
- <p>{{highlight quotes='true'}} {{citation}} {{comment}}{{if tags}} #{{tags join=' #'}}{{endif}}</p>+ <p>{{highlight}} {{citation}} {{comment}}{{if tags}} #{{tags join=' #'}}{{endif}}</p>
 {{endif}} {{endif}}
 </code> </code>
Line 39: Line 37:
  
   * ''highlight''   * ''highlight''
-    * ''quotes'' — if "true", add quotation marks around text+    * ''quotes'' 
 +      * omitted: Include quotation marks around text unless the highlight is placed within a blockquote 
 +      * "true": Always include quotation marks 
 +      * "false": Never include quotation marks. The highlight must be placed within a blockquote to remain as an active annotation.
   * ''citation''   * ''citation''
   * ''comment''   * ''comment''
-  * ''color''+  * ''color'' — yellow: '#ffd400', red: '#ff6666', green: '#5fb236', blue: '#2ea8e5', purple: '#a28ae5'
   * ''tags''   * ''tags''
     * ''join'' — string to use to join tags     * ''join'' — string to use to join tags
  
 (Note that ''color'' is primarily for use in conditionals. Annotation colors can be [[pdf_reader#displaying_annotation_colors|toggled on and off]] from the note editor menu. An upcoming version will add a preference for controlling whether colors are shown by default.) (Note that ''color'' is primarily for use in conditionals. Annotation colors can be [[pdf_reader#displaying_annotation_colors|toggled on and off]] from the note editor menu. An upcoming version will add a preference for controlling whether colors are shown by default.)
note_templates.txt · Last modified: 2023/02/21 06:38 by dstillman