LaTeX forum ⇒ LyXpdflatex - hyperlink seems to extend too long across the page Topic is solved

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
pread
Posts: 9
Joined: Thu Jun 21, 2018 11:11 pm

pdflatex - hyperlink seems to extend too long across the page

Postby pread » Fri Jun 22, 2018 12:12 am

OS: Kubuntu 18.04
Lyx 2.2.3
Class: Article

I was testing adding a hyperlink in but when it outputs to pdf, it extends way too long across to the right of the page (see pic below). I tried inserting the same hyperlink to the 'text' field but it doesn't make a difference, it doesn't break it down to the next line.

Pic: https://imgur.com/a/2sUsKvX (the orange lines is my attempt to show the approx. margins)

Thanks in advance, let me know if I've missed anything.
LyX beginner - just using it for personal documentation, I'm not even in academia nor programming

User avatar
Johannes_B
Site Moderator
Posts: 3883
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Fri Jun 22, 2018 6:55 am

I don't see the picture. Please upload it to the forum as an attachment.

For URLs, you should use the url package.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

pread
Posts: 9
Joined: Thu Jun 21, 2018 11:11 pm

Postby pread » Fri Jun 22, 2018 11:19 am

Johannes_B wrote:I don't see the picture. Please upload it to the forum as an attachment.

For URLs, you should use the url package.


The picture is a link, can you try clicking again or viewing on a different browser?
LyX beginner - just using it for personal documentation, I'm not even in academia nor programming

User avatar
Stefan Kottwitz
Site Admin
Posts: 9164
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Fri Jun 22, 2018 11:22 am

Pictures should be uploaded as attachments here. I don't like link external stuff, full of advertisements and sometimes malware (those one click hosters). Putting the picture on imgur.com instead of here forces people to load and watch advertisements.

It's easy to attach a picture here. The "Attachments" link is below the text editing field, when writing a post.

Stefan
Site admin

pread
Posts: 9
Joined: Thu Jun 21, 2018 11:11 pm

Postby pread » Fri Jun 22, 2018 11:48 am

Y5HDFW6.png
Y5HDFW6.png (6.32 KiB) Viewed 451 times
LyX beginner - just using it for personal documentation, I'm not even in academia nor programming

User avatar
Stefan Kottwitz
Site Admin
Posts: 9164
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Fri Jun 22, 2018 12:01 pm

Here you can see how nicely it works at the margin by default:

  1. \documentclass{article}
  2. \usepackage{url}
  3. \begin{document}
  4. \section{Test}
  5. Some long test to see the justification of lest and right margin.
  6. This is just a test. See:
  7. \url{https://www.reddit.com/r/learnprogramming/comments/61oly8/new_read_me_first/}
  8. \end{document}


Click on "Open in Overleaf" above the code, to see it.

url.png
url.png (15.08 KiB) Viewed 449 times


Your document does something different. We can find it out, if you make a pdfLaTeX export in LyX and post it here, as attachment.

Stefan
Site admin

pread
Posts: 9
Joined: Thu Jun 21, 2018 11:11 pm

Postby pread » Fri Jun 22, 2018 11:29 pm

Thank you so much again, I was using the hyperlink package rather than the URL package. That fixed the issue!
LyX beginner - just using it for personal documentation, I'm not even in academia nor programming


Return to “LyX”

Who is online

Users browsing this forum: No registered users and 6 guests