<br><font size=2 face="sans-serif">Dear all,</font>
<br>
<br><font size=2 face="sans-serif">When I write design documents, review documents, or coding notes for a program project,</font>
<br><font size=2 face="sans-serif">I always refer to function names, variable names, and class names in that program.</font>
<br><font size=2 face="sans-serif">However, these types of strings can not be arranged by (La)TeX well.</font>
<br>
<br><font size=2 face="sans-serif">For example,</font>
<br>
<br><font size=2 face="sans-serif">A macro named 'SECONDARY_EXTSRAM_LARGEPOOL_NORMAL', (La)TeX doesn't know</font>
<br><font size=2 face="sans-serif">how to break this string at the page margin. The final result I got shown below:</font>
<br>
<br><font size=2 face="sans-serif">..........................................................................</font>
<br><font size=2 face="sans-serif">..........................................................................</font>
<br><font size=2 face="sans-serif">...................................... SECONDARY_EXTSRAM_LARGEPOOL_NORMAL</font>
<br><font size=2 face="sans-serif">..........................................................................</font>
<br><font size=2 face="sans-serif">..........................................................................</font>
<br>
<br><font size=2 face="sans-serif">This is ugly.</font>
<br><font size=2 face="sans-serif">Then I use some solutions I can find:</font>
<br>
<br><font size=2 face="sans-serif">1) use \- to mark places where (La)TeX can break:</font>
<br>
<br><font size=2 face="sans-serif">Ex: SECONDARY\-\_EXTSRAM\-\_LARGEPOOL\-\_NORMAL</font>
<br>
<br><font size=2 face="sans-serif">However, this will make (La)TeX inserts a hyphen (-),</font>
<br><font size=2 face="sans-serif">and still can not break at the middle of SECONDARY, EXTSRAM, LARGEPOOL, NORMAL.</font>
<br>
<br><font size=2 face="sans-serif">Then the result will be:</font>
<br>
<br><font size=2 face="sans-serif">..........................................................................</font>
<br><font size=2 face="sans-serif">..........................................................................</font>
<br><font size=2 face="sans-serif">...................................... SECONDARY_EXTSRAM_-</font>
<br><font size=2 face="sans-serif">LARGEPOOL_NORMAL .............................</font>
<br><font size=2 face="sans-serif">..........................................................................</font>
<br><font size=2 face="sans-serif">..........................................................................</font>
<br>
<br><font size=2 face="sans-serif">It is still not good.</font>
<br>
<br><font size=2 face="sans-serif">2) I don't want the additional hyphen, so I use \discretionary{}{}{} instead of \-:</font>
<br>
<br><font size=2 face="sans-serif">Ex: SECONDARY\discretionary{}{}{}\_EXTSRAM\discretionary{}{}{}\_LARGEPOOL\discretionary{}{}{}\_NORMAL</font>
<br>
<br><font size=2 face="sans-serif">The effect of this method is almost the same with the one above, except the additional hyphen.</font>
<br><font size=2 face="sans-serif">The result of this follows.</font>
<br>
<br><font size=2 face="sans-serif">..........................................................................</font>
<br><font size=2 face="sans-serif">..........................................................................</font>
<br><font size=2 face="sans-serif">...................................... SECONDARY_EXTSRAM_</font>
<br><font size=2 face="sans-serif">LARGEPOOL_NORMAL .............................</font>
<br><font size=2 face="sans-serif">..........................................................................</font>
<br><font size=2 face="sans-serif">..........................................................................</font>
<br>
<br><font size=2 face="sans-serif">3) Use \path from path package (path.sty):</font>
<br>
<br><font size=2 face="sans-serif">The effect of this method is completely the same with the one of method 2.</font>
<br>
<br><font size=2 face="sans-serif">Ex: \path|SECONDARY_EXTSRAM_LARGEPOOL_NORMAL|</font>
<br>
<br><font size=2 face="sans-serif">will produce</font>
<br>
<br><font size=2 face="sans-serif">..........................................................................</font>
<br><font size=2 face="sans-serif">..........................................................................</font>
<br><font size=2 face="sans-serif">...................................... SECONDARY_EXTSRAM_</font>
<br><font size=2 face="sans-serif">LARGEPOOL_NORMAL .............................</font>
<br><font size=2 face="sans-serif">..........................................................................</font>
<br><font size=2 face="sans-serif">..........................................................................</font>
<br>
<br><font size=2 face="sans-serif">Even worse, this \path command conflicts with the listings package and the longtable packages.</font>
<br>
<br><font size=2 face="sans-serif">Does anyone knows how can I break a special string at any character in it?</font>
<br><font size=2 face="sans-serif">Maybe there is a package named forcebreak, and there is a command \forcebreakhere in it.</font>
<br>
<br><font size=2 face="sans-serif">\usepackage{forcebreak}</font>
<br><font size=2 face="sans-serif">....</font>
<br><font size=2 face="sans-serif">........... \forcebreakhere{SECONDARY_EXTSRAM_LARGEPOOL_NORMAL} ......</font>
<br><font size=2 face="sans-serif">....</font>
<br>
<br><font size=2 face="sans-serif">Then the result is:</font>
<br>
<br><font size=2 face="sans-serif">..........................................................................</font>
<br><font size=2 face="sans-serif">..........................................................................</font>
<br><font size=2 face="sans-serif">...................................... SECONDARY_EXT</font>
<br><font size=2 face="sans-serif">SRAMLARGEPOOL_NORMAL .................</font>
<br><font size=2 face="sans-serif">..........................................................................</font>
<br><font size=2 face="sans-serif">..........................................................................</font>
<br>
<br><font size=2 face="sans-serif">or</font>
<br>
<br><font size=2 face="sans-serif">..........................................................................</font>
<br><font size=2 face="sans-serif">..........................................................................</font>
<br><font size=2 face="sans-serif">...... SECONDARY_EXTSRAMLARGEPOO</font>
<br><font size=2 face="sans-serif">L_NORMAL ...................................................</font>
<br><font size=2 face="sans-serif">..........................................................................</font>
<br>
<br><font size=2 face="sans-serif">depends on the context.</font>
<br>
<br><font size=2 face="sans-serif">Does such a package exist?</font>
<br><font size=2 face="sans-serif">Or can I use some other methods to accomplish this?</font>
<br>
<br><font size=2 face="sans-serif">Thanks very much.</font>
<br><font size=2 face="sans-serif">Wei.</font>
<br><FONT SIZE=3><BR>
<BR>
************* Email Confidentiality Notice ********************<BR>
<BR>
The information contained in this e-mail message (including any attachments) may be confidential, proprietary, privileged, or otherwise exempt from disclosure under applicable laws. It is intended to be conveyed only to the designated recipient(s). Any use, dissemination, distribution, printing, retaining or copying of this e-mail (including its attachments) by unintended recipient(s) is strictly prohibited and may be unlawful. If you are not an intended recipient of this e-mail, or believe that you have received this e-mail in error, please notify the sender immediately (by replying to this e-mail), delete any and all copies of this e-mail (including any attachments) from your system, and do not disclose the content of this e-mail to any other person. Thank you!<BR>
</FONT>