[texworks] Scripting: Empty message box

Paul A Norman paul.a.norman at gmail.com
Wed Sep 7 11:09:10 CEST 2011


Thanks Stefan,

That's the only explanation that makes sense - will work around it.

We are using LaTeX to Html transformations through QtScript,  and have
found TeXworks, with user configuration tweaking, to actually be a
surprisingly  good html editor!

The problem suggests that Qt is not fully parsing things to establish
valid tags.
Qt only provides a limited subset of HTML, so it is possible for it to
be done properly.

They may have gone for a kind of short cut approach. I.e open tag
symbol present there for treat as tag with no further validation
against the subset and well formedness of html they make available.

Paul




On 7 September 2011 04:38, Stefan Löffler <st.loeffler at gmail.com> wrote:
> Hi,
>
> 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",
> "<b>Test</b>");
>
> 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.
>
> HTH
> Stefan
>



More information about the texworks mailing list