aboutsummaryrefslogtreecommitdiff
path: root/test/command/6137.md
blob: d92406aeb8d97f27bb01d4fedf8a32190e4959af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
```
% pandoc -f latex -t native
This reference to Table \ref{tbl:label} doesn't work.
\begin{table}
        \caption{This caption has no number.}\label{tbl:label}
        \begin{tabular}{ l c r }
          -------- & -------- & -------- \\
          -------- & -------- & -------- \\
        \end{tabular}
\end{table}

This reference to Figure \ref{fig:label} works fine.
\begin{figure}
        \includegraphics[width=\textwidth]{example.png}
        \caption{A numbered caption, if I use pandoc-crossref.}\label{fig:label}
\end{figure}
^D
[ Para
    [ Str "This reference to Table "
    , Link
        ( ""
        , []
        , [ ( "reference-type" , "ref" )
          , ( "reference" , "tbl:label" )
          ]
        )
        [ Str "1" ]
        ( "#tbl:label" , "" )
    , Str " doesn\8217t work."
    ]
, Div
    ( "tbl:label" , [] , [] )
    [ Table
        ( "" , [] , [] )
        (Caption
           Nothing [ Plain [ Str "This caption has no number." ] ])
        [ ( AlignLeft , ColWidthDefault )
        , ( AlignCenter , ColWidthDefault )
        , ( AlignRight , ColWidthDefault )
        ]
        (TableHead ( "" , [] , [] ) [])
        [ TableBody
            ( "" , [] , [] )
            (RowHeadColumns 0)
            []
            [ Row
                ( "" , [] , [] )
                [ Cell
                    ( "" , [] , [] )
                    AlignDefault
                    (RowSpan 1)
                    (ColSpan 1)
                    [ Plain [ Str "\8212\8212\8211" ] ]
                , Cell
                    ( "" , [] , [] )
                    AlignDefault
                    (RowSpan 1)
                    (ColSpan 1)
                    [ Plain [ Str "\8212\8212\8211" ] ]
                , Cell
                    ( "" , [] , [] )
                    AlignDefault
                    (RowSpan 1)
                    (ColSpan 1)
                    [ Plain [ Str "\8212\8212\8211" ] ]
                ]
            , Row
                ( "" , [] , [] )
                [ Cell
                    ( "" , [] , [] )
                    AlignDefault
                    (RowSpan 1)
                    (ColSpan 1)
                    [ Plain [ Str "\8212\8212\8211" ] ]
                , Cell
                    ( "" , [] , [] )
                    AlignDefault
                    (RowSpan 1)
                    (ColSpan 1)
                    [ Plain [ Str "\8212\8212\8211" ] ]
                , Cell
                    ( "" , [] , [] )
                    AlignDefault
                    (RowSpan 1)
                    (ColSpan 1)
                    [ Plain [ Str "\8212\8212\8211" ] ]
                ]
            ]
        ]
        (TableFoot ( "" , [] , [] ) [])
    ]
, Para
    [ Str "This reference to Figure "
    , Link
        ( ""
        , []
        , [ ( "reference-type" , "ref" )
          , ( "reference" , "fig:label" )
          ]
        )
        [ Str "1" ]
        ( "#fig:label" , "" )
    , Str " works fine."
    ]
, Para
    [ Image
        ( "fig:label" , [] , [ ( "width" , "\\textwidth" ) ] )
        [ Str "A numbered caption, if I use pandoc-crossref." ]
        ( "example.png" , "fig:" )
    ]
]
```