New answers tagged

2

Instead of a tabular, you could use a raster with an extruded right box. Following code needs some geometry adjustments, but can help as starting point. \documentclass{book} \usepackage{lipsum} \usepackage[most]{tcolorbox} \makeatletter \def\thickhrulefill{\leavevmode \leaders \hrule height 1ex \hfill \kern \z@} \def\@makechapterhead#1{% \reset@font ...


0

The below given MWE will set it for you: \documentclass{book} \usepackage{lipsum} \usepackage{tcolorbox,array} \makeatletter \def\thickhrulefill{\leavevmode \leaders \hrule height 1ex \hfill \kern \z@} \def\@makechapterhead#1{% \reset@font \parindent \z@ \vspace*{10\p@}% \def\xwidth{5cm}% \def\xsep{1pc}% \global\setbox0=\vbox{\begin{tcolorbox}[...


1

With the help of @JPi and the answer to this question : Background image from tikzpicture does not fit the whole page, I made my background image fit the margin as I wish : (...) \usepackage[paperheight=5cm, paperwidth=9cm, left=0mm, bottom=0mm]{geometry} (...) \begin{tikzpicture}[remember picture,overlay,shift={(current page.center)}] \node[inner sep=0] {...


1

Like so? \documentclass[10pt,landscape]{article} \usepackage{graphicx} \usepackage{tikz} \usepackage{tikzpagenodes} \begin{document} \begin{tikzpicture}[remember picture,overlay,shift={(current page.south west)}] \node[anchor=south west] (0,0) {\includegraphics[width=\paperwidth,height=\paperheight]{pig}}; \end{tikzpicture} \end{document} I'm ...


1

A preliminary solution, working for the transparency so far only`. \documentclass[a4paper,landscape]{article} \usepackage[outline]{contour} \usepackage{xcolor} \usepackage{graphicx} %\usepackage{transparent} \usepackage{background} \usepackage{eso-pic} \newcommand\BackgroundPic{% \includegraphics[% width=\paperwidth, keepaspectratio%, ]{london3.png}...


2

For fun, here is a ConTeXt solution. As in other solutions, all you need is a colored box with appropriate background color and text color. In ConTeXt, \framed macro provides such boxes. So, we define a new frame with the right parameters: \usecolors[x11] % To use lightsteelblue and navy colors \defineframed [tagged] [ location=low, % align with ...


2

Remove the line that patches \@endpart. You do not want an opaque white page color. Then you get the desired result with your code. Here is a another suggestion. In the following example all part pages get a background image that is set by \setpartbackgroundimage{<image>}. To change the image use this command before \part. To get a part page without ...


0

Just found the solution in this post: How to overcome Acrobat Reader error 131 with a pdfLaTeX doc? Adding the following line at the very beginning of the tex file did the trick \pdfminorversion=4


2

In Context you can do this with \framed and its relations. Here's a simple lualatex + Metapost approach that does something similar. \documentclass{article} \usepackage{fontspec} \usepackage[svgnames]{xcolor} \setmainfont{TeX Gyre Pagella} \setsansfont[Scale=MatchLowercase]{TeX Gyre Heros} \usepackage{luamplib} \newcommand\ttag[1]{% \setbox0\hbox{% ...


0

use it this way: \begin{figure}[htb] \centering \includegraphics[width=1.0\columnwidth]{my_picture} \caption{This is my picture.}\label{fig:my_picture} \end{figure} \centering is a switch and not an environment and \caption itself starts a new paragraph. And for width=1.0\columnwidth the \centering is not needed, the image is already of linewidth


3

Yhe code contains two little mistakes. First of all, commas are missing between values. And second RGB model is defined with values between 0 and 255, while rgb model uses values between 0 and 1. Therefore, if \definecolor{MyBackground}{RGB}{1.0000 0.9451 0.6549} is replaced with \definecolor{MyBackground}{rgb}{1.0000,0.9451,0.6549} everything ...


12

Here's an alternative solution with Tikz. Output Code \documentclass[margin=10pt]{standalone} \usepackage{tikz} \definecolor{backg}{RGB}{225,236,244} \definecolor{tagtxt}{RGB}{88,115,159} \newcommand\sotag[1]{% \tikz[baseline]{% \node[anchor=base, text=tagtxt, fill=backg, font=\sffamily, text depth=.5mm] {#1}; }% } \begin{document} ...


4

You can use \texttt{++} instead, can't you? \documentclass{article} \usepackage{tcolorbox} \definecolor{mycolor}{rgb}{0.122, 0.435, 0.698} \newtcbox{\mybox}{nobeforeafter,colframe=mycolor,colback=mycolor!10!white,boxrule=0.5pt,arc=4pt, boxsep=-3pt,left=6pt,right=6pt,top=6pt,bottom=6pt,tcbox raise base} \begin{document} \mybox{C\texttt{++}} \end{...


4

I hope, at least this compiles for the O.P. ;-) \tcboxverb is designed for such small boxes with verbatim content. I've added a myboxstyle TikZ style for this. \documentclass{article} \usepackage[most]{tcolorbox} \definecolor{mycolor}{rgb}{0.122, 0.435, 0.698} %\newtcbox{\mybox}{nobeforeafter,colframe=mycolor,colback=mycolor!10!white,boxrule=0.5pt,arc=...


11

\documentclass{article} \usepackage[skins]{tcolorbox} \newtcolorbox{tagbox}[1][]{colback=blue!20!white,sharp corners,boxrule=0pt,enhanced jigsaw,nobeforeafter,width=3cm,halign=center,valign=center} \newcommand{\sotagbox}[1]{% \begin{tagbox} #1 \end{tagbox} } \begin{document} \sotagbox{foo} \end{document} Update: With a tikz style and replacing ...


7

You could use \colorbox{red}{text} from the standard latex color package.



Top 50 recent answers are included