# Tag Info

0

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 (A) ...

4

Here you go. It is presumed that the image file exists (and has a particular dimension) and the aim is to produce either a space or a placeholder that would be the same size as would be produced, while at the same time not making the image available to the reader (could also reduce file size in a draft). You could do something like the below, measuring the ...

1

According to the documentation, the environment sidewaysfigure "produces a single page-size float with contents rotated ±90 degrees." So a sidewaysfigure will always be alone on its page. If you don't want that, then use an ordinary figure and rotate it manually.

2

You can modify the \@makecol macro in the output routine so it reboxes the page to its natural height rather than forcing it to be text height, then set \pdfpageheight to the height of that box (plus some extra for the 1in offset TeX uses, and the page margins). \documentclass{article} % make all pages long \usepackage[paperheight=26in,top=20pt]{geometry} ...

1

You could use \clearpage after your first group of tables (it should not make a blank page) or just make the last of the first group bigger so the second group has to start on a new page for example \begin{table}[p] \begin{tabular}... \caption{...} \vspace{.4\textheight} \end{table}

0

I suggest you load the afterpage package in the preamble and issue the following instructions in the body of the document: \afterpage{% \clearpage % flush any accumulated floats \begin{figure}[ht!] % or: \begin{table}[ht!] ... % body of figure/table environment \end{figure} % or: \end{table} } % end of scope of \afterpage directive Basically, ...

1

\begin{figure}[p] should work to force the float to a float page, if you want to allow the float page to have just 1 float even if the float is small, then set \floatpagefraction small enough say \renewcommand\floatpagefraction{0.1} so that LaTeX does not need to hold the float back to fit a second float on the page to exceed \floatpagefraction (which is ...

1

As a workaround try to change package loading order to: \usepackage{floatpag} \usepackage{float} There are plans to do some code cleanup and make it compatible with float package in the next floatpag package release.

4

You need no \subfloat, for this. All trees can be encapsulated in a tabular environment that guarantees vertical centering with respect to the formula axis where the arrows sit. I also added \small that makes everything a tad smaller and helps in keeping the size under control. \documentclass[a4paper, 11pt, titlepage]{book} \usepackage[T1]{fontenc} ...

1

For such an appendix you don't really want the figures to float at all so rather than specifying that they float and hoping they don't, use [H] to tell latex not to float them, then the usual rules about keeping section headings with teh first text in the section will kick in. I also added some % to ends of lines to avoid the overfull box warnings in the ...

0

If you never want a float to float "backwards" to the top of the current page so that it is placed before its position in the source file then you can use \usepackage{flafter} which is part of the base latex distribution. Normally such position isn't a problem as the idea of the \caption and \ref system is that you word the caption assuming it has a ...

3

You really don't want the picture to float, but figure tells LaTeX to float the contents. This introduces complications it seems best to do without. Moreover, eliminating the figure environment solves the centring problem: \documentclass[a4paper]{memoir} \setstocksize{29.7cm}{21.0cm} % A4 stock \settrimmedsize{27.94cm}{21.0cm}{*} % 27.94cm = 11in ...

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, ...

1

Your demand is against to basic rule of TeX/LaTeX: figures and tables (and similar object) should be in float environments that can be moved to place, where the best fit into the text ... To achieve, what you like, is the simplest way not to use floats. Just put figure directly in text and for caption use \captionof from package caption or small package ...

2

Why do you need the float package ? First read about figure placement and try with the following: \documentclass{article} \usepackage{graphicx} \begin{document} \begin{figure}[!htbp] \centering \textbf{Your title}\\ \includegraphics[width=.5\textwidth]{fig} \caption{Explanatory statement \label{fig:fig1}} \end{figure} \end{document}

1

You can use the [!h] instead of [H] to make it better, \begin{figure}[!h] \centering \includegraphics[width=\textwidth]{pictures/mypicture.png} \caption{mypicture} \label{fig:mypicture} \end{figure}

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".

1

I'd consider defining your own floating environment with the float package, doing something like this: \usepackage{float} \usepackage{listings} \newfloat{lstfloat}{htbp}{lop} \floatname{lstfloat}{Listing} Now, you can create a floating listing with the following syntax: \begin{lstfloat} \begin{lstlisting} % code here \end{lstlisting} \end{float} This ...

0

Alright, at least I figured out how to get rid of the issue, although I couldn't quite find the origin of it. First of all thank you very much for your help @cfr . As I tried to compile a fresh sample of classicthesis and the error still kept popping up, I switched to my linux distribution and successfully hit the pdflatex to create an error free version. ...

1

The following code resolves the issue. Replace the rule with the figure. \begin{strip} \centering\noindent \rule{0.75\linewidth}{0.5\linewidth} \captionof{figure}{\blindtext} \end{strip}

0

The float boxed style is always slightly wider than \textwidth. If you don't want the box around the caption, just put an \fbox{..} around the image. \documentclass{article} \usepackage{showframe} \usepackage{mwe} \begin{document} \begin{figure} \fboxsep=1em \fboxrule=1pt \fbox{\begin{minipage}{\dimexpr \textwidth -2\fboxsep-2\fboxrule} ...

2

The syntax for \begin{wrapfigure} is \begin{wrapfigure}[<number>]{<letter>}[<dimen>]{<dimen>} You can use xparse: \usepackage{xparse} \usepackage{wrapfig} \RenewDocumentEnvironment{wrapfigure}{omom} {\begin{figure}} {\end{figure}}

1

Typically journals want figures as separate files. In practice you can put them at the back of the file with a note in the text stating where they belong. If you use the endfloat package it will do both of these things for you automatically.

4

I suggest you load the subcaption package and use three subfigure environments inside a single figure environment. \documentclass[a4paper, 11pt, titlepage]{book} \usepackage[demo]{graphicx} % omit 'demo' option in real document \usepackage{subcaption} \begin{document} \begin{figure} \begin{subfigure}{\textwidth} \centering ...

1

Split your figure into two figure and than to second immediately after \begin{figure} add \ContinuedFloat. With this both figures have the same number, sub captions numbers will continue in the second figure: \documentclass{article} \usepackage{graphicx} \usepackage{caption} \usepackage{subcaption} \begin{document} \begin{figure}[htb] \centering ...

2

This is how I do it. I don't use the endfloat package. Normal way to include figure \begin{figure} \centering \includegraphics[width=4in]{somefigure.png} \caption{some caption.} \label{Fig: somefigure} \end{figure} %--------- modification --------- \usepackage{caption} \captionsetup{labelformat=empty} \begin{figure} \centering ...

2

The xprintlen package provides the means to show the length of a dimension register in more 'human' units, such as cm or mm, which is the default: \printlen[2][mm]{length register} Will use 2 significant figures (which is the default), mm as unit of the relevant length register. \documentclass{article} \usepackage{pgffor} \usepackage{xprintlen} ...

1

With help of tabular environments: \documentclass{article} \usepackage{subcaption} \usepackage{graphicx} \begin{document} \begin{figure}[htb] \centering \begin{tabular}[t]{@{}p{0.3\hsize}@{}} \begin{subfigure}{\hsize}\centering \includegraphics[width=0.9\hsize]{example-image} \caption{A} \label{A} \end{subfigure} ...

0

I have now fixed this and thought I'd share my solution since it is not similar to any of the suggestions by others. Essentially I managed to force the order of my floats by defining the tables before the paragraph rather than after it. Compare the following to my original post. The code I am now using is of the form: table1 float environment [p] table2 ...

3

@cfr is right. The dimension \beamer@frametextheight is calculated very lately. In fact, this dimension is used at only two places: \framezoom and shrink. Thus one has two ways to utilize the full vertical space. \documentclass{beamer} \usepackage{tikz} \begin{document} \frame{{use \tt\string\framezoom} \framezoom<1><2>(0cm,0cm)(5cm,5cm) ...

3

With the following code : \documentclass[print]{nuthesis} % Require http://www.math.unl.edu/graduate/nuthesis/nuthesis.zip \begin{document} \chapter{Foreword} \section{First section} \begin{figure} \caption{First figure} \end{figure} \section{Second Section} \begin{figure} \caption{Second figure} \end{figure} ...

2

Using [p] on the tables restricts the position the tables can go so latex is forced to hold them back hoping to fill a float page subject to the constraints on float pages. As you have posted no example we have to guess but I would guess that the two figures are too small to fill a float page on their own but too large to both fit, so they will be held back ...

4

wrapfig always adds floats to the start of a paragraph and as clarified in comments the behaviour is expected, the float was added to the start of the first paragraph which started sufficiently high up the page to accept the figure. It is easy to manually adjust the position, once the document is stable, add a spurious paragraph break at the point TeX broke ...

0

Alternatively to my above comment: If you use a double-column format like IEEEtran, you might want to use the figure* environment instead of the figure environment. figure only occupies one column. figure* spans both.

1

The \floatpagestyle{empty} command is designed to set the page style on float pages (as used by [p] floats). the package redefines float internals in a way incompatible with the float package so do not use them both together. In the case of [H] or [h] floats they are by definition on a text page not on a float page, so the command could do nothing in that ...

0

If you are using tikz you could use the "scale" option. Here is an example: \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} \begin{figure}[htbp] \begin{tikzpicture}[auto,node distance=8mm,>=latex,font=\small] \draw[thick,black] circle[radius=1] node[right=1]{normal size}; \end{tikzpicture} ...

3

In your markdown source code add the \suppressfloats command before the offending floats (tables, figures), and compile with pandoc -f markdown+raw_tex. Tested on this kantlip.md input ![Two plots placed side by side.](frog.jpg) \kant[2-3] \suppressfloats \begin{figure} \includegraphics[width=0.5\linewidth]{frog} ...

1

I would set up the environment as follows: \begin{figure}[h] \caption{Headline} \label{fig:headline} \includegraphics[scale=0.5]{Graphic1} \smallskip Explanation and legend, involving a cross-reference to Figure \ref{fig:headline} itself. \end{figure}

1

You can not use a figure environment inside a frame environment. So, put your frame inside your figure like it follows: \documentclass{article} \usepackage[demo]{graphicx}% demo option just for the example \usepackage{framed} \usepackage{caption} \captionsetup[figure]{labelfont={bf},labelformat={default},labelsep=period,name={Fig.},width=\textwidth} ...

4

It seems that you need not the long tables breakable to the pages but your preprocessor uses this marking for all tables. In such case, you can define longtable as normal table. It means, don't load longtable package, i.e don't use \usepackage{longtable} but define this: \newenvironment{longtable}[2][c] {\table[h] \bgroup ...

1

For this you have more possibilities. The simple one is to omit empty line between last and one before subfigure. In this case the subfigure d will be vertically aligned with subfigure c. More elegant result you can achieve with use of tabular environment: \documentclass[11pt]{article} \usepackage{pgfplots} \usepackage{graphicx} \usepackage{caption} ...

10

The copyrightbox package is done precisely for that: \documentclass{book} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{ebgaramond} \usepackage{graphicx} \usepackage[x11names]{xcolor} \usepackage{caption, copyrightbox} \captionsetup{justification = centering} \begin{document} \begin{figure*}[!h] \centering ...

3

One way would be to use a rotatebox inside a figure environment like this: \documentclass{article} \usepackage{graphicx} \begin{document} \begin{figure} \centering \rotatebox{90}{\tiny Hans Hillewaert (WIKIPEDIA)} \includegraphics[width=0.5\textwidth]{squid.jpg} \caption{A Nice Squid} \end{figure} \end{document} this will give something ...

2

Entering LaTeX 2.09 COMPATIBILITY MODE ************************************************************* !!WARNING!! !!WARNING!! !!WARNING!! !!WARNING!! This mode attempts to provide an emulation of the LaTeX 2.09 author environment so that OLD documents can be successfully processed. It should NOT be used for NEW documents! New ...

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}}% ...

1

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

2

Try for example this code: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{width=3cm,height=3cm} \begin{document} \begin{tikzpicture} \begin{axis}[xmin=0,xmax=2,ymin=0,ymax=2,ytick=0.5,xtick=0.5] \end{axis} \draw [red] (current bounding box.south west) rectangle (current bounding box.north east); \end{tikzpicture} \begin{tikzpicture} ...

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} ...

1

Well, in the manual for class apa6, Chapter 3 you can read: Document mode: Three choices are available. jou (default): Formats the document with an appearance resembling a jou printed APA journal (e.g., Journal of Educational Psychology. The text is typeset in two-sided, two-column format. man: Formats the document in close (if not complete) ...

Top 50 recent answers are included