meluso / UMich_Dissertation_Template

University of Michigan Rackham Graduate School Dissertation Template (unofficial)
https://www.overleaf.com/latex/templates/university-of-michigan-dissertation-and-thesis-template-unofficial/tpnjzndnrzmf
Creative Commons Zero v1.0 Universal
44 stars 16 forks source link

[FEATURE] URLs aren't line-breaking #18

Open bryant1410 opened 3 months ago

bryant1410 commented 3 months ago

Describe the bug

The recently introduced package "href-ul" uses ulem's uline, which doesn't support line-breaking. It makes the URL to overflow the page.

To Reproduce

Enter a long enough URL:

\url{https://www.google.com/search?as_q=this+is+an+example+or+a+long+url&as_nlo=123&as_nhi=456&lr=lang_hu&cr=countryAD&as_qdr=m&as_sitesearch=stackoverflow.com&as_occt=title&safe=active&tbs=rl%3A1%2Crls%3A0&as_filetype=xls&as_rights=(cc_publicdomain%7Ccc_attribute%7Ccc_sharealike%7Ccc_nonderived).-(cc_noncommercial)&gws_rd=ssl}

Expected behavior

The URL should line-break.

bryant1410 commented 3 months ago

I have tried using soul's ul instead but seems not trivial. I also tried with this soul patch but I didn't get it to work with \url (it did for \href), and it also changed the format of the \ref{...} and \cite{...}.

meluso commented 3 months ago

Thanks Santiago. With the fix I put in, I recommended using href with text in place of the long URL. I understand that may not be ideal in a few narrow cases, but it meets the intent of Rackham's new changes toward making dissertations more accessible. I'd suggest using href with some shorter stand-in text (e.g. \href{https://www.MySuperDuperLongLinkWouldBe.Here}{some text}) for the mean time.

As this isn't technically broken at this point, I'm going to switch this from bug to enhancement now. Thanks for your interest though! Do let me know if you find a way to do what you want.