LyX ⇒ Lyx spacing & wrapping
Lyx spacing & wrapping
I am using Lyx standard thesis template (LyX20\Resources\templates\thesis), but am having trouble with the layout. I have not changed much in the template's default settings. If you would please look at the attachement, you'll see that the first trouble is the wrapping with urls... they are not working properly. (breakurl is already there)
The second trouble is the spacing between words, which is too much in some examples.
Can you please help me?
Cheers,
Samira
- Attachments
-
- Bibtex spacing and wrapping
- lyx forum.PNG (26.72 KiB) Viewed 4918 times
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
Lyx spacing & wrapping
welcome to the board!
The problem here is the line breaking, LyX and LaTeX don't break the URLs at arbitrary places but for example at dashes, for readability of complex URLs. The consequence is that the justification is hardly possible which results in bad spacing.
You could extend the line breaking. For example, like I wrote in: Re: Failure to word-wrap inside enumerate environment, you could add this in your document preamble to allow line breaks for all lower case letters too:
Code: Select all
\expandafter\def\expandafter\UrlBreaks\expandafter{\UrlBreaks\do\a%
\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j\do\k\do\l\do\m\do\n%
\do\o\do\p\do\q\do\r\do\s\do\t\do\u\do\v\do\w\do\x\do\y\do\z\do\&}
Stefan
Re: Lyx spacing & wrapping
Thankyou very much for your fast reply! I am so sorry to ask, but is this how it should be added? Because the spaces and wrapping are still there.
- Attachments
-
- Adding expandafter
- lyx forum 2.PNG (52.53 KiB) Viewed 4911 times
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Lyx spacing & wrapping
Once we can test and verify the problem, based on your example, I'm sure it can be solved.
Stefan
Lyx spacing & wrapping
I found what is causing the problem and the solution now

The problem was caused by a change in alpha.bst, because I was trying to show the url in misc types.
So I changed this:
Code: Select all
FUNCTION {misc}
{ output.bibitem
format.authors output
title howpublished new.block.checkb
format.title output
howpublished new.block.checka
howpublished output
format.date output
new.block
note output
fin.entry
empty.misc.check
}
Code: Select all
FUNCTION {misc}
{ output.bibitem
format.authors output
title howpublished new.block.checkb
format.title output
howpublished new.block.checka
howpublished output
format.date output
if$
new.block
url output
note output
fin.entry
empty.misc.check
}
changed my bst... and now it works
