如何在matlab情节标题中使一个字母的字体大小更大 [英] How to make fontsize bigger for one letter in matlab plot title

查看:279
本文介绍了如何在matlab情节标题中使一个字母的字体大小更大的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使\mu的大小与其他字母的大小相同,我该怎么做?

I want to make \mu to appear the same size as the other letters, how can i do that?

title('Größen-Parameter x in dem spongiösen Knochen(300\mum, 600\mum und 2000\mum)');

推荐答案

要回答标题中的问题:

您可以使用{\fontsize{size},letter}调整字母(或任意长度的文本)的字体大小.例如:

You can adjust the font size of a letter (or a text of any length) with {\fontsize{size},letter}. E.g.:

title('Größen-Parameter x in dem spongiösen Knochen(300{\fontsize{14}\mu}m, 600{\fontsize{14}\mu}m und 2000{\fontsize{14}\mu}m)');

但是,您的实际问题似乎是亩的面积似乎比文字的其余部分要小.原因是Matlab在使用时默认将普通文本解释为文字字符( WYSIWYG )如果您调用诸如\mu之类的乳胶命令,则使用乳胶解释器.这将导致这些字母的显示方式有所不同.

However, your actual problem seems to be that the mu's appear slightly smaller than the rest of the text. The reason for this is that Matlab by default interprets normal text as literal characters (WYSIWYG) while using a latex interpreter if you call a latex command such as \mu. This causes those letters to be displayed differently.

当然,您可以增加这些字母的大小,但这不是很优雅,并且字母仍将具有不同的样式.作为替代方案,我建议对整个文本使用Latex解释器-除了解决您的问题之外,它还会看起来更好!

Of course you can just increase the size of those letters, but that's not very elegant and the letters will still have a different style. As an alternative I would suggest using a Latex interpreter for the whole text - aside from solving your problem, it will also look nicer!

title('Groessen-Parameter x in dem spongioesen Knochen (300 $\mu$m, 600 $\mu$m und 2000 $\mu$m)','interpreter','latex');

唯一的问题是您的德语特殊字符(ö和那个双倍的东西).要正确显示这些内容,您必须加载德语软件包ngerman.这并不容易,但是在此处有说明.但是,如果您使用的是德国Matlab(如果是这样的话),则可能不需要它.

The only problem are your german special characters (ö and that double s thingy). To display those correctly you would have to load the german language package ngerman. This isn't easy but there are instructions here. However, if you are using a german matlab (if that's a thing) it might work without that.

这篇关于如何在matlab情节标题中使一个字母的字体大小更大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆