Hey there!
Consider the following Markdown:
::: title
Novel Name
:::
::: author
Author Name
:::
This is run through some code that produces the following TeX code:
\startbooktitle
Novel Name
\stopbooktitle
\startbookauthor
Author Name
\stopbookauthor
When typeset, this produces:
\par Novel Name \par
\par Author Name \par
However, there were no line breaks in the original div element, so it was a bit of a surprise to see the blank lines in the output.
Is there a way to suppress the internal newlines to generate the blocks without the new lines? Such as:
\startbooktitle
Novel Name
\stopbooktitle
\startbookauthor
Author Name
\stopbookauthor
The lua filter code that generates the ConTeXt macro follows:
function Div( element )
local annotation = element.classes:find_if( matches )
if annotation then
annotation = annotation:gsub( "[^%w]*", "" )
return {
context( "\\start", annotation ),
element,
context( "\\stop", annotation )
}
end
end
function matches( s )
return s:match( "^%a+" )
end
function context( macro, annotation )
return pandoc.RawBlock( "context", macro .. "book" .. annotation )
end
What--if anything--can be changed in the code to suppress the newlines?
Thank you.