From 37b83526b15cc4abae4bd07c50f37c3d3a37378a Mon Sep 17 00:00:00 2001 From: mstsirkin Date: Mon, 25 Nov 2013 12:25:59 +0000 Subject: 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 git-svn-id: https://tools.oasis-open.org/version-control/svn/virtio@112 0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652 --- txt2latex.pl | 2 ++ 1 file changed, 2 insertions(+) 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; } -- cgit v1.2.3