Tag Info

1

There are a few tools that can do this conversion process automatically. My preference is ansifilter. To use ansifilter, first, install by following the instructions here. Now, pipe the command of interest through ansifilter. For your example you would run: git log --color --graph --oneline | ansifilter --latex > log.tex The resulting log.tex is a LaTeX-...

1

The Boadilla theme internally loads the rose color theme, in which the colors of the block title and block body are defined as follows: \setbeamercolor{block title}{use=structure,fg=structure.fg,bg=structure.fg!20!bg} \setbeamercolor{block body}{parent=normal text,use=block title,bg=block title.bg!50!bg} Since the block body background color is defined as ...

2

You can easily do that table with nicematrix. The output will be perfect in all the PDF viewers, at all levels of zoom (you won't have rules which seem to vanish). However, you need several compilations (because nicematrix uses PGF/Tikz nodes). \documentclass{article} \usepackage{nicematrix} \begin{document} \begin{NiceTabular}{ccllll}% [ vlines , ...

2

A solution without multirow, based on collcell and stackengine: \documentclass{article} \usepackage{amsmath} \usepackage[table, svgnames]{xcolor} \usepackage{multirow, hhline} \usepackage{collcell} \newcolumntype{L}{>{$\collectcell\Vectorstack}l<{\endcollectcell$}} \usepackage[usestackEOL]{stackengine} \setstackEOL{\nl} \setlength{\extrarowheight}{2pt} ...

3

With \rowcolor for each row and a different placement of the \multirow commands, you can achieve the following output. Personally, I'd prefer a different colorless approach that also removes almost all lines in the table. I have also included the code for this approach as well: \documentclass{article} \usepackage{geometry} \usepackage{multirow} \usepackage[...

1

colortbl makes the coloured panel with \color but it expects that that command is related to the color definition command used to define the color. You can make its wish come true by defining \color to be \color_select:n \documentclass{article} \usepackage[table]{xcolor} \usepackage{l3draw} \ExplSyntaxOn \color_set:nnn {sampleredexpl} {RGB} {21,71,158} \...

3

As the documentation grfguide writes: There is a different type of problem that will occur for all drivers. Due to certain technical difficulties, it is possible that at points where the colour changes, the spacing is affected. color commands insert whatsits and in certain places this is quite a pain. So if possible try to insert color changes in ...

1

The right way is \textcolor{blue}{\textbf{\MakeUppercase{#1}}} There's no point in having \bf (which should be \bfseries, for \bf has been obsolete and deprecated for 25 years) inside \MakeUppercase in the first place. Also \MakeUppercase{\bf #1 } introduces an unwanted space; the fact that this space will be ignored because the line ends does not justify ...

4

mcode is not in the standard distributions but you can see the same effect using xcolor \documentclass[a4paper,12pt]{extarticle} %% Language and font encodings \usepackage[english]{babel} \usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc} %% Sets page size and margins \usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm,marginparwidth=1.75cm]...

1

\documentclass{article} \usepackage[table]{xcolor}% http://ctan.org/pkg/xcolor \begin{document} \begin{tabular}{l|c|r} \hline Some & \cellcolor{blue!25}coloured & contents \\ \hline \end{tabular} \begin{tabular}{ | l | l | l | } \hline A & B & C \\ \hline D & E & \cellcolor{green}F \\ \hline G & H &...

1

Edit: New, much better solution I came up with an implementation with works without the detour via colormap access=direct. This way only requires knowledge about the appearing point meta min and point meta max values, which is for phase plots usually clear and is easy to extract from the data. Thus, it is much more flexible, no extra data preparation is ...

0

Go to Document > Settings > LaTeX Preamble and add the following line: \renewcommand{\lyxadded}[3]{{\color{red}#3}} Make sure to double-check everything carefully (i.e., that this command doesn't have any unintended consequences) before submitting.

1

With tcolorbox it is easy. This code is based on this post. Of course, you can combine this with other tcolorbox features. Here is a basic variant. \documentclass{article} \usepackage{tcolorbox} \tcbuselibrary{skins} \usetikzlibrary{calc} \definecolor{pride1}{RGB}{136,205,248} \definecolor{pride2}{RGB}{226,168,182} \tcbset{pride/.style={enhanced,hbox,colback=...

3

Force the colors to use the same color model, either cmyk or rgb: \documentclass[border=3mm]{standalone} \usepackage[dvipsnames,rgb]{xcolor} %<-- or cmyk \usepackage{tikz} \begin{document} \begin{tikzpicture} \node[left color=OliveGreen!60, right color=MidnightBlue!50] (Trd) at (0,0) {Trainingsdaten}; \node[fill=OliveGreen!60] (Trd) at(0,-1) {...

0

The problem is still present with the class revtex-4.2. With the environment {NiceTabular} of nicematrix (similar to {tabular} of array), you have directly the output you want. In fact, the output is better than with the class article because the rules won't seem to vanish in some PDF viewers at some levels of zoom (as in the picture of the OP). \...

3

I take it you build your document's bibliography by hand. If this assumption is correct, all you need to do to achieve your achieve is to (a) use \bibitem instead of \item in the thebibliography environment, (b) load the cite citation management package and use \cite commands to generate numeric-style citation call-outs, and (c) load the hyperref package and ...

1

Let me turn my old comment to an answer: you need to correct spel color names: instead of dvipnames is correct dvipsnames the package xcoloris loaded bytikz` package, so you not need to load it again (and eventually have problems with options clash) for your \newcommand\bs[1]{\boldsymbol{#1}} you need to load amsmath package. Instead it I would use the bm ...

4

First, I guess from your code that you misunderstood the basic commands of the xcolor package. Its simplest commands that color a text are \color and \textcolor. \textcolor takes two mandatory arguments, the first being a valid color, and the second being the input you want to be output in that color. I think this is how you intended to use \color, but that'...

6

Here, I build it from scratch as a TABstack. I use tokcycle only insofar as employing it's token-list building macro \addcytoks to build the \cytoks token register. I use listofitems to parse the coefficients and to build up the token register, which in the end gets passed to the TABstack. Syntax is \mysystem{<color1>}{<color2>}{<Variable>}...

3

You can try with Asymptote. I will describe my code in detail for you. This code can be compiled at http://asymptote.ualberta.ca/ unitsize(1cm); /* page 48 (official documentation) To make the user coordinates of picture pic represent multiples of x units in the x direction and y units in the y direction, use void unitsize(picture pic=currentpicture, real x, ...

0

Got it (partially) working, thanks to the comments above! After redefining \LT@makecaption I could solve it by only adding \caption{...}\label{...} \\ to the table. Here is the working version from the code above: \documentclass[12pt]{article} \usepackage{longtable} \usepackage{color} \usepackage{xcolor} \usepackage{colortbl} % redefine longtable caption \...

2

Here are two ways to emphasise the different functions. In the first, I use the evaluate key to calculate a tint factor that can be used in a colour declaration, thus making it possible to use an expression in such a colour declaration. In the second, I use the TikZ library overlay-beamer-styles to modify a style depending on which slide it is on. So in ...

4

Not only the line color, cycle list in pgfplots can also control other aspects like the drawing patten, marker shape and marker options. The following example sets color series foo (the actually used color-spec is foo!![<n>]) as drawing color. You may also want to use foo as the current color of that series in marker options. Noted that pgf currently ...

5

The following code compiles in 10 seconds. \documentclass[aspectratio=169,10pt,notheorems]{beamer} \setbeamertemplate{navigation symbols}{} \setbeamercolor{background canvas}{bg=black} \setbeamercolor{normal text}{fg=white} \usepackage{pgfplots} \pgfplotsset{compat=1.17} \begin{document} \begin{tikzpicture} \foreach\n in{1,...,10}{ \path[save ...

1

Like this? I have added only \usepackage{xcolor} and \textcolor{blue}{...}. \documentclass[10pt]{article} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage[normalem]{ulem} \usepackage{hyperref} \usepackage{xcolor} \hypersetup{ colorlinks=true, urlcolor=blue, urlbordercolor=blue, pdfborderstyle={/S/U/W 1} } \urlstyle{same} \...

3

A simple solution with \makebox: \documentclass{article} \usepackage{showframe} \renewcommand\ShowFrameLinethickness{0.3pt} \usepackage{xcolor} \begin{document} \begin{itemize} \item \makebox[\linewidth]{$\color{red}\displaystyle y=x^2$} \item Blah blah blah. \end{itemize} \end{document} Edit: to obtain the same result with , you can load nccmath ...

10

tcolorbox, with use in math environment(s): \documentclass[dvipsnames]{article} \usepackage[most]{tcolorbox} \colorlet{LightLavender}{Lavender!40!} \tcbset{on line, boxsep=4pt, left=0pt,right=0pt,top=0pt,bottom=0pt, colframe=white,colback=LightLavender, highlight math style={enhanced} } \begin{document} \tcbox{Hello} world!...

2

Using a color picking tool of your choice you can obtain the RGB values corresponding to the text color. Using xcolor you can then define this color with the previously obtained RGB values and use it later on: \documentclass{article} \usepackage{xcolor} \definecolor{myorange}{RGB}{221,110,78} \begin{document} text \textcolor{myorange}{orange text} text \...

2

Here is how to do it with thmtools: \documentclass{article} \usepackage[svgnames]{xcolor} \usepackage{amsthm} \usepackage{thmtools} % \theoremstyle{definition} \declaretheorem[numberwithin=section, title=\color{Chartreuse}Definition]{definition} \theoremstyle{plain} \declaretheorem[sharenumber=definition, title=\color{Tomato}Proposition]{proposition} \...

3

On page 20 of the manual for beamer, you find \documentclass[ 10pt, xcolor={usenames,dvipsnames}, ]{beamer} I recommend this way of typing long list of options to classes, so one has all of them in view and commenting/uncommenting them is easier.

1

The document class beamer load (among others also) package xcolor, so you not need to load it again. If you do, as you show in your question, you get clash between xcolor options. So, in your case just remove second line (with xcolor) in the code: \documentclass[10pt,dvipsnames]{beamer} \usepackage{pgfpages} \usepackage{tikz} \begin{document} \begin{frame}...

3

\documentclass{article} \usepackage{amsmath,xcolor,environ} \NewEnviron{pmatrixcolor}[1][red]{% \colorlet{currentcolor}{.}% \mathinner{\begingroup\color{#1}\left(\color{currentcolor}% \begin{matrix} \BODY \end{matrix} \color{#1}\right)\endgroup}} \begin{document} \[ \begin{pmatrix} 1 \\ 2 \\ -1 \end{pmatrix}...

0

Unfortunately, there is no MWE (minimal working example) in the question, and I am not sure I understand what you are trying to do. If the links are the same color as the headings in the document and the links in the table of contents are different colors, nobody knows what a link is and what is not a link. Nevertheless it is possible to have blue links and ...

Top 50 recent answers are included