I am trying to export parameter tables to word using the VIKTOR WordFileTag. The problem I am facing is that some of my parameters are design values and therefore I want to add a subscript d to the parameter symbol. I have however been unable to do so, for other subscripts I have used unicode characters but unfortunately subscript d does not exist in the unicode standard. One of the parameters I want to write is cd, I have tried the following:
c<sub>d</sub> ā This causes word to crash when trying to open the file
c_d ā This writes c_d in word
c{_d} ā This writes c{_d} in word (LaTeX math mode)
c_{d} ā This writes c_{d} in word (LaTeX math mode)
c_d ā This writes c_d in word
Is there any way of writing a subscript d in word using the WordFileTag? As a sidenote I am also exporting the tables to Excel using the xlsxwriter package. Here c_d does work in order to add cd to the table headers
Normally you want all formatting done in Word. So what you can do is make a seperate tag voor de subscript in word. And put the complete tag in subscript.
Since the tag will be replaced by the value, the value will be in subscript.
Something like this:
@mweehuizen I have used your proposed solution and it works perfectly. In hindsight it makes sense that the formatting has to be done in Word and my code is now a lot cleaner since I can omit lots of unicode characters now.
@mslootweg I did not get the chance to look at the packages you suggested since I am on a tight schedule deadline wise. It looks interesting though and Iād like to see if in the future I have some time to look at them.