# Tag Info

1

Would mixing some white to your colour do what you want? \documentclass[a4paper,fontsize=12pt]{scrartcl} \usepackage{empheq} \usepackage[x11names]{xcolor} \definecolor{alizarin}{rgb}{0.82, 0.1, 0.26} \begin{document} \begin{empheq}[box = \fcolorbox{black}{alizarin!75!}]{equation} \begin{split} I_1\dot{\omega}_1 + (I_3 - ...

2

To obtain colored vowels in Arabic script, we can use ArabTeX with the acolor.sty. The following example shows how to use it: \documentclass[a4paper,12pt]{report} \usepackage[utf8,latin1]{inputenc} \usepackage[french]{babel} \usepackage[T1]{fontenc} \usepackage{amsmath,amsfonts,amssymb} \usepackage{graphicx} \usepackage{arabtex} \usepackage{acolor} ...

3

You need no \begingroup and \endgroup: \documentclass{article} \usepackage[usenames, dvipsnames]{color} \definecolor{myred1}{RGB}{255, 0, 0} \definecolor{myyellow1}{RGB}{255, 255, 219} \definecolor{mygreen1}{RGB}{0, 255, 0} \definecolor{mygreen2}{RGB}{0, 126, 0} \definecolor{myblue1}{RGB}{0, 0, 255} \begin{document} ...

3

If you use \begin{tabular}{lcccc} then the rules are the same length as the coloured panels:

1

As I mentioned in comments to Steven's answer, I ended up writing a program to transform for example \myVerb+abc$\+ into \myVerb{abc\$\textbackslash } that is, escape characters and use {} as delimiters. That way I can dispose of verbatim and use \newcommand{\myVerb}[1]{{\ttfamily\color{fgcolor}{\hl{#1}}}} i.e. the third "solution" in my question. ...

4

Looks like you can add \tikzumlset{fill class = white, fill template = white} to your document to do this. And you can add color to a specific class using a tag like \uml-class[fill=white]{name}{blah}{blah} Per the documentation on page 20.

0

Since you seem to want expandable commands, you have to set the relevant bits at color definition time, because the extraction/conversion functions provided by xcolor are not expandable. Here's a way, with two “extended” commands for color definition, namely \Xdefinecolor and \Xcolorlet. \documentclass{article} \usepackage{xcolor,xparse} \ExplSyntaxOn ...

1

Perhaps too much ado for a 'simple' question, but this extracts the floating point values of the color specification. Improved version: Rounding the floating point values to integer numbers -- not failsafe of course! Basic explanation: extractcolorspecs yields the model and color specification in a command, the later giving a CSV list of floating point ...

1

I accepted @Mico's answer as best because his provided me a template to get exactly what I wanted with very little added work. In particular, I tinkered with the colors, the vertical alignment of the row heads, and created a nice little legend thing with minipage. \documentclass{article} \usepackage[table,svgnames]{xcolor} ...

3

Here's an attempt to replicate the table in the screenshot you posted. A comment: Given that you want to use colors, I would do away with all interior lines of the table. (I've already omitted all exterior lines.) \documentclass{article} \usepackage[table,svgnames]{xcolor} \begin{document} \begin{table}[ht] \arrayrulecolor{white} \centering ...

3

For overlapping lines, I would recommend using different styles such as dotted or dashed: Note: As this is a graph you really should consider using pgfplots instead of straight tikz. Code: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[ultra thick] % Axis and coordinates \coordinate (y) at (0,5); ...

5

Updated Answer Inspired by "Z-level" in TikZ \pgfdeclarelayer{front} \pgfdeclarelayer{back} \pgfsetlayers{back,main,front} \tikzset{% http://tex.stackexchange.com/questions/20425/z-level-in-tikz on layer/.code={\pgfonlayer{#1}\tikzset{every picture}\begingroup\aftergroup\endpgfonlayer\aftergroup\endgroup}, also in front/.style 2 ...

3

Changing your definition of the cycle a little bit by removing the final ,, which introduced an empty style for the 9th line and adding % for stability (didn't compile on my system without them) you get \pgfplotscreateplotcyclelist{mycyclelist}{% {UniBlau, line width = 2pt},% {UniGruen, line width = 2pt},% {UniOrange, line width = 2pt},% {UniRot, ...

2

The default color is black; but if you are unsure that some package might change it, it's possible to extract the one LaTeX will start with by saying \AtBeginDocument{\colorlet{defaultcolor}{.}} since . refers to the current color. Then you can say \color{defaultcolor} to go back to the starting color. Example: \documentclass{article} ...

4

The precise definition of black depends on the color model. Both color and xcolor load the 'default' dvipsnam.def file and especially xcolor uses \definecolorset{rgb/hsb/cmyk/gray}{}{}% {red,1,0,0/0,1,1/0,1,1,0/.3;% green,0,1,0/.33333,1,1/1,0,1,0/.59;% blue,0,0,1/.66667,1,1/1,1,0,0/.11;% brown,.75,.5,.25/.083333,.66667,.75/0,.25,.5,.25/.5475;% ...

2

Inserting this in your preamble works fine: \usepackage{bookmark} \bookmarkdefinestyle{TheStyleOfTheBookmark0}{color=blue} % Farbe Bookmark Chapter \bookmarkdefinestyle{TheStyleOfTheBookmark1}{color=green} % Farbe Bookmark Section \bookmarkdefinestyle{TheStyleOfTheBookmark2}{color=red} % Farbe Bookmark Subsection ...

2

One way is to use the \bookmark command and its color= option. However, hyperref adds automatically bookmarks unless the tocdepth is smaller than -1, so using \bookmark would double the entries. Setting tocdepth to -2 temporarilywill disable this, use\bookmarkthen with a destination and use the the relevant sectioning command then (or whatever should be ...

3

Just for fun with plain TeX \def\cpm{% \mathchoice% {\xcpm\displaystyle{.2ex}{.53ex}}% displaystyle {\xcpm\textstyle{.2ex}{.53ex}}% textstyle {\xcpm\scriptstyle{.16ex}{.43ex}}% scriptstyle {\xcpm\scriptscriptstyle{.11ex}{.35ex}}% scriptscriptstyle } \def\xcpm#1#2#3{\mathbin{\ooalign{% \raise #2\hbox{\pdfliteral{0 1 0 rg}$#1+$\pdfliteral{0 ...

4

\documentclass{article} \usepackage{stackengine,xcolor} \def\cpm{\mathbin{\ensurestackMath{\abovebaseline[-3.4pt]{% \stackunder[-3.5pt]{\color{green!70}+}{\color{red}-}}}}} \begin{document} $1\pm2\cpm3$ \end{document} If you need a version that works across math styles (EDITED to add \cmp support): \documentclass{article} ...

9

Use the siunitx package, you will have a much simpler code: \documentclass{article} \usepackage{color} \usepackage{siunitx} \begin{document} \begin{table} \sisetup{table-number-alignment=center} \begin{tabular}{S[table-format=1.5]S[table-format=-1.1]} \color{red}1.0 & 3.1 \\ 2.12346 & -4.4 \\ & 5.7 \end{tabular} ...

2

Correct the last line in your \lstset definition like this: {.3}{{\color{codeblue}.3}}{1} But the spacing then will be not consistent, so, I suggest another workaround: {.}{{\color{codeblue}.}}{1} Now this will produce:

2

You should call literate with an asterisk, like this: literate=* {0}{{{\color{codelightblue}0}}}1 {1}{{{\color{codelightblue}1}}}1 {2}{{{\color{codelightblue}2}}}1 % and so on This tells listings that literate should not override other syntax highlighting, including strings and comments. When I made that change, this is the output I got: ...

2

This requires direct access to the colormap functions of pgfplots: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.12} \begin{document} \begin{tikzpicture} \begin{axis}[ xmin=0, xmax=1, ymin=0, ymax=1, width=7.5cm, colorbar, colormap={mymap}{[1pt] rgb(0pt)=(0,0,0.5); rgb(22pt)=(0,0,1); rgb(25pt)=(0,0,1); rgb(68pt)=(0,0.86,1); ...

7

One way could be the soulpos package that support line breaks: \documentclass{article} \usepackage[paperwidth=80mm, paperheight=20mm]{geometry} \usepackage{xcolor} \usepackage{soulpos} \ulposdef{\hlc}[xoffset=1pt]{\mbox{\color{cyan!30}\rule[-.8ex]{\ulwidth}{3ex}}} \begin{document} Some math \hlc{$x^2+4$} and \hlc{some wonderfull text}. Need \hl{two} ...

0

The elsarticle class redefines \@citecolor (and several others) at the beginning of the document to blue, overriding the settings you are making in the preamble. You can override this override by appending the changes to the code executed at the beginning of the document by adding \makeatletter \AtBeginDocument{\def\@citecolor{DarkGreen}} \makeatother ...

12

You could load the xcolor package and use that package's \colorbox macro. The argument of \colorbox can be both text and math material. \documentclass{article} \usepackage[svgnames]{xcolor} % for 'lightgray' color \begin{document} \colorbox{lightgray}{word} \colorbox{yellow}{abcde} \colorbox{lime}{$a^2+b^2=c^2$} \end{document}

9

The command to change the colour of a highlight in soul is \sethlcolor{}. Here's an MWE: \documentclass{article} \usepackage{xcolor,soul} \sethlcolor{lightgray} \begin{document} \hl{this text has a light grey background} \end{document} You may encounter some trouble with mathematics in that the highlight does not expand vertically to fit the full height ...

1

I don't know the exact reason but if your mark options go before table then everything works. \documentclass{book} \usepackage{tikz} \usepackage{pgfplots} \usepackage{filecontents} \begin{filecontents*}{data.csv} Iter Abs1 Abs2 x y 1, 0.9317521, 1.1849326, 1.6130556, 0.8022207 2, 1.8946202, 1.1228282, 1.8964566, -0.5353802 3, ...

5

Imho you shouldn't assume that people don't print a pdf and so \pagecolor is not really an option. But you can a similar effect with layers: \documentclass{article} \usepackage{geometry,color} \geometry{papersize={4cm, 4cm}} %for the tests \usepackage{ocg-p,tikz,eso-pic} \AddToShipoutPictureBG {\begin{ocg}[printocg=never]{backgroundcolor}{oc1}{1} ...

0

I'd say no if there is a chance people will print the document, it'll come out terribly and drain their cartridges.

2

Your code is not "almost same as Khaled Hosny's code," you left out the most important parts of the code in the answer you linked to. If I follow Khaled's procedure and produce an amiri.lfg file, then copy all his code (not just some bits and pieces), I get colored output. No idea if the diacritics are in the correct position, I don't know any Arabic).

Top 50 recent answers are included