aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/meta_conf_make_meta.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2022-02-28 10:40:04 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2022-03-05 10:33:48 -0500
commit8dde791281d89baa8c1c4a2455218d34d740105c (patch)
tree7e98c87a455c07f69118fee18bcb14e46bb03e0f /org/meta_conf_make_meta.org
parentorg-mode, latex file, cosmetic (diff)
latex select papersize & orientation
- cfte, doc collection config, cli e.g. --set-papersize="a4,letter.portrait,b4.portrait"
Diffstat (limited to 'org/meta_conf_make_meta.org')
-rw-r--r--org/meta_conf_make_meta.org42
1 files changed, 21 insertions, 21 deletions
diff --git a/org/meta_conf_make_meta.org b/org/meta_conf_make_meta.org
index 331fe49..38fe49a 100644
--- a/org/meta_conf_make_meta.org
+++ b/org/meta_conf_make_meta.org
@@ -1032,16 +1032,6 @@ string[] selected_papersize(string _sizes_str) {
case "a4.landscape":
_selected_sizes ~= _size;
break;
- case "a5":
- _selected_sizes ~= "a5.portrait";
- _selected_sizes ~= "a5.landscape";
- break;
- case "a5.portrait":
- _selected_sizes ~= _size;
- break;
- case "a5.landscape":
- _selected_sizes ~= _size;
- break;
case "b4":
_selected_sizes ~= "b4.portrait";
_selected_sizes ~= "b4.landscape";
@@ -1052,6 +1042,16 @@ string[] selected_papersize(string _sizes_str) {
case "b4.landscape":
_selected_sizes ~= _size;
break;
+ case "a5":
+ _selected_sizes ~= "a5.portrait";
+ _selected_sizes ~= "a5.landscape";
+ break;
+ case "a5.portrait":
+ _selected_sizes ~= _size;
+ break;
+ case "a5.landscape":
+ _selected_sizes ~= _size;
+ break;
case "letter":
_selected_sizes ~= "letter.portrait";
_selected_sizes ~= "letter.landscape";
@@ -1077,24 +1077,24 @@ string[] selected_papersize(string _sizes_str) {
}
return _selected_sizes;
}
+string _set_papersize;
if (_opt_action.latex_papersize.length > 0) {
- _struct_composite.conf.set_papersize = selected_papersize(_opt_action.latex_papersize);
-} else if (
- "default" in _yaml
- && _yaml["default"].type.sequence
- && _yaml["default"].type.mapping
- && _yaml["default"].tag.match(rgx.yaml_tag_is_map)
-) {
+ _set_papersize
+ = _opt_action.latex_papersize;
+} else {
+ _set_papersize
+ = (_cfg.default_papersize.empty)
+ ? "a4,letter.portrait"
+ : _cfg.default_papersize;
if ("papersize" in _yaml["default"]
&& _yaml["default"]["papersize"].type.string
&& _yaml["default"]["papersize"].tag.match(rgx.yaml_tag_is_str)
) {
- _struct_composite.conf.set_papersize = selected_papersize(_yaml["default"]["papersize"].get!string);
+ _set_papersize
+ = _yaml["default"]["papersize"].get!string;
}
}
-if (_struct_composite.conf.set_papersize.length == 0) {
- _struct_composite.conf.set_papersize = ["a4.portrait", "a4.landscape"];
-}
+_struct_composite.conf.set_papersize = selected_papersize(_set_papersize);
if (
"default" in _yaml
&& _yaml["default"].type.sequence