1

How to avoid the extra spaces in latex document, here i am facing the spacing from . to Kadokave, i am writing a large number of such texts assuming it may happen in some other lines also. Here is my MWE

 \documentclass[twoside,letterpaper,11pt,openany]{book}

 \usepackage[margin=1.5cm]{geometry}
 \usepackage[T1]{fontenc}
 \usepackage{titletoc} %%% Table of contents 
 \usepackage{ebgaramond}
 \usepackage{lipsum}
 \usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
 \usepackage{paracol}
 \usepackage{microtype}
 \usepackage{graphicx}
 \usepackage{fancyhdr}
   \pagestyle{fancy}
   \fancyhf{}
   \fancyhead[RO,LE]{\rightmark}
   \fancyhead[LE,RO]{\leftmark} %% display chapter in header
   \renewcommand{\headrulewidth}{.5pt}
   \fancyhead[C]{\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, unicode]{hyperref}


 \makeatletter
 \newcommand\versenumcolor{red}
  \newcommand\chapnumcolor{red}
  \renewcommand\paragraph{%
    \@startsection{paragraph}{4}{\z@}%
            {.25ex \@plus.25ex \@minus.1ex}%
            {-.5em}%
            {\normalfont\normalsize\bfseries\color{\versenumcolor}}}%
  \newlength{\biblechapskip}
  \setlength{\biblechapskip}{1em plus .33em minus .2em}
 \newcounter{biblechapter}
 \newcounter{bibleverse}[biblechapter]
 \renewcommand\chaptername{Book}
 \let\ltx@chapter=\chapter
 \let\ltx@paragraph=\paragraph
 \newcommand{\book}[1]{%
  \gdef\currbook{#1}
  \ltx@chapter{#1}}
 \newcount\biblechap@svdopt
 \newenvironment{biblechapter}[1][\thebiblechapter]
  {\biblechap@svdopt=#1
  \ifnum\c@biblechapter=\biblechap@svdopt\else
\advance\biblechap@svdopt by -1\fi
  \setcounter{biblechapter}{\the\biblechap@svdopt}
   \refstepcounter{biblechapter}
   \lettrine{\color{\chapnumcolor}\lower-6pt\hbox{\thebiblechapter}}{}\ignorespaces}
   {\vspace{\biblechapskip}}
  \renewcommand{\verse}[1][\thebibleverse]{%
  \refstepcounter{bibleverse}
  \markright{{\scshape\currbook} \thebiblechapter:\thebibleverse}
  \ifnum\c@bibleverse=1\else
  \ltx@paragraph*{#1}\fi}%
  \makeatother

 \newcounter{jChapter}
 \newcommand{\jChapter}[1]{
 \noindent\scalebox{2.5}{\color{red}\textbf{#1}\hspace{0.3mm}}
 \setcounter{jChapter}{#1}
 }  
 \newcommand{\jverse}[1]{\noindent\textcolor{cyan}{\scalebox{1.0}{\textbf{#1\hspace{1.0mm}}}}\markboth{\scshape\currbook\ \thejChapter : #1}{} }
\newcommand{\story}[1]{\vfill\centering\it\textbf{#1}}



 \title{Tanslation}
 \date{}
 \author{}
 \usepackage{lipsum}
 \usepackage{ragged2e}
 \newcommand{\BookLine}{ \centering\noindent\rule{19cm}{1pt}}
 \newcommand{\BookNote}[1]{{\begin{center} \textbf{KEPACHINI} \justify

  #1
 \end{center}
 \BookLine
 \vspace{2mm}
 }}

 \newcommand{\ParallelLText}[2]{\begin{paracol}{2}\sloppy \switchcolumn[0]\noindent  #1 \switchcolumn[1]\noindent #2 \end{paracol}}

 \usepackage[perpage]{footmisc} %%% To restart footnote numbering on every new pages


 \usepackage{multicol,etoolbox}


 \setcounter{tocdepth}{2} %set depth of printed table of contets.

 \makeatletter


 \patchcmd{\l@section}
   {\hfil}
   {\leaders\hbox{\normalfont$\m@th\mkern \@dotsep mu\hbox{.}\mkern \@dotsep     mu$}\hfill}
   {}{}

 \renewcommand\tableofcontents{%
    \begin{multicols}{2}[\section*{\contentsname
    \@mkboth{%
       \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}]%
     \printlist{toc}{}{}
     \thispagestyle{empty}
     \end{multicols}%
     }

 \makeatother %print dots in sections in toc.



 \begin{document}
 \renewcommand{\thefootnote}{\emph{\alph{footnote}}}
 \frontmatter
 \maketitle
 {\setlength{\columnsep}{130pt}
 \renewcommand{\contentsname}{\hfill\Huge Kechejok Barim\hfill~\\[2.5ex] }
 \startlist{toc}
 \hypersetup{linkcolor=blue}
 \tableofcontents
 }
 \mainmatter

 {\pagenumbering{gobble}
 \part*{\scshape Kechejok Barim}
 }
 \pagenumbering{arabic}  
  \setlength{\columnseprule}{.5pt}
 \setcounter{page}{1}

 \setlength{\columnseprule}{0pt}

 \clearpage
 \setcounter{page}{1}


 {\pagestyle{empty}
 {\pagenumbering{gobble}
 \part*{\scshape Kechejok Kemi}
 }

 \frontmatter
 \setlength{\columnsep}{130pt}
 \renewcommand{\contentsname}{\hfill\Huge Kechejok Kemi\hfill~\\[2.0em]}
 \startlist{toc}
  \hypersetup{linkcolor=blue}
 \tableofcontents

 \mainmatter
 }


 \setlength{\columnseprule}{.5pt}
 \book{KK}  
 \ParallelLText{\jverse{43}Kadokave atum Arnam ajakong pen apot manghuhak-lo. Kadokave atum Jisu keklembom akam aphan kemanghuphrong ahut alangli asangho atum aphan pulo.  }{\jverse{43}And all were astounded at the greatness of God. While everyone was amazed at all that he was doing, he said to his disciples, }
 \end{document}

enter image description here

Biki Teron
  • 3,275
  • 1
    Please make your MWE really MWE (Minimal Working Example). Remove from preamble all what is not related to your problem (as page headers etc). – Zarko Jun 22 '19 at 19:37
  • I am using all the packages which are in preamble, so i have to find the the commands or packages which compatible with my preamble, so i posted without reducing my preamble. @Zarko – Biki Teron Jun 22 '19 at 19:45
  • 2
    Do all this packages relevant to your problem? If you say so ... but to me most of them is simple clutter for an MWE ... – Zarko Jun 22 '19 at 19:49
  • To force all spaces, including the ones after punctuation, to be the same size, specify \frenchspacing in your preamble. However, in the example shown, a better approach would probably be to specify some additional hyphenation points in the word "kemanghuphrong". If there are no hyphenation patterns defined for this language, the best option is to look through the output, determine what words can best benefit from hyphenation and add a \hyphenation list to the preamble. The question https://tex.stackexchange.com/q/37934/579 may help (not sure). – barbara beeton Jun 22 '19 at 20:06
  • Is the “left text” in Indonesian? You should use babel for it. – egreg Jun 22 '19 at 21:39
  • Thank you so much its working, left teft texts is not in Indonessia, its in Karbi Language, what will be the reason for this problem? if someone could explain better in solution @egreg – Biki Teron Jun 23 '19 at 04:07
  • @BikiTeron I don't think that hyphenation patterns for Karbi are available. With your code, English patterns are used and apparently they don't succeed in finding hyphenation points, which would probably be wrong in most cases anyway. – egreg Jun 23 '19 at 07:53
  • What is the best possible way to type unknown language in LaTeX @egreg – Biki Teron Jun 23 '19 at 11:34
  • @BikiTeron Find a supported language whose hyphenation patterns are similar. Otherwise you have to resort to manual hyphenation. – egreg Jun 23 '19 at 13:03
  • Can I get any tutorial regarding to make custom language for hyphenation pattern @egreg – Biki Teron Jun 23 '19 at 13:07

0 Answers0