Fix pdflatex ToC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From df15e226d96614ffbdedfd517f8a6d7afc1c0fee Mon Sep 17 00:00:00 2001
From: Balbir singh <bsingharora@xxxxxxxxx>
Date: Sun, 15 Sep 2019 21:14:53 +1000
Subject: [PATCH] Make hyperlinks colorful and a browsable pdf TOC

Without these changes the the PDF does not provide
a browsable TOC to choose for navigation, also add
a bit of color to the links to make them screen
friendly.

Also add synctex=-1 to prevent pdf readers like
evince from complaining to the pdflatex command
line

Signed-off-by: Balbir singh <bsingharora@xxxxxxxxx>
---
 perfbook.tex               | 1 +
 utilities/runfirstlatex.sh | 2 +-
 utilities/runlatex.sh      | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/perfbook.tex b/perfbook.tex
index 85696333..a9a0d813 100644
--- a/perfbook.tex
+++ b/perfbook.tex
@@ -70,6 +70,7 @@
 \usepackage{multirow}
 \usepackage{noindentafter}
 \NoIndentAfterCmd{\epigraph}
+\hypersetup{pdftex, colorlinks=true, allcolors=blue}
 
 % custom packages
 
diff --git a/utilities/runfirstlatex.sh b/utilities/runfirstlatex.sh
index 1a2a7a58..019d60d8 100644
--- a/utilities/runfirstlatex.sh
+++ b/utilities/runfirstlatex.sh
@@ -40,7 +40,7 @@ fi
 basename=`echo $1 | sed -e 's/\.tex$//'`
 
 echo "pdflatex 1 for $basename.pdf"
-pdflatex $basename > /dev/null 2>&1 < /dev/null || :
+pdflatex --synctex=-1 $basename > /dev/null 2>&1 < /dev/null || :
 if grep -q '! Emergency stop.' $basename.log
 then
 	grep -B 15 -A 5 '! Emergency stop.' $basename.log
diff --git a/utilities/runlatex.sh b/utilities/runlatex.sh
index 289364d7..2a168a8d 100644
--- a/utilities/runlatex.sh
+++ b/utilities/runlatex.sh
@@ -51,7 +51,7 @@ identical_warnings () {
 }
 
 iterate_latex () {
-	pdflatex $basename > /dev/null 2>&1 < /dev/null || :
+	pdflatex --synctex=-1 $basename > /dev/null 2>&1 < /dev/null || :
 	if grep -q '! Emergency stop.' $basename.log
 	then
 		grep -B 15 -A 5 '! Emergency stop.' $basename.log
-- 
2.20.1




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux