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.1 KiB
4.1 KiB
Commands of glossaries package
% pandoc -f latex -t native
Many programming languages provide \glspl{API}. Each \gls{API} should provide a documentation.
^D
[ Para
[ Str "Many"
, Space
, Str "programming"
, Space
, Str "languages"
, Space
, Str "provide"
, Space
, Span
( ""
, []
,
[ ( "acronym-label", "API" ), ( "acronym-form", "plural+short" ) ]
)
[ Str "APIs" ]
, Str "."
, Space
, Str "Each"
, Space
, Span
( ""
, []
,
[
( "acronym-label", "API" )
,
( "acronym-form", "singular+short" )
]
)
[ Str "API" ]
, Space
, Str "should"
, Space
, Str "provide"
, Space
, Str "a"
, Space
, Str "documentation."
]
]
% pandoc -f latex -t native
\Glsdesc{API} XYZ ist not as performant as \glsdesc{API} ZXY.
^D
[ Para
[ Span
( ""
, []
,
[
( "acronym-label", "API" )
,
( "acronym-form", "singular+long" )
]
)
[ Str "API" ]
, Space
, Str "XYZ"
, Space
, Str "ist"
, Space
, Str "not"
, Space
, Str "as"
, Space
, Str "performant"
, Space
, Str "as"
, Space
, Span
( ""
, []
,
[
( "acronym-label", "API" )
,
( "acronym-form", "singular+long" )
]
)
[ Str "API" ]
, Space
, Str "ZXY."
]
]
% pandoc -f latex -t native
\Acrlong{API} XYZ ist not as performant as \acrlong{API} ZXY.
^D
[ Para
[ Span
( ""
, []
,
[
( "acronym-label", "API" )
,
( "acronym-form", "singular+long" )
]
)
[ Str "API" ]
, Space
, Str "XYZ"
, Space
, Str "ist"
, Space
, Str "not"
, Space
, Str "as"
, Space
, Str "performant"
, Space
, Str "as"
, Space
, Span
( ""
, []
,
[
( "acronym-label", "API" )
,
( "acronym-form", "singular+long" )
]
)
[ Str "API" ]
, Space
, Str "ZXY."
]
]
% pandoc -f latex -t native
\Acrfull{API} XYZ ist not as performant as \acrfull{API} ZXY.
^D
[ Para
[ Span
( ""
, []
,
[
( "acronym-label", "API" )
,
( "acronym-form", "singular+full" )
]
)
[ Str "API" ]
, Space
, Str "XYZ"
, Space
, Str "ist"
, Space
, Str "not"
, Space
, Str "as"
, Space
, Str "performant"
, Space
, Str "as"
, Space
, Span
( ""
, []
,
[
( "acronym-label", "API" )
,
( "acronym-form", "singular+full" )
]
)
[ Str "API" ]
, Space
, Str "ZXY."
]
]
% pandoc -f latex -t native
\Acrshort{API} XYZ ist not as performant as \acrshort{API} ZXY.
^D
[ Para
[ Span
( ""
, []
,
[
( "acronym-label", "API" )
,
( "acronym-form", "singular+abbrv" )
]
)
[ Str "API" ]
, Space
, Str "XYZ"
, Space
, Str "ist"
, Space
, Str "not"
, Space
, Str "as"
, Space
, Str "performant"
, Space
, Str "as"
, Space
, Span
( ""
, []
,
[
( "acronym-label", "API" )
,
( "acronym-form", "singular+abbrv" )
]
)
[ Str "API" ]
, Space
, Str "ZXY."
]
]
Commands of acronym package
% pandoc -f latex -t native
Many programming languages provide \acp{API}. Each \ac{API} should provide a documentation.
^D
[ Para
[ Str "Many"
, Space
, Str "programming"
, Space
, Str "languages"
, Space
, Str "provide"
, Space
, Span
( ""
, []
,
[ ( "acronym-label", "API" ), ( "acronym-form", "plural+short" ) ]
)
[ Str "APIs" ]
, Str "."
, Space
, Str "Each"
, Space
, Span
( ""
, []
,
[
( "acronym-label", "API" )
,
( "acronym-form", "singular+short" )
]
)
[ Str "API" ]
, Space
, Str "should"
, Space
, Str "provide"
, Space
, Str "a"
, Space
, Str "documentation."
]
]