Hi,
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
LyX ⇒ Lyx spacing & wrapping
Lyx spacing & wrapping
- Attachments
-
- Bibtex spacing and wrapping
- lyx forum.PNG (26.72 KiB) Viewed 5004 times
Last edited by samirazs on Thu Jan 17, 2013 11:52 am, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Lyx spacing & wrapping
Hi Samira,
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:
You can see the structure and may easily extend or reduce it.
Stefan
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
Code, edit and compile here:
\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
LaTeX.org admin
Re: Lyx spacing & wrapping
Hi Stefan,
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.
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 4997 times
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Lyx spacing & wrapping
The place is correct. To investigate the reason in your specific case, why it doesn't work, you could post your LyX document as attachment to a post here in the forum. To protect your content, and to make help possible, post a copy of the document which is reduced as much as possible (without non-relevant text, packages etc.). Also your bibliography entries (.bib file) would be needed.
Once we can test and verify the problem, based on your example, I'm sure it can be solved.
Stefan
Once we can test and verify the problem, based on your example, I'm sure it can be solved.
Stefan
LaTeX.org admin
Lyx spacing & wrapping
Hi Stefan,
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:
to this:
I found this: http://www.tex.ac.uk/tex-archive/biblio ... phaurl.bst
changed my bst... and now it works
Thankyou so much!
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.bibitemformat.authors outputtitle howpublished new.block.checkbformat.title outputhowpublished new.block.checkahowpublished outputformat.date outputnew.blocknote outputfin.entryempty.misc.check}
Code: Select all
FUNCTION {misc}{ output.bibitemformat.authors outputtitle howpublished new.block.checkbformat.title outputhowpublished new.block.checkahowpublished outputformat.date outputif$new.blockurl outputnote outputfin.entryempty.misc.check}
changed my bst... and now it works

Last edited by cgnieder on Thu Jan 17, 2013 2:25 pm, edited 1 time in total.