There have been already several questions on this point, but still I could not find what I am looking for. I am working with book class and compiling tex file with LuaLaTeX engine. The packages babel
, fontspec
are also loaded. I am looking for
- Justification of paragraph text like in Microsoft word. The lengthier space between words is okay like it is done in Microsoft word.
- No hyphenation for entire content of the book.
- Uniform spacing between sections, subsections, paragraphs etc.
What I have tried so far is this.
Setting
\hyphenpenalty
to 1000. It causes extra white-space between sections, subsections, paragraphs etc.\usepackage[none]{hyphenat}
This causes words going out of margins. I am using geometry package with custom margins.\usepackage[none]{hyphenat}
with\sloppy
macro. It causes extra white-space between sections, subsections, paragraphs etc.\usepackage[english=nohyphenation]{hyphsubst}
also does not work.
The following is the MWE. The overleaf link.
\documentclass[fontsize=12bp,twoside,a4paper]{book}
\usepackage{fontspec,blindtext,setspace,scrextend,longtable,booktabs}
\hyphenpenalty=10000
\usepackage[hmargin=2.54cm,vmargin=2.54cm]{geometry}
\setmainfont{Times New Roman}
\setstretch{1.42}
\begin{document}
\chapter{Test}
some text some text some text
\begin{longtable}{ccp{12cm}}
\toprule[1.2pt]
\textbf{A} & \textbf{B} & \textbf{C} \\
\midrule
a & b & \blindtext \\ \midrule
a & b & \blindtext \\
\bottomrule[1.5pt]
\caption{Some Caption}
\label{tbl:sometbl}
\end{longtable}
\blindtext[2]
\subsection{Some Section} \blindtext
\subsection{Some Section} \blindtext
\end{document}
I have also attached the screenshot of some part of second page. I understand the fact that it may not be in the spirit of LaTeX to do some ugly formatting. However, sometimes we have these requirements posed by the institute or some journal. The problem is to have justified text in paragraph like Microsoft word and no hyphenation. Any help would be quite helpful. Thank You.