## LaTeX forum ⇒ General ⇒ Line/data overrun ...

LaTeX specific issues not fitting into one of the other forums of this category.
rgrice
Posts: 10
Joined: Fri Mar 09, 2012 2:25 pm

### Line/data overrun ...

Hi,

I'm sure this problem has been 'done to death' but I've having difficulty getting my abstract to display correctly.

Basically I've got a mixed tabular and two column multicolumn environment and the data can includes chemical names which are hyphenated and therefore don't wrap but run off the page or into the neighbouring column.

Additionally, I would like to be able to have ragged right text but I've tried to use the \raggedright command in DajBodyDefinitions.tex (see attached for file) but then I get this error ...

! Undefined control sequence.\CT@start ->\let \CT@arc@save                                \CT@arc@ \let \CT@drsc@save \CT@drsc@ \let \CT...

I'd like to get the text left justified (with ragged right) or failing that full justification (which seems to be the default) but with no text overruns. I've attached the LaTeX code US20120165464A1dab.tex which is the abstract data and the DajBodyDefinitions.tex and map.tex which are the supporting latex modules.

Yours sincerely
Richard
Attachments
map.tex
Supporting LaTeX module
dajBodyDefinitions.tex
Supporting LaTeX module
US20120165464A1dab.tex
Abstract data
Last edited by cgnieder on Wed Aug 22, 2012 7:52 pm, edited 1 time in total.

Tags:

cgnieder
Site Moderator
Posts: 1993
Joined: Sat Apr 16, 2011 7:27 pm
When running your code (I discovered I have to use XeLaTeX...) I found the file env.tex missing and the control sequence \dajRecord undefined…

Regards
site moderator & package author

rgrice
Posts: 10
Joined: Fri Mar 09, 2012 2:25 pm
Ah I uploaded the wrong file ... it is there now. I'm not sure why the \dajRecord isn't defined as it is defined in dajBodyDefinitions.tex ...

I've just run it through MikTeX fine ... hope you can get it working...
Rich
Attachments
env.tex
dajBodyDefinitions.tex
New version

cgnieder
Site Moderator
Posts: 1993
Joined: Sat Apr 16, 2011 7:27 pm
After breaking this down to a minimal working example I find it is a non-trivial task (at least for me).

The code:
\documentclass[8pt]{article}\usepackage{fontspec}   \setmainfont[     Scale=1.35,     Ligatures=TeX,     Extension=.otf,     UprightFont= *-regular,     BoldFont=*-bold,     ItalicFont=*-italic,     BoldItalicFont=*-bolditalic]{texgyretermes}\linespread{1.1}\setlength\textwidth{9.25cm}\usepackage{showframe} \begin{document}\footnotesize\noindent(bis(trihydrocarbylsilyl)amino)(hydrocarbyl)\,[di(hydrocarbylaminohydrocarbyloxy)]silanes,(bis(dihydrocarbylhydrosilylamino)(hydrocarbyl)\,[di(hydrocarbylaminohydrocarbyloxy)\,]silanes,(1-aza-2ω -disilacyclohydrocarbyl)(hydrocarbyl)\,[di(hydrocarbylaminohydrocarbyloxy)\,]silanes,\,[(trihydr-ocarbylsilyl)(hydrocarbyl)amino\,](hydrocarbyl)\,[di(hydrocarbylaminohydrocarbyloxy)\,]silanes,\,[(dihydrocarbylhydrosilyl)(hydrocarbyl)amino\,](hydrocarbyl) \,[di(hydrocarbylaminohydrocarbyloxy)\,]silanes,(1-aza-2-silacyclohydrocarbyl)(hydrocarbyl)\,[di(h-ydrocarbylaminohydrocarbyloxy)\,]silanes,(dihydrocarbylamino)(hydrocarbyl)\,[di(hydrocarbylaminohydrocarbyloxy)\,]silanes, \end{document}

I tried to adapt the automated method described here: How to break long word containing symbols but with no hyphen? which is working somehow (not really perfect as it allows breaking anywhere, see code below and the attachment) and increases compilation time significantly. One should probably try a different approach for the loop…

Of course you can always add breakpoints manually…


Regards
Attachments
test.pdf
site moderator & package author

cgnieder
Site Moderator
Posts: 1993
Joined: Sat Apr 16, 2011 7:27 pm
As things sometimes go… I just found out about the seqsplit package. Since it gobbles all spaces you'd need to insert non-breakable spaces (~) or control spaces (\) instead:

site moderator & package author

cgnieder
Site Moderator
Posts: 1993
Joined: Sat Apr 16, 2011 7:27 pm
The tedious method would of course be adding the breakpoints manually and using \raggedright (which you've already mentioned), maybe combined with some semantic markup:

\documentclass[8pt]{article}\usepackage{fontspec}   \setmainfont[     Scale=1.35,     Ligatures=TeX,     Extension=.otf,     UprightFont= *-regular,     BoldFont=*-bold,     ItalicFont=*-italic,     BoldItalicFont=*-bolditalic]{texgyretermes}\linespread{1.1}\setlength\textwidth{9.25cm}\usepackage{showframe} \usepackage{chemmacros} \newcommand\techFocus{%\iupac{(bis\|(tri\|hydro\|carbyl\|silyl)amino)\|(hydro\|carbyl)\|[di\|(hydro\|carbyl\|amino\|hydro\|carbyloxy)]\|silanes},\iupac{(bis\|(di\|hydro\|carbyl\|hydro\|silyl\|amino)\|(hydro\|carbyl)\|[di\|(hydro\|carbyl\|amino\|hydro\|carbyloxy)]\|silanes},\iupac{(1\-aza\-2\w\-di\|sila\|cyclo\|hydro\|carbyl)\|(hydro\|carbyl)\|[di\|(hydro\|carbyl\|amino\|hydro\|carbyloxy)]\|silanes},\iupac{[(tri\|hydro\|carbyl\|silyl)\|(hydro\|carbyl)\|amino]\|(hydro\|carbyl)\|[di\|(hydro\|carbyl\|amino\|hydro\|carbyloxy)]\|silanes},\iupac{[(di\|hydro\|carbyl\|hydro\|silyl)\|(hydro\|carbyl)\|amino]\|(hydro\|carbyl)\|[di\|(hydro\|carbyl\|amino\|hydro\|carbyloxy)]\|silanes},\iupac{(1\-aza\-2\-sila\|cyclo\|hydro\|carbyl)\|(hydro\|carbyl)\|[di\|(hydro\|carbyl\|amino\|hydro\|carbyloxy)]\|silanes},\iupac{(dihydro\|carbyl\|amino)\|(hydro\|carbyl)\|[di\|(hydro\|carbyl\|amino\|hydro\|carbyloxy)]\|silanes}} \begin{document}\footnotesize\noindent\raggedright\techFocus \end{document}

Regards
site moderator & package author

rgrice
Posts: 10
Joined: Fri Mar 09, 2012 2:25 pm
Thanks very much for the quick replay and taking the time to look to this ... I'll have a go at trying to implement this solution.

rgrice
Posts: 10
Joined: Fri Mar 09, 2012 2:25 pm
Thanks \seqsplit seems to do the trick ...

Just one more question before I go ... something that bugs me about LaTeX. It seems that text is always fully justified. I would have thought left justified text should be the default. For example within a multicolumn environment it seems that LaTeX will space pad between words in order to get even text borders (anchoring it seems on hyphens when possible). However, this isn't predictable.

For example this text :

A reactive functional group-modified molecularly self-
assembling material comprises reactive functional group(s)
covalently bonded to a molecularly self-assembling (MSA)
material. The reactive functional group is supplementary to
the MSA material and independently derived from a reaction
of a premodification MSA material with a polyfunctional
reactant comprising first- and second-reacting functional
groups.

I would prefer to see like this :

A reactive functional group-modified molecularly
self-assembling material comprises reactive functional
group(s) covalently bonded to a molecularly
self-assembling (MSA) material. The reactive functional
group is supplementary to the MSA material and independently
derived from a reaction of a premodificationMSA material
with a polyfunctional reactant comprising first- and second-
reacting functional groups.

Thanks again for all your help ... it is much appreciated

Rich

cgnieder
Site Moderator
Posts: 1993
Joined: Sat Apr 16, 2011 7:27 pm
rgrice wrote:Just one more question before I go ... something that bugs me about LaTeX. It seems that text is always fully justified. I would have thought left justified text should be the default. For example within a multicolumn environment it seems that LaTeX will space pad between words in order to get even text borders (anchoring it seems on hyphens when possible). However, this isn't predictable.

Well, let's say:difficult to predict. TeX has a sophisticated way of building paragraphs and and typeset them justified. Internally it will always try several possibilities and choose the one with least “badness”, a number depending on a series of factors. The details for this are described in the TeXbook or in texbytopic.

Why don't you just set the text ragged right if you want to have it so?

\documentclass{article} \usepackage{ragged2e}% Improvements on the standard \raggedright, used as \RaggedRight\begin{document} A reactive functional group-modified molecularly self-assembling material comprisesreactive functional group(s) covalently bonded to a molecularly self-assembling (MSA)material. The reactive functional group is supplementary to the MSA material andindependently derived from a reaction of a premodification MSA material with apolyfunctional reactant comprising first- and second-reacting functional groups. \raggedrightA reactive functional group-modified molecularly self-assembling material comprisesreactive functional group(s) covalently bonded to a molecularly self-assembling (MSA)material. The reactive functional group is supplementary to the MSA material andindependently derived from a reaction of a premodification MSA material with apolyfunctional reactant comprising first- and second-reacting functional groups. \RaggedRightA reactive functional group-modified molecularly self-assembling material comprisesreactive functional group(s) covalently bonded to a molecularly self-assembling (MSA)material. The reactive functional group is supplementary to the MSA material andindependently derived from a reaction of a premodification MSA material with apolyfunctional reactant comprising first- and second-reacting functional groups. \end{document}

Regards
site moderator & package author