diff options
author | mstsirkin <mstsirkin@0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652> | 2013-11-25 12:25:59 +0000 |
---|---|---|
committer | mstsirkin <mstsirkin@0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652> | 2013-11-25 12:25:59 +0000 |
commit | 37b83526b15cc4abae4bd07c50f37c3d3a37378a (patch) | |
tree | e45d9224dbd530fa48651434f8113834dfb5167d | |
parent | 678610624cbcef303b9dd5ebe134135030449474 (diff) |
txt2latex.pl: don't put _ in labels
This doesn't work well if _ is redefined, and is easy to avoid.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
git-svn-id: https://tools.oasis-open.org/version-control/svn/virtio@112 0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652
-rwxr-xr-x | txt2latex.pl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/txt2latex.pl b/txt2latex.pl index 5e04ef1..5732fe5 100755 --- a/txt2latex.pl +++ b/txt2latex.pl @@ -105,6 +105,8 @@ for ($s = 0; $s <= $#sections; $s++) { last if (not defined $latest_by_depth{$#path - $i}); $label = "$latest_by_depth{$#path - $i} / $label"; } + #It's best to avoid underscore in labels + $label =~ s/_/-/g; $text[$l] = $type . "{$name}\\label{sec:$label}\n"; $label_by_section{$section} = $label; } |