diff --git a/sutta_publisher/src/sutta_publisher/templates/tex/individual/an.tex b/sutta_publisher/src/sutta_publisher/templates/tex/individual/an.tex index 1e0b11f..d988924 100644 --- a/sutta_publisher/src/sutta_publisher/templates/tex/individual/an.tex +++ b/sutta_publisher/src/sutta_publisher/templates/tex/individual/an.tex @@ -6,7 +6,7 @@ \let\oldfrontmatter\frontmatter \renewcommand{\frontmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \oldfrontmatter} \let\oldmainmatter\mainmatter @@ -18,7 +18,7 @@ \let\oldbackmatter\backmatter \renewcommand{\backmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \pagestyle{plainer}% \oldbackmatter} diff --git a/sutta_publisher/src/sutta_publisher/templates/tex/individual/dhp.tex b/sutta_publisher/src/sutta_publisher/templates/tex/individual/dhp.tex index 5f67483..9204359 100644 --- a/sutta_publisher/src/sutta_publisher/templates/tex/individual/dhp.tex +++ b/sutta_publisher/src/sutta_publisher/templates/tex/individual/dhp.tex @@ -6,19 +6,19 @@ \let\oldfrontmatter\frontmatter \renewcommand{\frontmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \oldfrontmatter} \let\oldmainmatter\mainmatter \renewcommand{\mainmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering\Large}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \oldmainmatter} \let\oldbackmatter\backmatter \renewcommand{\backmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \pagestyle{plainer}% \oldbackmatter} diff --git a/sutta_publisher/src/sutta_publisher/templates/tex/individual/dn.tex b/sutta_publisher/src/sutta_publisher/templates/tex/individual/dn.tex index 6232beb..b41c483 100644 --- a/sutta_publisher/src/sutta_publisher/templates/tex/individual/dn.tex +++ b/sutta_publisher/src/sutta_publisher/templates/tex/individual/dn.tex @@ -6,19 +6,19 @@ \let\oldfrontmatter\frontmatter \renewcommand{\frontmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \oldfrontmatter} \let\oldmainmatter\mainmatter \renewcommand{\mainmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \oldmainmatter} \let\oldbackmatter\backmatter \renewcommand{\backmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \pagestyle{plainer}% \oldbackmatter} diff --git a/sutta_publisher/src/sutta_publisher/templates/tex/individual/iti.tex b/sutta_publisher/src/sutta_publisher/templates/tex/individual/iti.tex index 3b9b459..92cc04e 100644 --- a/sutta_publisher/src/sutta_publisher/templates/tex/individual/iti.tex +++ b/sutta_publisher/src/sutta_publisher/templates/tex/individual/iti.tex @@ -6,7 +6,7 @@ \let\oldfrontmatter\frontmatter \renewcommand{\frontmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \oldfrontmatter} \let\oldmainmatter\mainmatter @@ -18,7 +18,7 @@ \let\oldbackmatter\backmatter \renewcommand{\backmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \pagestyle{plainer}% \oldbackmatter} diff --git a/sutta_publisher/src/sutta_publisher/templates/tex/individual/mn.tex b/sutta_publisher/src/sutta_publisher/templates/tex/individual/mn.tex index c06eef2..338f136 100644 --- a/sutta_publisher/src/sutta_publisher/templates/tex/individual/mn.tex +++ b/sutta_publisher/src/sutta_publisher/templates/tex/individual/mn.tex @@ -6,7 +6,7 @@ \let\oldfrontmatter\frontmatter \renewcommand{\frontmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \oldfrontmatter} \let\oldmainmatter\mainmatter @@ -18,7 +18,7 @@ \let\oldbackmatter\backmatter \renewcommand{\backmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \pagestyle{plainer}% \oldbackmatter} diff --git a/sutta_publisher/src/sutta_publisher/templates/tex/individual/sn.tex b/sutta_publisher/src/sutta_publisher/templates/tex/individual/sn.tex index 7867ee2..c8c43f2 100644 --- a/sutta_publisher/src/sutta_publisher/templates/tex/individual/sn.tex +++ b/sutta_publisher/src/sutta_publisher/templates/tex/individual/sn.tex @@ -6,7 +6,7 @@ \let\oldfrontmatter\frontmatter \renewcommand{\frontmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \oldfrontmatter} \let\oldmainmatter\mainmatter @@ -18,7 +18,7 @@ \let\oldbackmatter\backmatter \renewcommand{\backmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \pagestyle{plainer}% \oldbackmatter} diff --git a/sutta_publisher/src/sutta_publisher/templates/tex/individual/snp.tex b/sutta_publisher/src/sutta_publisher/templates/tex/individual/snp.tex index 1dd3a0b..c1aa35a 100644 --- a/sutta_publisher/src/sutta_publisher/templates/tex/individual/snp.tex +++ b/sutta_publisher/src/sutta_publisher/templates/tex/individual/snp.tex @@ -6,7 +6,7 @@ \let\oldfrontmatter\frontmatter \renewcommand{\frontmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \oldfrontmatter} \let\oldmainmatter\mainmatter @@ -18,7 +18,7 @@ \let\oldbackmatter\backmatter \renewcommand{\backmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \pagestyle{plainer}% \oldbackmatter} diff --git a/sutta_publisher/src/sutta_publisher/templates/tex/individual/thag.tex b/sutta_publisher/src/sutta_publisher/templates/tex/individual/thag.tex index c6a581d..b6c2608 100644 --- a/sutta_publisher/src/sutta_publisher/templates/tex/individual/thag.tex +++ b/sutta_publisher/src/sutta_publisher/templates/tex/individual/thag.tex @@ -6,7 +6,7 @@ \let\oldfrontmatter\frontmatter \renewcommand{\frontmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \oldfrontmatter} \let\oldmainmatter\mainmatter @@ -18,7 +18,7 @@ \let\oldbackmatter\backmatter \renewcommand{\backmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \pagestyle{plainer}% \oldbackmatter} diff --git a/sutta_publisher/src/sutta_publisher/templates/tex/individual/thig.tex b/sutta_publisher/src/sutta_publisher/templates/tex/individual/thig.tex index a4f9504..5461c6e 100644 --- a/sutta_publisher/src/sutta_publisher/templates/tex/individual/thig.tex +++ b/sutta_publisher/src/sutta_publisher/templates/tex/individual/thig.tex @@ -6,7 +6,7 @@ \let\oldfrontmatter\frontmatter \renewcommand{\frontmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \oldfrontmatter} \let\oldmainmatter\mainmatter @@ -18,7 +18,7 @@ \let\oldbackmatter\backmatter \renewcommand{\backmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \pagestyle{plainer}% \oldbackmatter} diff --git a/sutta_publisher/src/sutta_publisher/templates/tex/individual/ud.tex b/sutta_publisher/src/sutta_publisher/templates/tex/individual/ud.tex index bdb7ee5..00316c8 100644 --- a/sutta_publisher/src/sutta_publisher/templates/tex/individual/ud.tex +++ b/sutta_publisher/src/sutta_publisher/templates/tex/individual/ud.tex @@ -6,7 +6,7 @@ \let\oldfrontmatter\frontmatter \renewcommand{\frontmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \oldfrontmatter} \let\oldmainmatter\mainmatter @@ -18,7 +18,7 @@ \let\oldbackmatter\backmatter \renewcommand{\backmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \pagestyle{plainer}% \oldbackmatter} diff --git a/sutta_publisher/src/sutta_publisher/templates/tex/individual/vinaya-1.tex b/sutta_publisher/src/sutta_publisher/templates/tex/individual/vinaya-1.tex index b708a63..f9b5519 100644 --- a/sutta_publisher/src/sutta_publisher/templates/tex/individual/vinaya-1.tex +++ b/sutta_publisher/src/sutta_publisher/templates/tex/individual/vinaya-1.tex @@ -6,7 +6,7 @@ \let\oldfrontmatter\frontmatter \renewcommand{\frontmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \oldfrontmatter} \let\oldmainmatter\mainmatter @@ -18,7 +18,7 @@ \let\oldbackmatter\backmatter \renewcommand{\backmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \pagestyle{plainer}% \oldbackmatter} diff --git a/sutta_publisher/src/sutta_publisher/templates/tex/individual/vinaya-2.tex b/sutta_publisher/src/sutta_publisher/templates/tex/individual/vinaya-2.tex index b708a63..f9b5519 100644 --- a/sutta_publisher/src/sutta_publisher/templates/tex/individual/vinaya-2.tex +++ b/sutta_publisher/src/sutta_publisher/templates/tex/individual/vinaya-2.tex @@ -6,7 +6,7 @@ \let\oldfrontmatter\frontmatter \renewcommand{\frontmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \oldfrontmatter} \let\oldmainmatter\mainmatter @@ -18,7 +18,7 @@ \let\oldbackmatter\backmatter \renewcommand{\backmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \pagestyle{plainer}% \oldbackmatter} diff --git a/sutta_publisher/src/sutta_publisher/templates/tex/individual/vinaya-3.tex b/sutta_publisher/src/sutta_publisher/templates/tex/individual/vinaya-3.tex index b708a63..f9b5519 100644 --- a/sutta_publisher/src/sutta_publisher/templates/tex/individual/vinaya-3.tex +++ b/sutta_publisher/src/sutta_publisher/templates/tex/individual/vinaya-3.tex @@ -6,7 +6,7 @@ \let\oldfrontmatter\frontmatter \renewcommand{\frontmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \oldfrontmatter} \let\oldmainmatter\mainmatter @@ -18,7 +18,7 @@ \let\oldbackmatter\backmatter \renewcommand{\backmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \pagestyle{plainer}% \oldbackmatter} diff --git a/sutta_publisher/src/sutta_publisher/templates/tex/individual/vinaya-4.tex b/sutta_publisher/src/sutta_publisher/templates/tex/individual/vinaya-4.tex index 0608956..85d9024 100644 --- a/sutta_publisher/src/sutta_publisher/templates/tex/individual/vinaya-4.tex +++ b/sutta_publisher/src/sutta_publisher/templates/tex/individual/vinaya-4.tex @@ -6,19 +6,19 @@ \let\oldfrontmatter\frontmatter \renewcommand{\frontmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \oldfrontmatter} \let\oldmainmatter\mainmatter \renewcommand{\mainmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \oldmainmatter} \let\oldbackmatter\backmatter \renewcommand{\backmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \pagestyle{plainer}% \oldbackmatter} diff --git a/sutta_publisher/src/sutta_publisher/templates/tex/individual/vinaya-5.tex b/sutta_publisher/src/sutta_publisher/templates/tex/individual/vinaya-5.tex index 0608956..85d9024 100644 --- a/sutta_publisher/src/sutta_publisher/templates/tex/individual/vinaya-5.tex +++ b/sutta_publisher/src/sutta_publisher/templates/tex/individual/vinaya-5.tex @@ -6,19 +6,19 @@ \let\oldfrontmatter\frontmatter \renewcommand{\frontmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \oldfrontmatter} \let\oldmainmatter\mainmatter \renewcommand{\mainmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \oldmainmatter} \let\oldbackmatter\backmatter \renewcommand{\backmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \pagestyle{plainer}% \oldbackmatter} diff --git a/sutta_publisher/src/sutta_publisher/templates/tex/individual/vinaya-6.tex b/sutta_publisher/src/sutta_publisher/templates/tex/individual/vinaya-6.tex index 0608956..85d9024 100644 --- a/sutta_publisher/src/sutta_publisher/templates/tex/individual/vinaya-6.tex +++ b/sutta_publisher/src/sutta_publisher/templates/tex/individual/vinaya-6.tex @@ -6,19 +6,19 @@ \let\oldfrontmatter\frontmatter \renewcommand{\frontmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \oldfrontmatter} \let\oldmainmatter\mainmatter \renewcommand{\mainmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \oldmainmatter} \let\oldbackmatter\backmatter \renewcommand{\backmatter}{% \chapterfont{\setstretch{.85}\normalfont\centering}% -\sectionfont{\setstretch{.85}\normalfont}% +\sectionfont{\setstretch{.85}\normalfont\BalancedRagged}% \pagestyle{plainer}% \oldbackmatter} diff --git a/sutta_publisher/src/sutta_publisher/templates/tex/shared/preamble-template.tex b/sutta_publisher/src/sutta_publisher/templates/tex/shared/preamble-template.tex index 5673bb7..5bbce13 100644 --- a/sutta_publisher/src/sutta_publisher/templates/tex/shared/preamble-template.tex +++ b/sutta_publisher/src/sutta_publisher/templates/tex/shared/preamble-template.tex @@ -1,3 +1,4 @@ +\usepackage{ragged2e} \usepackage{verse} \usepackage[a-3u]{pdfx} \usepackage[inner=1in, outer=1in, top=.7in, bottom=1in, papersize={6in,9in}, headheight=13pt]{geometry} @@ -21,6 +22,15 @@ \usepackage{relsize} \usepackage{etoolbox} +% improve ragged right headings by suppressing hyphenation and orphans. spaceskip plus and minus adjust interword spacing; increase rightskip stretch to make it want to push a word on the first line(s) to the next line; reduce parfillskip stretch to make line length more equal . spacefillskip and xspacefillskip can be deleted to use defaults. +\protected\def\BalancedRagged{ +\leftskip 0pt +\rightskip 0pt plus 10em +\spaceskip=1\fontdimen2\font plus .5\fontdimen3\font minus 1.5\fontdimen4\font +\xspaceskip=1\fontdimen2\font plus 1\fontdimen3\font minus 1\fontdimen4\font +\parfillskip 0pt plus 15em +\relax +} \hypersetup{ colorlinks=true, @@ -179,8 +189,8 @@ % style headings with secsty. chapter and section are defined per-edition \partfont{\setstretch{.85}\normalfont\centering\textsc} -\subsectionfont{\setstretch{.85}\normalfont}% -\subsubsectionfont{\setstretch{.85}\normalfont\itshape} +\subsectionfont{\setstretch{.95}\normalfont\BalancedRagged}% +\subsubsectionfont{\setstretch{1}\normalfont\itshape\BalancedRagged} % style elements of suttatitle \newcommand*{\suttatitleacronym}[1]{\smaller[2]{#1}\vspace*{.3em}} @@ -255,21 +265,20 @@ \newsavebox\IBox % custom commands for html styling classes -\newcommand*{\scnamo}[1]{\begin{center}\textit{#1}\end{center}} -\newcommand*{\scendsection}[1]{\begin{center}\begin{small}\textit{#1}\end{small}\end{center}} -\newcommand*{\scendsutta}[1]{\begin{center}\textit{#1}\end{center}} -\newcommand*{\scendbook}[1]{\bigskip\begin{center}\uppercase{#1}\end{center}} -\newcommand*{\scendkanda}[1]{\begin{center}\textbf{#1}\end{center}} % use for ending vinaya rule sections and also samyuttas % -\newcommand*{\scend}[1]{\begin{center}\begin{small}\textit{#1}\end{small}\end{center}} -\newcommand*{\scendvagga}[1]{\begin{center}\textbf{#1}\end{center}} +\newcommand*{\scnamo}[1]{\begin{Center}\textit{#1}\end{Center}\bigskip} +\newcommand*{\scendsection}[1]{\begin{Center}\begin{small}\textit{#1}\end{small}\end{Center}\addvspace{1em}} +\newcommand*{\scendsutta}[1]{\begin{Center}\textit{#1}\end{Center}\addvspace{1em}} +\newcommand*{\scendbook}[1]{\bigskip\begin{Center}\uppercase{#1}\end{Center}\addvspace{1em}} +\newcommand*{\scendkanda}[1]{\begin{Center}\textbf{#1}\end{Center}\addvspace{1em}} % use for ending vinaya rule sections and also samyuttas % +\newcommand*{\scend}[1]{\begin{Center}\begin{small}\textit{#1}\end{small}\end{Center}\addvspace{1em}} +\newcommand*{\scendvagga}[1]{\begin{Center}\textbf{#1}\end{Center}\addvspace{1em}} \newcommand*{\scrule}[1]{\textsb{#1}} \newcommand*{\scadd}[1]{\textit{#1}} \newcommand*{\scevam}[1]{\textsc{#1}} \newcommand*{\scspeaker}[1]{\hspace{2em}\textit{#1}} \newcommand*{\scbyline}[1]{\begin{flushright}\textit{#1}\end{flushright}\bigskip} \newcommand*{\scexpansioninstructions}[1]{\begin{small}\textit{#1}\end{small}} - -\newcommand*{\scuddanaintro}[1]{\medskip\noindent\begin{footnotesize}\textit{#1}\end{footnotesize}} +\newcommand*{\scuddanaintro}[1]{\medskip\noindent\begin{footnotesize}\textit{#1}\end{footnotesize}\smallskip} \newenvironment{scuddana}{% \setlength{\stanzaskip}{.5\baselineskip}%