Is there a way to convert PowerPoint theme to LaTeX beamer theme? - latex

I've found quite a few ways to convert the contents of the presentation to .tex file, but that's not what i need.
At job i have to use PowerPoint template, but i'd rather use LaTeX to create presentation itself. Maybe there is an easy way to modify existing beamer theme by adding pictures at the top and the bottom of every slide?

There is indeed an easy way to modify existing beamer themes by adding pictures at the top and the bottom of every slide:
\documentclass{beamer}
\setbeamertemplate{footline}{\includegraphics[width=\paperwidth,height=1cm]{example-image-duck}}
\setbeamertemplate{headline}{\includegraphics[width=\paperwidth,height=1cm,page=2]{example-image-duck}}
\begin{document}
\begin{frame}
abc
\end{frame}
\end{document}

Related

Add border to all images

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}

LaTeX \url{} in italics

Is there a simple way of getting a LaTeX url to display in italics, i.e. emph{\url{http://www.stackoverflow.com}}? FYI I am also using \urlstyle{same} right before, which keeps the style looking like the document default style, but I don't want to set my document default to italics.
You can easily set urls to italic text by setting the UrlFont in the document, like so:
\documentclass{article}
\usepackage{url}
\begin{document}
\def\UrlFont{\em}
\url{http://www.address.com}
\end{document}
The url should appear in italics.
You might want to try setting \UrlFont to \itshape, i.e.
\renewcommand\UrlFont\itshape
This worked for me,
\textit{\url{etcetcetc.com}}
using
\usepackage{url}

How to make a hyperlink navigate to the top of the figure in LaTeX when using hyperref?

I have a LaTeX document with a figure and references to it:
\begin{figure}
...
\caption{...}
\label{fig:1}
\end{figure}
\ref{fig:1}
I use the hyperref package to get hyperlinks in the resulting PDF.
However the link to the figure navigates to the caption leaving the figure itself out of the view. How can I make it navigate to the start of the figure instead without moving the caption to the top?
Add this in your preamble
\usepackage{hyperref}
\usepackage[all]{hypcap} %for going to the top of an image when a figure reference is clicked
Make sure that the \usepackage[all]{hypcap} is written after the hyperref package is imported.
To previous comment:
\usepackage{hyperref}
\usepackage{caption}
is slightly better than \usepackage[all]{hypcap} because when you use e.g. figure without captions there won't be a compilation problem. The caption package by default sets option
hypcap=true
anchoring hyperlinks to the beginning of an environment.
\usepackage{hyperref}
\usepackage{caption}
Using this is a better idea than \usepackage[all]{hypcap}.

Inconsistent styling in latex table of contents?

I'm wondering why in my toc shown below, I have different dots style in the most detailed subsections ?
All I've used is:
\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5}
....
\tableofcontents
How can I create a consistent style at all levels of depth: section, subsection, etc?
It really depends on the document class you are using; book, article etc have a preset layout for the TOC.
Since you said you are writing your Thesis, is it possible that you are using a style given by the college/university?
There is still a way to change it. You can use the package tocloft,
\usepackage{tocloft}
which has a method called \#dotsep to change the amount of space between the dots. Although I do not know if it will work in this case as you only define it once for the whole TOC and if it is relative to what you have it may just increase your dots relative to the way it is already placed.
But here is the code anyways,
\makeatletter \renewcommand{\#dotsep}{4.5} \makeatother
\tableofcontents
It must be placed before your toc command and 4.5 represents the distance.
But like I said this depends on your document class and its style class. Here is the link to the package documentation tocloft.pdf. There are more customizations available which may work for you better.
At least in the article class, they already have a standard style, but to also get dot leaders for sections like the ones in subsections, just use this:
\usepackage{tocloft}
\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}

how to add a jpg image in Latex

I want to insert a .jpg image(that is in my current folder, where the .tex file is) after a paragraph. How can I do it in Latex? What should I include / what commands should I use?
You need to use a graphics library. Put this in your preamble:
\usepackage{graphicx}
You can then add images like this:
\begin{figure}[ht!]
\centering
\includegraphics[width=90mm]{fixed_dome1.jpg}
\caption{A simple caption \label{overflow}}
\end{figure}
This is the basic template I use in my documents. The position and size should be tweaked for your needs. Refer to the guide below for more information on what parameters to use in \figure and \includegraphics. You can then refer to the image in your text using the label you gave in the figure:
And here we see figure \ref{overflow}.
Read this guide here for a more detailed instruction:
http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions
if you add a jpg,png,pdf picture, you should use pdflatex to compile it.

Resources