I m writing one article in which i need to write a paragraph full of medical terms. How can i wrap a text in a line without using line break (or hyphen)?
Regards
I m writing one article in which i need to write a paragraph full of medical terms. How can i wrap a text in a line without using line break (or hyphen)?
Regards
If you want to split a word but don't want a hyphen to be used where the split happens, you can define a new hyphenation style:
\def\+{\discretionary{}{}{}}
Now you can use it as in a\+very\+long\+word. However, this still requires to place this new non-hyphen manually.
From the TeXBook:
A discretionary break consists of three sequences of characters called the pre- break, post-break, and no-break texts. The idea is that if a line break occurs here, the pre-break text will appear at the end of the current line and the post-break text will occur at the beginning of the next line; but if no break occurs, the no-break text will appear in the current line. Users can specify discretionary breaks in complete generality by writing
\discretionary{⟨pre-break text⟩}{⟨post-break text⟩}{⟨no-break text⟩}where the three texts consist entirely of characters, boxes, and kerns. For example, TEX can hyphenate the word ‘difficult’ between the f’s, even though this requires breaking the ‘ffi’ ligature into ‘f-’ followed by an ‘fi’ ligature, if the horizontal list contains
di\discretionary{f-}{fi}{ffi}cult.
babel package, the same effect (text breaking without hyphen) is accomplished with the notation "".
– mpy
Mar 02 '13 at 14:00
You can use
\usepackage{seqsplit}
and then use
\seqsplit{ATGTCCACTGATAAAAGTACACGCTATAATTTTCAGATTGAGAAAGCCCC
CTCGTTGGCGTACGCTGCAGGTCGAC}
this can be used for displaying DNA sequences, but probably does an alright job in your case as well
You can break a word with no hyphen at the end of the line (see the other answers), but then it doesn't look like a broken word. It might be a good idea to use some other symbol there instead of the hyphen, for instance $\bm\cdot$ (with \usepackage{bm}). This can be done by defining:
\newcommand{\+}{\discretionary{\mbox{${\bm\cdot}\mkern-1mu$}}{}{}}
I strongly recommend using the package microtype too, which helps a lot here. I added a small negative \mkern after the dot, to make it protrude a bit to the right margin.

\documentclass{article}
\usepackage{bm}
\newcommand{\+}{\discretionary{\mbox{${\bm\cdot}\mkern-1mu$}}{}{}}
\usepackage{microtype}
\begin{document}
\hsize 4.75cm
x\hfill x
This is my\-very\-long\-word\-that\-I\-want\-to\-break\-at\-any\-of\-these\-given\-points
This is my\+very\+long\+word\+that\+I\+want\+to\+break\+at\+any\+of\+these\+given\+points
\renewcommand\+{\discretionary{}{}{}}
This is my\+very\+long\+word\+that\+I\+want\+to\+break\+at\+any\+of\+these\+given\+points
\end{document}
\mbox{....}. To avoid hyphens you may also use\usepackage{hyphenat}and use\nohyphens{<text>}. To make it global use\usepackage[none]{hyphenat}– Mar 01 '13 at 02:23\raggedrightmode. This may be preferable to maintaining full justification. The latter is likely to produce some lines with huge inter-word gaps when hyphenation is turned off. – Mico Mar 01 '13 at 03:17