RM2SF Change the typeface of non-math text to sans-serif

버전 1.6.0.0 (2.03 KB) 작성자: Mukhtar Ullah
Changes the typeface of non-math text with latex interpreter from roman to sans-serif.
다운로드 수: 480
업데이트 날짜: 2011/9/1

라이선스 보기

RM2SF changes the typeface of non-math text with latex interpreter from
roman (serif) to sans-serif. This is needed because the latex interpreter
typesets both math and text in roman irrespective of the font
specification. Therefore RM2SF places each non-math part of the text
inside \textsf{}.

RM2SF replaces, by \textsf{STR}, each non-math part STR of all text
objects in the current figure whose interpreter is set to latex.

RM2SF(FIG) applies to text objects in figure with handle FIG.

RM2SF(AX) applies to text objects in axes with handle AX.

RM2SF(TX) applies to text objects with handles specified in vector TX.

Example:

tx(1) = text(0.2,0.8, 'square of \$x\$ is $x^2$');
tx(2) = text(0.3,0.6, {'sine of $\theta$'; 'is $\sin \theta$'});
tx(3) = text(0.2,0.4, 'cube of $x$ is $x^3$');
tx(4) = xlabel('time $t$ here');
tx(5) = ylabel('concentration {\it C(t)} here', 'FontSize', 20);
set(tx(1:4), 'FontSize', 20 , 'Interpreter', 'latex')
rm2sf(tx([1 2 4]))

인용 양식

Mukhtar Ullah (2024). RM2SF Change the typeface of non-math text to sans-serif (https://www.mathworks.com/matlabcentral/fileexchange/29084-rm2sf-change-the-typeface-of-non-math-text-to-sans-serif), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2010b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Entering Commands에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.6.0.0

Now it should work for multiline texts also.

1.5.0.0

Corrected a typo in the description.

1.4.0.0

Updated the title

1.3.0.0

Cleanup

1.2.0.0

Fixed a few minor issues and redundancies.

1.1.0.0

Corrected a typo in description and help.

1.0.0.0