Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix check for citation_french in set_citations() #264

Open
seananderson opened this issue Aug 6, 2024 · 0 comments
Open

Fix check for citation_french in set_citations() #264

seananderson opened this issue Aug 6, 2024 · 0 comments

Comments

@seananderson
Copy link
Member

set_citations() has a check:

 if(fr()){
    if(!length(ca_ind)){
      warning("You are missing the `citation_english:` tag in your YAML file:\n",
              fn, ". This citation is required when you build in French as it ",
              "is set to the other language citation on page 2 of ",
              "the document")
      return(invisible())
    }
  }else{
    if(!length(cf_ind)){
      warning("You are missing the `citation_french:` tag in your YAML file:\n",
              fn, ". This citation is required when you build in English as it ",
              "is set to the other language citation on page 2 of ",
              "the document")
      return(invisible())
    }
  }

But not all templates have or use citation_english and citation_french. E.g. in Tech Reports are usually only in one language and the Res Docs use citation_other_language. For now, I turned this to a message instead of warning, because it was breaking several unit tests and therefore R CMD check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant