# [LON-CAPA-users] Greek Characters in Formula Response

Harding, Gene L glhardin at purdue.edu
Mon Apr 20 16:53:23 EDT 2020

Thank you Dave, Mark, Stefan, and Stuart. I got it working. The easiest way I found to get the Greek characters was to display them in the LON-CAPA problem text, e.g., β, then copy them from the displayed problem, return to the editor, and paste where needed.
Best regards,

Gene L. Harding, PE
Associate Professor of ECET
Purdue University
574-520-4190
https://polytechnic.purdue.edu/south-bend/

-----Original Message-----
From: LON-CAPA-users <lon-capa-users-bounces at mail.lon-capa.org> On Behalf Of Raeburn, Stuart
Sent: Monday, April 20, 2020 9:12 AM
To: Discussion list for LON-CAPA users <lon-capa-users at mail.lon-capa.org>
Subject: Re: [LON-CAPA-users] Greek Characters in Formula Response

Gene,

You are referring to this post to the lon-capa-users list:
mail.lon-capa.org/pipermail/lon-capa-users/2014-December/004706.html

which references this demo problem: /res/fhwf/droeschl/misc/addchars.problem , which is published Source open.

With your Author role active, when you browse /res/fhwf/droeschl/misc/ , with the "Source Available" checkbox checked, you can click "Source Code" to import into your Authoring Space.  If you do that, do you get a working problem?

LON-CAPA includes a meta tag in the page header which includes charset=utf-8", which tells your web browser which encoding to use.  In the menus on Firefox, the "Text Encoding" option, under View, (which allows you to switch encoding) is grayed out in the case where a web page includes information about the encoding.

As regards editing a problem -- within the LON-CAPA XML editor you will enter a comma separated list of the characters in the addchars attribute, whereas within the LON-CAPA colorful editor, you will enter the same comma separated list in the "Click-On Texts (comma sep)" textbox.

As to how to enter each Greek character, you need to enter the appropriate unicode (UTF-8) character.

You could:

(a) use the character map for your particular OS, e.g., see: sites.psu.edu/symbolcodes/windows/charmap/ or sites.psu.edu/symbolcodes/mac/charview/

or

(b) visit: www.unicode.org/charts/U0370.pdf and copy and paste the character

or

(c) use a web site (there are many) which provides Unicode Character Search, and copy and paste the character you need).

Stuart Raeburn
________________________________________
From: LON-CAPA-users <lon-capa-users-bounces at mail.lon-capa.org> on behalf of Harding, Gene L <glhardin at purdue.edu>
Sent: Friday, April 17, 2020 9:33 PM
To: Discussion list for LON-CAPA users
Subject: [LON-CAPA-users] Greek Characters in Formula Response

Hi,

Does anyone know how to do Greek characters in a formularesponse? Someone shared a response from Stefan Droeschler several years ago, but I cannot get it to work:
<problem>

<script type="loncapa/perl">
$answer="ù+á*t"; </script> <startouttext /> <p><m>$\omega + \alpha t$</m></p> <endouttext /> <formularesponse answer="$answer">
</formularesponse>

</problem>

Is a cut and paste from MS Word OK for putting the Greek characters into the script and addchars statement? If not, how can I do that? Once that is done, how do you enter the Greek characters into the formularesponse textline field?

Best regards,

Gene L. Harding, PE
Associate Professor of ECET
Purdue University
574-520-4190
https://polytechnic.purdue.edu/south-bend/<https://urldefense.com/v3/__https://polytechnic.purdue.edu/south-bend/__;!!HXCxUKc!nvo635sbWhA7DBf_tztnMFVFsaCt03Ol2QdE_ZZeVlSqz8iCeE8bA70wl_HRNw\$>

_______________________________________________
LON-CAPA-users mailing list
LON-CAPA-users at mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-users