aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/meta_conf_make_meta.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2022-03-07 12:13:48 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2022-03-07 14:40:59 -0500
commit60e34a2acd828681be9043ac710174aee6aba203 (patch)
tree266708eedc0c833d0a55160ee503233013779712 /org/meta_conf_make_meta.org
parentlatex, pdf headers, some removed (diff)
latex, pagebreaks, make headers
- for book, article and manually set pagebreaks, not fully utilized but flexibility introduced
Diffstat (limited to 'org/meta_conf_make_meta.org')
-rw-r--r--org/meta_conf_make_meta.org37
1 files changed, 27 insertions, 10 deletions
diff --git a/org/meta_conf_make_meta.org b/org/meta_conf_make_meta.org
index 38fe49a..983cc75 100644
--- a/org/meta_conf_make_meta.org
+++ b/org/meta_conf_make_meta.org
@@ -295,8 +295,9 @@ static auto mkup = InlineMarkup();
return line_;
}
struct ConfCompositeMakeStr {
- string bold;
+ string doc_type = "book"; // book, article
string breaks;
+ string bold;
string cover_image;
string css;
string emphasis;
@@ -321,6 +322,9 @@ struct confCompositeMakeBuild {
}
return _out;
}
+ string doc_type(string _mk) {
+ return _mk;
+ }
string breaks(string _mk) {
return _mk;
}
@@ -385,10 +389,11 @@ struct confCompositeMakeBuild {
#+NAME: meta_defaults_template_structs_composite_make_init
#+BEGIN_SRC d
struct ConfCompositeMakeInit {
- string[] bold;
+ string doc_type;
string breaks;
string cover_image;
string css;
+ string[] bold;
string[] emphasis;
string[] footer;
string[] headings;
@@ -1171,11 +1176,11 @@ if ("make" in _yaml
if (_yaml["make"].type.mapping
&& _yaml["make"].tag.match(rgx.yaml_tag_is_map)
) {
- if ("bold" in _yaml["make"]
- && _yaml["make"]["bold"].type.string
- && _yaml["make"]["bold"].tag.match(rgx.yaml_tag_is_str)
+ if ("doc_type" in _yaml["make"]
+ && _yaml["make"]["doc_type"].type.string
+ && _yaml["make"]["doc_type"].tag.match(rgx.yaml_tag_is_str)
) {
- _struct_composite.make_str.bold = _yaml["make"]["bold"].get!string;
+ _struct_composite.make_str.doc_type = _yaml["make"]["doc_type"].get!string;
}
if ("breaks" in _yaml["make"]
&& _yaml["make"]["breaks"].type.string
@@ -1183,6 +1188,12 @@ if ("make" in _yaml
) {
_struct_composite.make_str.breaks = _yaml["make"]["breaks"].get!string;
}
+ if ("bold" in _yaml["make"]
+ && _yaml["make"]["bold"].type.string
+ && _yaml["make"]["bold"].tag.match(rgx.yaml_tag_is_str)
+ ) {
+ _struct_composite.make_str.bold = _yaml["make"]["bold"].get!string;
+ }
if ("cover_image" in _yaml["make"]
&& _yaml["make"]["cover_image"].type.string
&& _yaml["make"]["cover_image"].tag.match(rgx.yaml_tag_is_str)
@@ -1298,8 +1309,9 @@ if ("make" in _yaml
_struct_composite.make_str.texpdf_font = _yaml["make"]["texpdf_font"].get!string;
}
}
- _struct_composite.make.bold = _mk.bold(_struct_composite.make_str.bold);
+ _struct_composite.make.doc_type = _mk.doc_type(_struct_composite.make_str.doc_type);
_struct_composite.make.breaks = _mk.breaks(_struct_composite.make_str.breaks);
+ _struct_composite.make.bold = _mk.bold(_struct_composite.make_str.bold);
_struct_composite.make.cover_image = _mk.cover_image(_struct_composite.make_str.cover_image);
_struct_composite.make.css = _mk.css(_struct_composite.make_str.css);
_struct_composite.make.emphasis = _mk.emphasis(_struct_composite.make_str.emphasis);
@@ -1774,16 +1786,21 @@ static template contentJSONtoSpineStruct() {
#+BEGIN_SRC d
/+ make ------------------------------------------------------------------- +/
if ("make" in _json.object) {
- if ("bold" in _json.object["make"]
- && (_json.object["make"]["bold"].type().to!string == "string")
+ if ("doc_type" in _json.object["make"]
+ && (_json.object["make"]["doc_type"].type().to!string == "string")
) {
- _struct_composite.make_str.bold = _json.object["make"]["bold"].str;
+ _struct_composite.make_str.doc_type = _json.object["make"]["doc_type"].str;
}
if ("breaks" in _json.object["make"]
&& (_json.object["make"]["breaks"].type().to!string == "string")
) {
_struct_composite.make_str.breaks = _json.object["make"]["breaks"].str;
}
+ if ("bold" in _json.object["make"]
+ && (_json.object["make"]["bold"].type().to!string == "string")
+ ) {
+ _struct_composite.make_str.bold = _json.object["make"]["bold"].str;
+ }
if ("cover_image" in _json.object["make"]
&& (_json.object["make"]["cover_image"].type().to!string == "string")
) {