Use a google sheets formula to set text value as italic - google-sheets-formula

I'd like to concatenate values in a text cell so that a part of the cell is standard font and a part of it is italic. I'm envisioning something like this:
="("&italic("text sample")&")"
... where the enclosing parentheses are standard font and the text is italic. So the result would look like this: (text sample). Obviously, my example is not an actual formula.
Anyone know how to do that?
Thanks!

After quite a bit of research, looks like there is no way to do this with native google sheet functions. A custom function would be needed. Not really a big problem, but a function that I wish were there to use.

Related

macOS using html tags in nstextfield

Im wondering is there any ways to make this possible:
I have a nstextfield(or nstextview). And I also have one button, clicking on that should activate Bold mode for selected text, or the text that would written further.
First idea I had - is to use attributes for characters that would be written further, but this idea is not so good, as I would need to save that string in file later. I can save attributed string, but this gives me not proper format, what I would like to see is kind of or smth like that.
If I understand correctly your "First idea" is correct. Within your program you use NSAttributedString to add bold etc. your text. When you wish to save the text you can convert to HTML, or a number of other formats, and reading these formats and converting back to NSAttributed is also supported. A good place to start is Formatted Documents and Attributed Strings.

Change font style when typing in powerpont

I am using PowerPoint2013 for create a presentation about math. And I do not want to use "equation object". I chose Italic time new roman font and I write for example A=(a1,a2,...) but it show me A=(a1,a2,...) instead of A=(a1,a2,...). Except letters, other characters not to be italic style.
So if a character (that I write) be a letter then automatically must be show italic style, and if not, must be show normal style.
How can I do.
I'll present a few options here:
VBA
You could use VBA to italicise only the letters on a slide. If this is something that could be useful then let me know and I'll give you a few pointers. A few downsides though:
It wouldn't work in real time. Also, not all letters should be italicised when typesetting math; for example, cos(x).
It still won't look great. Times is not a mathematical font.
Beamer
Most university lecturers will use LaTeX with Beamer to create mathematical presentations. It will export each slide as a static .pdf (i.e. you won't be able to use animation other than things appearing one by one), but will look much more professional than powerpoint, and you will be able to take advantage of LaTeX's wonderful maths typesetting.
TeXPoint
I haven't used this myself, but it is a plugin for powerpoint which lets you use LaTeX to typeset equations: http://texpoint.necula.org/
Out of interest, why do you not want to use PowerPoint's built-in equation editor?

Matlab Text mode subscripts too big in axis label (LaTeX interpreter)

If I have the axis label $x_\textrm{ABC}$, the ABC is way too big. I tried $x_\textrm{\scriptsize ABC}$ and $x_\textrm{\tiny ABC}$, but that prevents the LaTeX code from being interpretted (I end up seeing the raw code instead of the formatted math). How does one shrink the subscript text size when the subscript is a name that needs to be spelled in text mode?
I posted this to usenet yesterday, but no response so far.
I also tried to modify the text in Acrobat Pro, but I can't actually highlight the individual series of characters (it's the y-axis label).
Finally, I tried to modify it in inkscape, but same problem.
A respondent at the usenet link provided the answer: To use \mathrm instead of \textrm. It looks way better.

How to change the spacing between letters in a NSFont?

I'm trying to change the letter spacing in a NSFont (such as Gill Sans). Is this possible or will I need to load my own custom font?
Though I suppose fonts might specify some kerning hints, kerning is really an attribute of rendered text. So the answer to your question depends on how you're going to render your text to the screen.
If you're using NSAttributedString, you can look at the NSKernAttributeName attribute (see the Constants section in the documentation. If you're using CoreText and CFAttributedString, you can look at the kCTKernAttributeName attribute (see the Constants section in the documentation.
If you're using something else to render text, then the answer (if there is one; not all text rendering methods support advanced customization) will be dependent on that something else.

How to write a subscript and superscript in Matlab that will be displayed in Graphical User Interface(GUI)?

I want to have a subscript and superscript in my GUI in Matlab. So far I have tried to use x_2 and x^2 and neither of them work. Is there anyone who knows how to do this?
Thanks in advance!
From http://www.mathworks.com/matlabcentral/newsreader/view_thread/158410#398940
You can use an undocumented feature of all Matlab uicontrols, which is
the fact that they use underlying Java Swing controls, and these in
turn accept any valid HTML strings. So you can do the following for
example:
uicontrol('string','<html><b>1<sub>2</sub>3<sup>4</sup>5</b></html>')
This is equivalent to the tex string '\bf1_23^45\rm'. You can set font
faces, colors, sizes, bold/italic and any other valid HTML 3.0
property. It's limited, but should do the trick in most conceivable
cases.
The same is true for tooltips, by the way: try setting multi-line
(<br>) multi-colored (<font color="red"> ... </font>) tooltip once and
you'll never use the standard boring single-line black tooltip
again...
And just in case you were wondering - yes, it also works for menus,
listboxes etc.

Resources