|
From: André W. <wo...@us...> - 2012-10-08 08:13:43
|
Michael, well, a \linebreak (*) is not what people want to express by "\\". See my enclosed example. I hope it goes through the list, we'll see. To my mind you should rethink your advice. People should use real paragraphs. This is what I would suggest in such situations most of the time. I'm aware this is sometimes difficult or impossible (think of the need for using \long\def for example), but we're really in a TeX discussion here. It's not that I want to quit this discussion as I think we can all learn from each other. I totally agree, that "\\" is often use wrongly. It harms the paragraph breaking algorithm of TeX and I constantly suggest to use paragraphs instead. While you then may need to fiddle with \parskip and \parindent, it is the only true solution to generate lines in LaTeX (to my knowledge). But in the end of the day if we want to give (and publish) a founded advice, we should probably ask a TeX guru (which I'm not). Best, André (*) at least when not in a raggedleft, raggedright or center-like mode, which happen to add some left and right horizontal material to each line at the beginning and end to suppress the inter-word glue blowup Am 08.10.2012 um 09:36 schrieb Michael J Gruber: > Hi there, > > I don't care personally, but '\linebreak' is the correct way to enforce > a linebreak in TeX. A new paragraph is something different. > > '\\' is used routinely (and mistakenly) by many people because it's > shorter, and most of the time it works. That patch was triggered by a > "bug report" on the users' list, and the intention was to preemptively > answer further reports. Anyway, it's "on google" now... > > Michael > > André Wobst venit, vidit, dixit 06.10.2012 18:39: >> Hi Michael, >> >> We just discussed this at a pyx dev weekend. Sorry for coming back to this email after such a long time of silence. While I totally agree with you in that "\\" to be considered harmful. However, I'm rather unsure whether \linebreak is the proper solution. I always suggest to use real paragraphs to generate breaks, as it creates separate vertical material in TeX. While I do understand your intention, I'm not sure whether we should document your solution. As it's a TeX problem, we may better not comment on that at all rather than proposing a wrong solution. >> >> Best, >> >> >> André >> >> >> Am 22.07.2011 um 14:26 schrieb Michael J Gruber: >> >>> The widespread use of \newline (in the incarnation \\) for enforcing >>> linebreaks causes many problems with the alignment of parboxes. >>> \linebreak is the correct way to force a line break without destroying >>> alignment. >>> --- >>> examples/text/halign.txt | 4 ++++ >>> 1 files changed, 4 insertions(+), 0 deletions(-) >>> >>> diff --git a/examples/text/halign.txt b/examples/text/halign.txt >>> index a9d15e3..b1453d0 100644 >>> --- a/examples/text/halign.txt >>> +++ b/examples/text/halign.txt >>> @@ -23,3 +23,7 @@ well, when you do not create a parbox. >>> !! Note that the alignment features are implemented in such a way, that they work >>> in both, TeX and LaTeX mode. Furthermore, you can always influence the >>> alignment of the box contents by appropriate TeX and LaTeX commands as well. >>> + >>> +!! If you want to enforce line breaks in a parbox use `\linebreak`, not `\newline` (which >>> +is equivalent to `\\`). `\linebreak` makes sure that horizontal alignment is preserved >>> +throughout the text box. >>> -- >>> 1.7.6.336.gdf067 >>> >>> >>> ------------------------------------------------------------------------------ >>> 10 Tips for Better Web Security >>> Learn 10 ways to better secure your business today. Topics covered include: >>> Web security, SSL, hacker attacks & Denial of Service (DoS), private keys, >>> security Microsoft Exchange, secure Instant Messaging, and much more. >>> http://www.accelacomm.com/jaw/sfnl/114/51426210/ >>> _______________________________________________ >>> PyX-devel mailing list >>> PyX...@li... >>> https://lists.sourceforge.net/lists/listinfo/pyx-devel >> > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev > _______________________________________________ > PyX-devel mailing list > PyX...@li... > https://lists.sourceforge.net/lists/listinfo/pyx-devel -- by _ _ _ Dr. André Wobst, Amselweg 22, 85716 Unterschleißheim / \ \ / ) wo...@us..., http://www.wobsta.de/ / _ \ \/\/ / PyX - High quality PostScript and PDF figures (_/ \_)_/\_/ with Python & TeX: visit http://pyx.sourceforge.net/ |