Implement native text accents for unmodified LaTeX jobs
This commit is contained in:
1 parent
ca60c66a17
commit
4eeb5686b8
16 files changed
+269
-18
No files matched your search
@@ -3393,6 +3393,7 @@ impl Executor {
|
||||
)) | Meaning::CharGiven(_)
|
||||
| Meaning::Primitive(
|
||||
Primitive::Char
|
||||
| Primitive::Accent
|
||||
| Primitive::Hskip
|
||||
| Primitive::Hfil
|
||||
| Primitive::Hfill
|
||||
@@ -3565,6 +3566,7 @@ impl Executor {
|
||||
}
|
||||
Unskip | Unkern | Unpenalty => self.delete_last(primitive)?,
|
||||
ItalicCorrection => self.append_italic_correction()?,
|
||||
Accent => self.text_accent(&token, files)?,
|
||||
Shipout => self.scan_box(boxes::Destination::Shipout, files)?,
|
||||
Leaders | Cleaders | Xleaders => self.scan_leaders(primitive, files)?,
|
||||
Vrule => {
|
||||
@@ -3741,13 +3743,23 @@ impl Executor {
|
||||
key: Option<Key>,
|
||||
files: &mut impl SourceProvider,
|
||||
) -> Result<(), Error> {
|
||||
self.assignment_inner(primitive, key, files)?;
|
||||
self.assignment_with_box_policy(primitive, key, true, files)
|
||||
}
|
||||
fn assignment_with_box_policy(
|
||||
&mut self,
|
||||
primitive: Option<Primitive>,
|
||||
key: Option<Key>,
|
||||
allow_setbox: bool,
|
||||
files: &mut impl SourceProvider,
|
||||
) -> Result<(), Error> {
|
||||
self.assignment_inner(primitive, key, allow_setbox, files)?;
|
||||
self.finish_assignment()
|
||||
}
|
||||
fn assignment_inner(
|
||||
&mut self,
|
||||
mut primitive: Option<Primitive>,
|
||||
mut key: Option<Key>,
|
||||
allow_setbox: bool,
|
||||
files: &mut impl SourceProvider,
|
||||
) -> Result<(), Error> {
|
||||
use Primitive::*;
|
||||
@@ -3918,6 +3930,9 @@ impl Executor {
|
||||
}
|
||||
Some(Parshape) => self.scan_paragraph_shape(global, files)?,
|
||||
Some(Setbox) => {
|
||||
if !allow_setbox {
|
||||
return self.fail("improper native setbox in an assignment prefix");
|
||||
}
|
||||
let n = self.register_index(files)?;
|
||||
self.optional_equals(files)?;
|
||||
if self
|
||||
|
||||
Reference in new issue
Block a user