Skip to content
Discussion options

You must be logged in to vote

Found this solution:

function Para(para)
    -- if para sub el is math, then create a div with custom-style = Equations and put the para in it
    if para.content[1].t == 'Math' then
        local kv = {}
        kv['custom-style'] = 'Equations'
        return pandoc.Div(para, kv)
    end
end

Before

Pandoc
  Meta { unMeta = fromList [] }
  [ Para
      [ Math
          DisplayMath
          "\\begin{aligned}\n   V_{\\mathrm{yFk}}&=(1.08-1)\\times7.186\\times0.4m_{\\mathrm{r}}\\\\\n   &=0.230m_{\\mathrm{r}}\n\\end{aligned}"
      ]
  ]

After

Pandoc
  Meta { unMeta = fromList [] }
  [ Div
      ( "" , [] , [ ( "custom-style" , "Equations" ) ] )
      [ Para
          [ Math
              D…

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
7 replies
@Xmarmalade
Comment options

@jgm
Comment options

jgm Jun 11, 2024
Maintainer

@cagix
Comment options

@cagix
Comment options

@jgm
Comment options

jgm Jun 11, 2024
Maintainer

Comment options

You must be logged in to vote
1 reply
@cagix
Comment options

Answer selected by Xmarmalade
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants