diff --git a/app-text/tetex/files/tetex-3.0_p1-bibtex-no-bad-newline.patch b/app-text/tetex/files/tetex-3.0_p1-bibtex-no-bad-newline.patch new file mode 100644 --- /dev/null +++ b/app-text/tetex/files/tetex-3.0_p1-bibtex-no-bad-newline.patch @@ -0,0 +1,42 @@ +--- tetex-src-3.0/texk/web2c/bibtex.ch 2005-12-06 10:03:56.000000000 -0500 ++++ tetex-src-3.0.nonl/texk/web2c/bibtex.ch 2008-02-24 23:05:35.000000000 -0500 +@@ -1047,28 +1047,24 @@ + char2 := x_entry_strs(ptr2)(char_ptr); + @z + +-% We shouldn't try to split a \% combo, as the result is an escaped % at +-% end-of-line, and a line beginning with a %, which leads to rest being +-% ignored. This is a special case of the general problem that we shouldn't +-% split macro invocations either -- however, the best way to avoid that is +-% not to split lines at all. +-@x [324] Check whether we're trying to break a \% combo. ++@x[324] Get rid of this silly business of breaking these lines + out_buf[end_ptr] := out_buf[max_print_line-1]; {save this character} + out_buf[max_print_line-1] := comment; {so \TeX\ does the thing right} + out_buf_length := max_print_line; + break_ptr := out_buf_length - 1; {the `|-1|' allows for the restoration} + output_bbl_line; {output what we can,} + out_buf[max_print_line-1] := out_buf[end_ptr]; {restore this character} ++out_buf_ptr := 0; ++tmp_ptr := break_ptr; ++while (tmp_ptr < end_ptr) do {and slide the rest down} ++ begin ++ out_buf[out_buf_ptr] := out_buf[tmp_ptr]; ++ incr(out_buf_ptr); ++ incr(tmp_ptr); ++ end; ++out_buf_length := end_ptr - break_ptr; + @y +-if out_buf[max_print_line-1] = comment then {assume \% combo here} +- out_buf_length := max_print_line - 1 +-else +- out_buf_length := max_print_line; +-break_ptr := out_buf_length - 1; {the `|-1|' allows for the restoration} +-out_buf[end_ptr] := out_buf[break_ptr]; {save this character} +-out_buf[break_ptr] := comment; {so \TeX\ does the thing right} +-output_bbl_line; {output what we can,} +-out_buf[break_ptr] := out_buf[end_ptr]; {restore this character} ++output_bbl_line; {output the whole line rather than breaking it up} + @z + + @x [327] Add check for fieldinfo[] overflow.