Skip to content

How to change the font colour on the slide with background image in quarto pptx? #9564

Answered by mcanouil
udurraniAtPresage asked this question in Q&A
Discussion options

You must be logged in to vote

I edited (quick & dirty) to include the OpenXML code:

Span = function(span)
  color = span.attributes['color']
  if color == nil then return span end

  if FORMAT:match 'html' or FORMAT:match 'revealjs' then
    span.attributes['color'] = nil
    span.attributes['style'] = 'color: ' .. color .. ';'
    return span
  elseif FORMAT:match 'latex' or FORMAT:match 'beamer' then
    span.attributes['color'] = nil
    if string.sub(color, 1, 1) == "#" and #color == 7 then
      -- TODO: requires xcolor
      local R = tostring(tonumber(string.sub(color, 2, 3), 16))
      local G = tostring(tonumber(string.sub(color, 4, 5), 16))
      local B = tostring(tonumber(string.sub(color, 6, 7), 16))
      

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@mcanouil
Comment options

Answer selected by udurraniAtPresage
@cscheid
Comment options

@udurraniAtPresage
Comment options

@mcanouil
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
themes Related to HTML theming or any other style related issue (like highlight-style) lua Issues related to the lua codebase, filter chain, etc pptx issue with pptx format
3 participants