aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2024-05-29 12:47:35 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2024-05-29 12:48:50 -0400
commit39d2dfabac93c700d6888e51ad582076658b23cc (patch)
treea3ada0c75e1e1ceaa1125b0fd770488724625614
parentREADME, further note on using nix for installation (diff)
latex footers from document header make, a fix
-rw-r--r--org/meta_conf_make_meta.org19
-rw-r--r--org/out_latex.org12
-rw-r--r--src/sisudoc/io_out/latex.d12
-rw-r--r--src/sisudoc/meta/conf_make_meta_structs.d7
-rw-r--r--src/sisudoc/meta/conf_make_meta_yaml.d12
5 files changed, 34 insertions, 28 deletions
diff --git a/org/meta_conf_make_meta.org b/org/meta_conf_make_meta.org
index ca8d6f7..9c62322 100644
--- a/org/meta_conf_make_meta.org
+++ b/org/meta_conf_make_meta.org
@@ -347,12 +347,7 @@ struct ConfCompositeMakeStr {
return _out;
}
string[] footer(string[] _mk) {
- string line_;
- string[] _mk2;
- foreach (line; _mk) {
- _mk2 ~= url_markup(line);
- }
- return _mk2;
+ return _mk;
}
string[] headings(string[] _mk) {
return _mk;
@@ -1229,7 +1224,17 @@ if ("make" in _yaml
char[][] __match_footer_array
= (cast(char[]) _yaml["make"]["footer"].get!string)
.split(rgx.make_heading_delimiter);
- _struct_composite.make_str.footer = __match_footer_array.to!(string[]);
+ foreach(string hbt; __match_footer_array.to!(string[])) {
+ _struct_composite.make_str.footer ~= url_markup(hbt);
+ }
+ } else if ("footer" in _yaml["make"]
+ && _yaml["make"]["footer"].type.string
+ && _yaml["make"]["footer"].tag.match(rgx_y.yaml_tag_is_seq)
+ ) {
+ _struct_composite.make_str.footer = [];
+ foreach(string hbt; _yaml["make"]["footer"]) {
+ _struct_composite.make_str.footer ~= url_markup(hbt);
+ }
}
if ("headings" in _yaml["make"]
&& _yaml["make"]["headings"].type.string
diff --git a/org/out_latex.org b/org/out_latex.org
index daafd37..bb9d6cb 100644
--- a/org/out_latex.org
+++ b/org/out_latex.org
@@ -1810,13 +1810,11 @@ string _footer(M)(M doc_matters) {
string _ft_2 = format(q"┃
\cfoot{\href{%s}{%s}}┃", "https://git.sisudoc.org", "git",);
if (doc_matters.conf_make_meta.make.footer.length > 0) {
- if (doc_matters.conf_make_meta.make.footer.length > 0) {
- if (doc_matters.conf_make_meta.make.footer[0].matchAll(rgx.inline_link)) {
- _ft ~= doc_matters.conf_make_meta.make.footer[0]
- .replace(rgx.inline_link, "{\\tiny \\href{$2}{$1}}");
- } else {
- _ft ~= _ft_1;
- }
+ if (doc_matters.conf_make_meta.make.footer[0].matchAll(rgx.inline_link)) {
+ _ft ~= doc_matters.conf_make_meta.make.footer[0]
+ .replace(rgx.inline_link, "{\\tiny \\href{$2}{$1}}");
+ } else {
+ _ft ~= _ft_1;
}
if (doc_matters.conf_make_meta.make.footer.length > 1) {
if (doc_matters.conf_make_meta.make.footer[1].matchAll(rgx.inline_link)) {
diff --git a/src/sisudoc/io_out/latex.d b/src/sisudoc/io_out/latex.d
index a6867cb..771bc57 100644
--- a/src/sisudoc/io_out/latex.d
+++ b/src/sisudoc/io_out/latex.d
@@ -995,13 +995,11 @@ template outputLaTeX() {
string _ft_2 = format(q"┃
\cfoot{\href{%s}{%s}}┃", "https://git.sisudoc.org", "git",);
if (doc_matters.conf_make_meta.make.footer.length > 0) {
- if (doc_matters.conf_make_meta.make.footer.length > 0) {
- if (doc_matters.conf_make_meta.make.footer[0].matchAll(rgx.inline_link)) {
- _ft ~= doc_matters.conf_make_meta.make.footer[0]
- .replace(rgx.inline_link, "{\\tiny \\href{$2}{$1}}");
- } else {
- _ft ~= _ft_1;
- }
+ if (doc_matters.conf_make_meta.make.footer[0].matchAll(rgx.inline_link)) {
+ _ft ~= doc_matters.conf_make_meta.make.footer[0]
+ .replace(rgx.inline_link, "{\\tiny \\href{$2}{$1}}");
+ } else {
+ _ft ~= _ft_1;
}
if (doc_matters.conf_make_meta.make.footer.length > 1) {
if (doc_matters.conf_make_meta.make.footer[1].matchAll(rgx.inline_link)) {
diff --git a/src/sisudoc/meta/conf_make_meta_structs.d b/src/sisudoc/meta/conf_make_meta_structs.d
index 9b1d1d1..3ece2dc 100644
--- a/src/sisudoc/meta/conf_make_meta_structs.d
+++ b/src/sisudoc/meta/conf_make_meta_structs.d
@@ -139,12 +139,7 @@ struct ConfCompositeMakeStr {
return _out;
}
string[] footer(string[] _mk) {
- string line_;
- string[] _mk2;
- foreach (line; _mk) {
- _mk2 ~= url_markup(line);
- }
- return _mk2;
+ return _mk;
}
string[] headings(string[] _mk) {
return _mk;
diff --git a/src/sisudoc/meta/conf_make_meta_yaml.d b/src/sisudoc/meta/conf_make_meta_yaml.d
index ac97a21..5712bcf 100644
--- a/src/sisudoc/meta/conf_make_meta_yaml.d
+++ b/src/sisudoc/meta/conf_make_meta_yaml.d
@@ -698,7 +698,17 @@ template contentYAMLtoSpineStruct() {
char[][] __match_footer_array
= (cast(char[]) _yaml["make"]["footer"].get!string)
.split(rgx.make_heading_delimiter);
- _struct_composite.make_str.footer = __match_footer_array.to!(string[]);
+ foreach(string hbt; __match_footer_array.to!(string[])) {
+ _struct_composite.make_str.footer ~= url_markup(hbt);
+ }
+ } else if ("footer" in _yaml["make"]
+ && _yaml["make"]["footer"].type.string
+ && _yaml["make"]["footer"].tag.match(rgx_y.yaml_tag_is_seq)
+ ) {
+ _struct_composite.make_str.footer = [];
+ foreach(string hbt; _yaml["make"]["footer"]) {
+ _struct_composite.make_str.footer ~= url_markup(hbt);
+ }
}
if ("headings" in _yaml["make"]
&& _yaml["make"]["headings"].type.string