diff options
Diffstat (limited to 'org')
-rw-r--r-- | org/out_latex.org | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/org/out_latex.org b/org/out_latex.org index 0a2cbac..807010d 100644 --- a/org/out_latex.org +++ b/org/out_latex.org @@ -601,10 +601,9 @@ _txt = _txt ) { 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; } @@ -759,13 +758,12 @@ _txt = _txt ); } 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, @@ -778,7 +776,7 @@ _txt = _txt \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} @@ -808,13 +806,12 @@ _txt = _txt && _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, @@ -827,13 +824,12 @@ _txt = _txt ) { /+ 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, @@ -863,14 +859,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; } @@ -892,7 +887,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} @@ -902,7 +897,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; } @@ -923,7 +917,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 @@ -934,7 +928,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; } @@ -955,7 +948,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} @@ -964,7 +957,6 @@ string codeblock(O,M)( ┃"; _txt = format(_tex_para, obj.metainfo.object_number, - obj.metainfo.object_number, _txt.nbsp_char_to_space ).strip; } @@ -1053,7 +1045,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} @@ -1064,7 +1056,6 @@ string table(O,M)( ┃"; _txt = format(_tex_para, obj.metainfo.object_number, - obj.metainfo.object_number, _colw, _table, ).strip; @@ -1665,6 +1656,9 @@ string _latex_head = format(q"┃%%%% spine LaTeX output \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{ |