Skip to contentSkip to conversation

utilities/toarxiv.sh: Get rid of borders around hyperlinks

PATCH In review Akira Yokosawa 2 participants 5 messages Jan 4, 2020 – Jan 6, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 utilities/toarxiv.sh: Get rid of borders around hyperlinks

From 1edf6fb9b98cd74d37a3580f2b482d4d9c0197ad Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Sat, 4 Jan 2020 20:15:27 +0900
Subject: [RFT PATCH] utilities/toarxiv.sh: Get rid of borders around hyperlinks

Based on a Q&A on StackExchange [1], putting "nohypertex" in 00README.XXX looks like the cause of all those ugly borders.

To override the default behavior of arxiv's hyperref, add a boolean "toarxiv" in perfbook.tex and set it "true" in toarxiv.sh so that the workaround code added in the preamble shall be enabled.

[1]: https://tex.stackexchange.com/questions/30243/

---
Hi Paul,

I looked at v2019.12.22a on https://arxiv.org/abs/1701.00854 and found that some pages in the PDF almost impossible to read because of frequent borders around hyperlinks.

I'm not sure this change in toarxiv.sh and perfbook.tex actually works on arxiv.org, but can you try building there and see whether it works or not?

Thanks, Akira

Signature · 3 lines
 perfbook.tex         | 14 +++++++++++++-
 utilities/toarxiv.sh |  4 ++--
 2 files changed, 15 insertions(+), 3 deletions(-)
perfbook.tex +13 -1
index 0fae78fb..db334ae4 100644
@@ -110,10 +110,12 @@
 \newboolean{nimbusavail}
 \setboolean{nimbusavail}{false}
 \newcommand{\IfNimbusAvail}[2]{\ifthenelse{\boolean{nimbusavail}}{#1}{#2}}
-
 \newboolean{colorlinks}
 \setboolean{colorlinks}{false}
 \newcommand{\IfColorLinks}[2]{\ifthenelse{\boolean{colorlinks}}{#1}{#2}}
+\newboolean{toarxiv}
+\setboolean{toarxiv}{false}
+\newcommand{\IfToArxiv}[2]{\ifthenelse{\boolean{toarxiv}}{#1}{#2}}
 
 \IfTwoColumn{}{
 \setboolean{colorlinks}{true}
@@ -123,6 +125,16 @@
 \hypersetup{colorlinks=true,allcolors=MediumBlue}
 }{}
 
+\IfToArxiv{
+\hypersetup{
+    colorlinks=true,
+    linkcolor=black,
+    citecolor=black,
+    filecolor=black,
+    urlcolor=black,
+}
+}{}
+
 \IfNimbusAvail{
 \usepackage{nimbusmononarrow}
 }{}
utilities/toarxiv.sh +2 -2
index 29bce4ea..5e1c6388 100644
@@ -79,6 +79,6 @@ rm ${destdir}/SMPdesign/DiningPhilosopher5TB.tex
 
 # The following changes work around arxiv.org limitations
 sed	-e '/usepackage{footnotebackref}/d' \
-	-e 's/\[bookmarks=true,bookmarksnumbered=true,pdfborder={0 0 0}]/[bookmarks=false]/' \
+	-e 's/{toarxiv}{false}/{toarxiv}{true}/' \
 	< perfbook.tex > ${destdir}/perfbook.tex
-echo "nohypertex" > ${destdir}/00README.XXX
+# echo "nohypertex" > ${destdir}/00README.XXX
Signature · 1 line
2.24.1
#1 lore raw
Quoted 19 lines · Akira Yokosawa
Quoted 1 line

From 1edf6fb9b98cd74d37a3580f2b482d4d9c0197ad Mon Sep 17 00:00:00 2001

From: Akira Yokosawa <[email protected]>
Date: Sat, 4 Jan 2020 20:15:27 +0900
Subject: [RFT PATCH] utilities/toarxiv.sh: Get rid of borders around hyperlinks

Based on a Q&A on StackExchange [1], putting "nohypertex" in 00README.XXX looks like the cause of all those ugly borders.

To override the default behavior of arxiv's hyperref, add a boolean "toarxiv" in perfbook.tex and set it "true" in toarxiv.sh so that the workaround code added in the preamble shall be enabled.

[1]: https://tex.stackexchange.com/questions/30243/

---
Hi Paul,

Quoted 6 lines

I looked at v2019.12.22a on https://arxiv.org/abs/1701.00854 and found that some pages in the PDF almost impossible to read because of frequent borders around hyperlinks.

I'm not sure this change in toarxiv.sh and perfbook.tex actually works on arxiv.org, but can you try building there and see whether it works or not?

Queued and pushed. I have started the arxiv.org processing step, but it usually takes awhile. ;-)

Thanx, Paul

Quoted 57 lines

Thanks, Akira

Signature · 3 lines
 perfbook.tex         | 14 +++++++++++++-
 utilities/toarxiv.sh |  4 ++--
 2 files changed, 15 insertions(+), 3 deletions(-)
perfbook.tex +13 -1
index 0fae78fb..db334ae4 100644
@@ -110,10 +110,12 @@
 \newboolean{nimbusavail}
 \setboolean{nimbusavail}{false}
 \newcommand{\IfNimbusAvail}[2]{\ifthenelse{\boolean{nimbusavail}}{#1}{#2}}
-
 \newboolean{colorlinks}
 \setboolean{colorlinks}{false}
 \newcommand{\IfColorLinks}[2]{\ifthenelse{\boolean{colorlinks}}{#1}{#2}}
+\newboolean{toarxiv}
+\setboolean{toarxiv}{false}
+\newcommand{\IfToArxiv}[2]{\ifthenelse{\boolean{toarxiv}}{#1}{#2}}
 
 \IfTwoColumn{}{
 \setboolean{colorlinks}{true}
@@ -123,6 +125,16 @@
 \hypersetup{colorlinks=true,allcolors=MediumBlue}
 }{}
 
+\IfToArxiv{
+\hypersetup{
+    colorlinks=true,
+    linkcolor=black,
+    citecolor=black,
+    filecolor=black,
+    urlcolor=black,
+}
+}{}
+
 \IfNimbusAvail{
 \usepackage{nimbusmononarrow}
 }{}
utilities/toarxiv.sh +2 -2
index 29bce4ea..5e1c6388 100644
@@ -79,6 +79,6 @@ rm ${destdir}/SMPdesign/DiningPhilosopher5TB.tex
 
 # The following changes work around arxiv.org limitations
 sed	-e '/usepackage{footnotebackref}/d' \
-	-e 's/\[bookmarks=true,bookmarksnumbered=true,pdfborder={0 0 0}]/[bookmarks=false]/' \
+	-e 's/{toarxiv}{false}/{toarxiv}{true}/' \
 	< perfbook.tex > ${destdir}/perfbook.tex
-echo "nohypertex" > ${destdir}/00README.XXX
+# echo "nohypertex" > ${destdir}/00README.XXX
Signature · 1 line
2.24.1
#2 lore raw

And I placed the arxiv PDF here:

http://www2.rdrop.com/~paulmck/submission/perfbook-arxiv.pdf

Thoughts?

Thanx, Paul

Quoted 89 lines · Paul E. McKenney
Quoted 19 lines · Akira Yokosawa
Quoted 1 line

From 1edf6fb9b98cd74d37a3580f2b482d4d9c0197ad Mon Sep 17 00:00:00 2001

From: Akira Yokosawa <[email protected]>
Date: Sat, 4 Jan 2020 20:15:27 +0900
Subject: [RFT PATCH] utilities/toarxiv.sh: Get rid of borders around hyperlinks

Based on a Q&A on StackExchange [1], putting "nohypertex" in 00README.XXX looks like the cause of all those ugly borders.

To override the default behavior of arxiv's hyperref, add a boolean "toarxiv" in perfbook.tex and set it "true" in toarxiv.sh so that the workaround code added in the preamble shall be enabled.

[1]: https://tex.stackexchange.com/questions/30243/

---
Hi Paul,

Quoted 6 lines

I looked at v2019.12.22a on https://arxiv.org/abs/1701.00854 and found that some pages in the PDF almost impossible to read because of frequent borders around hyperlinks.

I'm not sure this change in toarxiv.sh and perfbook.tex actually works on arxiv.org, but can you try building there and see whether it works or not?

Queued and pushed. I have started the arxiv.org processing step, but it usually takes awhile. ;-)

Thanx, Paul

Quoted 57 lines

Thanks, Akira

Signature · 3 lines
 perfbook.tex         | 14 +++++++++++++-
 utilities/toarxiv.sh |  4 ++--
 2 files changed, 15 insertions(+), 3 deletions(-)
perfbook.tex +13 -1
index 0fae78fb..db334ae4 100644
@@ -110,10 +110,12 @@
 \newboolean{nimbusavail}
 \setboolean{nimbusavail}{false}
 \newcommand{\IfNimbusAvail}[2]{\ifthenelse{\boolean{nimbusavail}}{#1}{#2}}
-
 \newboolean{colorlinks}
 \setboolean{colorlinks}{false}
 \newcommand{\IfColorLinks}[2]{\ifthenelse{\boolean{colorlinks}}{#1}{#2}}
+\newboolean{toarxiv}
+\setboolean{toarxiv}{false}
+\newcommand{\IfToArxiv}[2]{\ifthenelse{\boolean{toarxiv}}{#1}{#2}}
 
 \IfTwoColumn{}{
 \setboolean{colorlinks}{true}
@@ -123,6 +125,16 @@
 \hypersetup{colorlinks=true,allcolors=MediumBlue}
 }{}
 
+\IfToArxiv{
+\hypersetup{
+    colorlinks=true,
+    linkcolor=black,
+    citecolor=black,
+    filecolor=black,
+    urlcolor=black,
+}
+}{}
+
 \IfNimbusAvail{
 \usepackage{nimbusmononarrow}
 }{}
utilities/toarxiv.sh +2 -2
index 29bce4ea..5e1c6388 100644
@@ -79,6 +79,6 @@ rm ${destdir}/SMPdesign/DiningPhilosopher5TB.tex
 
 # The following changes work around arxiv.org limitations
 sed	-e '/usepackage{footnotebackref}/d' \
-	-e 's/\[bookmarks=true,bookmarksnumbered=true,pdfborder={0 0 0}]/[bookmarks=false]/' \
+	-e 's/{toarxiv}{false}/{toarxiv}{true}/' \
 	< perfbook.tex > ${destdir}/perfbook.tex
-echo "nohypertex" > ${destdir}/00README.XXX
+# echo "nohypertex" > ${destdir}/00README.XXX
Signature · 1 line
2.24.1
#3 lore raw
Quoted 5 lines · Paul E. McKenney

And I placed the arxiv PDF here:

http://www2.rdrop.com/~paulmck/submission/perfbook-arxiv.pdf

Thoughts?

Thank you for testing this.
It looks mostly identical to our -2c build, give or take the footnotebackref package. So the workaround code seems to work!

Didn't you get any warning message from arxiv's build system?

Arxiv.org says it has TeX Live 2016 installed now, and I guess footnotebackref should also be available.

Thanks, Akira

Quoted 93 lines

Thanx, Paul

Quoted 89 lines · Paul E. McKenney
Quoted 19 lines · Akira Yokosawa
Quoted 1 line

From 1edf6fb9b98cd74d37a3580f2b482d4d9c0197ad Mon Sep 17 00:00:00 2001

From: Akira Yokosawa <[email protected]>
Date: Sat, 4 Jan 2020 20:15:27 +0900
Subject: [RFT PATCH] utilities/toarxiv.sh: Get rid of borders around hyperlinks

Based on a Q&A on StackExchange [1], putting "nohypertex" in 00README.XXX looks like the cause of all those ugly borders.

To override the default behavior of arxiv's hyperref, add a boolean "toarxiv" in perfbook.tex and set it "true" in toarxiv.sh so that the workaround code added in the preamble shall be enabled.

[1]: https://tex.stackexchange.com/questions/30243/

---
Hi Paul,

Quoted 6 lines

I looked at v2019.12.22a on https://arxiv.org/abs/1701.00854 and found that some pages in the PDF almost impossible to read because of frequent borders around hyperlinks.

I'm not sure this change in toarxiv.sh and perfbook.tex actually works on arxiv.org, but can you try building there and see whether it works or not?

Queued and pushed. I have started the arxiv.org processing step, but it usually takes awhile. ;-)

Thanx, Paul

Quoted 57 lines

Thanks, Akira

Signature · 3 lines
 perfbook.tex         | 14 +++++++++++++-
 utilities/toarxiv.sh |  4 ++--
 2 files changed, 15 insertions(+), 3 deletions(-)
perfbook.tex +13 -1
index 0fae78fb..db334ae4 100644
@@ -110,10 +110,12 @@
 \newboolean{nimbusavail}
 \setboolean{nimbusavail}{false}
 \newcommand{\IfNimbusAvail}[2]{\ifthenelse{\boolean{nimbusavail}}{#1}{#2}}
-
 \newboolean{colorlinks}
 \setboolean{colorlinks}{false}
 \newcommand{\IfColorLinks}[2]{\ifthenelse{\boolean{colorlinks}}{#1}{#2}}
+\newboolean{toarxiv}
+\setboolean{toarxiv}{false}
+\newcommand{\IfToArxiv}[2]{\ifthenelse{\boolean{toarxiv}}{#1}{#2}}
 
 \IfTwoColumn{}{
 \setboolean{colorlinks}{true}
@@ -123,6 +125,16 @@
 \hypersetup{colorlinks=true,allcolors=MediumBlue}
 }{}
 
+\IfToArxiv{
+\hypersetup{
+    colorlinks=true,
+    linkcolor=black,
+    citecolor=black,
+    filecolor=black,
+    urlcolor=black,
+}
+}{}
+
 \IfNimbusAvail{
 \usepackage{nimbusmononarrow}
 }{}
utilities/toarxiv.sh +2 -2
index 29bce4ea..5e1c6388 100644
@@ -79,6 +79,6 @@ rm ${destdir}/SMPdesign/DiningPhilosopher5TB.tex
 
 # The following changes work around arxiv.org limitations
 sed	-e '/usepackage{footnotebackref}/d' \
-	-e 's/\[bookmarks=true,bookmarksnumbered=true,pdfborder={0 0 0}]/[bookmarks=false]/' \
+	-e 's/{toarxiv}{false}/{toarxiv}{true}/' \
 	< perfbook.tex > ${destdir}/perfbook.tex
-echo "nohypertex" > ${destdir}/00README.XXX
+# echo "nohypertex" > ${destdir}/00README.XXX
Signature · 1 line
2.24.1
#4 lore raw
Quoted 5 lines · Akira Yokosawa
Quoted 4 lines · Paul E. McKenney

And I placed the arxiv PDF here:

http://www2.rdrop.com/~paulmck/submission/perfbook-arxiv.pdf

Quoted 7 lines
Quoted 1 line

Thoughts?

Thank you for testing this.
It looks mostly identical to our -2c build, give or take the footnotebackref package. So the workaround code seems to work!

Didn't you get any warning message from arxiv's build system?

It said that the processing went well, and does not contain the string footnotebackref. If you really want the full LaTeX output, let me know, and I will send it along. Or let me know what you would like me to search for.

Quoted 2 lines

Arxiv.org says it has TeX Live 2016 installed now, and I guess footnotebackref should also be available.

It does look better. My thought is to leave the current release as is, and update somewhat sooner than a year from now. ;-)

Thanx, Paul

Quoted 96 lines

Thanks, Akira

Quoted 93 lines

Thanx, Paul

Quoted 89 lines · Paul E. McKenney
Quoted 19 lines · Akira Yokosawa
Quoted 1 line

From 1edf6fb9b98cd74d37a3580f2b482d4d9c0197ad Mon Sep 17 00:00:00 2001

From: Akira Yokosawa <[email protected]>
Date: Sat, 4 Jan 2020 20:15:27 +0900
Subject: [RFT PATCH] utilities/toarxiv.sh: Get rid of borders around hyperlinks

Based on a Q&A on StackExchange [1], putting "nohypertex" in 00README.XXX looks like the cause of all those ugly borders.

To override the default behavior of arxiv's hyperref, add a boolean "toarxiv" in perfbook.tex and set it "true" in toarxiv.sh so that the workaround code added in the preamble shall be enabled.

[1]: https://tex.stackexchange.com/questions/30243/

---
Hi Paul,

Quoted 6 lines

I looked at v2019.12.22a on https://arxiv.org/abs/1701.00854 and found that some pages in the PDF almost impossible to read because of frequent borders around hyperlinks.

I'm not sure this change in toarxiv.sh and perfbook.tex actually works on arxiv.org, but can you try building there and see whether it works or not?

Queued and pushed. I have started the arxiv.org processing step, but it usually takes awhile. ;-)

Thanx, Paul

Quoted 57 lines

Thanks, Akira

Signature · 3 lines
 perfbook.tex         | 14 +++++++++++++-
 utilities/toarxiv.sh |  4 ++--
 2 files changed, 15 insertions(+), 3 deletions(-)
perfbook.tex +13 -1
index 0fae78fb..db334ae4 100644
@@ -110,10 +110,12 @@
 \newboolean{nimbusavail}
 \setboolean{nimbusavail}{false}
 \newcommand{\IfNimbusAvail}[2]{\ifthenelse{\boolean{nimbusavail}}{#1}{#2}}
-
 \newboolean{colorlinks}
 \setboolean{colorlinks}{false}
 \newcommand{\IfColorLinks}[2]{\ifthenelse{\boolean{colorlinks}}{#1}{#2}}
+\newboolean{toarxiv}
+\setboolean{toarxiv}{false}
+\newcommand{\IfToArxiv}[2]{\ifthenelse{\boolean{toarxiv}}{#1}{#2}}
 
 \IfTwoColumn{}{
 \setboolean{colorlinks}{true}
@@ -123,6 +125,16 @@
 \hypersetup{colorlinks=true,allcolors=MediumBlue}
 }{}
 
+\IfToArxiv{
+\hypersetup{
+    colorlinks=true,
+    linkcolor=black,
+    citecolor=black,
+    filecolor=black,
+    urlcolor=black,
+}
+}{}
+
 \IfNimbusAvail{
 \usepackage{nimbusmononarrow}
 }{}
utilities/toarxiv.sh +2 -2
index 29bce4ea..5e1c6388 100644
@@ -79,6 +79,6 @@ rm ${destdir}/SMPdesign/DiningPhilosopher5TB.tex
 
 # The following changes work around arxiv.org limitations
 sed	-e '/usepackage{footnotebackref}/d' \
-	-e 's/\[bookmarks=true,bookmarksnumbered=true,pdfborder={0 0 0}]/[bookmarks=false]/' \
+	-e 's/{toarxiv}{false}/{toarxiv}{true}/' \
 	< perfbook.tex > ${destdir}/perfbook.tex
-echo "nohypertex" > ${destdir}/00README.XXX
+# echo "nohypertex" > ${destdir}/00README.XXX
Signature · 1 line
2.24.1