[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: sed question (bibtex problem)



Hello Brian,

Check this:

sed '/%$/{
N
s/%\n//
}' yourfile.bib

It should work from command line using bash's multiline input capability
(with the '). It checks for % at the end of lines (hence the $), then
reads the next line into the buffer and then removes the %\n sequence (I
don't quite understand, why sed can't do it with the one-liner you
mentioned, but I guess there's a good reason).
Regards,
Daniel

> On Fri, 3 Nov 2000, Brian May wrote:
> 
> > bibtex likes to word-wrap/mangle/destroy my long lines (eg. URLs) into
> > this form:
> > 
> > \bibitem[Mic00]{Microsoft2000}
> > Microsoft.
> > \newblock Windows 2000 kerberos authentication.
> > \newblock White paper, Microsoft, January 2000.
> > \newblock
> >   \url=http://www.microsoft.com/technet/win2000/win2ksrv/technote/kerberos.asp%
> > =.
> > 
> > which is interpreted by LaTeX to display a percent sign at the end of
> > the URL :-(




Reply to: