From 7f0039f151798b41fe5e542f407ca08bd5c246b5 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 30 Jun 2022 16:01:08 +0100 Subject: [PATCH] add appendix hyperlink --- openpower/pandoc_img.py | 8 ++++++++ openpower/simple_v_spec.tex | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/openpower/pandoc_img.py b/openpower/pandoc_img.py index c2071276c..23de6a271 100755 --- a/openpower/pandoc_img.py +++ b/openpower/pandoc_img.py @@ -48,10 +48,18 @@ def inlinenotes(k, v, f, meta): # link page if v.startswith("[[") and v.endswith("]]"): link = v[2:-2] + if '|' in link: + link, ref = link.split("|") + return Link(['', [], []], + [Str(link)], + [ref, '']) + out.write(" link %s\n" % link) lookups = {'sv/overview': 'Overview Chapter', 'sv/svp64': 'SVP64 Chapter', + 'svp64/appendix': 'SVP64 Appendix', } if link in lookups: + out.write(" found %s\n" % lookups[link]) return Link(['', [], []], [Str(lookups[link])], ['#%s' % link, '']) diff --git a/openpower/simple_v_spec.tex b/openpower/simple_v_spec.tex index 4cca725e0..52a23bb51 100644 --- a/openpower/simple_v_spec.tex +++ b/openpower/simple_v_spec.tex @@ -123,7 +123,7 @@ EU Grants 871528 and 957073. \input{tex_out/mv_vec.tex} \begin{appendices} -\chapter{SVP64 Appendix} +\chapter{SVP64 Appendix}\hypertarget{svp64ux2fappendix}{SVP64 Appendix} \input{tex_out/svp64_appendix.tex} \chapter{SVP64 Quirks} \input{tex_out/svp64_quirks.tex} -- 2.30.2