The following simple Latex description does not result
in the slide I want it to be.
\begin{frame}
\frametitle{Previous Work}
\begin{itemize}
\item [Hummer 1992] - First work in this area was conducted by Hummer
\item [Goldreich et at. 2002] - Theoretical work that focused more on the power characteristics of embedded systems
\end{itemize}
\end{frame}
The problem is, that the text within the square brackets is cuts off. So it should look
like this:
Hummer 1992 - First work in this area was conducted
by Hummer
Goldreich et al. 2002 - Theoretical work that focused more on
the power
But it looks like this:
r 1992 - First work in this area was conducted by Hummer
l. 2002 - Theoretical work that focused more on the power
Any idea how I can sort this out.
Thanks!
As progo said, the description environment fits better than itemize.
Additionally, you could improve the alignment using the optional parameter of the description environment, specifying the width of the widest label:
\begin{frame}
\frametitle{Previous Work}
\begin{description}[Goldreich et at. 2002]
\item [Hummer 1992] First work in this area was conducted by Hummer
\item [Goldreich et at. 2002] Theoretical work that focused more
on the power characteristics of embedded systems
\end{description}
\end{frame}
Output:
(source: texblog.net)
Btw. if you would like to know how to get rid of the "default" beamer warnings have a look at this blog post regarding beamer warnings.
The itemize environment is not meant to be used with long 'bullets'. Using the description environment does a better job (which also works in beamer as I checked), but it won't align the names and descriptions as you would like to sketch out.
There's always the tabular for doing exactly what you want.
Related
I am having issues with a report I am writing. First time using latex and after getting some help on here regarding some tables weirdness I again have a silly frustrating issue. Figures don't stay where I put them. I made a MWE Posted Below
\documentclass{article}
\usepackage{graphicx}
\graphicspath{ {./Figures/} }
%%%%%% Referencing %%%%%%
\usepackage{natbib}
\bibliographystyle{abbrvnat}
\setcitestyle{authoryear,open={(},close={)}}
\title{MWE}
\begin{document}
\maketitle
\section{Introduction}
The average sea surface temperature (SST) trend is shown in Figure \ref{fig:SST}.
\section{Figures}
\begin{figure}
\includegraphics[width = \linewidth]{Figures/SST.png}
\label{fig:SST}
\end{figure}
\section{References}
\bibliography{References.bib}
\bibliographystyle{agsm}
\end{document}
I expect, probably an error, for the figure to be inserted under the Figures subheading however it appears on the next page after references. I have to refer to my figure in the text, hence the \ref{fig:SST} so it is clickable. It's not a size issue as there is more than enough space on the page to accommodate the figure. Even if that was the issue I would expect the references subheading to be after it.
Most latex classes use so called floats for figures, tables etc. The idea is that latex will automatically find a good place for your images and avoid ugly white space.
To make use of the abilities of latex to produce a good looking output, you must specify possible placements with floating specifier such as [htbp], which allows latex to place the image here, at the top, at the bottom or an a separate page.
Also if you want to use the \label-\ref mechanism, your figure must have a caption (and the label inside or after the caption).
\documentclass{article}
\usepackage{graphicx}
\graphicspath{ {./Figures/} }
%%%%%% Referencing %%%%%%
\usepackage{natbib}
\bibliographystyle{abbrvnat}
\setcitestyle{authoryear,open={(},close={)}}
\title{MWE}
\begin{document}
\maketitle
\section{Introduction}
The average sea surface temperature (SST) trend is shown in Figure \ref{fig:SST}.
\section{Figures}
\begin{figure}[htbp]
\includegraphics[width = \linewidth]{example-image-duck}
\caption{test}
\label{fig:SST}
\end{figure}
\section{References}
\bibliography{References.bib}
\bibliographystyle{agsm}
\end{document}
Generally, LaTeX's attitude is ‘you write the text, let me worry about placing the figures’.
Floats (that is, figures and tables) will float to where LaTeX thinks they go best. I can't remember the precise rules in the article style, but generally they float to the top of the nearest following page that has room for them. LaTeX won't fill too much of a page with figures, so if you have a dense sequence of large-ish figures, some of them can end up quite a long way away from the point in the source text where they're written.
This is normal, and how figures and tables appear in the majority of published books and articles.
You'll usually write a caption:
\begin{figure}
\includegraphics{...blah...}
\caption{This is a caption for my figure\label{fig:SST}}
\end{figure}
Then you can write
...this is shown in Figure~\ref{fig:SST}
If you want to, you might add ...on p.\thinspace\pageref{fig:SST} and LaTeX will insert the page number where the figure ends up. Also, see the prettyref package.
As mentioned in the other answer, you can add placement specifiers like [ht], which give LaTeX permission to put the figure ‘here’ or at the top of a page, but that doesn't force anything. It is possible to fight with LaTeX about this (the Overleaf docs give some hints), but it's generally not worth it in my experience.
That said, one bit of guidance it's useful to give LaTeX is something like \renewcommand{\floatpagefraction}{.8}, which says that LaTeX is allowed to use as much as 80% of the page for floats (ie, figures and tables) – the default value is a bit tight (there are more comments on this in this TeX.SE question – tex.stackexchange.com is generally a better site for LaTeX-related questions).
If you do feel compelled to fight/fiddle with float placement, do it at the very end of the process, where you're fine-tuning the punctuation of your document. Small changes in the document can have big effects on where floats end up, and it's simply not worth worrying about this until your document is almost finalised.
Your final puzzlement was about the figure ending up after the references. In the case of your document, the figure goes on p.2, so there's plenty of space on p.1 for LaTeX to carry on setting text, so naturally it puts the references there. Since you generally do want the references to go at the very end of an article, this is a case where it's reasonable to exert a little control over placement, and a good idea would be to put \clearpage before the References section. What that does is to make a new page and force out any floats which are still in the queue waiting for space to appear.
Looking for the best way to fit a figure tightly that spans the full height of a page. I'm writing a document about the ionosphere and want to include this image along the side: https://en.wikipedia.org/wiki/Thermosphere#/media/File:EarthAtmosphereBig.jpg
Seems like a job for minipage but I can't quite figure out a good solution. Any tips?
You can achieve this by placing two minipages, one with a larger width than the other, side-by-side.
\documentclass[12pt]{article}
\usepackage[demo]{graphicx} %demo option should be omitted in real document
\usepackage{lipsum} %for random text, should be omitted in real document
%--------%Shows page layout, also should be omitted in real document.
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%--------%Idea from Zarko of TEX.SE
\begin{document}
\begin{minipage}{0.8\textwidth}
\lipsum[1-3]
\end{minipage}
\begin{minipage}[r]{0.2\textwidth}
\centering
\includegraphics[width=0.2\textwidth, height=\textheight]{demo.png}
\end{minipage}
\end{document}
I have been searching for some automated way of numbering the references on the same slide in beamer Madrid with biblatex. This works fine with \pause and \footcite{}. But when I have multiple bullets on the same slide (e.g. 5), and I want to cite for the last point, the problem is that the reference appears from the very first slide. I want that the reference appears only when the relevant slide appears (i.e. 5th one in this case)
\documentclass{beamer}
\mode<presentation>{\usetheme{Madrid}}
\usepackage[style=verbose]{biblatex}
\only<2->{...} etc. is one solution but I think it is a lot of manual work to update all numbers on the slide when, for instance, I need to remove (or add) one point with a reference.
Thanks.
You don't need to update any numbers if you use relative overlays instead of absolute numbers:
\documentclass{beamer}
\mode<presentation>{\usetheme{Madrid}}
\usepackage[style=verbose]{biblatex}
\addbibresource{biblatex-examples.bib}
\begin{document}
\begin{frame}
\begin{itemize}[<+->]
\item ABC \only<.->{\footcite{knuth:ct:a}}
\item XYZ \only<.->{\footcite{knuth:ct:b}}
\end{itemize}
\end{frame}
\end{document}
I want to have the picture exactly in a specific position in my text. I use the commands below
\begin{enumerate}
\item T.D. Lee(1957 Physics Nobel Laureate)
\begin{figure}
\begin{center}
\includegraphics[scale=0.5]{TdLee.eps}
\end{center}
\end{figure}
I have many figures like this. What happens is that I see figures and items in different order. Can you let me know which latex command i should use in order to have the picture under or right to the each item?
Thanks
Kurt
To work with the standard float system, you might try the h positioner (as mentioned in another answer) but with the ! modifier as in
\begin{figure}[h!]
...
\end{figure}
There is even another H positioner, like h! but tries harder. It needs the package float
\usepackage{float}
...
\begin{figure}[H]
...
\end{figure}
but even that doesn't work many times. However since you are doing this in a list, trying to use a float might not be the best for you.
You might try to create a minipage to house the figure. Or perhaps the way to do what you want might be to omit the figure environment all together but keep the center one if you want it.
If you know exactly where you want the figure, don't use a float (that's what the "figure" environment is)...floats are there to.....wait for it.....float!
So if you know exactly where you want your figure, simply use \includegraphics:
\begin{enumerate}
\item T.D. Lee(1957 Physics Nobel Laureate)
\begin{center}
\includegraphics[scale=0.5]{TdLee.eps}
\end{center}
...
\end{enumerate}
You can also redefine the enumerate environment so that you do not have to surround each picture with a \begin{center}...\end{center} environment, but if you are interested in how to do that, I'll leave it for a separate question. (And unapologetically suggest that you ask it on the TeX Stack Exchange, where no TeX-related question is too small.)
Try the h placement specifier. From here:
\begin{figure}[h]
\centering
\includegraphics[scale=0.5]{TdLee.eps}
\end{figure}
It does not guarantee perfect placement, but it tries.
I am writing a personal statement in latex. I don't want the big margin at the top of the page not big title taking a lot of space. I just like to make the layout compact but still clearly spaced with title, name and other necessary information, since there may be restriction on the number of pages. One example would be http://www.hsc.unt.edu/education/CIM/Documents/PS-Sample2_000.pdf. I wonder where to find some good latex templates or examples?
Thanks and regards!
I would use the geometry package to establish the desired margins. To get the margins in your sample document, try:
\usepackage[left=1in,right=1in,top=1in,bottom=1in]{geometry}
Your next requirement was to fix the title block. LaTeX uses the internal command \#maketitle to format the title block. You can redefine this as you like. To achieve the same title block style as in the sample document, use:
\usepackage[svgnames]{xcolor}% provides colors for text
\makeatletter% since there's an at-sign (#) in the command name
\renewcommand{\#maketitle}{%
\begin{center}
\parskip\baselineskip% skip a line between paragraphs in the title block
\parindent=0pt% don't indent paragraphs in the title block
\textcolor{red}{\bf\#title}\par
\textbf{\#author}\par
%\#date% remove the percent sign at the beginning of this line if you want the date printed
\end{center}
}
\makeatother% resets the meaning of the at-sign (#)
The \#title, \#author, and \#date commands will print the title, author, and date. You can use whatever formatting commands you like to set the text in bold, different colors, etc.
Put all of the above commands in the preamble of the document. The preamble is the space between \documentclass and \begin{document}.
\documentclass{article}
% this is the preamble
% put all of the above code in here
\title{Personal Statement}
\author{Tim}
\begin{document}
\maketitle% prints the title block
Emergency medicine has always been a passion of mine\ldots
\end{document}
Attempt #1: I've used the following style file, which I call cramp2e, for similar purposes. It is probably not right for you, but have a look:
\oddsidemargin -1cm
\evensidemargin -2cm
\topmargin 1cm
\textheight 24cm
\textwidth 19cm
\headheight 0cm
\headsep .7cm
\footskip .7cm
\parskip .2cm
\paperheight 25cm
\setlength\voffset{-.33in}
\setlength\hoffset{-.25in}
Any good?
Postscript This is for A4 size paper.
A slightly less LaTeX-ey solution would be to not use the \maketitle command. A couple of times I've simply used this as my title(marginsize helps too).
Set up smaller margins:
\documentclass{article}
\usepackage{anysize}
\marginsize{1cm}{1cm}{1cm}{1cm}
(EDIT: 1cm might be even better..)
Minimal title:
\begin{document}
\begin{center}
\section*{My Document Title}
\today
\end{center}
% content goes here
\end{document}
The result looks something like: