Add inline framed fbox
This commit is contained in:
1 parent
32b0064e5f
commit
2552008d4b
11 files changed
+273
-28
No files matched your search
@@ -206,6 +206,8 @@ pub struct InlineBox {
|
||||
pub align: InlineBoxAlign,
|
||||
/// Vertical lift from `\raisebox{lift}{...}`.
|
||||
pub raise: common::Scaled,
|
||||
/// Draw a frame around the box (`\fbox`).
|
||||
pub frame: bool,
|
||||
}
|
||||
|
||||
/// A filled rectangle produced by `\rule`.
|
||||
|
||||
@@ -380,6 +380,7 @@ struct InlineBoxSpec {
|
||||
width: Option<common::Scaled>,
|
||||
align: InlineBoxAlign,
|
||||
raise: common::Scaled,
|
||||
frame: bool,
|
||||
}
|
||||
|
||||
struct Parser {
|
||||
@@ -693,12 +694,14 @@ impl Parser {
|
||||
width,
|
||||
align,
|
||||
raise,
|
||||
frame,
|
||||
} => {
|
||||
self.inline_boxes.push(InlineBoxSpec {
|
||||
runs: Vec::new(),
|
||||
width: *width,
|
||||
align: *align,
|
||||
raise: *raise,
|
||||
frame: *frame,
|
||||
});
|
||||
}
|
||||
expanded::FrontendEventKind::InlineBoxEnd => {
|
||||
@@ -716,6 +719,7 @@ impl Parser {
|
||||
width: spec.width,
|
||||
align: spec.align,
|
||||
raise: spec.raise,
|
||||
frame: spec.frame,
|
||||
}),
|
||||
unresolved_reference: None,
|
||||
bold: false,
|
||||
|
||||
@@ -102,6 +102,7 @@ pub enum FrontendEventKind {
|
||||
width: Option<common::Scaled>,
|
||||
align: crate::document::InlineBoxAlign,
|
||||
raise: common::Scaled,
|
||||
frame: bool,
|
||||
},
|
||||
InlineBoxEnd,
|
||||
MetadataStart(MetadataField),
|
||||
|
||||
Reference in new issue
Block a user