context-dependent / qualtr

Qualtrics API tools for R
Creative Commons Zero v1.0 Universal
0 stars 0 forks source link

Rich text html artefacts confusing tex converter #2

Closed context-dependent closed 5 years ago

context-dependent commented 5 years ago

Chains of html tags created in the process of rich text editing, like this one:

<b>In general, how happy or unhappy do you usually feel?</b><div><b><br></b></div>

cause problems with converting to tex because commands like textbf{} demand that the contents be a single paragraph. The raw tex results of the current conversion process are, unfortunately, not.

I'm not sure how to incorporate this kind of check into the conversion pipeline, and it may require a substantial overhaul. For now, it is best addressed in the Qualtrics HTML editing view, where it's trivial to trim the artefacts. In this particular example, amending the question HTML to the following:

<b>In general, how happy or unhappy do you usually feel?</b>

resulted in error-free pdf generation.

context-dependent commented 5 years ago

Closing for now, as the Qualtrics solution is probably the easiest, but I will look into removing content-less divs and style tags.