Report Generator - Writing subscripts within text

I'm using the report generator and would like to include a variable letter with a subscript, for instance Q_turbine. Is there any way to get the report generator to write the subscript within a text. I know how to the the LaTeX commands to add subscripts to an axis label, but I'm not sure how this would work for plain text.

댓글 수: 2

Which Report Generator element do you want to contain the subscript?
Ryan
Ryan 2011년 4월 20일
I am looking for either the text or paragraph component.

댓글을 달려면 로그인하십시오.

답변 (2개)

Oleg Komarov
Oleg Komarov 2011년 4월 20일

0 개 추천

EDIT

This is what you get

%%
% My solution:
%
% $$ Q_{turbine} $$
%
% Jarrod's: 
%
% <html>
% Q<sub>turbine</sub>
% </html>

댓글 수: 9

Ryan
Ryan 2011년 4월 20일
The text component just reads this as text. It reads the line literally.
Which version do you have?
Ryan
Ryan 2011년 4월 20일
I hasve 2007b with RG 3.2.1.
Unfortunately you cannot embed latex equations with that version: http://www.mathworks.com/support/solutions/en/data/1-6CKOEZ/index.html?product=MR&solution=1-6CKOEZ
A workaround is suggested in the technical solution above.
Ryan
Ryan 2011년 4월 20일
I am using that work around to produce any of my equations. What I have is a text discussion that includes a name of a variable that has a subscript.
Does 2010b solve this issue?
Yes but the quality of latex equations is poor.
Ryan
Ryan 2011년 4월 20일
So, I could use '%% $$ Q_{turbine} $$ in Matlab 2010b and this would work? I understand the issue with the LaTeX equations being poor. At least there is that work around.
Ryan
Ryan 2011년 4월 20일
I think I understand the confusion. I'm using the Report Generator toolbox, not the publish command. Your solution works for the M-file publishing, but not the text component in the Report Generator.
Sorry, didn't get it! Never used report generator, can't be of any help.

댓글을 달려면 로그인하십시오.

Jarrod Rivituso
Jarrod Rivituso 2011년 4월 20일

0 개 추천

Not sure if this meets your needs, but it seems like you could write HTML formatted text in a separate file and then include it using the "File" component.
In case you don't know, the < sub > tag is used for subscript in HTML:
This is a subscript: Qturbine

카테고리

도움말 센터File Exchange에서 MATLAB Report Generator에 대해 자세히 알아보기

질문:

2011년 4월 20일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by