aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/doc_reform/io_out/latex.d32
1 files changed, 13 insertions, 19 deletions
diff --git a/src/doc_reform/io_out/latex.d b/src/doc_reform/io_out/latex.d
index 6160a3e..d87a938 100644
--- a/src/doc_reform/io_out/latex.d
+++ b/src/doc_reform/io_out/latex.d
@@ -382,10 +382,9 @@ template outputLaTeX() {
) {
if (obj.metainfo.is_of_type == "para") {
string _tex_para;
- _tex_para = q"┃\begin{tiny}\hspace{0mm}\end{tiny}{\marginpar{\begin{tiny}\hspace{0mm}\hypertarget{%s}{%s}\end{tiny}}}%s┃";
+ _tex_para = q"┃\ocn{%s}%s┃";
_txt = format(_tex_para,
obj.metainfo.object_number,
- obj.metainfo.object_number,
_txt.footnotes
).strip;
}
@@ -483,13 +482,12 @@ template outputLaTeX() {
);
} else if (obj.metainfo.heading_lev_markup < 4) {
if (!(_txt.footnotes.strip == "Endnotes")) {
- _tex_para = q"┃%s\part*{\begin{tiny}\hspace{0mm}\end{tiny}{\marginpar{\begin{tiny}\hspace{0mm}\hypertarget{%s}{%s}\end{tiny}}}%s}
+ _tex_para = q"┃%s\part*{\ocn{%s}%s}
\addcontentsline{toc}{part}{%s}
\markboth{%s}┃";
_txt = format(_tex_para,
_pg_break,
obj.metainfo.object_number,
- obj.metainfo.object_number,
_txt.strip.footnotes,
_txt.strip.remove_footnotes,
(doc_matters.conf_make_meta.meta.title_main).sp_char_esc_txt,
@@ -502,7 +500,7 @@ template outputLaTeX() {
\pagenumbering{none}
\setcounter{page}{1}
\setlength{\parskip}{1ex plus0.5ex minus0.2ex}
-\part*{\begin{tiny}\hspace{0mm}\end{tiny}{\marginpar{\begin{tiny}\hspace{0mm}\hypertarget{1}{1}\end{tiny}}}%s \newline %s}
+\part*{\ocn{1}%s \newline %s}
\clearpage
\markboth{%s}{%s}
@@ -532,13 +530,12 @@ template outputLaTeX() {
&& _part == "bookindex"
&& _txt.match(regex(r"^Index$"))
) {
- _tex_para = q"┃%s\%s*{\begin{tiny}\hspace{0mm}\end{tiny}{\marginpar{\begin{tiny}\hspace{0mm}\hypertarget{%s}{%s}\end{tiny}}}%s}
+ _tex_para = q"┃%s\%s*{\ocn{%s}%s}
\addcontentsline{toc}{%s}{%s%s}%s%s┃";
_txt = format(_tex_para,
_pg_break,
_sect.strip,
obj.metainfo.object_number,
- obj.metainfo.object_number,
_txt.footnotes.strip,
_sect,
_txt.remove_footnotes.strip,
@@ -551,13 +548,12 @@ template outputLaTeX() {
) { /+ dummy headings completely omitted +/
_txt = "";
} else {
- _tex_para = q"┃%s\%s*{\begin{tiny}\hspace{0mm}\end{tiny}{\marginpar{\begin{tiny}\hspace{0mm}\hypertarget{%s}{%s}\end{tiny}}}%s}
+ _tex_para = q"┃%s\%s*{\ocn{%s}%s}
\addcontentsline{toc}{%s}{%s%s}%s┃";
_txt = format(_tex_para,
_pg_break,
_sect.strip,
obj.metainfo.object_number,
- obj.metainfo.object_number,
_txt.footnotes.strip,
_sect,
_txt.remove_footnotes.strip,
@@ -578,14 +574,13 @@ string group(O,M)(
) {
if (obj.metainfo.is_a == "group") {
string _tex_para;
- _tex_para = q"┃\begin{tiny}\hspace{0mm}\end{tiny}{\marginpar{\begin{tiny}\hspace{0mm}\hypertarget{%s}{%s}\end{tiny}}}\setlength{\parskip}{0.5ex plus0.2ex minus0.1ex}
+ _tex_para = q"┃\ocn{%s}\setlength{\parskip}{0.5ex plus0.2ex minus0.1ex}
\begin{footnotesize}
%s
\end{footnotesize}
┃";
_txt = format(_tex_para,
obj.metainfo.object_number,
- obj.metainfo.object_number,
_txt.footnotes.strip
).strip;
}
@@ -599,7 +594,7 @@ string block(O,M)(
if (obj.metainfo.is_a == "block") {
// _txt = _txt.nbsp_char;
string _tex_para;
- _tex_para = q"┃\begin{tiny}\hspace{0mm}\end{tiny}{\marginpar{\begin{tiny}\hspace{0mm}\hypertarget{%s}{%s}\end{tiny}}}\setlength{\parskip}{0.5ex plus0.2ex minus0.1ex}
+ _tex_para = q"┃\ocn{%s}\setlength{\parskip}{0.5ex plus0.2ex minus0.1ex}
\begin{footnotesize}
%s
\end{footnotesize}
@@ -609,7 +604,6 @@ string block(O,M)(
_txt = _txt.split(rgx.br_newlines_linebreaks).join("\n\n"); // _txt = _txt.split(rgx.br_newlines_linebreaks).join(" \\\n");
_txt = format(_tex_para,
obj.metainfo.object_number,
- obj.metainfo.object_number,
_txt.nbsp_char.footnotes.strip
).strip;
}
@@ -622,7 +616,7 @@ string verse(O,M)(
) {
if (obj.metainfo.is_a == "verse") {
string _tex_para;
- _tex_para = q"┃\begin{tiny}\hspace{0mm}\end{tiny}{\marginpar{\begin{tiny}\hspace{0mm}\hypertarget{%s}{%s}\end{tiny}}}\setlength{\parskip}{0.1ex plus0.1ex minus0.1ex}
+ _tex_para = q"┃\ocn{%s}\setlength{\parskip}{0.1ex plus0.1ex minus0.1ex}
\begin{footnotesize}
%s
@@ -633,7 +627,6 @@ string verse(O,M)(
┃"; // \hardspace
_txt = format(_tex_para,
obj.metainfo.object_number,
- obj.metainfo.object_number,
_txt.nbsp_char.footnotes.split("\n").join("\n\n").strip
).strip;
}
@@ -646,7 +639,7 @@ string codeblock(O,M)(
) {
if (obj.metainfo.is_a == "code") {
string _tex_para;
- _tex_para = q"┃\begin{tiny}\hspace{0mm}\end{tiny}{\marginpar{\begin{tiny}\hspace{0mm}\hypertarget{%s}{%s}\end{tiny}}}\setlength{\parskip}{0.5ex plus0.2ex minus0.1ex}\begin{Codeblock}
+ _tex_para = q"┃\ocn{%s}\setlength{\parskip}{0.5ex plus0.2ex minus0.1ex}\begin{Codeblock}
\begin{lstlisting}
%s
\end{lstlisting}
@@ -655,7 +648,6 @@ string codeblock(O,M)(
┃";
_txt = format(_tex_para,
obj.metainfo.object_number,
- obj.metainfo.object_number,
_txt.nbsp_char_to_space
).strip;
}
@@ -728,7 +720,7 @@ string table(O,M)(
);
}
string _tex_para;
- _tex_para = q"┃\begin{tiny}\hspace{0mm}\end{tiny}{\marginpar{\begin{tiny}\hspace{0mm}\hypertarget{%s}{%s}\end{tiny}}}
+ _tex_para = q"┃\ocn{%s}
\setlength{\LTleft}{0pt}
\setlength{\LTright}{\fill}
\begin{tiny}
@@ -739,7 +731,6 @@ string table(O,M)(
┃";
_txt = format(_tex_para,
obj.metainfo.object_number,
- obj.metainfo.object_number,
_colw,
_table,
).strip;
@@ -1085,6 +1076,9 @@ string table(O,M)(
\newcommand{\slash}{{/}}
\newcommand{\underscore}{\_}
\newcommand{\exclaim}{\Verbatim{!}}
+\newcommand{\ocn}[1]{
+\begin{tiny}\hspace{0mm}\end{tiny}{\marginpar{\begin{tiny}\hspace{0mm}\hypertarget{#1}{#1}\end{tiny}}}
+}
\definecolor{listinggray}{gray}{0.9}
\definecolor{lbcolor}{rgb}{0.9,0.9,0.9}
\lstset{