TransWikia.com

Why are my columns colliding with package paracol?

TeX - LaTeX Asked by Dustin Nieffenegger on January 31, 2021

I am trying to use the package paracol to display the same biblical verses in several languages. Why are my two columns colliding and how can I prevent this? Also, as a secondary question, I am using the TeXstudio application; why are the end{nthcolumn*} and end{nthcolumn} commands showing as “unrecognized command”? The source compiles regardless. I have enabled paracol.cwl in the Completion configuration. I am not very skilled with Xetex yet so please explain as simply as you can. Here is my source code:

documentclass{book}
usepackage{fontspec}
usepackage{paracol}

newcommand{omission}{hspace{6pt}$cdots$hspace{6pt}}
newcommand{at}{,·enspace} % Greek ano teleia
newcommand{setcoptic}{noindentsetmainfont{Antinoou}}
newcommand{setgreek}{noindentsetmainfont{GFS Porson}}

begin{document}
begin{Large}

begin{paracol}{2}

    begin{column}
    setcoptic
    omission ⲉⲅⲛⲱ⳯ omission ⲉⲛ ⲧⲟomission ⲟⲩⲧⲟatomission ⲡⲏⲅⲅⲉⲓomission ⲉ ⲉⲅⲟomission ⲥⲏomission
    end{column}

    begin{column}
    setgreek
    καὶ εἶπεν αὐτῷ Ἀβιμέλεχ Οὐκ ἔγνων τίς ἐποίησεν τὸ πρᾶγμα τοῦτοat οὐδὲ σύ μοι ἀπήγγειλας, οὐδὲ ἐγὼ ἤκουσα ἀλλὰ σήμερον.
    end{column}

    begin{nthcolumn*}{0}
    verse 27 goes here
    end{nthcolumn*}

    begin{nthcolumn}{1}
    verse 27 goes here
    end{nthcolumn}

end{paracol}

end{Large}
end{document}

3 Answers

After reading through the paracol documentation further, I found that setting setcolumnwidth{30pt,30pt} fixed my collision issue. I am not sure if this is the most proper answer and still welcome other answers or an explanation of why this works.

Answered by Dustin Nieffenegger on January 31, 2021

Your problem is just standard overfull lines when typesetting in a narrow column. If LaTeX can't find how to break a paragraph into lines with high quality, it gives up, outputs a bad line, and displays a warning about it. You don't need to set extra-wide column separation, but instead use the common techniques to permit good line-breaking in paragraphs.

  • Ensure hyphenation patterns are loaded for your languages, and do select the language in the text -- don't just switch font. I have my doubts about hyphenating ancient coptic.
  • Pay attention to "Overfull hbox" warnings in the log file. If they're hard to track down, declare setlengthoverfullrule{5pt} to flag the locations in the typeset output. (Remove it for final typesetting.)
  • Maybe declare sloppy to allow line breaks that are typically unacceptable. Then LaTeX will give warnings about the lines that are ridiculously stretched out.
  • Allow more flexibility in lines. Like with your omission macro, add flexibility to the spacing: newcommand{omission}{hspace{6ptplus3ptminus3pt}$cdots$hspace{6ptplus3ptminus3pt}}
  • Don't force flush margins if the text has trouble fitting. Try
    • raggedrightfor the most ragged appearance
    • RaggedRight using the ragged2e package for less raggedness
    • setlengthrightskip{0pt plus 8pt} for some raggedness without packages.

Answered by Donald Arseneau on January 31, 2021

You can modify the separation between columns modifying the following parameter:

setlength{columnsep}{20pt}

And this part fixes the justification issue with columns flowing over:

tolerance=1
emergencystretch=maxdimen
hyphenpenalty=10000
hbadness=10000

Answered by Carlos José Díaz Baso on January 31, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP