c266734448
Previously we used our own homespun formatting. But this produces over-long lines that aren't ideal for diffs in tests. Easier to use something off-the-shelf and standard. Closes #7580. Performance is slower by about a factor of 10, but this isn't really a problem because native isn't suitable as a serialization format. (For serialization you should use json, because the reader is so much faster than native.)
4.8 KiB
4.8 KiB
% pandoc -f latex -t native
\cites(Multiprenote)(multipostnote)[23][42]{Knu86}[65]{Nie72}
^D
[ Para
[ Cite
[ Citation
{ citationId = "Knu86"
, citationPrefix =
[ Str "Multiprenote", Space, Str "23" ]
, citationSuffix =
[ Str "42" ]
, citationMode = NormalCitation
, citationNoteNum = 0
, citationHash = 0
}
, Citation
{ citationId = "Nie72"
, citationPrefix = []
, citationSuffix =
[ Str "65", Str ",", Space, Str "multipostnote" ]
, citationMode = NormalCitation
, citationNoteNum = 0
, citationHash = 0
}
]
[ RawInline
( Format "latex" ) "\\cites(Multiprenote)(multipostnote)[23][42]{Knu86}[65]{Nie72}"
]
]
]
% pandoc -f latex -t native
\cites(Multiprenote)()[23][42]{Knu86}[65]{Nie72}
^D
[ Para
[ Cite
[ Citation
{ citationId = "Knu86"
, citationPrefix =
[ Str "Multiprenote", Space, Str "23" ]
, citationSuffix =
[ Str "42" ]
, citationMode = NormalCitation
, citationNoteNum = 0
, citationHash = 0
}
, Citation
{ citationId = "Nie72"
, citationPrefix = []
, citationSuffix =
[ Str "65" ]
, citationMode = NormalCitation
, citationNoteNum = 0
, citationHash = 0
}
]
[ RawInline
( Format "latex" ) "\\cites(Multiprenote)()[23][42]{Knu86}[65]{Nie72}"
]
]
]
% pandoc -f latex -t native
\cites()(multipostnote)[23][42]{Knu86}[65]{Nie72}
^D
[ Para
[ Cite
[ Citation
{ citationId = "Knu86"
, citationPrefix =
[ Str "23" ]
, citationSuffix =
[ Str "42" ]
, citationMode = NormalCitation
, citationNoteNum = 0
, citationHash = 0
}
, Citation
{ citationId = "Nie72"
, citationPrefix = []
, citationSuffix =
[ Str "65", Str ",", Space, Str "multipostnote" ]
, citationMode = NormalCitation
, citationNoteNum = 0
, citationHash = 0
}
]
[ RawInline
( Format "latex" ) "\\cites()(multipostnote)[23][42]{Knu86}[65]{Nie72}"
]
]
]
% pandoc -f latex -t native
\cites()()[23][42]{Knu86}[65]{Nie72}
^D
[ Para
[ Cite
[ Citation
{ citationId = "Knu86"
, citationPrefix =
[ Str "23" ]
, citationSuffix =
[ Str "42" ]
, citationMode = NormalCitation
, citationNoteNum = 0
, citationHash = 0
}
, Citation
{ citationId = "Nie72"
, citationPrefix = []
, citationSuffix =
[ Str "65" ]
, citationMode = NormalCitation
, citationNoteNum = 0
, citationHash = 0
}
]
[ RawInline
( Format "latex" ) "\\cites()()[23][42]{Knu86}[65]{Nie72}"
]
]
]
% pandoc -f latex -t native
\cites(multipostnote)[23][42]{Knu86}[65]{Nie72}
^D
[ Para
[ Cite
[ Citation
{ citationId = "Knu86"
, citationPrefix =
[ Str "23" ]
, citationSuffix =
[ Str "42" ]
, citationMode = NormalCitation
, citationNoteNum = 0
, citationHash = 0
}
, Citation
{ citationId = "Nie72"
, citationPrefix = []
, citationSuffix =
[ Str "65", Str ",", Space, Str "multipostnote" ]
, citationMode = NormalCitation
, citationNoteNum = 0
, citationHash = 0
}
]
[ RawInline
( Format "latex" ) "\\cites(multipostnote)[23][42]{Knu86}[65]{Nie72}"
]
]
]
% pandoc -f latex -t native
\cites(Multiprenote)(multipostnote){Knu86}
^D
[ Para
[ Cite
[ Citation
{ citationId = "Knu86"
, citationPrefix =
[ Str "Multiprenote" ]
, citationSuffix =
[ Str ",", Space, Str "multipostnote" ]
, citationMode = NormalCitation
, citationNoteNum = 0
, citationHash = 0
}
]
[ RawInline
( Format "latex" ) "\\cites(Multiprenote)(multipostnote){Knu86}"
]
]
]
% pandoc -f latex -t native
\footcites(Multiprenote)(multipostnote)[23][42]{Knu86}[65]{Nie72}
^D
[ Para
[ Note
[ Para
[ Cite
[ Citation
{ citationId = "Knu86"
, citationPrefix =
[ Str "Multiprenote", Space, Str "23" ]
, citationSuffix =
[ Str "42" ]
, citationMode = NormalCitation
, citationNoteNum = 0
, citationHash = 0
}
, Citation
{ citationId = "Nie72"
, citationPrefix = []
, citationSuffix =
[ Str "65", Str ",", Space, Str "multipostnote" ]
, citationMode = NormalCitation
, citationNoteNum = 0
, citationHash = 0
}
]
[ RawInline
( Format "latex" ) "\\footcites(Multiprenote)(multipostnote)[23][42]{Knu86}[65]{Nie72}"
]
, Str "."
]
]
]
]