plk/biber

wrap lines in tool mode

Closed this issue · 16 comments

Hi,

is it possible to make the tool mode wrap longer lines at word boundaries?
I found --wraplines but that seems not to work for tool mode.
If not would it be hard to add this feature?

plk commented

Please try DEV version 2.20 from SF. --wraplines now also applies to .bib output in tool mode. Also, you can pass a column number now to --wraplines to customise the column to wrap on (omit for the backwards-compatible default of 80).

Wow very impressed that you added that so quickly.

Unfortunately I cannot test the new version.
I do not want to change my local version just now.
I tried to download the repo and build it as a separate binary.
But the build script wants to install on /usr/local/bin which I would prefer not to.

Anyway, thank you!

plk commented

As long as you are using windows, intel linux or macos, there are pre-built DEV 2.20 binaries here:

https://sourceforge.net/projects/biblatex-biber/files/biblatex-biber/development/binaries/

That is what I tried at first, But it seems the version I download from SF is still 2.19.

plk commented

Which platform did you download for? it might be that I forgot to bump the version but the development folder should be the right one anyway.

plk commented

Run it and see if biber --help shows the --wraplines taking an column argument. If it does, that's really 2.20.

It only shows Wrap lines in the .bbl file.
Sorry if I am making some stupid mistake ...

plk commented

I suspect you are still running the existing version from your PATH. I just tried that 2.20 version and it shows the right version:

philkime@bbf-l64:/tmp$ ./biber --version
biber version: 2.20 (beta)

When you download, make sure you call it with a full path to the test binary or you'll pick up the one in the your PATH (which is 2.19 presumably). When you have the downloaded one from the link you posted above in a directory, do ./biber --version.

you are of course right ... as I said I was stupid and was using the biber from my path.
It works like a charm now. Even though I would have preferred the wrapped lines to start one character after the opening { of the field.

Ty!

plk commented

Can you tell me what behaviour you are seeing vs what you would prefer? There is room to tune this probably but I only did a quick fix.

What I get now is

    title = {Nonconvex minimization calculations and the conjugate gradient
    method},

what I would prefere is

    title = {Nonconvex minimization calculations and the conjugate gradient
             method},

Ty for considering.

plk commented

Please get the latest 2.20 dev release again - I think this should work now.

The alignment is not really working for me.
It seems that it is always a multiple of 4 spaces to short.
Also the indent on the wrapped lines is done with tabs which I think is messy when no t was specified for --output-indent.
(I use --output-indent=4 btw. and my editor/viewer displays tabs as 4 spaces).

Also it seems to break the lines to early.
The entry

  title = {A method of conjugate subgradients for minimizing nondifferentiable functions},

could have been wrapped like this

  title = {A method of conjugate subgradients for minimizing nondifferentiable
            functions},

but was actually warpped like this

  title = {A method of conjugate subgradients for minimizing
	     nondifferentiable functions},
plk commented

I found that this had been broken forever - it was always converting to tabs on output. This should be fixed now, please pull 2.20 from SF again.

yep works great now. Ty.