From 7c69731a62bd71c5411395b8ee35bd5f68ec36fb Mon Sep 17 00:00:00 2001 From: Andreu Botella Date: Wed, 8 May 2019 13:35:40 +0200 Subject: Adding attributes to the table content elements. --- src/document_tree/extra_attributes.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/document_tree/extra_attributes.rs') diff --git a/src/document_tree/extra_attributes.rs b/src/document_tree/extra_attributes.rs index 5ed9788..35f4b5a 100644 --- a/src/document_tree/extra_attributes.rs +++ b/src/document_tree/extra_attributes.rs @@ -1,7 +1,7 @@ use serde_derive::Serialize; use crate::target; -use super::attribute_types::{CanBeEmpty,FixedSpace,ID,NameToken,AlignHV,AlignH,Measure,EnumeratedListType}; +use super::attribute_types::{CanBeEmpty,FixedSpace,ID,NameToken,AlignHV,AlignH,AlignV,TableAlignH,TableBorder,Measure,EnumeratedListType}; pub trait ExtraAttributes { fn with_extra(extra: A) -> Self; @@ -61,7 +61,14 @@ impl_extra!(Footnote { backrefs: Vec, auto: bool }); impl_extra!(Citation { backrefs: Vec }); impl_extra!(SystemMessage { backrefs: Vec, level: Option, line: Option, type_: Option }); impl_extra!(Figure { align: Option, width: Option }); -impl_extra!(Table {}); //TODO: Table +impl_extra!(Table { frame: Option, colsep: Option, rowsep: Option, pgwide: Option }); + +impl_extra!(TableGroup { cols: usize, colsep: Option, rowsep: Option, align: Option }); +impl_extra!(TableHead { valign: Option }); +impl_extra!(TableBody { valign: Option }); +impl_extra!(TableRow { rowsep: Option, valign: Option }); +impl_extra!(TableEntry { colname: Option, namest: Option, nameend: Option, morerows: Option, colsep: Option, rowsep: Option, align: Option, r#char: Option, charoff: Option, valign: Option, morecols: Option }); +impl_extra!(TableColspec { colnum: Option, colname: Option, colwidth: Option, colsep: Option, rowsep: Option, align: Option, r#char: Option, charoff: Option, stub: Option }); impl_extra!(OptionArgument { delimiter: Option }); -- cgit v1.2.3 From 543c97c71d9dd8b79507dc6fe352ad6bdcbe18b6 Mon Sep 17 00:00:00 2001 From: Andreu Botella Date: Wed, 8 May 2019 18:28:30 +0200 Subject: Adding an attribute type for the cols attribute of tgroup. --- src/document_tree/extra_attributes.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/document_tree/extra_attributes.rs') diff --git a/src/document_tree/extra_attributes.rs b/src/document_tree/extra_attributes.rs index 35f4b5a..bff9fb3 100644 --- a/src/document_tree/extra_attributes.rs +++ b/src/document_tree/extra_attributes.rs @@ -1,7 +1,7 @@ use serde_derive::Serialize; use crate::target; -use super::attribute_types::{CanBeEmpty,FixedSpace,ID,NameToken,AlignHV,AlignH,AlignV,TableAlignH,TableBorder,Measure,EnumeratedListType}; +use super::attribute_types::{CanBeEmpty,FixedSpace,ID,NameToken,AlignHV,AlignH,AlignV,TableAlignH,TableBorder,TableGroupCols,Measure,EnumeratedListType}; pub trait ExtraAttributes { fn with_extra(extra: A) -> Self; @@ -63,7 +63,7 @@ impl_extra!(SystemMessage { backrefs: Vec, level: Option, line: Optio impl_extra!(Figure { align: Option, width: Option }); impl_extra!(Table { frame: Option, colsep: Option, rowsep: Option, pgwide: Option }); -impl_extra!(TableGroup { cols: usize, colsep: Option, rowsep: Option, align: Option }); +impl_extra!(TableGroup { cols: TableGroupCols, colsep: Option, rowsep: Option, align: Option }); impl_extra!(TableHead { valign: Option }); impl_extra!(TableBody { valign: Option }); impl_extra!(TableRow { rowsep: Option, valign: Option }); -- cgit v1.2.3