1

Currently I am facing a problem of hyphenation when i used the package \usepackage{ebgaramond}, but when i remove this package (i.e \usepackage{ebgaramond}) hyphenation goes fine, but i need the text font style which is creating in \usepackage{ebgaramond} here is my MWE

\documentclass[twoside,letterpaper,11pt]{book}
\usepackage{ebgaramond}
\usepackage[margin=1.5cm]{geometry}
\usepackage[T1]{fontenc}

\usepackage{lipsum}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}


\usepackage{parallel,graphicx}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[RO,LE]{\rightmark}
\renewcommand{\headrulewidth}{.5pt}
\fancyhead[LO,RE]{\thepage} %% To display numbering on every page alternately left and right

\setlength{\headwidth}{\textwidth}
\setlength{\headheight}{15pt}
\setlength{\headsep}{0pt}
\setlength{\columnseprule}{0pt}

\usepackage[colorlinks]{hyperref}

\newcommand{\jChapter}[1]{\noindent\scalebox{2.5}{\color{red}\textbf{#1}\hspace{0.3mm}}}
\newcommand{\jverse}[1]{\noindent\textcolor{cyan}{\scalebox{1.0}{\textbf{#1\hspace{1.0mm}}}}}
\newcommand{\story}[1]{\vspace*{2mm}\centering\it\textbf{#1}}


\newcommand\versenumcolor{red}
\newcommand\chapnumcolor{red}


\title{Karbi}
\date{}
\author{}
\usepackage{lipsum}
\usepackage{ragged2e}

\begin{document}
\renewcommand{\thefootnote}{\emph{\alph{footnote}}}
\frontmatter
\maketitle
\tableofcontents

\mainmatter


\part*{The Old Testament}
  \setlength{\columnseprule}{.5pt}
\twocolumn
\begin{Parallel}{9.1cm}{9.1cm}
{\jChapter{10}While the Israelites were camped in Gilgal they kept passover the in the evening on the fourteenth day of the month in the plains of Jericho. }
{\jverse{11}On the day after the passover, on that very day, they ate the produce of the land, unleavened cakes and parched grain. }
{\jverse{12}The manna ceased on the day they ate the produce of the land, and the Israelites no longer had manna; they ate the crops of the land of Canaan that year. }
\end{Parallel}

\end{document}

below is the image when i used \usepackage{ebgaramond} enter image description here

When i donot use the package \usepackage{ebgaramond} here is the output enter image description here

7
  • 3
    This is a just a case of bad luck and a word that won't hyphenate according to the usual rules. You can manage this either by adding \hyphenation{pass-over} in the preamble, or by adding a discretionary hyphen in the word itself: pass\-over. I maintain the hyphenation exception list, and will add this word. Jun 13 '19 at 19:03
  • This can be possible only if there is a few text but i have thounsands of thousand text, so it will difficult for me type like this \hyphenation{pass-over} @barbarabeeton
    – Biki Teron
    Jun 13 '19 at 19:17
  • It looks like ebgaramond sets tighter than, for example, computer modern. However, this can potentially happen with any font. Since it seems you are using the default U.S. hyphenation patterns, you might take a look at ushyphex Jun 13 '19 at 20:07
  • 1
    @BikiTeron You need \hyphenation{pass-over} just once in the document preamble.
    – egreg
    Jun 13 '19 at 22:42
  • Will it work for another word also because my text is just a problem of type, the word may not be passover, iwant generalize to split the word automatically. @egreg
    – Biki Teron
    Jun 13 '19 at 22:48
3

Somehow, “passover” slips through the hyphenation patterns for American English.

You can declare a hyphenation exception, by adding \hyphenation{pass-over} in the preamble.

\documentclass[twoside,letterpaper,11pt]{book}
\usepackage{ebgaramond}
\usepackage[margin=1.5cm]{geometry}
\usepackage[T1]{fontenc}

\usepackage{lipsum}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}


\usepackage{parallel,graphicx}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[RO,LE]{\rightmark}
\renewcommand{\headrulewidth}{.5pt}
\fancyhead[LO,RE]{\thepage} %% To display numbering on every page alternately left and right

\setlength{\headwidth}{\textwidth}
\setlength{\headheight}{15pt}
\setlength{\headsep}{0pt}
\setlength{\columnseprule}{0pt}

\usepackage[colorlinks]{hyperref}

\newcommand{\jChapter}[1]{\noindent\scalebox{2.5}{\color{red}\textbf{#1}\hspace{0.3mm}}}
\newcommand{\jverse}[1]{\noindent\textcolor{cyan}{\scalebox{1.0}{\textbf{#1\hspace{1.0mm}}}}}
\newcommand{\story}[1]{\vspace*{2mm}\centering\itshape\bfseries#1}


\newcommand\versenumcolor{red}
\newcommand\chapnumcolor{red}

% hyphenation exceptions
\hyphenation{
  pass-over
  % other words you need (the following are just by way of example)
  anti-deriv-a-tives
  anti-holo-mor-phic
 }


\title{Karbi}
\date{}
\author{}
\usepackage{lipsum}
\usepackage{ragged2e}

\begin{document}
\renewcommand{\thefootnote}{\emph{\alph{footnote}}}
\frontmatter
\maketitle
\tableofcontents

\mainmatter


\part*{The Old Testament}
  \setlength{\columnseprule}{.5pt}
\twocolumn
\begin{Parallel}{9.1cm}{9.1cm}
{\jChapter{10}While the Israelites were camped in Gilgal they kept passover the in the evening on the fourteenth day of the month in the plains of Jericho. }
{\jverse{11}On the day after the passover, on that very day, they ate the produce of the land, unleavened cakes and parched grain. }
{\jverse{12}The manna ceased on the day they ate the produce of the land, and the Israelites no longer had manna; they ate the crops of the land of Canaan that year. }
\end{Parallel}

\end{document}

Note that you just type passover in the text. Add other problematic words, should the need arise. You can also add

\input{ushyphex}

just before \hyphenation, so to load all the known exceptions.

I changed \it into \itshape (the command \it has been deprecated for more than 20 years).

enter image description here

7
  • It is just like a manually kind of things, I have a thousands of thousands text this will be very difficult to write down all the problematics words, is there any other solution? @egreg
    – Biki Teron
    Jun 13 '19 at 23:12
  • @BikiTeron Why moaning before trying? Chances are good that just a few exceptions will be needed.
    – egreg
    Jun 13 '19 at 23:14
  • I have checked , it shows problem for other words also. what will be reason for not hyphenating automaticaly by LaTeX. @egreg
    – Biki Teron
    Jun 13 '19 at 23:16
  • @BikiTeron And the number of words is? Sorry, but this is going nowhere. TeX knows rules to hyphenate correctly the more common English words. It hasn't gobbled a dictionary of hyphenation points, but uses an algorithm that is very efficient at the expense, for languages like English, of not being able to find all correct hyphenation points.
    – egreg
    Jun 14 '19 at 6:22
  • But the text which i have is an English language only,so please let me know where i am doing mistake. @egreg
    – Biki Teron
    Jun 14 '19 at 6:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.