Search the Legacy Support Archive (up to v2020)
  1. Read-only archive (2005–2024). Posting is closed. Need help with MediaLab or DirectRT 2027? Email service@empirisoft.com.

    All words · “exact phrase” · -leave out

    Advanced search

Adding formatting to question wording?

  1. #1
    jarvis24 Blair Jarvis, Administrator

    Adding formatting to question wording?

    [edited from support email]
    When typing in the question wording, is there a way to do any formatting at all? It would be helpful to be able to add emphasis (boldface, italics, and/or underline), superscripts and subscripts, and mathematical symbols (such as sigma for summation). So far the only way I've found is to create an image (by copying a textbox into paint and saving it as a .bmp or .jpg file), but then it's sometimes fiddly to position the image neatly.

  2. #2
    jarvis24 Blair Jarvis, Administrator
    You can use Word or any HTML editor to format question wording like this. Just make sure to save the file in HTML (web page) format and then enter the name of the HTML file in the background field of the given question item. See the zipped file wording.htm below for an example of an HTML formatted question wording.

    You can also open HTML files like this in notepad.exe for easy editing. For example, in the attached sample, you can add font tags around any text for which you like to change the color:

    this text is <font color="darkred">red</font>.

    will look like this:

    this text is red

    but <i>this text</i> is <b>blue!</b>.

    will look like this:

    but this text is blue!

    To display the attached sample, you would enter wording.htm in the background field for any given item in your questionnaire. For precise location, you can add parameters for height, width and positioning like this:
    wording.htm (t.1,l.1,w.9,h.2)

    It's usually a good idea to add these parameters--it creates a defined space for the HTML which prevents text from running off the screen and prevents the HTML from covering up other stuff on your page (e.g., button labels and such).

  3. #3
    jarvis24 Blair Jarvis, Administrator
    Some notes about the HTML file attached in the previous post:

    <body bgcolor="#ccccff"><p style="font-family:verdana; font-size:24px; font-color:navy">
    Please indicate which of the following emotions you experienced <font color="darkred"><i>while</i> watching the movie.</font>
    </p></body>

    The color #ccccff is the default backgorund colour used by MediaLab. Using this as the background colour in your HTML file will make it blend in nicely. The default background for HTML is usually white.

    Note that a great intro tutorial on fomratting text via HTML and the tags you can use can be found here:
    http://www.w3schools.com/html/html_formatting.asp

    Hope that helps!
    Blair

  4. #4
    with html files, how do I get rid of the scroll bar on the side if it is not needed?

  5. #5
    jarvis24 Blair Jarvis, Administrator
    You could define the HTML as a background to an Instruction Item rather than having it as an HTML Item. If you define the region where it's going to appear (see above), you can avoid the scroll bar, I believe. See background in the users guide for more detail.

  6. #6
    thanks for the info!

  7. #7
    I'm having a bit of trouble with this. I'm able to create the htm file (using Microsoft Word). I can even get it to display in MediaLab using the directions given. But when it displays, it displays the code, not how I want it to look. (I'm trying to italicize and bold different phrases in a questionnaire). I even copied the code straight from previous posts to be sure that it was written correctly. Is there a step that I'm missing?

  8. #8
    jarvis24 Blair Jarvis, Administrator
    Can you zip and post a folder containing a simple .que file and your html file? Then I can try it out here and see if I can replicate the problem and identifiy the issue.

  9. #9
    The code is displaying how I want it to look now (e.g, not the code, but as italicized text). Instead I'm having a problem getting it to look similiar to the rest of the questions in Medialab (same color, font, etc.) Also, the file takes up the whole screen (so that you can't even see the continue button).
    The attached files are from two items that we are trying to create, one being a set of instructions with a bolded phrase, and the second being a multiple response item with italics, that we'd like to have 5 response options (again, the file takes up the whole page). The third and fourth items are included to give an idea of what we'd like this to look like in Medialab (excluding the formatting).
    Thanks very much for your help with this.

  10. #10
    jarvis24 Blair Jarvis, Administrator
    Take a look at the revised sample and see if that's what you are looking for. I changed your two custom items to an instruction item and a scale response. Then I added your html files as "backgrounds" with defined areas for the html to appear. Let me know if you have any trouble with it!

  11. #11
    Hi,
    Thanks so much for your help with this, I've been able to do this for just about every item now. There is only one item that is still giving me trouble - it is a fill in the blank item. I've created the html file, and when I open that file separately, it looks just how I want it to. When I put the file into the item (with parameters so that it doesn't overlap the text box), it will display an error ("The page cannot be displayed. The page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to adjust your browser settings."). This doesn't make sense to me, since the html code for this is very simliar to the other ones in the experiment, and they all are working correctly. Does this have to do with the item type?

  12. #12
    How do I move down the scale response for a question? The question wording and scale response overlap. Thank you!

  13. #13
    abanks: To move the scale down, use the Top (t) parameter. More information can be found here: http://www.empirisoft.com/medialab/help/queparameters.htm#top

  14. #14
    I have a 12 item questionnaire setup with radio buttons for response. My issue is that a few of my question wordings require italics, and for the life of me, I can't figure out an easy way to do this.

    Is my only option to drop the "<ml.wording>" component in my custom item and create 12 seperate items in which each question is entered into the .htm file so I can utilise html formatting?

  15. #15
    jarvis24 Blair Jarvis, Administrator
    Interesting. I haven't tried this myself, but what about placing HTML tags around the words *in* the question wording (or other) field of the que? e.g., would:
    the &lt;i&gt;quick&lt;/i&gt; brown fox

    as .que question wording, or as a .que response option produce the word "quick" in italics when imported into the custom item? I expect it would.

  16. #16
    Doesn't look like the que files obey HTML commands like <i>italicization</i> within the question wording, unfortunately.

    This would be a HUGELY beneficial feature for future releases of MediaLab and DirectRT!!