2

Problem Description

I am a newbie. I use microtype package. I would like to set the minimum width of a space to a width of a regular space. However, with default settings, it is shrinked too much and I think it makes the text less readable.

Minimal Working Example

%%%%%  Preamble  %%%%%
\documentclass[10pt]{book}
% \usepackage[a4paper]{geometry}
\usepackage[
    paperheight=7cm,
    paperwidth=21cm,
    top=1in,
    bottom=1in,
    right=1in,
    left=1in,
    portrait]{geometry}

\usepackage[slovak]{babel}
\usepackage{microtype}
\usepackage{xcolor}

% Font family
\usepackage[math-style=ISO, bold-style=ISO, partial=upright, nabla=upright]{unicode-math}
\setmainfont{Libertinus Serif}

% Paragraph and line settings
\setlength{\parindent}{0em}           % Set paragraph indentation
\setlength{\parskip}{0.08in}          % Paragraph spacing
\renewcommand{\baselinestretch}{1.0}  % Line \expandafter\selectlanguage\expandafter{\cvlang}

% Custom commands
\newcommand{\paragraphStyle}[1]{%
    \par
    \begingroup
        \setlength{\parindent}{0pt}%
        \setlength{\parskip}{0.16in}%
        \renewcommand{\baselinestretch}{1.0}%
        \fontsize{20pt}{24pt}\selectfont
        \noindent\color{black!100}%
        \bfseries\ignorespaces #1\par
    \endgroup
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}
    \pagestyle{empty}
    \paragraphStyle{
        Pripomenieme si Pánovo zmŕtvychvstanie, budeme počúvať
    }
\end{document}

Output

output

2 Answers2

4

enter image description here

\documentclass[10pt]{book}
% \usepackage[a4paper]{geometry}
\usepackage[
    paperheight=7cm,
    paperwidth=21cm,
    top=1in,
    bottom=1in,
    right=1in,
    left=1in,
    portrait]{geometry}

\usepackage[slovak]{babel}
\usepackage{microtype}
\usepackage{xcolor}

% Font family
\usepackage[math-style=ISO, bold-style=ISO, partial=upright, nabla=upright]{unicode-math}
\setmainfont{Libertinus Serif}

% Paragraph and line settings
\setlength{\parindent}{0em}           % Set paragraph indentation
\setlength{\parskip}{0.08in}          % Paragraph spacing
\renewcommand{\baselinestretch}{1.0}  % Line \expandafter\selectlanguage\expandafter{\cvlang}

% Custom commands
\newcommand{\paragraphStyle}[1]{%
    \par
    \begingroup
        \setlength{\parindent}{0pt}%
        \setlength{\parskip}{0.16in}%
        \setlength\spaceskip{12pt plus 2pt minus 2pt }% word space
        \setlength\xspaceskip{14pt plus 4pt minus 2pt }% end of sentence space
        \renewcommand{\baselinestretch}{1.0}%
        \fontsize{20pt}{24pt}\selectfont
        \noindent\color{black!100}%
        \bfseries\ignorespaces #1\par
    \endgroup
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}
    \pagestyle{empty}
    \paragraphStyle{
        Pripomenieme si Pánovo zmŕtvychvstanie, budeme počúvať
    }
\end{document}
David Carlisle
  • 757,742
4

You can use the WordSpace option to adjust the space. The value is a scale factor (3 is too much and only used for the demo here). It is also possible to adjust the stretch and shrink value individually, see the documentation of fontspec.

\documentclass[10pt]{book}

\usepackage[slovak]{babel}
\usepackage{microtype}
\usepackage{xcolor}

% Font family
\usepackage[math-style=ISO, bold-style=ISO, partial=upright, nabla=upright]{unicode-math}
\setmainfont{Libertinus Serif}[WordSpace={3}]
\begin{document}

        Pripomenieme si Pánovo zmŕtvychvstanie, budeme počúvať

\end{document}

enter image description here

Ulrike Fischer
  • 327,261