Add eqref, math accents, and named undefined-command errors
This commit is contained in:
1 parent
f4d477695f
commit
e77181e997
3 files changed
+68
-2
No files matched your search
Vendored
+8
-2
@@ -356,6 +356,8 @@ impl TexError for SimpleFailedPreconditionError {
|
||||
pub struct UndefinedCommandError {
|
||||
/// The token that was referred to an undefined command.
|
||||
pub token: token::Token,
|
||||
/// The name of the undefined command.
|
||||
pub name: String,
|
||||
/// Control sequences that are spelled similarly to the token.
|
||||
pub close_names: Vec<WordDiff>,
|
||||
}
|
||||
@@ -373,7 +375,11 @@ impl UndefinedCommandError {
|
||||
}
|
||||
let close_names = spellcheck::find_close_words(&all_names, &name);
|
||||
|
||||
UndefinedCommandError { token, close_names }
|
||||
UndefinedCommandError {
|
||||
token,
|
||||
name,
|
||||
close_names,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -383,7 +389,7 @@ impl TexError for UndefinedCommandError {
|
||||
}
|
||||
|
||||
fn title(&self) -> String {
|
||||
"undefined control sequence".into()
|
||||
format!("undefined control sequence `\\{}`", self.name)
|
||||
}
|
||||
|
||||
fn notes(&self) -> Vec<display::Note> {
|
||||
|
||||
Reference in new issue
Block a user