Page 1 of 1

Ways of expressing subscripted variable names in DITA?

Posted: Mon May 21, 2018 1:50 pm
by B98
Attempts at naming variables using subscripts will fail. Using TeX notation for illustration, the idea is that X_3 or t_P or TEMP_{hazard} are names of single objects, and I want to represent that in DITA.

Code: Select all

<varname>X<sub>3</sub></varname>
Invalid content was found starting with element 'sub'...
The failure is formally expected, and formally correct. Arguably, the DITA model does not reflect subscripted names as meaningful units. (Eventually, the model subsumes <sub> under typography, and what has typography got to do with variable names - I speculate :roll: and I digress.)

Are there different element types in DITA for me to use, other than resorting to MathML (which I am considering), that users of DITA could kindly suggest? Something that does permit <sub>. My current workaround is introducing <varname> elements in more places than I'd like to, as the single variables do not refer to objects, thus

Code: Select all

<equation-inline><varname>t</varname><sub><varname>P</varname></sub></equation-inline>
<equation-inline><varname>TEMP</varname><sub><keyword>hazard</keyword></sub></equation-inline>

Re: Ways of expressing subscripted variable names in DITA?

Posted: Mon May 21, 2018 3:10 pm
by Radu
Hi,

Other than what you are doing right now I'm not sure what's the best approach. How about not using <varname> at all or using <b> instead of <varname>?
You could also try to register on the DITA Users List (Yahoo Groups) and ask there, maybe you'll get better feedback from the community.

Regards,
Radu