I am having difficulty to bold the symbol in plt.text although i have tried using the method as \boldmath and weight="bold" but still cannot work. (Refer to the screenshot) Hence, I would like to seek you all advice on this.
I have tried using \boldmath and weight="bold" command and expect it works but end up did not work
Related
I want to search for multiple codes appearing in a cell. There are so many codes that I'd like to write parts of the code in succeeding lines. For example, let's say I am looking for "^a11","^b12", "^c67$" or "^d13[[:blank:]]". I am using:
^a11|^b12|^c67$|^d13[[:blank:]]
This seems to work. Now, I tried:
^a11|^b12|
^c67$|^d13[[:blank:]]
That also seemed to work. However when I tried:
^a11|^b12|^c67$|
^d13[[:blank:]]
It did not count the last one.
Note that my code is wrapped into a function. So the above is an argument that I feed the function. I'm thinking that's the problem, but I still don't know why one truncation works while the other does not.
I realized the answer today. The problem is that since I am feeding the regex argument, it will count the next line in the succeeding code.
Thus, the code below was only "working" because ^c67$ is empty.
^a11|^b12|
^c67$|^d13[[:blank:]]
And the code below was not working because ^d13 is not empty but also this setup looks for (next line)^d13[[:blank:]] instead of just ^d13[[:blank:]]
^a11|^b12|^c67$|
^d13[[:blank:]]
So an inelegant fix is:
^a11|^b12|^c67$|
^nothinghere|^d13[[:blank:]]
This inserts a burner code that is empty which is affected by the line break.
I need to indent some math stuff in the \details section of my .Rd documentation to enhance its readability. I am using mathjaxr. Is there any way to indent without installing roxygen2 or similar?
The math stuff is inline, so simply setting to display using \mjdeqn won't solve this.
I seem to have a reasonable "cheating" work around for indenting the first line using mathjaxr, at least for the PDF and HTML output.
We need to do two things:
Use the mathjax/LaTeX phantom command. phantom works by making a box of the size necessary to type-set whatever its argument is, but without actually type-setting anything in the box. For my purposes, if I want to indent, say, about 2 characters wide, I would start the line with a \mjeqn{\phantom{22}}{ } and following with my actual text, possibly including actual mathy bits. If I want an indent of, say, roughly 4 characters wide, I might use \mjeqn{\phantom{2222}}{ }.
Because mathjaxr has a problem with tacking on unsolicited new lines when starting a line with mjeqn, we need to prefix the use of phantom in 1 above with an empty bit of something non-mathjaxr-ish like \emph{}.
Putting it all together, I can indent by about 2 characters using something like this:
\emph{}\mjeqn{\phantom{22}}Here beginneth mine indented line…
I need to explore whether the { } business actually indents for ASCII output, or whether I might accomplish that using or some such.
I am having trouble getting this to work, I think it is a pretty easy fix. The standard way of formatting your code is like
$spreadsheet->getActiveSheet()->getStyle('C3:C6')
However when I try to add a variable for each of the numbers I can not get it to work, here is what I have tried:
$spreadsheet->getActiveSheet()->getStyle('C'.$var1.':C'.$var2)
but this needs a trailing '
$spreadsheet->getActiveSheet()->getStyle('C'.$var1.':C'.$var2."'")
Also doesn't seem to work.
As part of my feature engineering, I need to parse text strings from different languages and keep text enclosed within parentheses. Everything was going well until I encountered a very strange phenomenon. For some languages, the parentheses I need to find look slightly different, and various regexp options fail.
I'm pasting screen-shots because strangely, copying and pasting the strange parentheses changes it to a 'normal' one, so I can't set up a different regex to find those separately.
Notice that the parentheses in the first entry look normal, but for the second entry, it appears sort of 'sharp'
If I use stringr's str_extract, the first instance works fine, but the second fails.
But, the encodings are the same. Anyone know what's going on?
[Edit: here are the results of dput on these same examples. dput apparently sees the parentheses as equivalent, even though grep does not]
c("Obnaružena poterâ šaga na (Motor šprica pipettora R1).", "(STAT tàn zhen Z zhóu ma dá) tàn cè dào diu bù<U+3002>")
Finally, I am actually copy and pasting the two parentheses from R into the code window below; they do appear different this way. First is normal, second is the strange one.
( (
For example, in http://homepages.cwi.nl/~paulv/papers/algorithmicstatistics.pdf at the bottom of page 5 and top of page 6, he uses a plus/equal symbol and a similar plus/lessthan symbol. I can't figure out how to make that symbol, and I'd like to quote him.
Any help?
Try $\stackrel{top}{bottom}$
You'd want something like this:
$X \stackrel{+}{=} Y$
This positions the plus sign above the equals sign. For example, the following code:
$K(x,y|z) \stackrel{+}{=} K(x|z) \stackrel{+}{<} I(x:y|z)$
produces the following output:
The Comprehensive LaTeX Symbol List (from here) is a great resource, and start for questions like this. You could also contact the author, it's possible he did some LaTex voodoo (math accents and such) to get it to work.
Best of luck.
PS: isn't \pm plus-minus, not plus-equals?
Here's the list of Latex Math Symbols. I don't see the two from the PDF you linked to. Do you know what they mean? You might be able to find an equivalent in the Latex list.