# Tag Info

1

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 ...

3

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}

2

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 ...

9

The color package also supports decimal values in the RGB color model that accepts integer values in the interval [0,255]. On the other hand, xcolor offers much more features, so it's better to use it. \documentclass{article} \usepackage{xcolor} \definecolor{ultramarine}{RGB}{0,32,96} \definecolor{wrongultramarine}{rgb}{0.07, 0.04, 0.56} \begin{document} ...

2

\documentclass{article} \usepackage{xcolor,listings} \begin{document} \begin{lstlisting}[basicstyle=\ttfamily,breaklines,prebreak={\space\hbox{\textcolor{teal}{!}}},postbreak={\hbox{\textcolor{blue}{!}}\space}] This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is another long line. This is another ...

4

This is a bug in \pgfcorepatterns.code.tex. The internal macro \pgf@declarepatternmutable saves the pattern type as 7 instead of #7. The corrected line should read: \expandafter\gdef\csname pgf@pattern@type@#1\endcsname{#7}% With this change the patterns work as expected.

1

Here's a diagnostic, though not a solution. The code for a form only pattern should not include colour code at all. So setting the colour within the definition is surely a no-no, if the documentation is to be believed. However, that just turns everything black or white... OK. Start with the code from page 1064 of the manual for the stars pattern. This ...

2


1

Using the built-in mechanism of ArabTeX, you can indicate by a hyphen (which becomes invisible) that a given letter should consider itself medial, albeit standing at a word border. kitabu-\textcolor{red}{-hA} should make do in your example. However the choice of the font may change the result significantly. (I don't know, if the two forms of the ha are ...

1

I give it a try, although the answer may not yet be complete/final. The reference to ConTeXt mentioned by @Alan Munn contains a solution to the question of diacritical marks (vowels), including the use of unicode characters instead of translitteration. But it uses general rules to colour all glyphs of a given type in the same way, not individual ones in a ...

2


5

Those colours are taken from item projected so use \setbeamercolor{item projected}{fg=white,bg=red} MWE \documentclass{beamer} \usetheme{CambridgeUS} \setbeamercolor{item projected}{fg=white,bg=red} \begin{document} \begin{frame} \begin{enumerate} \item one \item two \item three \end{enumerate} \end{frame} \end{document}

1

Easiest is to add the picture as a background to the slides, and then clearing it after the title slide: \setbeamertemplate{background}{% \put(0,-265){% \pgfuseimage{mybackground} } } Here is the full code: \documentclass [compress]{beamer} \newcommand\Fontvi{\fontsize{6}{7.2}\selectfont} \usepackage{remreset} \usepackage{textpos} ...

3

You have to use a blend mode \documentclass[class=article,border=0pt]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \begin{scope}[transparency group] \begin{scope}[blend mode=multiply] \node [circle, fill=blue, opacity=0.5, minimum size=.4cm] at (0.2cm,0cm) () {}; \node [circle, fill=red, opacity=0.5, minimum size=.4cm] at (0cm,0cm) ...

0

How about a command with a color parameter? \newcommand\tln[1]{\tabularnewline\arrayrulecolor{#1}\hline} Then in your table Some name &Sometext &Sometext &100 & &x & & & & &\tln{green} Some name &Sometext &Sometext &100 & &x & & & & ...

2

Finding out which package loads what is often a daunting task. Instead pass the options before document class. If there is still an option clash then you cannot use that option together with the other package loading. Also smartdiagram -> tikz -> {graphicx,xcolor}. \PassOptionsToPackage{table,xcdraw}{xcolor} \documentclass[a4paper,12pt]{report} ...

2

tcolorbox loads pgf which loads xcolor without options. If you want to pass some options to xcolor (which completely integrates color functionality) you can use cfr solution \usepackage[]{xcolor} with specific options before loading tcolorbox, but you also have two more options. The first one would be to use ...

3

xcolor is an enhanced version of color but the real trick here is simply to load it first: \documentclass{article} \usepackage[usenames,dvipsnames]{xcolor} \usepackage{tcolorbox} \usepackage{lipsum} \begin{document} \begin{tcolorbox}[colback=green!5,colframe=green!40!black,title=A nice heading] \lipsum[2] \end{tcolorbox} \end{document}

4

You can use \hypersetup to decalre settings later in the document. \documentclass{article} % If I uncomment that, the contents are colored red! \usepackage{hyperref} \author{George Samaras} %\usepackage{graphicx} %\usepackage{amsmath} %\usepackage{bm} %\usepackage{enumitem} \newcommand{\tab}{\hspace*{1.2em}} \hypersetup{colorlinks=true, ...

2

For your first example using wrong quotes, you can correct them by making all your quotes neutral (non-curly). See How can I get straight double quotes in listings? Alternatively, you can simply use typewriter font in your basic or even just your string style. I usually do this anyway for listings: basicstyle=\normalsize\ttfamily, When using the correct ...

1

With caption package. \documentclass[a4paper]{article} \usepackage{caption,xcolor} \DeclareCaptionFont{blue}{\color{blue}} \captionsetup[figure]{labelfont=blue} %% ,textfont=blue will make all blue \begin{document} \begin{figure} \caption{some caption} \end{figure} \end{document} Adding ,textfont=blue makes every thing blue. ...

1

Add \ganttsets in the middle like: \ganttset{bar incomplete/.append style={fill=red!40}, group/.append style={draw=black, fill=red},} Code: \documentclass[12pt]{article} \usepackage[margin=1.0in]{geometry} \usepackage{pgfgantt} \begin{document} \begin{ganttchart}[ y unit title=0.5cm, y unit chart=0.6cm, time slot ...

3

A command, which changes the page color from the current position does not need to know the exact location. Instead a large colored rectangle can be drawn. The following example moves \paperwidth to the left and draws a rectangle with width 2\paperwidth and height \paperheight. This covers the whole of the remaining page regardless of the current position on ...

2

Normally, a tikz picture has to be drawn AFTER all the \tikzmarks are defined, in which case they are drawn on top of the text, so for this problem one must be careful to work from top to bottom. However, using a page hook one can draw the tikz picture after the page is laid out but BEFORE it is shipped out, which puts the text on top. ...

6

Here's a method which uses tikzmark and avoids the need to specify the height of each rectangle manually. \documentclass{article} \usepackage{tikz,kantlipsum} \usetikzlibrary{tikzmark} \begin{document} \pagecolor{green} \kant[1] \tikzmark{here} \begin{tikzpicture}[overlay, remember picture, inner sep=0pt, outer sep=0pt] \fill [yellow] (current page.west ...

5

\documentclass{article} \usepackage{tikz} \newcommand{\amount}{6in} %%<---- adjust \begin{document} \begin{tikzpicture}[remember picture,overlay] \fill[green] ([yshift=-\amount]current page.north west) rectangle (current page.north east); \fill[yellow] (current page.south west) rectangle ([yshift=-\amount]current page.north east); \end{tikzpicture} ...

Top 50 recent answers are included