How to get colored background in word wih R Markdown? - ms-word

My team wants to highlight a certain word by using a yellow background, as a reminder that this value needs to be edited manually.
Desired result:
I try to make this happen (inspired by this answer). I format a line of text in my reference text as Times New roman with font size 12, with bold text and a yellow background. I then save the format as a "character"-type style and I save it under "boldyellow" in order to avoid underscores.
In my r markdown document I write:
<span custom-style=“boldyellow”>SKRIV IN ANTAL</span> av **21** regioner moretext moretext.
With no obvious result:
Am I missing one or more steps I haven't tought of? Is this possible at all using this method?

Related

Fillable Pdf multi-line, Allow rich text formatting in Acrobat Pro DC: but it ignores line spacing/leading set in More

I'm on Win10, using Acrobat Pro DC 2021.011... to edit and Reader DC (same version) to test.
From experience and from reading forums etc, forms in these apps are maddening... but I have not been able to find any discussion (or solutions) to the following behavior...
The form I'm building for other employees' use has a large edit text box set to Multi-line and Allow Rich Text Formatting. It is set to a default font, Calibri and size 50pt. For most situations this will work for them; provides 2-3 lines for a short product description. But occasionally they want a smaller font and more lines... They know how to get the ctrl+e properties bar. But in my testing of this alternative situation they'll need sometimes, I'm finding it's impossible to get the smaller font size and more lines to work. Here's my process.
tab into text box. Ctrl+E for properties bar.
before typing I set the font size to 24
then I type in my 4 lines of text
then I tab to my next form field...
and kaboom... the field I just filled...it's line height is so large it's pushed some of the content invisible. I assume this is coming from the field's default font size, 50
And if I try to adjust the line height, by selecting all the text and then choosing in More...>Form Field Text Properties>Paragraph>Line Spacing
If I set it to Single and click Close/click into another field I get the very large leading (presumably for 50pt font (same as pic above after point 5)
If I choose Exactly and set to point size slightly larger, click Close/out of field, I get another ridiculous result where the 2/3 line have the height I set, but the space between the 1 & 2 second line is way too much and the space between the last line and 3rd line is way too small...
before tabbing or clicking out of field to another field
Good lord.. what is that! 3 different leading values in the same field; just after applying 1 value to all lines, all text in the field...
It makes no sense... it doesn't look like it regards your input at all, and just comes up with it's own random leading... I've fiddled with Space before/after and combinations of Line Height and nothing comes close to what we need... At this point I'm convinced the Acrobat tools for a stylizing text in a multi-line, allow formatting text field are useless. I'd be better off with my employees they can't format anything, ever. Just type one line and hit Tab or Enter...
What is going on! I'm trying to make a simple fillable form for other employees to use, but this kind of behavior makes that impossible (It's enough of a stretch to teach them to use the ctrl+E and do some styling of their text but this is bonkers and completely unteachable... there's not rhyme or pattern to teach!)
Hope someone can help or has seen this behavior too.

Changing the colour of curley braces inside VSC

I write content in VSC and I use handlebars to write content.
{{#jan}} Hello my name is Tony {{else}} Hi my name is Bob {{/if}}
Is there any way I can get the content inside the {{}} to highlight something like bright yellow? when I have loads of these in the docs, its hard to spot them when scrolling.
I've tried messing around with the workspace settings.js file but have had no luck. Thanks
The title of your question asks how to change the color of the brackets themselves, while the body asks for how to change the content in the middle.
here's a solution for the title part: the extension bracket pair colorizer will give you full control over curly brace colors. by default, it colors nested braces differently, but as per its documentation, you can configure it however you want. so if you choose only one brace color, they can both be yellow or whatever color you want
https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer-2

Add HTML but not in text mode of TinyMCE

I have a big text and like to highlight words that are trademarks. So within this big CDATA node I need to grab for multiple words like "ACME Soda Chips" and make them red.
currently I do something like this in a TinyMCE plugin:
// almost ...
var foo = editor.getContent();
foo.replace('ACME Soda Chips', '<span class="douh">ACME Soda Chips</span>');
editor.setContent(foo);
My problem now is, that such HTML is displayed in Text-Mode (where you see the content as plain HTML) and also submitted therefor stored to the database.
But what I like to have is:
Highlight a word in the visual mode
Do not store my surrounding span somehow
Optional: Do not show that I used a span and CSS-class to highlight things.
Hint:
I may completely do this wrong - please help.
I read some other plugins and honestly I don't understand what they do.
Imagine the whole text as one single big CDATA part but I like to highlight a specific set out of it.

Extract link and word from word file

I have Word file contains 10000+ lines among them 4503 words are blue & red colored. I want to extract all those blue and red colored word with its links.
As I have shown in image the link are on various number. And word are written before it.
Replace/ Format/ Font/ Font color: Automatic (or black)/ OK
Replace with ^p
Replace all.

In Applescript, finding only bold words in TextEdit causes app to hang

just trying to find a vanilla applescript way of setting a variable to all bold words of a document. I've looked for ways using Applescript in Word, Pages & TextEdit and TextEdit seems to be the only one (could be wrong, though).
The good news is that the following script works but the bad news is if the document is over 2 pages with let's say ~50 bolded words, TextEdit hangs.
Any other ways to get bolded words using Applescript?
tell application "TextEdit"
return words of text of document 1 where font contains "Bold"
end tell
Thanks
It may be that TextEdit is being unreasonably slow. I just used the following code for a document with 3600 words, with some random bold words interspersed throughout. It took way too long. I'd look into using different scriptable app, like Tex-Edit Plus (still goin' strong, still great).
The reason I used both "Black" and "Bold" is that some fonts use a "Black" variant instead of "Bold" when you make the text Bold (at least in TextEdit). Just to be clear, the following code works, but it is painfully slow. It may be that your code, if you waited long enough, works, too. :-( BUT keep reading :-)
tell application "TextEdit"
tell document 1
set thisManyRuns to count of attribute run of text of it
repeat with r from 1 to thisManyRuns
if font of attribute run r of text of it contains "Black" then
--do stuff
set color of attribute run r of text of it to {35555, 0, 0}
end if
if font of attribute run r of text of it contains "Bold" then
--do stuff
set color of attribute run r of text of it to {35555, 0, 0}
end if
end repeat
end tell
end tell
I just ran this text in Tex-Edit Plus and it completed in about two seconds:
tell application "Tex-Edit Plus"
tell document 1
set thisManyRuns to count of style run of text of it
repeat with r from 1 to thisManyRuns
set thisStyle to style of style run r of text of it
if on styles of thisStyle contains bold then
--do stuff
set color of style run r of text of it to {0, 35555, 0}
end if
end repeat
end tell
end tell
... so you might want to switch to that. Just a caveat that I had to put the style into the thisStyle variable before querying for the on styles property -- it would not work if I tried to do that in one line. I was working with an rtf file.