I have been trying to insert a (transparent) logo in the bottom right corner in the background of my title page without affecting the text in Overleaf. Unfortunately, I haven't found a similar use case and have tried many different options for quite some time, but it doesn't work the way I need it to. Can someone please help me in this regard?
I would like it to look like this. As you can see, there is a logo inserted in the lower right corner.
You can add an image to the page background via the shipout/background hook. To make positioning easier, I'm using tikz in the following example:
\documentclass{article}
\usepackage{lipsum}
\usepackage{tikz}
\AddToHookNext{shipout/background}{
\begin{tikzpicture}[remember picture, overlay,inner sep=0pt,outer sep=0pt,opacity=0.5]
\node[anchor=south east] at ([xshift=3cm,yshift=-3cm]current page.south east) {
\includegraphics[width=16cm]{example-image-duck}
};
\end{tikzpicture}
}
\begin{document}
\lipsum
\end{document}
Related
I was hoping anyone could help me with this. I am working with Latex and the Tikz package (I'm a new user on both) on a document cover using 2 figures so it looks like this:
That is, the background image leaves a thin margin on all sides, and the logo falls off-margin to the right and bottom. So, I enter the code overlaying the the logo over the background using Tikz, and as soon as I edit the coordinates to get the logo to go off-margin either on the right or bottom, the background image starts moving to the left and top until it sticks to the opposing borders of the page, like this:
My question is, is there a way to have the superimposing image to fall off the margins while keeping the background image properly centered?
Here is the code I'm using:
\usepackage{mwe,tikz}
\begin{figure}
\begin{tikzpicture}[
every node/.style={anchor=south west,inner sep=20pt},
x=1mm, y=1mm,
]
\node (fig1) at (0,0)
{\includegraphics[scale=0.2]{Images/Background.jpg}};
\node (fig2) at (124,-23)
{\includegraphics[scale=1.5]{Images/Logo.png}};
\end{tikzpicture}
\end{figure}
I first tried using the Overpic package instead, but I found it to be rather limited (or I couldn't figure it out well enough probably). I then tried using \centering and other horizontal and vertical centering techniques in combination with Tikz, but to no avail.
A figure environment is a floating objects, which allows latex to find a good location within the text flow. If you want an image at a very specific position, like a title page, you shouldn't use a figure environment
using the overlay option will make sure that the actual size of the tikzpicture does not influence the positioning and thus a cutoff logo won't influence the rest of the page
I also suggest the remember picture option which allows you to position your nodes with respect to the page. This way you can place the big picture in the centre of the page and the smaller picture at the lower right corner (shift it around with the xshift and yshift keys)
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[remember picture,overlay]
\node at (current page.center) {\includegraphics[width=.9\paperwidth,height=.9\paperheight]{example-image-10x16}};
\node at ([xshift=-2cm,yshift=1cm]current page.south east) {\includegraphics[width=15cm]{example-image-duck}};
\end{tikzpicture}
\end{document}
I have a document that has a handful of figures in it, and I am using
\tcbox{\includegraphics{./Pictures/image-name.png}}
to put a border around them. I end up repeating this for every image though. Is there a way to put something at the top of my document that says to apply this to all images?
If nothing else in your document relies on \includegraphics, you could try the following redefinition:
\documentclass{article}
\usepackage[most]{tcolorbox}
\let\includegraphicsold\includegraphics
\renewcommand{\includegraphics}[2][]{\tcbox{\includegraphicsold[#1]{#2}}}
\begin{document}
\includegraphics[width=10cm]{example-image-duck}
\end{document}
How to position the smaller nested box, so it appeared in the top right corner (see image below)?
Here is my current, wrong implementation:
\newcommand\TBox[3][]{%
\tikz\node[draw,ultra thick,text width=#2,align=left,#1] {#3};}
\TBox{14cm}{%
\TBox{10cm}{xxx \vspace{9cm}} \TBox{3cm} \\
}
It would be better to place all your boxes in a single tikzpicture, because right now you are nesting them which is in general not a good idea.
To come back to your original question, you can use baseline=(current bounding box.north) to top align the boxes:
\documentclass{article}
\usepackage{tikz}
\newcommand\TBox[3][]{%
\tikz\node[draw,ultra thick,text width=#2,align=left,#1,baseline=(current bounding box.north)] {#3};}
\begin{document}
\TBox{14cm}{%
\TBox{10cm}{xxx \vspace{9cm}} \TBox{3cm} \\
}
\end{document}
Well I'm a newbie in latex and I want to make a latex Curriculum Vitae.
I want to create a page with two parts
First part: an image from TOP to Bottom, and from left to the middle of the page
Second part: a text zone from from TOP to Bottom, and from middle of the page to the right
I have tried to create two columns but every time one of the columnes are put on the next pages :(
Do you have any advice or tips or answer to give me?
Thank you very much for your help.
For a single-page split-view display, you can set the content in a tabularx structure. The left-hand side contains an image with no height/depth. This allows you put anything in the right-hand side.
\documentclass{article}
\usepackage[margin=1in]{geometry}
\usepackage{graphicx,tabularx}
\usepackage{lipsum}
\setlength{\parindent}{0pt}
\pagestyle{empty}
\begin{document}
\begin{tabularx}{\textwidth}{#{} X X #{}}
\raisebox{\dimexpr-\height+.7\normalbaselineskip}[0pt][0pt]{%
\includegraphics[width=\linewidth,height=\textheight]{example-image}} &
\lipsum[1-3]
\end{tabularx}
\end{document}
There are multiple ways of doing this. It all depends on whether you're stuck with a single page, or want to move to a bigger canvas.
How can I include a tikzpicture on every page?
I would like to create a complicated document template (page should be framed, and have a table to hold document information both in the header and footer).
I was thinking of using something like:
\begin{tikzpicture}[remember picture,overlay]
% complicated layout should be here, simple example is given below:
% \node [xshift=1cm,yshift=1cm] at (current page.south west)
% {This is an absolutely positioned text in the page};
\end{tikzpicture}
Do you have any other suggestions on how to create such a template?
Add information to header/footer either using fancyhdr Or KOMA Script
For adding a something on every page I used this:
\usepackage{eso-pic}
\makeatletter
\AddToShipoutPicture{%
\setlength{\#tempdimb}{.1\paperwidth}%
\setlength{\#tempdimc}{.04\paperheight}%
\setlength{\unitlength}{1pt}%
\put(\strip#pt\#tempdimb,\strip#pt\#tempdimc){%
\makebox(0,0){ \textcolor{gray}{Rev: \svnrev{} (\svnfilerev)} }%
}%
}
\makeatother
Here, I add the SVN revision number on the bottom right of every page. I don't remember why I did not use a tikzpicture[overlay,remember picture] in \AddToShipoutPicture, maybe because it can't remember the picture position in the state of shipping out the page.
Hope that helps.