I have a sentence with the word "ASP.NET", but half of the word doesn't fit in the current line anymore. There is no hyphenation which is quite ok, but latex doesn't insert a linebreak before the word, instead it is overlapping the margin. I suppose this is happening because of the dot. How can I control the linebreak dynamically to avoid overlapping?
Asked
Active
Viewed 2,106 times
3
1 Answers
2
Load the package microtype and that's already all you need. If not, you will have to decide which breaking-point you want to allow and add it (e.g. ASP"-.NET). I would not break after the dot: A dot at the end of a line always looks like the end of a sentence and ".NET" is kind of a fix expression which should stick together.
When your document is finished (see darthbith) command, you could try to rephrase ("...using ASP of the .NET framework...") or push the word to the next line with a new not indented paragraph or alike.
If you want to have a line-break without a hyphen, you may want to look here or use some short-hand of the package babel. This depends on the language you are writing in.
-
1for something that doesn't clean up nicely with microtype, one could consider using
sloppypar; see Prevent the overflow of text – barbara beeton Oct 30 '14 at 16:47
ASP.NETa URL (or a part of a URL)? If so, have you tried loading theurlpackage and typing\url{ASP.NET}? URL strings are usually allowed to break across lines after a.. – Mico Oct 30 '14 at 13:45@LaRiFaRi
– Matthias Oct 30 '14 at 13:59microtypeworks, great! If you add it as answer, I will accept it asapmicrotypeyou may write the word asASP\linebreak[1].NET. (It is just a search/replace in your editor). If you, when you write your text, push the word to the line border, it will break before the full stop. But if you later delete a word from the paragraph, it will move to the previous line as one word. But as you see,microtypeis a miracle. – Sveinung Oct 30 '14 at 20:00