New answers tagged

1

The problem comes from text height and text depth defined in tikzpicture options. In this way, they apply to all nodes, and right hand text is a node, so its vertical size is defined by these values. If you doesn't use text height and text depth, all other nodes won't be aligned, so it's not convenient to suppress them. As I don't know how to forget ...


1

A simpler variant of Ulrike's solution, based on my answer to How to be able to use the number sign (#) in the URL of an underlined href \documentclass{article} \usepackage{xcolor,soul} \usepackage{etoolbox} \usepackage{hyperref} \hypersetup{colorlinks,urlcolor=blue} \makeatletter \patchcmd{\hyper@link@} {{\Hy@tempb}{#4}} {{\Hy@tempb}{\ul{#4}}} {}{} ...


0

Here is the code to add at the start of your document for reference in darkgreen. \usepackage{xcolor} \usepackage{hyperref} \definecolor{darkgreen}{rgb}{0.06, 0.78, 0.3} \hypersetup{ % reference colors colorlinks=true, linkcolor=darkgreen, pdfborder = {0 0 0}, filecolor=magenta, urlcolor=cyan, } \hypersetup{linkcolor=black}


1

\href has to do quite a lot \catcode-magic to handle all the special chars (like #) in urls, so all commands that take an argument and so fix the \catcodes are difficult to insert. You can try the following. But Imho underlining doesn't look good. It will only work for \href (I hope ...) Normal text will break over lines, urls probably not. \ul from soul ...


3

Adapting Werner's Lorem ipsum example, another (internal-to-hyperref) possibility is this: \documentclass{article} \usepackage{hyperref} \hypersetup{ allbordercolors=0 0 1, pdfborderstyle={/S/U/W 1} } \begin{document} Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut \href{http://any-URL}{pellentesque augue} est, id ornare nisi fringilla ...


1

You can set a specific style using something like this: \documentclass{article} \usepackage{hyperref,xcolor,soul} \let\oldhref\href \renewcommand{\href}[2]{\oldhref{#1}{\hrefstyle{#2}}} \newcommand{\hrefstyle}[1]{\color{blue}\ul{#1}} \begin{document} Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut \href{http://any-URL}{pellentesque augue} ...


5

You can use font={\usebeamercolor[fg]{block title}}. The reason for using font here is that \usebeamercolor as I understand it essentially inserts a \color{<color name>}, so you cannot use it as a colour name directly. \documentclass{beamer} \usepackage{tikz} \begin{document} \frame{ \begin{tikzpicture} \draw (0, 5) node (n1) ...


2

You seem to know how to add options to individual cells, with |[...]| already, so in that sense you've almost answered your own question: Add fill=<color> in those options, e.g. |[fill=blue!20]|. \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc,matrix} \usepackage{amsthm} \usepackage{colortbl} \begin{document} \begin{table}[h] ...


1

You can use following code in preamble to change color of links according to your choice.Use black instead of red if you want links in toc to appear black. \hypersetup{ colorlinks, linkcolor={red!100!black}, citecolor={blue!100!black}, urlcolor={green!100!black}}


2

I wouldn't do it, but ... you asked for it. \documentclass{article} \usepackage{xcolor} \begin{document} \tableofcontents \section{Wombat} {\color{blue!50!black} \section{Capybara} } \section{Mara} \end{document}


2

\subsubsection[Embedded Design]{{\color{red} Embedded Design}} The part in the square brackets, defines the optional title of a *section that will be shown in the toc


1

As i only want to do 2D-Plots, I can use the z coordinate as a temporary buffer for the meta value, if the viewing angle is set to be from the top. Probably not the most elegant way, but it works... Comparison linear / symlog colormap The Code of the colormap transformation \pgfplotsset{ symlog colormap trafo/.code={ \pgfkeysalso{% y coord ...


1

I think I got it. Hope this helps anybody as confused with latex as I am. Using the new pagestyle, I ended up with: \fancypagestyle{special_chapter}{ \fancyhf{} \fancyhead[RO]{% \begin{tikzpicture}[overlay,remember picture] \fill [color=black!20] (current page.north east) rectangle ($ (current page.south east) + (-1cm,0cm) ...


2

Beamer has a build-in option to number theorems, you can activate it with \setbeamertemplate{theorems}[numbered] The question how to colour it, has already an answer http://tex.stackexchange.com/a/87219/36296 \documentclass{beamer} \usepackage{etoolbox} \newtheorem{teorem}{Teorem}[section] \newtheorem{definicija}{Definicija}[section] ...


3

Here is a solution \documentclass{article} \usepackage{xcolor} \title{\textcolor{blue}{The title}} \author{Me} \begin{document} \maketitle \end{document} Update if ams class used \documentclass{amsart} \usepackage{xcolor} \colorlet{BLUE}{blue} \title{\textcolor{blue}{The title}} \author{Me} \begin{document} \maketitle \end{document}


1

I think the easiest way to do this is probably to define a colour newcol, say, which you then set appropriately. This avoids the problems caused by trying to deal with the colour setting while actually testing. Minimising the example a bit: \documentclass{article} \usepackage{tikz} \usepackage{ifthen} \definecolor{newgreen}{RGB}{173,194,0} ...


0

Some folks at Matplotlib have spent a lot of time thinking about this. There is an excellent talk here: https://www.youtube.com/watch?v=xAoljeRJ3lU Summary: Nathaniel Smith and Stéfan van der Walt designed a colourmap called Parula that, in an optimal sense, differentiates sequential data in a visually proportional way, projects well to grayscale and is ...


1

This can be accomplished by defining a new version of the autoref command that will have the desired formatting. For example, in the preamble, add: \newcommand\colorAutoref[1]{{\hypersetup{linkcolor=blue}\autoref{#1}}} %% allows for calls to \autoref{} that have a different color from other links. Then, in the document, where you want to add your ...


2

I extend Chris H's answer: I extented the pdfcolorsplit.py script with an option -r to reassemble all split parts again into a final pdf, by converting all b/w parts to grayscale before reassembling: use like (-p option worked the best) : ./pdfcolorsplit.py -p -v -s -r Report.pdf The code is here: #!/usr/bin/env python # Python 2 and 3 compatible. # ...


1

Unfortunaly there is no MWE in the question. With memoir you should use the header and footer commands of this class: \documentclass{memoir} \usepackage{blindtext} \usepackage{xcolor} \colorlet{ared}{red} \pagestyle{ruled} \makeevenhead{ruled}{\leftmark}{}{\rightmark} \makeoddhead{ruled}{\rightmark}{}{\leftmark} \makeevenfoot{ruled}{}{\thepage}{} ...


6

No need to use \colorlet. You can also specify directly the color model of the mix ... but anyway macho programmers use only wavelengths. :) \documentclass{article} \usepackage{xcolor} \begin{document} \colorbox{rgb:blue!1!cyan,1}{} \colorbox{rgb:cyan!99!blue,1}{} \colorbox[wave]{480}{} \colorbox{cmy:blue!1!cyan,1}{} \colorbox{cmy:cyan!99!blue,1}{} ...


1

Mixing Paul Gaborit's answer with xcolor wave model and color conversions: \documentclass[tikz, margin=2mm]{standalone} \begin{document} \begin{tikzpicture}[x=1mm,y=1mm] \foreach \wav in {380, 384,...,780}{ \definecolor{tmpcolor}{wave}{\wav} \colorlet{mycolor}[rgb]{tmpcolor} \fill[fill=mycolor,draw=white] (\wav,1) rectangle +(4mm,15mm); ...


16

The xcolor package defines blue as a RGB color and cyan as a CMY color. To make a mix, xcolor uses the color model of the first color and, if necessary, converts the second color. To convert the CMY cyan to RGB cyan, you may add \colorlet{cyan}[rgb]{cyan} in your preamble. \documentclass[tikz]{standalone} \usepackage{tikz} \colorlet{cyan}[rgb]{cyan} ...


7

I don't know the details behind this, but blue!1!cyan is not the same as cyan!99!blue. \documentclass[tikz]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \filldraw[blue!1!cyan] (0,0) rectangle (-1,1); \filldraw[cyan] (0,0) rectangle (1,1); \filldraw[cyan!99!blue] (1,0) rectangle (2,1); \end{tikzpicture} \end{document}


1

Similar solution, other package: \usepackage{color, colortbl} \definecolor{Gray}{gray}{0.9} \begin{document} \begin {table}[h] \caption {Table Title} \label{tab:title} \begin{center} \begin{tabular}{c c c c c} \rowcolor{Gray} \multicolumn{1}{c}{A} & \multicolumn{2}{c}{B} & \multicolumn{1}{c}{C} & \multicolumn{1}{c}{D} \\ \hline \addlinespace ...


0

I edited your code a bit and now it looks like this: Here is the code: \begin {table}[H] \caption {Table Title} \label{tab:title} \centering \begin{tabular}{|c|c|c|c|c|} \toprule \rowcolor{Gray} & \multicolumn{2}{c|}{B} & &\\ \cline{2-3} \rowcolor{Gray}\multirow{-2}{*}{A}&E&F&\multirow{-2}{*}{C}&\multirow{-2}{*}{D}\\ ...


2

You can mix other colors, so for example green!50!black mixes black with it, 50% each. But since you want the green to be lighter, you should mix white. The command for this is shorter though because it will mix with white by default, so you can write \cellcolor{green!30}, and the resulting color will be 70% white and 30% green.


1

You can't do this by defining the color in TeX code. However, there is a way to get the custom color you want. Using an html color converter and inputting #B28B3C for your custom color, it appears that the cmyk code for the color is cmyk(0%, 22%, 66%, 30%). Similarly, if you ask for Purple from the color converter, you get the cmyk code cmyk(0%, 100%, 0%, ...


1

The command \definecolor{shadecolor}{rgb}{0, 0, 1} issued in a TeX inset (Ctrl+L) before the shaded box will change this color to blue. If the change should be only local for that particular box, do Ctrl+L; {; exit the TeX inset; Ctrl+L again; \definecolor{shadecolor}{rgb}{0, 0, 1}; exit the TeX inset; insert your box; Ctrl+L; } I do not understand why LyX ...


3

Simply \newcommand\boldblue[1]{\textcolor{blue}{\textbf{#1}}}


3

Here you go … I used colortbl (loaded by xcolor) to color the rows in the tabular and TikZ to draw the frame around it. Some more explanations are in the code comments, let me know if I should explain something in more detail. \documentclass[fontsize=8.5pt]{scrartcl} % set page size \usepackage{geometry} \geometry{ paperwidth = 3.5in, paperheight ...


5

I would guess that if you define the colours in the same way in both cases, they would match. Both xcolor and matplotlib allow you to use RGB tuples, with values in the range zero to one, to define colors, so you could probably say e.g. green = (0,1,0) plt.plot(x,y,color=green) in matplotlib, and \definecolor{green}{rgb}{0,1,0} \draw [green] (0,0) -- ...


1

First of all, why do you define a custom subsection command and not just redefine the default? To me it would make more sense to redefine it. Next thing I did was looking up the section/subsection definitions in moderncv. They are as follows: \RenewDocumentCommand{\section}{sm}{% \par\addvspace{2.5ex}% \phantomsection{}% reset the anchor for hyperrefs ...


1

I don't really know what's the problem, but you're approaching the matter from the wrong point of view. ;-) You just need no tabular* environment. \documentclass[twoside]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{graphicx} \usepackage{calc} \usepackage{amsmath} \usepackage{array} ...


1

You can use the command \defineunderbar. See example: \setuplayout [width=9.4cm] \definebar [foobar] [color=yellow, rulethickness=1.2em, offset=1.2, continue=yes, order=background] \starttext There must be \foobar{a way to set the background color when I need to highlight multiple lines of text. And then return to normal mode} without ...


2

Section titles are sometimes made uppercase. Then the uppercase command (\MakeUppercase or \uppercase) also converts the argument of \color to uppercase: \color{red} => \color{RED} Workarounds: Defining color RED, e.g.: \usepackage{xcolor} \colorlet{RED}{red} Hiding the color command as protected macro, e.g.: ...



Top 50 recent answers are included