0

I'm very new to LaTeX, apologies if this question is silly.

I'm trying to make my document such that it has minimal hyphenation caused by linebreaks. Instead I would like each line to be stretched to fill the entire column width, if necessary. I tried what this answer suggested, but setting \emergencystretch to any value didn't have any effect at all when using the AltaCV document class; below is the output of my MWE:

Output of MWE using AltaCV document class

The strange thing is if I use \documentclass{article} instead of \documentclass[10pt,a4paper,withhyper]{altacv}, it outputs the desired result (i.e. no "ragged" edges):

Desired output, obtained using documentclass{article}

My question: How do I obtain the desired result (2nd pic) while using the AltaCV class?

Setup:

  • lualatex with latexmk, Win10
  • altacv.cls file in same directory as main.tex; no other file required for MWE.
  • MWE in main.tex:
\documentclass[10pt,a4paper,withhyper, ragged2e]{altacv}
% \documentclass{article}

\usepackage{paracol}

\tolerance=1000 \emergencystretch=\maxdimen \hyphenpenalty=10000

\begin{document}

\columnratio{0.4} \begin{paracol}{2}

lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor incididunt ut labore et dolore magna aliqua ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo

\begin{itemize} \item lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor incididunt ut labore et dolore magna aliqua ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo \end{itemize} \switchcolumn lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor incididunt ut labore et dolore magna aliqua ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo \end{paracol} \end{document}

1 Answers1

0

The whole class is designed for ragged right setting. It is probably better to choose a different class if you want a justified design,

However \raggedright is used in multiple places in the class file, you could remove them from your copy of the class file, or globally disable it via a definition such as \let\raggedright\relax for example.

David Carlisle
  • 757,742