0

Backed by several questions' answers, I was able to remove several warnings from my enumeration quote box, except this warning:

test.tex:41: Underfull \hbox (badness 2913) in paragraph at lines 41--42 Underfull \hbox (badness 2913) in paragraph at lines 41--42 []\T1/cmr/m/n/12 Google []$\T1/cmtt/m/n/12 http : / / directory . google . com / Top / Computers / Programming / 

This is how I compile it latexmk -pdf -pdflatex="pdflatex -interaction=nonstopmode" -use-make test.tex with MikTex version:

pdflatex --version MiKTeX-pdfTeX (MiKTeX 2.9.6300) using bzip2 version 1.0.6, 6-Sept-2010 compiled with curl version 7.53.1; using libcurl/7.53.1 WinSSL compiled with expat version 2.2; using expat_2.2.0 compiled with jpeg version 9.2 compiled with liblzma version 50020032; using 50020032 compiled with libpng version 1.6.29; using 1.6.29 compiled with libressl version LibreSSL 2.4.5; using LibreSSL 2.4.5 compiled with MiKTeX Application Framework version 1.6300; using 1.6300 compiled with MiKTeX Core version 1.6300; using 1.6300 compiled with MiKTeX Archive Extractor version 1.6300; using 1.6300 compiled with MiKTeX Package Manager version 1.6300; using 1.6300 compiled with poppler version 0.53.0 compiled with uriparser version 0.8.4 compiled with zlib version 1.2.11; using 1.2.11 

This is the minimal code:

\documentclass[12pt]{article} \usepackage[T1]{fontenc} \usepackage[brazil]{babel} \usepackage[a4paper, margin=2cm]{geometry} \usepackage[utf8]{inputenc} \usepackage{array,ragged2e} \usepackage[shortlabels]{enumitem} % Change background color for text block % https://tex.stackexchange.com/questions/238294/change-background-color-for-text-block \usepackage{framed} \usepackage[most]{tcolorbox} \definecolor{shadecolor}{RGB}{219, 229, 241} \newtcolorbox{myquote}{ colback=shadecolor, grow to right by=-2mm, grow to left by=-2mm, boxrule=0pt, boxsep=0pt, breakable } % https://tex.stackexchange.com/questions/3033/forcing-linebreaks-in-url \PassOptionsToPackage{hyphens}{url}\usepackage{hyperref} % https://tex.stackexchange.com/questions/261776/how-to-avoid-overfull-error-with-url-package \Urlmuskip=0mu plus 2mu \begin{document} \begin{myquote} \begin{enumerate}[nolistsep,leftmargin=*] \sloppy \item {\RaggedRight Free \url{http://members.magnet.at/johann.langhofer/products/jxbeauty/overview.html} (has JBuilder support) } \item {\RaggedRight Google \url{http://directory.google.com/Top/Computers/Programming/Languages/Java/Development_Tools/Code_Beautifiers/?tc=1} } \end{enumerate} \end{myquote} \end{document} 

This is how the PDF looks like:

enter image description here

1 Answer 1

3

Your \RaggedRight usage is wrong (so it did nothing) you want

enter image description here

\documentclass[12pt]{article} \usepackage[T1]{fontenc} \usepackage[brazil]{babel} \usepackage[a4paper, margin=2cm]{geometry} \usepackage[utf8]{inputenc} \usepackage{array,ragged2e} \usepackage[shortlabels]{enumitem} % Change background color for text block % https://tex.stackexchange.com/questions/238294/change-background-color-for-text-block \usepackage{framed} \usepackage[most]{tcolorbox} \definecolor{shadecolor}{RGB}{219, 229, 241} \newtcolorbox{myquote}{ colback=shadecolor, grow to right by=-2mm, grow to left by=-2mm, boxrule=0pt, boxsep=0pt, breakable } % https://tex.stackexchange.com/questions/3033/forcing-linebreaks-in-url \PassOptionsToPackage{hyphens}{url}\usepackage{hyperref} % https://tex.stackexchange.com/questions/261776/how-to-avoid-overfull-error-with-url-package \Urlmuskip=0mu plus 2mu \begin{document} \begin{myquote}\RaggedRight \begin{enumerate}[nolistsep,leftmargin=*] \sloppy \item Free \url{http://members.magnet.at/johann.langhofer/products/jxbeauty/overview.html} (has JBuilder support) \item Google \url{http://directory.google.com/Top/Computers/Programming/Languages/Java/Development_Tools/Code_Beautifiers/?tc=1} \end{enumerate} \end{myquote} \end{document} 

As you had it, you were finishing the group before the end of the paragraph, so all the ragged settings were reverted and the paragraph was set fully justified using the default settings.

2
  • Thanks! Do you think it is also possible to remove/shrink the trailing box on the link line breaking? Example: i.imgur.com/FPB6ou1.png Commented Apr 26, 2017 at 14:14
  • Offtopic: The spaces around those .s and /s in the URLs are really ugly; is it just the font's fault? Wonder if there's a question about this somewhere on the site… Commented Apr 26, 2017 at 19:20

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.