[texworks] Scripting: Empty message box

Stefan Löffler st.loeffler at gmail.com
Tue Sep 6 18:38:29 CEST 2011


On 2011-09-06 13:11, Paul A Norman wrote:
> This behaviour has got me foxed. Any one spot what I'm doing wrong please?
> This'll generate a drop-down choice, then process the result and show
> the text of item chosen, accept in  special cases like  "<SPAN ""<SPAN
> QQ=\"aaa\">"  where there is correctly a space in the text. It comes
> out with a blank message box!
> While "<DIVzz=\"xx\">"  (no space)  works fine.

It took me a while to figure this out, but:
Qt seems to interpret (a subset of) HTML instructions in message boxes.
While 'DIVzz="xx"' is not an accepted tag, 'span' is.
To verify, you can simply use:
                       TW.information(null, "< object chosen",

So, the way to go would be to replace '<' by '<' (and possibly other
entities as well; I don't think Qt is too picky about this, though, and
without < there no longer are any valid HTML tags).
I don't want to do this on the C++ side, however, as that would
effectively kill this styling feature.


More information about the texworks mailing list