# Tag Info

0

The best way to put the figure to the bottom of a page is to tell latex to put directly to the bottom by \begin{figure}**[!b]** You can look at the result by looking at this code. The code itself is here: %% Just a MWE with a figure of a kitten and blindtext package \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[english,russian]{babel} ...

1

You can overlay anything on top of a picture, but you will need to do a lot of manual placement. Here I use relative coordinates from TikZ so that changing the size of the image will not affect the placement. \documentclass[border=1pt]{standalone} \usepackage{tikz} \usetikzlibrary{calc} \usepackage{mwe} \begin{document} \begin{tikzpicture} \node[inner ...

1

Here is a solution, using the resume* feature of the enumitem package. It consists in closing the enumerate environment before the inclusion of the image, and create side to side two minipage environments, top-aligned. The left-hand side minipage contains the resumed enumerate, and the right-hand side the image and its caption. At the end of these ...

2

I'll try to make the point of some things here, also because I don't agree with the approach suggested in the answer posted by @Mattia. There is a bit of confusion here about some heavy matters: positioning figures, floats, captions. First, the center environment is mainly meant to be used to center text paragraphs rather than images, figure should be used ...

1

The problem here is specific to wrapfig being in a list. One way around this problem is to adjust the margins within the list manually, and placing the figure in the appropriate position. Below I've used the power of LaTeX3's xgalley to set some relative margins within the enumerate. The image is put flush right inside a zero-height tabular (using ...

5

To force a figure to the current position, add \usepackage{float} to your preamble and use \begin{figure}[H] \centering \includegraphics[<options>]{<image>} \caption{<caption>} \end{figure} If this is your choice, please consider also reading How to influence the position of float environments like figure and table in LaTeX? ...

1

Redefine the command: \documentclass{article} \usepackage{graphicx} \let\IG\includegraphics \renewcommand\includegraphics[2][]{\IfFileExists{#2}{\IG[#1]{#2}}{\ignorespaces}} \begin{document} \includegraphics[width=3cm]{example-image.pdf} \includegraphics[width=5cm]{somefile.pdf} \includegraphics[width=3cm]{example-image-a.pdf} ...

0

To solve this problem you can use something like this: \begin{center} \includegraphics[width=13.7cm, height=8.2cm]{pictures/c25k.png} \begin{figure}[!h] \caption{Here the caption.} \end{figure} \end{center} This may works for what you are asking. But remind that if you want a figure in a specific place you can use the following command: ...

3

AFAIK, the only way to control the width and height of a pgfplot axis is with width and height, and pgfplot regards them more as guidelines than rules. If you want precision, you will need to use \resizebox. \documentclass{article} \usepackage{pgfplots} \usepackage{tikz} \pgfplotsset{ %label style={anchor=near ticklabel}, xlabel ...

0

\label{name} stores \thefigure together with "name" in the aux file. More accurately, it stores the counter last incremented by \refstepcounter. \ref{name} retrieves this stored text, but it takes a second run to show changes. \documentclass{book} \usepackage{mwe} \begin{document} \chapter{Start} See Figure \ref{name}. \begin{figure}[h] ...

2

You may also consider using the overprint command. \begin{figure} \begin{overprint} \onslide<1>\includegraphics{./figure1.png} \onslide<2>\includegraphics{./figure2.png} \onslide<3>\includegraphics{./figure3.png} \onslide<4->\includegraphics{./figure4.png} \end{overprint} \end{figure}

0

In the following are some suggestions to achieve the first point: make a visual mark that links graphically the toc to the text. It goes together with a mwe. Another additional feature should follow in order to make this a complete answer: to have the mark of the toc along the text pages of each chapter at the same height (of the margin) they were in the ...

1

The package makeidx (the most common indexing package for LaTeX) has a way to format the pages of a particular index entry. Namely, if you write \index{bulldog|textbf} then the page number for this entry will be typeset in bold face. You can use this in your case as follows: Define a new "style command" that takes one argument (the page number) and ...

4

You can use \unexpanded{\unexpanded{#1}}: \documentclass[a4paper,10pt]{report} \usepackage{fontspec} \usepackage{lipsum} \usepackage{graphicx} \usepackage{caption} % Redefinition of \addcontentsline \long\def\addefcline#1#2#3{% \addtocontents{#1}{\efcline{#2}{#3}{\thepage}}} % Redefinition of \contentsline \makeatletter \long\def\efcline#1{\csname ...

1

\noindent \makebox[\textwidth] does not stop the box being indented, it makes a blank paragraph just consisting of \parfillskip glue, then the vertical \parskip glue, and then the box starts an indented paragraph, so visually it moves the image down by a line and to the right by the paragraph indentation. The rest of the space is due to page margins, ...

5

Above the float, you should see a box with the text "float: Figure". If you right click it, then select "Settings...", then you should get this box: Uncheck "Use default placement" and play around with the settings under "Advanced Placement Options". To try David Carlisle's suggestion of htp, select "Here if possible", "Top of page" and "Page of floats".

0


3

Assuming that you are using this class: https://www.ctan.org/tex-archive/macros/latex/contrib/nature The comments make clear that images should not be included inline: %% The \includegraphics command is ignored since Nature wants figures %% as separate files. Thus changing macros would not really help. If you really want to do it anyway then ...

2

8

\node (as well as all TikZ paths) is overlay-aware so you can use \node<overlay spec.> [options] {contents}; A complete example: \documentclass{beamer} \usepackage{tikz} \begin{document} \begin{frame} \begin{center} \begin{tikzpicture} \node<1> (img1) {\includegraphics[width=.5\linewidth]{example-image-a}}; \node<2> (img2) ...

4

The troublesome parts in iiufrgs.cls are the lines 142 to 146. \vfuzz=30pt % prevent overfull \vbox while \output is active % prevent underfull \vbox while \output is active: \edef\orig@output{\the\output} \output{\setbox\@cclv\vbox{\unvbox\@cclv\vspace{0pt plus 50pt}}\orig@output} The first line, as David Carlisle pointed out in his comments, does not ...

1

The document should start (like all latex documents) \documentclass{sig-alternate-05-2015} \usepackage{graphics} \begin{document} You will get a warning You have requested document class sig-alternate-05-2015', but the document class provides sig-alternate'. which you can ignore, or to stop it, edit the \ProvidesClass line in the file to say ...

2

My suggestion would be to clip the image contents within LaTeX; graphicx allows for that: \documentclass{article} \usepackage{graphicx,subcaption} \begin{document} \begin{figure} \centering \setbox1=\hbox{\includegraphics{example-image-a}}% \subcaptionbox{}{\centering\includegraphics[scale=0.5,viewport=.5\wd1 0 \wd1 \ht1,clip]{example-image-a}}% ...

8

Harish asked me to provide the answer to this question. The OP notes that several png images, all 16x16 pixels, display at vastly different sizes in his document. To the OP, several comments were made. First, Harish suggested how to fix the problem, by using the width= specifier to \includegraphics, rather than the scale= specifier. I mentioned that one ...

1

\begin{tabular}{@{}l@{}} \includegraphics{zzz}\\ \hspace{1cm}(a)\hspace{2cm}(b) \end{tabular} Adjust the lengths to fit.

1

With subfig package you could do as it follows: First case \documentclass{article} \usepackage{graphicx} \usepackage{float} \usepackage{subfig} \begin{document} \begin{figure}[H] \captionsetup{labelfont=bf} \centering \subfloat[]{\centering\includegraphics[scale=0.6]{Fig1a.png}}\\ ...

2

From the comments to your question I guess you are using the subfig package` Your code doesn't tell because it doesn't seem to use its commands… Your usage of \captionsetup suggests that you're loading the caption package. Then I'd use the subcaption package from the same author for having subfigures. Here's an example: \documentclass{article} ...

0

I usually make the plots within R and export it to SVG. Then I use son image editor such as Inkscape to create a PDF version. This PDF version looks nice in the final latex document. I have done this several time with optimal results.

1

I encountered similar issue and then realised it was the preview of my editor (texstudio) which was responsible as when I opened the pdf file points were showing up. Maybe it can help.

0

You can use \resizebox{width}{height}{object} as it follows: \documentclass[10pt,a4paper]{extarticle} \usepackage{graphicx} \begin{document} \begin{figure} \resizebox{\textwidth}{!}{% \includegraphics{a.pdf}% \includegraphics{a.pdf}% \includegraphics{a.pdf}} \end{figure} \end{document} The ! is used to keep the aspect ratio. Put \quad or \qquad ...

Top 50 recent answers are included