Hi,
When I input this in an enumerate environment :
\item L-B-L assembly through electrostatic interaction means that the inter-molecular forces responsible for interaction between 2 polyelectrolytes is electrostatic in nature. This is found in LBL structures of 2 strong polyelectrolytes. e.g. Poly(allylamine hydrochloride) (PAH) and Poly(styrenesulfonate)(PSS). In contrast , for LBL assembly of weak polyelectrolytes the inter-molecular force is hydrogen bonding. e.g. Polyvinylcaprolactum(PVCL) and Poly(methacrylic acid)(PMAA).
It compiles without any error however, latex tries to accomodate these large polymer
names in a single line . for example if i reach the end of right margin, while typing
Poly(styrenesulfonate)(PSS), after Poly then "(styrenesulfonate)(PSS)" should begin from the new line so that the formatting is preserved. Instead "(styrenesulfonate)(PSS)" sticks out like a long rod in the same line.
can anybody please help me with it.
TIA (Thanks in advance)
-Anurag
Text Formatting ⇒ Alignment Problem in long Names
-
- Posts: 8
- Joined: Thu Oct 13, 2011 2:23 am
Alignment Problem in long Names
Last edited by anurag1fundoo on Mon Oct 17, 2011 12:59 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
Alignment Problem in long Names
Hi Anurag,
welcome to the board!
A quick way could be inserting \allowbreak at certain positions, such as:
Stefan
welcome to the board!
A quick way could be inserting \allowbreak at certain positions, such as:
Code: Select all
Poly\allowbreak (styrenesulfonate)\allowbreak(PSS)
LaTeX.org admin
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Alignment Problem in long Names
You could try to assign certain hyphenation points for these special terms.
These lines go into the document preamble.
Best regards and welcome to the board
Thorsten
Code: Select all
\hyphenation{%
Po-ly-(allyl-amine hy-dro-chlo-ride),
Po-ly-(sty-rene-sul-fo-nate),
Po-ly-vin-yl-ca-pro-lac-tum,
Po-ly-(meth-acry-lic acid)
}
Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 8
- Joined: Thu Oct 13, 2011 2:23 am
Re: Alignment Problem in long Names
Thanks you so much guys.
Alignment Problem in long Names
I realise I'm a bit late. However, there's another solution using the bpchem package. It provides the \IUPAC{} command, which is designed to handle breaks in "those long IUPAC compound names". Within it an allowed break is indicated with \|
Code: Select all
\documentclass{article}
\usepackage{bpchem, % provides \IUPAC
chemstyle} % provides \eg
\begin{document}
\begin{enumerate}
\item L-B-L assembly through electrostatic interaction means that the inter-molecular
forces responsible for interaction between 2 polyelectrolytes is electrostatic in nature.
This is found in LBL structures of 2 strong polyelectrolytes. \eg
\IUPAC{Poly\|(allyl\|amine hydro\|chloride)}(PAH) and \IUPAC{Poly\|(styrene\|sulfonate)}(PSS).
In contrast, for LBL assembly of weak polyelectrolytes the inter-molecular force is hydrogen
bonding. \eg \IUPAC{Poly\|vinyl\|caprolactum}(PVCL) and \IUPAC{Poly\|(meth\|acrylic acid)}(PMAA).
\end{enumerate}
\end{document}
site moderator & package author