Tag Info

New answers tagged

1

colorlinks cannot be enabled, after hyperref is loaded. Set the option as package option: \usepackage[colorlinks]{hyperref} The color Violet is undefined, this can be fixed, for example, by setting option svgnames for package xcolor. As Augustin has already analyzed in his answer, class elsarticle defines the colors of all link types to blue. This is done ...


1

The problem is caused by the elsarticle class which defines the colour of the links and prevents you from redefining them. If you change the style to article everything will work.


1

When you want to change anything from a beamer theme I'd suggest to take a look at original theme definition file (beamerthemeGoettingen.sty in this case). There you'll see what other themes (innr, outer, font, ...) are used and which templates do you need to change. Goettingen theme file is only 34 lines long and only load and customizes side bar outer ...


2

I am unsure which colors of the different navigation components you want to change, so let me go through some of them. The color of the navigation symbols can be changed using: \setbeamercolor{navigation symbols}{fg=red, bg=green} The color of the navigation panel you can change by putting \setbeamercolor{structure}{fg=red} before ...


2

The color specification in the argument to \colorbox should fully expand to a color name; since \IfEqCase does much work with its arguments and this work includes doing assignments, it can't be used in places where full expansion is needed. A better (and simpler) strategy is to say \colorlet{levelcolor1}{ForestGreen} \colorlet{levelcolor2}{CornflowerBlue} ...


1

For darker color try \colorlet{DarkBlue}{BlueLUH!80!black} instead. This way it will be Blue*0.8 + black*0.2. If you add second number then third color (i.e. white) will be added, and you don't need that. As I understand it, BlueLUH!80!black!30 would be (Blue*0.8 + black*0.2)*0.3 + white*0.7 Please see http://en.wikibooks.org/wiki/LaTeX/Colors#Examples


3

Sorry, but the software you used is totally inadequate. There are many errors and subscripts become confused, creating a great number of syntax errors. It's basically unrecoverable. Typing in every cell as a \multicolumn is absurd. Here I show that the table can be typed in much more easily. The only trick to remember is to have \relax in front of a [ ...


10

Package xcolor can extract the color definition in a macro: \extractcolorspec{<color>}{<macro>}. This can be used to define a test to compare the current color . with red: \documentclass[a4paper,12pt]{article} \usepackage[T1]{fontenc} \usepackage[svgnames]{xcolor} \usepackage[scaled=0.84]{beramono} \makeatletter \newcommand{\MyChange}[1]{% ...


5

You can use the fact that a color's definition is kept in the macro \csname\string\color@<colorname>\endcsname and you can inspect the current color with . for <colorname>, as explained in http://tex.stackexchange.com/a/36163/4427 \documentclass[a4paper,12pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} ...


3

You have wrong input: \textbf{trans\textcolor{red}{IT}ion} or \textbf{trans{\color{red}IT}ion} However, the former is better. Note that \textcolor takes two arguments: the color and the text to colorize; to the contrary, \color takes only one argument and tells TeX to colorize text from that point on (respecting grouping). The former is better because ...


2

In the definition of beamer@frameslide environment in beamerbaseframe.sty, there is an empty vbox above the frametitle: \ifx\beamer@frametitle\@empty% \setbox\beamer@frametitlebox=\box\voidb@x% \else% \setbox\beamer@frametitlebox=\vbox{ \vbox{}% {\parskip0pt\usebeamertemplate***{frametitle}\vskip0.25em}% }% \fi% Now assume we remove ...


0

You have to specify which component of the beamercolor you want to use. So if you want to use the foreground colour, use usebeamercolor[fg]{framesubtitle}. For the background component, it would be [bg]. \documentclass{beamer} \setbeamercolor{framesubtitle}{fg=yellow}% \setbeamerfont{framesubtitle}{size=\Large}% \defbeamertemplate*{frametitle}{my theme} ...


1

add \usepackage{color} to the preamble


2

beamer uses \insertslideintonotes to insert a frame thumbnail into notes page. This command is defined in beamerbasenotes.sty file: \newcommand{\insertslideintonotes}[1]{{% \begin{pgfpicture}{0cm}{0cm}{#1\paperwidth}{#1\paperheight} \begin{pgflowlevelscope}{\pgftransformscale{#1}}% \color{normal text.bg} ...


0

Why not use the soul package instead? Changing the line color is easy: \usepackage{color,soul} \definecolor{darkblue}{rgb}{0,0,0.5} \setulcolor{darkblue} \begin{document} \ul{This text is underlined in blue.} \end{document}


2

Is this what you want? \documentclass{article} \usepackage{amsmath} \usepackage{amsthm} \usepackage{amsfonts} \usepackage{amssymb} \usepackage[usenames,dvipsnames]{xcolor} \newtheorem{theorem}{Theorem} \usepackage{varioref} \usepackage{hyperref} \usepackage[noabbrev,capitalise,nameinlink]{cleveref} ...


5

In both cases, 0 g 0 G can be seen in the PDF files. This comes from the PDF color stack of pdfTeX that is not yet reassigned to CMYK values. This can be done by: \makeatletter \newcommand*{\InitColorStack}{% \chardef\main@pdfcolorstack=\pdfcolorstackinit{0 0 0 1 k 0 0 0 1 K}\relax } \InitColorStack \everyjob\expandafter{\the\everyjob\InitColorStack} ...


6

You could do it like this: \documentclass{beamer} \newcommand\coloreditem[1]{\item[\textcolor{#1}{\usebeamertemplate{itemize \beameritemnestingprefix item}}]} \begin{document} \begin{frame}{Title} \begin{itemize} \coloreditem{red} blabl \textcolor{red}{Red}, other text \coloreditem{green} blalba \textcolor{green}{Green}, other text \item bnlabla ...


4

If it is okay to define a command with two arguments you could use \newcommand\coloreditem[2]{{\setbeamercolor{itemize item}{fg=#1}\item #2}} Then the changed color is restricted to the single item. \documentclass{beamer} \newcommand\coloreditem[2]{{\setbeamercolor{itemize item}{fg=#1}\item #2}} \begin{document} \begin{frame}{Title} \begin{itemize} \item ...


6

scrlayer-scrpage Here is a suggestion using scrlayer-scrpage. \documentclass[a5paper]{book} \setlength\headheight{13.1pt} \usepackage{xcolor} \colorlet{headbgcolor}{green!50!blue!70} \usepackage[markcase=noupper]{scrlayer-scrpage} \clearpairofpagestyles \automark[chapter]{chapter} \renewcommand\chaptermarkformat{\chaptername\ \thechapter:\enskip} ...


2

I think there is no need to print the section number twice. Hence I would change the third argument of the \titleformat command to {\llap{\colorbox{black}{\makebox[3em][r]{\textcolor{white}{\thesection}}}\hspace{1em}}} and use {0pt} as fourth argument to align the section title with the text body. Code: ...


0

Use this: \renewcommand*{\thesection}{\textcolor{white}{\Roman{section}}} \documentclass[12pt,letterpaper,twoside]{article} \usepackage[margin=1in]{geometry} \usepackage[explicit]{titlesec} \usepackage{tikz} \usepackage{lipsum} \linespread{1.3} \titleformat{\section} {\normalfont\Large\bfseries} {\llap{\colorbox{black}{\makebox[3em][r] ...


1

Pursuing further sgmoye's idea, here's an implementation with l3regex that's easily extendable to several color change markers. \documentclass[margin=10pt]{standalone} \usepackage[utf8]{inputenc} \usepackage[russian]{babel} \usepackage{xcolor} \usepackage{xparse,l3regex} \usepackage{collcell} ...


3

First, let me say that I am no expert in the fine points of xparse.sty. That said, it occurred to me that something like this might prove useful: \documentclass[margin=10pt]{standalone} \usepackage[utf8]{inputenc} \usepackage[russian]{babel} \usepackage{xcolor} \usepackage{xparse} \usepackage{collcell} %% This is a two-part process. collcell.sty wraps the ...


3

In accordance with your new example I can show you how to set this in TeX. \input cyrchars \input opmac \def\t#1[#2,#3]#4// {{\rulewidth=.8pt \localcolor#1\def\tmpb{#4}% \ifx^#2^\else \replacestrings{ #2 }{ {#2} }\replacestrings{#2 }{{#1#2}}\fi \ifx^#3^\else \replacestrings{ #3 }{ {#3} }\replacestrings{#3 }{{#1#3}}\fi ...


5

I'd mark the suffix manually but let tex choose the colour from a pre-determined list: \documentclass[margin=10pt]{standalone} \usepackage[utf8]{inputenc} \usepackage[russian]{babel} \usepackage{xcolor} \def\>#1 {\csname suffix\detokenize{#1}\endcsname{#1} } \expandafter\def\csname suffix\detokenize{его}\endcsname{\textcolor{blue}} ...


3

\color{xxx} is a switch that change the color of the text, and it applies to the text following it (in a group). However, \bibitem does not set a group. This is way the color is propagated to the item following the entry where the color is set. Here is a simple hack to that achieve the result of the OP (it uses the toolbox package, i.e., ...


2

Use tcolorbox. \documentclass{article} \usepackage{lipsum} \usepackage[most]{tcolorbox} \definecolor{bg}{RGB}{255,249,227} \begin{document} \lipsum[1] \begin{tcolorbox}[enhanced jigsaw,colback=bg,boxrule=0pt,arc=0pt] \begin{itemize} \item Item 1 \item Item 2 \item Item 3 \end{itemize} \end{tcolorbox} \end{document} ...


1

For the first question, you can remove the \tabcolsep separately for those two columns like r<{\hspace{-\tabcolsep}}>{\hspace{-\tabcolsep}\,}c <{\hspace{-\tabcolsep}\,}>{\hspace{-\tabcolsep}}lcc} and for second, you can define a \bottomrulec like \newcommand{\bottomrulec}{% ...


3

The white space comes from booktabs adding some vertical padding above and below table rules. A workaround consists in setting this padding to $0$ pt and replacing it with vertical spacing with the cellspace package: it defines a minimal such vertical spacing and is compatible with \rowcolors (the column specifier must be preceded by the letter S). As for ...


0

If you don't provide MWE then I started with plain TeX example. All specifications (you mentioned) are implemented here. \input opmac \font\smcaps=cmcsc10 \regfont\smcaps \def\printchap#1{\vfil\break \headline={\hfil\global\headline={\printheadline}} \gdef\headtext{#1} \vglue 30pt \hrule \line{\smcaps\thefontsize[17]\vrule height22pt depth10pt ...


1

With tcolorbox \documentclass{article} \usepackage[most]{tcolorbox} \begin{document} \tcbincludegraphics[hbox,colframe=blue,boxrule=3pt,arc=0pt,outer arc=0pt,graphics options={width=3cm}]{example-image} \tcbincludegraphics[size=fbox,colframe=red!50!black,colback=red!20!black, fonttitle=\bfseries,center title,drop fuzzy shadow,title=my ...


4

Use adjustbox \documentclass{article} \usepackage{xcolor} \usepackage[export]{adjustbox} \begin{document} \includegraphics[width=2cm,cfbox=blue 1pt 1pt]{example-image} \end{document} How to use cfbox? This is from manual (of adjustbox): With export option these keys become available to \includegraphics


1

The white gap between the image and frame can be changed by modifying the length \fboxsep, which defaults to 3pt. \documentclass[12pt]{article} \usepackage{graphicx,xcolor} \begin{document} \textcolor{cyan}{\fboxrule=4pt\fbox{\includegraphics[height=1in]{example-image-A}}} \end{document}


0

Thanks to the answer of Herbert, I played a little more with this problem. Due to the braces he uses in the algebraic option of PSTricks, I tried those in the color definitions. This now works. \documentclass[]{scrartcl} \usepackage{xcolor} \usepackage{tikz} \usepackage{pstricks} \pagestyle{empty} \begin{document} \begin{center} ...


0

A quick-and-dirty hack: You could typeset the table as full-page document on its own and include it as a rotated figure. Maintaining a separate tex file for the table would be annoying, but how often would you edit a table? \begin{figure}[h] \centering \includegraphics[angle=90]{figure} \caption{The caption goes here} \end{figure}


5

I know this question has been answered very extensively. But not what I wanted or thought was the question based on the title. Therefore if others get in here looking for a possibility for colouring behind a word than this snippet is much easier: \colorbox{blue!30}{blue} or \textcolor{blue!30}{blue} resulting in: This is possible by only adding ...


2

use the algebraic option of coordinates in PSTricks: \documentclass[pstricks]{standalone} \usepackage{pstricks} \begin{document} \begin{pspicture}(-16,5)(8.0,7) \pgfforeach \x in {-15,...,15} {% \pgfmathsetmacro\angle{\x*\x*\x/125 * 25.01} \pgfmathsetmacro\myMix{50-50*sin(\angle)} \psline[linecolor={red!\myMix!green}, linewidth=2pt]{->}% ...


0

You can use afterpage package : \documentclass{memoir} \usepackage{lipsum} \usepackage{xcolor} \usepackage{pagecolor} \usepackage{afterpage} \title{Test} \author{flav} \begin{document} \newpagecolor{gray}\afterpage{\restorepagecolor} \maketitle \chapter{First chapter} \lipsum[1] \end{document} see : How to change the background color only for ...


1

The relevant portion of memoir.cls for the title is \newcommand{\@maketitle}{% \let\footnote\@mem@titlefootkill \ifdim\pagetotal>\z@ \newpage \fi \null \vskip 2em% \vspace*{\droptitle} \maketitlehooka {\@bspretitle \@title \@bsposttitle} \maketitlehookb {\@bspreauthor \@author \@bspostauthor} \maketitlehookc {\@bspredate ...


6

You can use fontupper like \documentclass{article} \usepackage[most]{tcolorbox} \newtcbox{\FOO}{colback=red,colframe=blue,fontupper=\color{green}} \begin{document} \FOO{Something} \FOO{Something else} \end{document} If you are using \tcblower then there is also \fontlower which will apply to the lower part. Here you can use font changing commands (like ...



Top 50 recent answers are included