表达式中的上标和下标相同的字符 [英] superscript and subscript the same character in an expression

查看:80
本文介绍了表达式中的上标和下标相同的字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在情节中,我想要一个标题,该标题应具有:

In a plot I would like a title which should have:

字符串我的标题是",后跟由'引起的caharecter alpha(即alpha素数),alpha也带有下标G.

the string "my title is" followed by the caharecter alpha raised by ' (i.e. alpha prime) with alpha also having the subscript G.

我尝试过:

expression(paste("my title is ",alpha^{"'"}[G],")"))

,但是上面的代码将alpha提升为幂'G.如何在'上标而不在G下标?

but the above code raises alpha to the power 'G . How do I superscript the ' but subscript the G ?

推荐答案

以下任一方法都能解决问题:

Either of the following would do the trick:

alpha[G]^"'"
{alpha^{"'"}}[G]

它们的排版略有不同,因此请选择您喜欢的任何一个.

They are typeset slightly differently, so pick whichever you prefer.

这篇关于表达式中的上标和下标相同的字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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