* `p`
The document often contains a `p` element that contains the content.
- [Inside `pageParagraph`](#the-text-element-inside-pageparagraph)
- only, the document can contain multiple paragraphs.
+ [Inside `pageParagraph`](#the-text-element-inside-pageparagraph),
+ the document can contain multiple paragraphs. On the other hand,
+ [inside `container`](#the-text-element-inside-container), if there
+ are multiple paragraphs, which is rare, `<p>` after the first are
+ simply treated as line breaks, as with `<br>`.
The following attributes are observed:
Embedded HTML writes most tag names in lowercase but this one is
usually in uppercase, as `<BR>`.
+ > At the beginning of an HTML body, a single `<BR>` element should
+ > be ignored, but only if capitalized; that is, `<br>` is not
+ > ignored, and neither is `<BR>` following any text or any other
+ > element.
+
* `b`
`i`
`u`
}
let footnotes = pivot::Footnotes::from_iter(footnotes);
- for (purpose, area) in [
- (Purpose::Title, Area::Title),
- (Purpose::SubTitle, Area::Caption),
- (Purpose::Layer, Area::Layers),
- (Purpose::Footnote, Area::Footer),
- ] {
- for label in &labels[purpose] {
- label.decode_style(&mut look.areas[area], &styles);
- }
- }
let title = LabelFrame::decode_label(&labels[Purpose::Title], &footnotes);
let mut caption_labels = &labels[Purpose::SubTitle];
if caption_labels.is_empty() {
caption_labels = &labels[Purpose::Footnote];
}
let caption = LabelFrame::decode_label(&caption_labels, &footnotes);
- if let Some(style) = &graph.interval.labeling.style
- && let Some(style) = styles.get(style.references.as_str())
- {
- Style::decode_area(
- Some(*style),
- graph.cell_style.get(&styles),
- &mut look.areas[Area::Data(RowParity::Even)],
- );
- look.areas[Area::Data(RowParity::Odd)] =
- look.areas[Area::Data(RowParity::Even)].clone();
- }
let _show_grid_lines = extension
.as_ref()
} else {
(false, None, None, None)
};
- if let Ok(a) = Axis2::try_from(a)
- && let Some(axis) = axes.get(&(base_level + variables.len() - 1))
- {
- Style::decode_area(
- axis.major_ticks.style.get(&styles),
- axis.major_ticks.tick_frame_style.get(&styles),
- &mut look.areas[Area::Labels(a)],
- );
- }
if a == Axis3::Y
&& let Some(axis) = axes.get(&base_level)
}
}
- #[derive(Default)]
+ #[derive(Default, Debug)]
struct Target<'a> {
graph: Option<&'a Style>,
labeling: Option<&'a Style>,
impl<'a> Target<'a> {
fn decode(
&self,
+ scp: &SetCellProperties,
intersect: &Intersect,
look: &mut Look,
series: &BTreeMap<&str, Series>,
}
}
+ dbg!(&scp.id, self, intersect);
match self {
- Self {
- graph: Some(_),
- labeling: Some(_),
- interval: None,
- major_ticks: None,
- frame: None,
- format: None,
- } if alternating => {
- let mut style = AreaStyle::default_for_area(Area::Data(RowParity::Odd));
- Style::decode_area(self.labeling, self.graph, &mut style);
- let font_style = &mut look.areas[Area::Data(RowParity::Odd)].font_style;
- font_style.fg = style.font_style.fg;
- font_style.bg = style.font_style.bg;
- }
Self {
graph: Some(_),
labeling: None,
if !wheres.is_empty() =>
{
// Formatting for individual row or column labels.
+ dbg!();
for w in &wheres {
let Some(s) = series.get(w.variable.as_str()) else {
continue;
} => {
// Formatting for individual cells or groups of them
// with some dimensions in common.
+ dbg!(&scp.id);
let mut include = vec![HashSet::new(); dims.len()];
for w in &wheres {
let Some(s) = series.get(w.variable.as_str()) else {
);
}
}
+ dbg!();
}
_ => (),
}
}
Set::SetFormat(sf) => {
let target_type = TargetType::from_id(&sf.target, graph, &major_ticks);
+ if target.format.is_some() {
+ dbg!();
+ }
target.format = Some((sf, target_type))
}
Set::SetMetaData(_) => (),
(Some(union_), false) => {
for intersect in &union_.intersects {
target.decode(
+ scp,
intersect,
&mut look,
&series,
) {
if let Some(sf) = sf {
if let Some(child) = &sf.child
- && let Some(format) = child.decode_format()
+ && let Some(format) = dbg!(child.decode_format())
&& let Some(datum_value) = value.inner.as_datum_value_mut()
{
+ dbg!(&datum_value);
match &datum_value.datum {
Datum::Number(_) => {
datum_value.format = format;