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
@@ -50,6 +50,7 @@ pub enum DiagnosticNode {
|
||||
},
|
||||
Output(OutputNode),
|
||||
Unsupported(String),
|
||||
AccentKern(i32),
|
||||
}
|
||||
/// A semantic view, without recursively copying the box's painted contents.
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Hash, serde::Serialize, serde::Deserialize)]
|
||||
@@ -209,6 +210,7 @@ pub(super) fn text_nodes(nodes: &[TextNode]) -> Vec<DiagnosticNode> {
|
||||
name: None,
|
||||
},
|
||||
TextNode::Leaders(leader) => leader_node(leader),
|
||||
TextNode::AccentKern(width) => DiagnosticNode::AccentKern(*width),
|
||||
TextNode::Kern { width, explicit } => DiagnosticNode::Kern {
|
||||
width: *width,
|
||||
explicit: *explicit,
|
||||
@@ -471,6 +473,12 @@ impl Printer<'_> {
|
||||
&format!("{prefix}."),
|
||||
)?;
|
||||
}
|
||||
DiagnosticNode::AccentKern(width) => {
|
||||
self.command("kern");
|
||||
self.literal(" ");
|
||||
self.number(i64::from(*width));
|
||||
self.literal(" (for accent)");
|
||||
}
|
||||
DiagnosticNode::Kern { width, explicit } => {
|
||||
self.command("kern");
|
||||
if *explicit {
|
||||
|
||||
Reference in new issue
Block a user