Difference between revisions of "Translating Table markup"

From Wiki
Jump to navigation Jump to search
(New page: <pre> # 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("capt...)
 
m
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 +
< [[HTML_to_ConTeXt]]
 +
 
<pre>
 
<pre>
  
Line 27: 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