diff options
| author | Ralph Amissah <ralph.amissah@gmail.com> | 2026-04-06 22:19:11 -0400 |
|---|---|---|
| committer | Ralph Amissah <ralph.amissah@gmail.com> | 2026-04-06 22:19:14 -0400 |
| commit | 47d3a00c05728521c4af109266c073ae1b764768 (patch) | |
| tree | 8554c98e047e07454f129a3af971a5455b2bdc49 | |
| parent | package housekeeping, minor (diff) | |
latex minor improvements and fixes, require testing
- FIXES issue with .tex files and xetex finding image paths when run
within latex/ output directory
| -rw-r--r-- | org/out_latex.org | 21 | ||||
| -rw-r--r-- | src/sisudoc/io_out/latex.d | 21 |
2 files changed, 24 insertions, 18 deletions
diff --git a/org/out_latex.org b/org/out_latex.org index 0b9f2be..bf80bac 100644 --- a/org/out_latex.org +++ b/org/out_latex.org @@ -438,9 +438,10 @@ fonts to try: \usepackage{newunicodechar} %% \usepackage[utf8]{inputenc} \usepackage{alltt} +\PassOptionsToPackage{hyphens}{url} \usepackage[ unicode=true, - pdfusetitle, + pdfusetitle, pdfsubject={}, pdfkeywords={}, %% keywords list {} {} {}, pdftoolbar=true, @@ -455,14 +456,15 @@ fonts to try: bookmarksopen=false, bookmarksnumbered=false, backref=false, - breaklinks=false, + breaklinks=true, colorlinks=true, urlcolor=black, filecolor=black, linkcolor=black, citecolor=black, %% links_mono_or_color_set ]{hyperref} -\PassOptionsToPackage{hyphens}{url}\usepackage{hyperref} +\usepackage{xurl} +%% \PassOptionsToPackage{hyphens}{url}\usepackage{hyperref} \usepackage[usenames]{color} \definecolor{myblack}{rgb}{0,0,0} \definecolor{myred}{rgb}{0.75,0,0} @@ -593,7 +595,7 @@ fonts to try: } \newcommand{\spaces}[1]{{\hspace*{#1ex}}} \newcommand{\s}{\hspace*{1ex}} -\newcommand{\hardspace}{\hspace*{1ex}} +\renewcommand{\hardspace}{\hspace*{1ex}} \newcommand{\-}{\hspace*{1ex}} \newcommand{\caret}{{\^{~}}} \newcommand{\pipe}{{\textbar}} @@ -601,7 +603,7 @@ fonts to try: \newcommand{\curlyClose}{}} \newcommand{\lt}{{UseTextSymbol{OML}{<}}} \newcommand{\gt}{{UseTextSymbol{OML}{>}}} -\newcommand{\slash}{{/}} +\renewcommand{\slash}{{/}} \newcommand{\underscore}{\_} \newcommand{\exclaim}{\Verbatim{!}} \newcommand{\linktext}[2]{%% @@ -646,9 +648,10 @@ fonts to try: \end{longtable} \end{tiny} } -%% \tolerance=300 -%% \clubpenalty=300 -%% \widowpenalty=300 +\tolerance=200 +\clubpenalty=150 +\widowpenalty=150 +\setlength{\emergencystretch}{3em} %% \usepackage{atbegshi} %% http://ctan.org/pkg/atbegshi %% (BUG tmp FIX deal with problem, remove first page which is blank) %% \AtBeginDocument{\AtBeginShipoutNext{\AtBeginShipoutDiscard}} %% (BUG tmp FIX deal with problem, remove first page which is blank) ┃", @@ -1153,7 +1156,7 @@ string links_and_images(O,M)( } string _latex_image_path(string _image_path) { auto pth_latex = spinePathsLaTeX(doc_matters); - _image_path = pth_latex.latex_path_stuff ~ "/" ~ _image_path; + _image_path = pth_latex.base_filename(doc_matters.src.filename) ~ "/" ~ _image_path; return _image_path; } string _if_images(string _linked_content) { diff --git a/src/sisudoc/io_out/latex.d b/src/sisudoc/io_out/latex.d index 1dca140..39dc932 100644 --- a/src/sisudoc/io_out/latex.d +++ b/src/sisudoc/io_out/latex.d @@ -447,7 +447,7 @@ template outputLaTeX() { } string _latex_image_path(string _image_path) { auto pth_latex = spinePathsLaTeX(doc_matters); - _image_path = pth_latex.latex_path_stuff ~ "/" ~ _image_path; + _image_path = pth_latex.base_filename(doc_matters.src.filename) ~ "/" ~ _image_path; return _image_path; } string _if_images(string _linked_content) { @@ -1525,9 +1525,10 @@ template outputLaTeXstyStatic() { \usepackage{newunicodechar} %% \usepackage[utf8]{inputenc} \usepackage{alltt} +\PassOptionsToPackage{hyphens}{url} \usepackage[ unicode=true, - pdfusetitle, + pdfusetitle, pdfsubject={}, pdfkeywords={}, %% keywords list {} {} {}, pdftoolbar=true, @@ -1542,14 +1543,15 @@ template outputLaTeXstyStatic() { bookmarksopen=false, bookmarksnumbered=false, backref=false, - breaklinks=false, + breaklinks=true, colorlinks=true, urlcolor=black, filecolor=black, linkcolor=black, citecolor=black, %% links_mono_or_color_set ]{hyperref} -\PassOptionsToPackage{hyphens}{url}\usepackage{hyperref} +\usepackage{xurl} +%% \PassOptionsToPackage{hyphens}{url}\usepackage{hyperref} \usepackage[usenames]{color} \definecolor{myblack}{rgb}{0,0,0} \definecolor{myred}{rgb}{0.75,0,0} @@ -1680,7 +1682,7 @@ template outputLaTeXstyStatic() { } \newcommand{\spaces}[1]{{\hspace*{#1ex}}} \newcommand{\s}{\hspace*{1ex}} -\newcommand{\hardspace}{\hspace*{1ex}} +\renewcommand{\hardspace}{\hspace*{1ex}} \newcommand{\-}{\hspace*{1ex}} \newcommand{\caret}{{\^{~}}} \newcommand{\pipe}{{\textbar}} @@ -1688,7 +1690,7 @@ template outputLaTeXstyStatic() { \newcommand{\curlyClose}{}} \newcommand{\lt}{{UseTextSymbol{OML}{<}}} \newcommand{\gt}{{UseTextSymbol{OML}{>}}} -\newcommand{\slash}{{/}} +\renewcommand{\slash}{{/}} \newcommand{\underscore}{\_} \newcommand{\exclaim}{\Verbatim{!}} \newcommand{\linktext}[2]{%% @@ -1733,9 +1735,10 @@ template outputLaTeXstyStatic() { \end{longtable} \end{tiny} } -%% \tolerance=300 -%% \clubpenalty=300 -%% \widowpenalty=300 +\tolerance=200 +\clubpenalty=150 +\widowpenalty=150 +\setlength{\emergencystretch}{3em} %% \usepackage{atbegshi} %% http://ctan.org/pkg/atbegshi %% (BUG tmp FIX deal with problem, remove first page which is blank) %% \AtBeginDocument{\AtBeginShipoutNext{\AtBeginShipoutDiscard}} %% (BUG tmp FIX deal with problem, remove first page which is blank) ┃", |
