Skip to content

Commit

Permalink
#182 - make some output sections in .bbl deterministic
Browse files Browse the repository at this point in the history
  • Loading branch information
plk committed Aug 25, 2017
1 parent a29463d commit d71ca8c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions lib/Biber/Output/base.pm
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@ sub get_output_section {
=head2 get_output_entries
Get the sorted order output data for all entries in a list as array ref
Used really only in tests as it instantiates list dynamic information so
we can see it in tests. As a result, we have to NFC() the result to mimic
real output since UTF-8 output is assumed in most tests.
=cut

Expand Down
10 changes: 6 additions & 4 deletions lib/Biber/Output/bbl.pm
Original file line number Diff line number Diff line change
Expand Up @@ -747,13 +747,15 @@ sub output {
}

# Aliases
foreach my $ks (values $data->{ALIAS_ENTRIES}{$secnum}{index}->%*) {
out($target, $$ks);
# Use sort to guaranteed deterministic order for things like latexmk
foreach my $ks (sort keys $data->{ALIAS_ENTRIES}{$secnum}{index}->%*) {
out($target, $data->{ALIAS_ENTRIES}{$secnum}{index}{$ks}->$*);
}

# Missing keys
foreach my $ks (values $data->{MISSING_ENTRIES}{$secnum}{index}->%*) {
out($target, $$ks);
# Use sort to guaranteed deterministic order for things like latexmk
foreach my $ks (sort keys $data->{MISSING_ENTRIES}{$secnum}{index}->%*) {
out($target, $data->{MISSING_ENTRIES}{$secnum}{index}{$ks}->$*);
}

out($target, "\\endrefsection\n");
Expand Down

0 comments on commit d71ca8c

Please sign in to comment.