check_dashes: Check dashes entered as hyphens

Description Usage Arguments Value

View source: R/check_dashes.R

Description

Check dashes entered as hyphens

Usage

1
2
3
4
5
6
7
check_dashes(
  filename,
  .report_error,
  dash.consistency = c("en-dash", "em-dash"),
  protases_ok = TRUE,
  rstudio = TRUE
)

Arguments

filename

A tex or Rnw file.

.report_error

How errors should be reported.

dash.consistency

Character vector permitted dash types.

protases_ok

(logical, default: TRUE) Should em-dashes be permitted when they form a protasis in a list? \item when there is an emdash---always.

rstudio

(logical, default: TRUE) Use the RStudio API?

Value

File stops and cat()s on any line where a hyphen is surrounded by a space. Excludes dashes in knitr chunks and LaTeX math mode \(...\) but not in TeX math mode $...$.


TeXCheckR documentation built on Nov. 17, 2020, 9:08 a.m.