Discussion:
[KBibTeX] [Bug 401470] New: Don't remove leading whitespace in macros
Add Reply
Stephan Beyer
2018-11-27 14:47:25 UTC
Reply
Permalink
https://bugs.kde.org/show_bug.cgi?id=401470

Bug ID: 401470
Summary: Don't remove leading whitespace in macros
Product: KBibTeX
Version: 0.8.1
Platform: Debian unstable
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: Loading/saving files
Assignee: ***@unix-ag.uni-kl.de
Reporter: s-***@gmx.net
Target Milestone: ---

SUMMARY

When a @string definition starts with whitespace, the whitespace is removed
when (or after) the file is loaded. This may be a feature in the general
setting but destroys my author lists because I use something like the following
to have consistent repeated author names:

@string{and = " and "}
@string{author1 = "First Author"}
@string{author2 = "Second Author"}
@article{foo,
author = author1 # and # author2,
...
}


STEPS TO REPRODUCE
1. Make a bib file containing the contents similar to the ones mentioned above.
2. Load the file into kbibtex.
3. Inside kbibtex, watch the BibTeX source of the first macro "and"
4. optionally: Save the file

OBSERVED RESULT
In step 3: "@string{and = {and }}"
In step 4: All your author information is now screwed because of the wrong
"and" macro.

EXPECTED RESULT
In step 3: "@string{and = { and }}"
In step 4: Do not screw up author information.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:
(available in About System)
KDE Plasma Version: 5.13.5
KDE Frameworks Version: 5.49.0
Qt Version: 5.11.1

ADDITIONAL INFORMATION
-
--
You are receiving this mail because:
You are watching all bug changes.
Thomas Fischer
2018-12-04 20:53:04 UTC
Reply
Permalink
https://bugs.kde.org/show_bug.cgi?id=401470

Thomas Fischer <***@unix-ag.uni-kl.de> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|REPORTED |CONFIRMED
Ever confirmed|0 |1
--
You are receiving this mail because:
You are watching all bug changes.
Thomas Fischer
2018-12-06 20:09:11 UTC
Reply
Permalink
https://bugs.kde.org/show_bug.cgi?id=401470

Thomas Fischer <***@unix-ag.uni-kl.de> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|CONFIRMED |ASSIGNED
Depends on| |388892
Version Fixed In| |c43b00e066f255ff9c12a0d930e
| |4be8d8d60f41d
Latest Commit| |0.8.2

--- Comment #1 from Thomas Fischer <***@unix-ag.uni-kl.de> ---
Please see the latest commit from branch 'bugs/kde401470' in my personal
repository clone:
https://cgit.kde.org/clones/kbibtex/thomasfischer/kbibtex.git/log/?h=bugs/kde401470

This should fix the problem.

To test the code, please see here:
https://userbase.kde.org/KBibTeX/Development#Quick_Start_to_Run_KBibTeX_from_Git
but invoke the script as follows:
bash run-kbibtex.sh
https://cgit.kde.org/clones/kbibtex/thomasfischer/kbibtex.git bugs/kde401470


Referenced Bugs:

https://bugs.kde.org/show_bug.cgi?id=388892
[Bug 388892] Formatting error when saving file ( switching " and } )
--
You are receiving this mail because:
You are watching all bug changes.
Arnout Boelens
2018-12-07 03:52:36 UTC
Reply
Permalink
https://bugs.kde.org/show_bug.cgi?id=401470
Bug 401470 depends on bug 388892, which changed state.

Bug 388892 Summary: Formatting error when saving file ( switching " and } )
https://bugs.kde.org/show_bug.cgi?id=388892

What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--
You are receiving this mail because:
You are watching all bug changes.
Loading...