✓resolved

## Translating images and tables to LaTeX

Reported by Bil Kleb | March 6th, 2009 @ 06:59 AM

In LaTeX, the figure and table environments are "floats" that are typeset separate from the running text, have captions, labels, placement specifiers, and so on. Meanwhile \includegraphics and the tabular environment are more primitive and typeset inline with surrounding text.

Currently, RedCloth translates images to figure environments with an embedded \includegraphics command whereas tables become LaTeX tabular environments. This feels inconsistent. I feel that they should both be translated as primitives (i.e., \includegraphics and tabular) or as floats (i.e., figure and table environments)?

I favor translating both to LaTeX floats as they can better absorb some of the more advanced Textile markup associated with both types, but I've not completely convinced myself...

### Comments and changes to this ticket

• #### Bil KlebMarch 6th, 2009 @ 07:23 AM

• State changed from “new” to “open”
• #### emimeMarch 6th, 2009 @ 07:49 AM

I think that tabular should be placed inside table as figure is...


\begin{table}[htp]

\caption{}
\begin{tabular}{|c|c|c|c|c|}
...
\hline
\end{tabular}

\end{table}


Don't see where in the code tabular is used...

• #### Bil KlebMarch 6th, 2009 @ 08:05 AM

I don't know that the use of tabular has been released yet, see

http://github.com/jgarber/redclo...

• #### Jason GarberMarch 7th, 2009 @ 05:39 AM

(from [e2d48eb92dcd1418fe2a5e62b0bec7565c3d1f59]) To be consistent with LaTeX formatting of images as figures, wrapped tabular environment in table environment. [#115 status:resolved] http://github.com/jgarber/redclo...

• #### Bil KlebMarch 7th, 2009 @ 05:46 AM

• State changed from “open” to “resolved”

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

Help contribute to this project by taking a few moments to create your personal profile.

RedCloth is a Ruby library for converting Textile into HTML