Replies: 1 comment
-
I don't see anything about |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been trying to use pandoc through the wrapper package pypandoc to convert RTF to HTML. It works perfectly for most everything I need, except any instance of an tag in the RTF is removed and not handled in the HTML output. I would expect that it gets converted to an tag with an href to handle the hyperlink.
For example, if I had this rtf:
{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\froman\\fprq2\\fcharset0 Times New Roman;}{\\f1\\fnil\\fcharset0 Arial;}}\n{\\colortbl ;\\red153\\green102\\blue204;}\n\\viewkind4\\uc1\\pard\\f0\\fs20 Example Content (\\cf1 Example RTF file content written here \\cf0\\v <autotext key="0A18D934" name="[SL method]" type="lookup" length="4"/>\\v0 )\n\\par \n\\par C1\n\\par R\\sub\\i t\\nosupersub\\i0 = 3 min.; SL \\i m/z\\i0 : 1000 (M+H)\\super +\\nosupersub .\n\\par R\\sub\\i t\\nosupersub\\i0 = 5 min.; SL \\i m/z\\i0 : 5000 (M-H)\\super -\\nosupersub .\n\\par \n\\par C2\n\\par \n\\par R\\sub\\i t\\nosupersub\\i0 = 10 min.; SL \\i m/z\\i0 : 800 (M+H)\\super +\\nosupersub .\n\\par R\\sub\\i t\\nosupersub\\i0 = 30 min.; SL \\i m/z\\i0 : 100 (M-H)\\super -\\nosupersub .\\lang1036\\f1\\fs16 \n\\par \\lang1033\\fs17 \n\\par }
and I convert it using pypandoc I get this:
<p>Example Content (Example RTF file content written here )</p><p>C1</p><p>R<em><sub>t</sub></em> = 3 min.; SL <em>m/z</em>: 1000(M+H)<sup>+</sup>.</p><p>R<em><sub>t</sub></em> = 5 min.; SL <em>m/z</em>: 5000(M-H)<sup>-</sup>.</p><p>C2</p><p>R<em><sub>t</sub></em> = 10 min.; SL <em>m/z</em>: 800(M+H)<sup>+</sup>.</p><p>R<em><sub>t</sub></em> = 30 min.; SL <em>m/z</em>: 100(M-H)<sup>-</sup>.</p>
but I would expect to see something like this:
<p>Example Content (Example RTF file content written <a href='javascript:void(0)'>here</a> )</p><p>C1</p><p>R<em><sub>t</sub></em> = 3 min.;SL <em>m/z</em>: 1000(M+H)<sup>+</sup>.</p><p>R<em><sub>t</sub></em> = 5 min.; SL <em>m/z</em>: 5000(M-H)<sup>-</sup>.</p><p>C2</p><p>R<em><sub>t</sub></em> = 10 min.; SL <em>m/z</em>: 800(M+H)<sup>+</sup>.</p><p>R<em><sub>t</sub></em> = 30 min.; SL <em>m/z</em>: 100(M-H)<sup>-</sup>.</p>
Is there a way to get the autotext tags converted properly?
Beta Was this translation helpful? Give feedback.
All reactions