summaryrefslogtreecommitdiff
path: root/test/command/refs.md
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-09-28 21:17:53 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2021-09-28 21:17:53 -0700
commit0bdcf415e4eff83ad8e35c1d41c8a28e0bbd5da1 (patch)
treec9bda08418e67755254ad2d1d2e95dd691bd1902 /test/command/refs.md
parent8018179b3df34cd7fdbd77c7a08b21fd8d5b5b31 (diff)
Switch from pretty-simple to pretty-show for native output.
Update tests. Reason: it turns out that the native output generated by pretty-simple isn't always readable by the native reader. According to https://github.com/cdepillabout/pretty-simple/issues/99 it is not a design goal of the library that the rendered values be readable using 'read'. This makes it unsuitable for our purposes. pretty-show is a bit slower and it uses 4-space indents (non-configurable), but it doesn't have this serious drawback.
Diffstat (limited to 'test/command/refs.md')
-rw-r--r--test/command/refs.md321
1 files changed, 163 insertions, 158 deletions
diff --git a/test/command/refs.md b/test/command/refs.md
index 165177175..d89e745ff 100644
--- a/test/command/refs.md
+++ b/test/command/refs.md
@@ -3,17 +3,18 @@
Figure \ref{fig:1}
^D
[ Para
- [ Str "Figure"
- , Space
- , Link
- ( ""
- , []
- ,
- [ ( "reference-type", "ref" ), ( "reference", "fig:1" ) ]
- )
- [ Str "[fig:1]" ]
- ( "#fig:1", "" )
- ]
+ [ Str "Figure"
+ , Space
+ , Link
+ ( ""
+ , []
+ , [ ( "reference-type" , "ref" )
+ , ( "reference" , "fig:1" )
+ ]
+ )
+ [ Str "[fig:1]" ]
+ ( "#fig:1" , "" )
+ ]
]
```
@@ -22,17 +23,18 @@ Figure \ref{fig:1}
Figure \cref{fig:1}
^D
[ Para
- [ Str "Figure"
- , Space
- , Link
- ( ""
- , []
- ,
- [ ( "reference-type", "ref" ), ( "reference", "fig:1" ) ]
- )
- [ Str "[fig:1]" ]
- ( "#fig:1", "" )
- ]
+ [ Str "Figure"
+ , Space
+ , Link
+ ( ""
+ , []
+ , [ ( "reference-type" , "ref" )
+ , ( "reference" , "fig:1" )
+ ]
+ )
+ [ Str "[fig:1]" ]
+ ( "#fig:1" , "" )
+ ]
]
```
@@ -41,17 +43,18 @@ Figure \cref{fig:1}
Figure \vref{fig:1}
^D
[ Para
- [ Str "Figure"
- , Space
- , Link
- ( ""
- , []
- ,
- [ ( "reference-type", "ref+page" ), ( "reference", "fig:1" ) ]
- )
- [ Str "[fig:1]" ]
- ( "#fig:1", "" )
- ]
+ [ Str "Figure"
+ , Space
+ , Link
+ ( ""
+ , []
+ , [ ( "reference-type" , "ref+page" )
+ , ( "reference" , "fig:1" )
+ ]
+ )
+ [ Str "[fig:1]" ]
+ ( "#fig:1" , "" )
+ ]
]
```
@@ -65,36 +68,40 @@ Accuracy~\eqref{eq:Accuracy} is the proportion, measuring true results among all
\end{equation}
^D
[ Para
- [ Str "Accuracy\160"
- , Link
- ( ""
- , []
- ,
- [ ( "reference-type", "eqref" ), ( "reference", "eq:Accuracy" ) ]
- )
- [ Str "[eq:Accuracy]" ]
- ( "#eq:Accuracy", "" )
- , Space
- , Str "is"
- , Space
- , Str "the"
- , Space
- , Str "proportion,"
- , Space
- , Str "measuring"
- , Space
- , Str "true"
- , Space
- , Str "results"
- , Space
- , Str "among"
- , Space
- , Str "all"
- , Space
- , Str "results."
- ]
+ [ Str "Accuracy\160"
+ , Link
+ ( ""
+ , []
+ , [ ( "reference-type" , "eqref" )
+ , ( "reference" , "eq:Accuracy" )
+ ]
+ )
+ [ Str "[eq:Accuracy]" ]
+ ( "#eq:Accuracy" , "" )
+ , Space
+ , Str "is"
+ , Space
+ , Str "the"
+ , Space
+ , Str "proportion,"
+ , Space
+ , Str "measuring"
+ , Space
+ , Str "true"
+ , Space
+ , Str "results"
+ , Space
+ , Str "among"
+ , Space
+ , Str "all"
+ , Space
+ , Str "results."
+ ]
, Para
- [ Math DisplayMath "\\label{eq:Accuracy}\n Accuracy = \\frac{t_p + t_n}{t_p + f_p + f_n + t_n}" ]
+ [ Math
+ DisplayMath
+ "\\label{eq:Accuracy}\n Accuracy = \\frac{t_p + t_n}{t_p + f_p + f_n + t_n}"
+ ]
]
```
@@ -168,93 +175,90 @@ Figure \ref{fig:Logo2} illustrated the SVG logo
Figure \ref{fig:Logo3} illustrated the SVG logo
^D
-[ Header 1
- ( "one", [], [] )
- [ Str "One" ]
+[ Header 1 ( "one" , [] , [] ) [ Str "One" ]
, Para
- [ Image
- ( "fig:Logo", [], [] )
- [ Str "Logo" ]
- ( "command/SVG_logo.svg", "fig:" )
- ]
+ [ Image
+ ( "fig:Logo" , [] , [] )
+ [ Str "Logo" ]
+ ( "command/SVG_logo.svg" , "fig:" )
+ ]
, Para
- [ Image
- ( "fig:Logo2", [], [] )
- [ Str "Logo2" ]
- ( "command/SVG_logo2.svg", "fig:" )
- ]
-, Header 1
- ( "two", [], [] )
- [ Str "Two" ]
-, Header 2
- ( "subone", [], [] )
- [ Str "Subone" ]
+ [ Image
+ ( "fig:Logo2" , [] , [] )
+ [ Str "Logo2" ]
+ ( "command/SVG_logo2.svg" , "fig:" )
+ ]
+, Header 1 ( "two" , [] , [] ) [ Str "Two" ]
+, Header 2 ( "subone" , [] , [] ) [ Str "Subone" ]
, Para
- [ Image
- ( "fig:Logo3", [], [] )
- [ Str "Logo3" ]
- ( "command/SVG_logo3.svg", "fig:" )
- ]
+ [ Image
+ ( "fig:Logo3" , [] , [] )
+ [ Str "Logo3" ]
+ ( "command/SVG_logo3.svg" , "fig:" )
+ ]
, Para
- [ Str "Figure"
- , Space
- , Link
- ( ""
- , []
- ,
- [ ( "reference-type", "ref" ), ( "reference", "fig:Logo" ) ]
- )
- [ Str "1.1" ]
- ( "#fig:Logo", "" )
- , Space
- , Str "illustrated"
- , Space
- , Str "the"
- , Space
- , Str "SVG"
- , Space
- , Str "logo"
- ]
+ [ Str "Figure"
+ , Space
+ , Link
+ ( ""
+ , []
+ , [ ( "reference-type" , "ref" )
+ , ( "reference" , "fig:Logo" )
+ ]
+ )
+ [ Str "1.1" ]
+ ( "#fig:Logo" , "" )
+ , Space
+ , Str "illustrated"
+ , Space
+ , Str "the"
+ , Space
+ , Str "SVG"
+ , Space
+ , Str "logo"
+ ]
, Para
- [ Str "Figure"
- , Space
- , Link
- ( ""
- , []
- ,
- [ ( "reference-type", "ref" ), ( "reference", "fig:Logo2" ) ]
- )
- [ Str "1.2" ]
- ( "#fig:Logo2", "" )
- , Space
- , Str "illustrated"
- , Space
- , Str "the"
- , Space
- , Str "SVG"
- , Space
- , Str "logo"
- ]
+ [ Str "Figure"
+ , Space
+ , Link
+ ( ""
+ , []
+ , [ ( "reference-type" , "ref" )
+ , ( "reference" , "fig:Logo2" )
+ ]
+ )
+ [ Str "1.2" ]
+ ( "#fig:Logo2" , "" )
+ , Space
+ , Str "illustrated"
+ , Space
+ , Str "the"
+ , Space
+ , Str "SVG"
+ , Space
+ , Str "logo"
+ ]
, Para
- [ Str "Figure"
- , Space
- , Link
- ( ""
- , []
- ,
- [ ( "reference-type", "ref" ), ( "reference", "fig:Logo3" ) ]
- )
- [ Str "2.1" ]
- ( "#fig:Logo3", "" )
- , Space
- , Str "illustrated"
- , Space
- , Str "the"
- , Space
- , Str "SVG"
- , Space
- , Str "logo"
- ]
+ [ Str "Figure"
+ , Space
+ , Link
+ ( ""
+ , []
+ , [ ( "reference-type" , "ref" )
+ , ( "reference" , "fig:Logo3" )
+ ]
+ )
+ [ Str "2.1" ]
+ ( "#fig:Logo3" , "" )
+ , Space
+ , Str "illustrated"
+ , Space
+ , Str "the"
+ , Space
+ , Str "SVG"
+ , Space
+ , Str "logo"
+ ]
]
```
@@ -264,20 +268,21 @@ Figure \ref{fig:Logo3} illustrated the SVG logo
\label{section} Section \ref{section}
^D
[ Para
- [ Span
- ( "section", [], [ ( "label", "section" ) ] )
- [ Str "[section]" ]
- , Space
- , Str "Section"
- , Space
- , Link
- ( ""
- , []
- ,
- [ ( "reference-type", "ref" ), ( "reference", "section" ) ]
- )
- [ Str "[section]" ]
- ( "#section", "" )
- ]
+ [ Span
+ ( "section" , [] , [ ( "label" , "section" ) ] )
+ [ Str "[section]" ]
+ , Space
+ , Str "Section"
+ , Space
+ , Link
+ ( ""
+ , []
+ , [ ( "reference-type" , "ref" )
+ , ( "reference" , "section" )
+ ]
+ )
+ [ Str "[section]" ]
+ ( "#section" , "" )
+ ]
]
```