<commit_before><#--
    Prints a text block containing a citation for an article.

    Parameters:
      citation - The article to be cited. Must be an object containing a subset of the normal article
                 metadata fields.
      useUrlDoiStyle - Boolean. True to format the DOI as a URL at http://dx.doi.org/; false to
                       just prefix it with "doi:".
  -->
<#macro displayCitation citation useUrlDoiStyle>
  <#assign maxAuthors = 5 /><#-- May want this to be configurable in the future. -->

  <#list citation.authors as author>
    <#if author_index lt maxAuthors>
      <#assign isCommaShown =
      author_has_next ||
      (citation.authors?size lt maxAuthors         <#-- Show a comma before "et al."     -->
      && citation.collaborativeAuthors?size gt 0)  <#-- or if collab authors will follow -->
      />
    ${author.surnames!}
      <#if author.givenNames?has_content><@abbreviatedName>${author.givenNames}</@abbreviatedName></#if><#t/>
      <#if author.suffix?has_content> <#--space--> ${author.suffix?replace('.', '')}</#if><#t/>
      <#if isCommaShown><#t/>,</#if>
    </#if>
  </#list>

  <#assign maxCollabAuthors = maxAuthors - citation.authors?size />
  <#list citation.collaborativeAuthors as author>
    <#if author_index lt maxCollabAuthors>
      <#assign isCommaShown = author_has_next || citation.collaborativeAuthors?size gt maxCollabAuthors />
    ${author}<#if isCommaShown>,</#if>
    </#if>
  </#list>

  <#if citation.authors?size + citation.collaborativeAuthors?size gt maxAuthors>
  et al.
  </#if>

  <#if citation.date??>(<@formatJsonDate date="${citation.date}" format="yyyy" />)</#if>

  <#if citation.title??>
  ${citation.title}<#if !citation.title?ends_with('?')>.</#if>
  </#if>

  <#if citation.journal??>
  ${citation.journal}<#t/><commit_msg>DPRO-2831: fix citation download page<commit_after><#--
    Prints a text block containing a citation for an article.

    Parameters:
      citation - The article to be cited. Must be an object containing a subset of the normal article
                 metadata fields.
      useUrlDoiStyle - Boolean. True to format the DOI as a URL at http://dx.doi.org/; false to
                       just prefix it with "doi:".
  -->
<#macro displayCitation citation useUrlDoiStyle>
  <#assign maxAuthors = 5 /><#-- May want this to be configurable in the future. -->

  <#list authors as author>
    <#if author_index lt maxAuthors>
      <#assign isCommaShown =
      author_has_next ||
      (authors?size lt maxAuthors         <#-- Show a comma before "et al."     -->
      && citation.collaborativeAuthors?size gt 0)  <#-- or if collab authors will follow -->
      />
    ${author.surnames!}
      <#if author.givenNames?has_content><@abbreviatedName>${author.givenNames}</@abbreviatedName></#if><#t/>
      <#if author.suffix?has_content> <#--space--> ${author.suffix?replace('.', '')}</#if><#t/>
      <#if isCommaShown><#t/>,</#if>
    </#if>
  </#list>

  <#assign maxCollabAuthors = maxAuthors - authors?size />
  <#list citation.collaborativeAuthors as author>
    <#if author_index lt maxCollabAuthors>
      <#assign isCommaShown = author_has_next || citation.collaborativeAuthors?size gt maxCollabAuthors />
    ${author}<#if isCommaShown>,</#if>
    </#if>
  </#list>

  <#if authors?size + citation.collaborativeAuthors?size gt maxAuthors>
  et al.
  </#if>

  <#if citation.publicationDate??>(<@formatJsonDate date="${citation.publicationDate}" format="yyyy" />)</#if>

  <#if citation.title??>
  ${citation.title}<#if !citation.title?ends_with('?')>.</#if>
  </#if>

  <#if citation.journal??>
  ${citation.journal}<#t/>
{'fraction_non_alphanumeric': 0.1589041095890411, 'fraction_numerical': 0.002191780821917808, 'mean_word_length': 3.139455782312925, 'pattern_counts': {'":': 0, '<': 87, '<?xml version=': 0, '>': 87, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2651188', 'n_tokens_mistral': 1286, 'n_tokens_neox': 1161, 'n_words': 303}