# Tag Info

Accepted

### Providing an Authentic Finish to a TIKZ Gold Plate

You could draw a black disc with opacity that varies by angle. The opacity formula pictured is k·sin²(2θ), with k=.04 (so that the opacity oscillates between 0 and k). Larger values of k will make the ...
• 46.6k
Accepted

### How to Draw Gabriel's Horn

Almost same image but from a different point of view and with the sun in a different position. Using only tikz with the library math and layers. It may take some time to execute; the time can be ...
• 6,142
Accepted

### How to create an overlapped colored equation?

An attempt using annotate-equations package. \PassOptionsToPackage{svgnames}{xcolor} \documentclass{article} \usepackage{amsmath} \usepackage{annotate-equations} \begin{document} \newcommand\...
• 27k

### How to color math symbols?

In sufficiently new version of LaTeX, simply load xcolor package and use \mathcolor. Refer to texdoc mathcolor for documentation. \documentclass{article} \usepackage{xcolor} \begin{document} \$\...
• 7,573

### How can I color just the outside \left and \right brackets?

(I've updated answer in order to incorporate David Carlisle's suggestion to mention the new-ish \mathcolor macro.) I can think of three solutions. The first requires having access to a fairly recent ...
• 514k

### How to Draw Gabriel's Horn

I don't know if this helps, but I was able to do it with pgfplots as follows; \documentclass{beamer} \beamertemplatenavigationsymbolsempty \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=...
• 397

### How can I draw the shapes with gradient colors as shown in the below figure?

You can use \shade to get the basic effect. \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \fill[blue!10] (0,0) rectangle (12,4); \shade[left color=blue!30, right ...
• 46.6k

### Extract color command

The first method works only for colours defined with xcolor. As Ulrike Fischer pointed out, this is not a general solution. The second works only for colours defined with l3color. Caveat emptor ... ...
• 207k
Accepted

### #1# signature in macro definition

\def\foo#1#{xxx [#1]} is primitive syntax that makes the first argument everything up to a (mandatory) { so \foo hello world{} would produce xxx [hello world] It's used here to save the higher level ...
• 771k
Accepted

### Rainbow-colored text strings

You could use this adaptation of the gradient-text package: \documentclass{article} % rainbow text (based on the gradient-text package) \makeatletter \ExplSyntaxOn \clist_new:N\l_gtext_First_clist \...
Accepted

### minted: preserve colours even with gray option to xcolor

you can change the color model locally. But you then need to consider color conversion. If you load with the gray model, the standard colors like red or blue will be defined as gray, and so can't be ...
• 332k
Accepted

### Why does the "\left [" partially disappear when I color a row in a table? But [ does not disappear

matrix has a negative space which is causing the background to over-print, but you don't really want to redraw the background on nested tables anyway, so this disables it \documentclass{article} \...
• 771k
Accepted

### Problem with Tikzpicture and colors in a foreach loop

Here an answer based on This solution here. It worked after adding the commands edef,temp and noexpand \documentclass{article} \usepackage{pgfplotstable} \pgfplotsset{compat=1.18} \begin{document} \...
• 851
Accepted

### Colored underline and overline in math mode

I'd first typeset the math, so color will not enter the scene and then add the overline or underline around the constructed box. This allows nesting and also works for subscripts and superscripts. \...
• 1.1m
Accepted

### New color command \colorPlus[<color-when-printed>]{<color-in-PDF>} that behaves differently when viewed and printed

colorPlus needs to be implemented as an environment, since filling the font outlines with optional colours depending on OC settings is done after the text has been inserted. So, here is a solution ...
• 55.3k

### How can I color the "or equal" line of \le?

Building a symbol by stacking a < on top of a - and adjusting the heights yields something pretty similar to \le, and then it's easy to add color. Maybe the heights are not perfect, but it's close. ...
• 20.3k
Accepted

### How can I color the "or equal" line of \le?

Clip the top and bottom part, colorizing them separately (the upper part can be also colored), then overlap them with \ooalign. \documentclass{article} \usepackage{trimclip} \usepackage{xcolor} \...
• 1.1m
Accepted

### Color in mathematical symbols does not work with overrightarrow command

Many math constructs use math mode inside horizontal mode, so you want that \color{navy} is not applied in nested math. Not foolproof (beware of footnotes, for instance): \documentclass{article} \...
• 1.1m
Accepted

### Help to draw and hatch a parallelogram

\documentclass[tikz,border=1mm,usenames,dvipsnames]{standalone} % ateb https://tex.stackexchange.com/a/700945/: addaswyd o gwestiwn JoudaBouda: https://tex.stackexchange.com/q/700934/ \usepackage{tikz}...
• 207k
Accepted

### Incompatibility between beamer and pdfrender packages?

To work around the problem, you could switch to an older version of the latex kernel: \RequirePackage[2023/11/10]{latexrelease} \documentclass{beamer} \usepackage{pdfrender} \begin{document} \begin{...
Accepted

### Variable in Color Code?

You can use hsb/Hsb colours in tikz if you load xcolor with the rgb option to set the target colour model to rgb: \documentclass{standalone} \usepackage[rgb]{xcolor} \usepackage{tikz} \begin{...
Accepted

### The distributive law in a square

There many ways to do this with more and less sophisticated packages and more and less complex custom configuration. Here's an example using efbox, makecell and xcolor. If you want to typeset many ...
• 207k

### How to draw a double-color line with tikz

In case you want to have a double colored border around a node, you can do it like this: \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node[circle,...
• 1,390
Accepted

### Two issues regarding line numbers

First of all, $$...$$ is not supported in LaTeX documents and lineno can do nothing about this. The manual suggests wrapping the display with linenomath*. \documentclass[12pt]{article} \usepackage{...
• 1.1m

### Definite integral with colored boundaries

Just to follow up on @DavidCarlisle's comment: You need to write {\color{...}...}, not color{...}... for the terms in the lower and upper limits of integration. Actually, if your TeX distribution is ...
• 514k
Accepted

### colours in loops

The !<factor>! doesn't get sent through the PGF math parser (unlike the coordinates) so you can't put expressions in there. Fortunately, you can use the evaluate key on the foreach loop to ...
• 155k

### Help to draw and hatch a parallelogram

% !TEX TS-program = lualatex \documentclass{standalone} \usepackage{tkz-euclide} \usepackage{tkz-elements} \usetikzlibrary{patterns,patterns.meta} \usetikzlibrary{arrows.meta} \usetikzlibrary{shapes....
• 95.7k

### Can I use \substitutecolormodel{hsb}{rgb} rather than \selectcolormodel{rgb} to draw PGF/TikZ paths with a hsb-defined colour series?

Well the problem is that xcolor doesn't support stroke and fill colors. pgf has therefore its own backend commands for stroke and fill which write the correct literals and this backend doesn't support ...
• 332k

Despite its name, your "Star Subsection" is not a subsection, but a subsubsection. So to change the colour, you'll need \subsubsectionfont{\color{red}} (or just use \allsectionsfont{\color{...
Accepted

### Color a single listings comment delimiter (shell transcript language style)?

You can adapt @matexmatics' solution from https://tex.stackexchange.com/a/706145/36296 like this: \documentclass{article} \usepackage{listings} \usepackage{xcolor} \usepackage[T1]{fontenc} \usepackage{...

Only top scored, non community-wiki answers of a minimum length are eligible