Ways of expressing subscripted variable names in DITA?

Post here questions and problems related to editing and publishing DITA content.
B98
Posts: 5
Joined: Tue Nov 29, 2016 3:38 pm

Ways of expressing subscripted variable names in DITA?

Post 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>
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Ways of expressing subscripted variable names in DITA?

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply