How to efficiently block text with a font colour? - latex

How can I make this markdown code for blocking text with a font colour applied?
I am beginner to markdown and I have applied the code below and it works, but is there a more efficient way of doing without repeating \textcolor{blue}{....} and >?
\textcolor{blue}{rm(A)}
\textcolor{blue}{rm(B,C)}
\textcolor{blue}{rm(A)}
Please help.

You can define a new command for color blue
\newcommand\blue[1]{{\color{blue}#1}}
Everytime you need to change the text color to blue, you just type
\blue{some text}

Related

Is there a way to hide the chart borders while converting Google Sheets into PDFs?

The grey chart borders show up, no matter what you do in Google sheets, when converted into PDF. Is there any other way or script to make it hide while PDF conversion?
For anyone still struggling with this issue, there is a workaround where you can set the border colour to white instead of choosing no border. With this change, PDF export won't show any border lines.
There is a quick hack to solve this issue instead of setting the border color to full white set the border color to another white color in custom border colors.
There's a little hack you can use, use a light color as the border color anything but white as it didn't work, you can use a very light grey color something like #fcfcfc. Worked for me perfectly.
Lads,
in case anyone stil struggles with this - dont save as .pdf directly but use the Print -> print to pdf function.
Hope it helps.

Latex color box inline with text

I'm trying to put together a LaTeX color box. The xcolor package \fcolorbox seem to be what I want, but I can't get the rendering quite correct. When I use
\fcolorbox{black}{red}{}
it renders a small box sunken to the bottom of the text line. The best I've managed to do is to fake it with a similar text color:
\fcolorbox{black}{red}{\textcolor{red}{--}}
However, I'm worried that this won't render correctly in all situations with defined colors. Is there a way I can declare an empty text box with full in-line text height? Is there another solution?
I'm basically looking for the code that produces the color boxes all through the document at ftp://ftp.dante.de/pub/tex/macros/latex/contrib/xcolor/xcolor.pdf. The boxes I'm referring to are used throughout, but the first instance is on page 4. Thanks.
The xcolor.dtx file in the same directory as the pdf contains the source for the package and the source for the documentation. The relevant bits from the source for the documentation:
\def\testclr#1#{\#testclr{#1}}
\def\#testclr#1#2{{\fboxsep\z#\fbox{\colorbox#1{#2}{\phantom{XX}}}}}
...
(Answer: 40\% \testclr{green} $+$ 60\% \testclr{yellow} $=$ \testclr{green!40!yellow}, e.g., |\color{green!40!yellow}|)
Basically, use \phantom{} on the contents of your color box, and make sure that at least one of the phantom characters is full-height.
Also, https://tex.stackexchange.com/

Latex font color

I'm trying to typeset a document I'm working on.
Currently I'm trying to format a piece of text such that the text consists of two colors: a fill color and a line color. In this way the header should pop out more.
I found \psset with options such as linecolor and fillcolor, but I can't get it to work. Can someone provide an example of how I could do this?
Just providing a color using the color-package is no problem, but also not what I want because using this package I can only provide a single color for a piece of text.
Maybe this is what you're looking for: Contour package. Here's the doc containing examples.

Which script editor can code-color hex color values?

I frequently work with lots of hexadecimal color values in my programs. Is there a script editor that can code-color the color values, based upon the colors they describe? .. (eg #FF0000 should be colored RED and 0x00FF00 should be colored GREEN)
The text editor UltraEdit has since version 20.00 the CSS color tooltip feature which is described as follows by IDM Computer Solutions, Inc.
Hovering cursor over a supported color definition causes a color "swatch" to be displayed. Users can CTRL+CLICK on "swatch" to invoke OS color picker to select a new color.
"Display CSS color tooltips" Configuration option added under Advanced -> Configuration -> Editor Display -> Miscellaneous
Detects and supports colors defined in the following formats:
Hex RGB
Functional notation RGB
RGBA
HSL
HSLA
Tooltips supported in the following file types:
HTML
CSS
Javascript
PHP
Perl
Python
Ruby
This feature does not syntax highlight the color value itself in the text file with the color according to the value. But it displays the color in a rectangle below the mouse pointer when mouse pointer is positioned over a color value in one of the supported formats.
So this feature of UltraEdit is not exactly what have been asked for, but is perhaps nevertheless very helpful for you.
In my point of view it does not really make sense to syntax highlight the color value itself in the color according to the value as this results most likely quite often in not visible or hard to see values. For example think about color value white with using white as text background color. Lots of combinations of text and background colors make the text very hard to read.
SynWrite editor can do it. #RRGGBB or rgb(rr, gg, bb) fragments are hilited.

Making LaTeX Beamer Black & White

Is there a way to make LaTeX Beamer output black & white? I need it for paper printing purposes. I'm using the default color theme, and for contrast reasons I need the title and everything to be black. If there is a black&white color scheme, I could use it, but otherwise I don't want other color schemes, with colored backgrounds. Maybe there are some commands which I can redefine?
Thanks.
You can also just add gray option to documentclass declaration:
\documentclass[gray]{beamer}
...
OK, found it after some more search. The answer is:
\setbeamercolor{frametitle}{fg=black}
In fact, you can change the color of all elements of your beamer theme using \setbeamercolor. You can use fg for changing the foreground and bg for the background. The problem of this is that you cannot use the traditional rbg scheme and you have to make very strange combinations of colors with a not-very-friendly way of giving the shares of each color you want to combine
Another possibility is to use \selectcolormodel{gray}
\documentclass{beamer}
\usetheme{CambridgeUS}
\selectcolormodel{gray}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\end{document}

Resources