Difference between revisions of "Translating Table markup"

From Wiki
Jump to navigation Jump to search
m
m
 
Line 29: Line 29:
  
 
</pre>
 
</pre>
 +
 +
[[Category:Old_Content]]

Latest revision as of 15:43, 8 June 2020

< HTML_to_ConTeXt


# Tables : placing them
# replace <p><img> by equivalent command in context
(@article/"table").each do |tab|
  if tab.at("caption")
  tab.swap("
  \\placetable[split]{#{tab.at("caption").inner_html}}\n
  {\\bTABLE \n
  #{tab.inner_html}
  \\eTABLE}
             ")
  else
  tab.swap("
   \\placetable[split]{}\n
   {\\bTABLE \n
  #{tab.inner_html}
  \\eTABLE} \n
            ")
  end
end

# Tables: remove the caption
(@article/"caption").each do |cap|
  cap.swap("\n")
end