(Answer) (Category) LON-CAPA User Help : (Category) Authoring : (Category) Authoring Problems :
How can I add a picture to my problem?
First, you will need to upload the graphic (e.g. .gif or .jpg file) to your construction space and then publish it. THen in the text area of your problem, add the following:
        <img src="/res/DOMAIN/AUTHOR/directory-of-picture/picture.jpg" />
(Advanced Users) You can also have:
        <img src="$picture" />
If $picture is one of many ranomized graphics, you will need to "Edit XML" and add all the various graphics to the <allow > tags at the bottom. Look at other problems that have images to see how the <allow > tag should be formatted.
More complete is the following:
<img src="picture.jpg" alt="(Picture of Large Duck)" width="400" TeXwidth="50%" />
This will probably alternate text for ADA-compliance and non-graphical browsers. The Web version will show up at 400 pixels wide (though it's typically better to use the natural width of the figure). In this case, the width of the figure in TeX will be half of one column.

[Append to This Answer]
Previous: (Answer) My students see 1.33333333333 as their answer, can I format this?
Next: (Answer) How do I create a problem?
This document is: http://help.loncapa.org/cgi-bin/fom?file=80
[Search] [Appearance] [Show This Answer As Text]
This is a Faq-O-Matic 2.719.
This FAQ administered by the LON-CAPA team at MSU. Submit a help request ticket to contact us.