# Tag Info

## New answers tagged floats

3

Maybe with the spy library: \documentclass{beamer} \usepackage{tikz} \usetikzlibrary{shapes,arrows,positioning,arrows,spy} \tikzstyle{arr} = [draw, -latex'] \begin{document} \begin{frame} % premier transparent \frametitle{Figure (1)} \scalebox{.3}{ \begin{tikzpicture}[spy using outlines={circle, magnification=3, size=20cm, connect spies}] \node ...

0

how about trying \includegraphics: \begin{figure}[!hb] \includegraphics[scale=0.40]{Graph1.eps} \caption{Random caption here.} \end{figure} instead of \plotone. You have to include the followings in the preamble: \usepackage{graphicx} \usepackage{epsfig}

4

this only allows p on odd pages. Note that it doesn't redefine \clearpage (including its implicit use in \end{document} so any floats pending at the end of the document will be flushed irrespective of page number. \documentclass{article} \makeatletter \def\@floatplacement{\global\@topnum\c@topnumber % Textpage bit, global: \global\@toproom ...

2

Is it like this? \documentclass[10pt, twoside]{book} \usepackage[demo]{graphicx} %%% remove demo in your file \usepackage{multicol} \usepackage{caption} \usepackage{kantlipsum} \begin{document} \begin{multicols}{2} a test file for picture inclusion along with the captions and labeling \noindent \begin{minipage}{0.5\columnwidth} \centering ...

1

multicol package doesn't work well with figure environment (which is a float). You stand better chances by using the \includegraphics and add the caption using \captionof macro from caption (or \capt-of) package. \documentclass[10pt, twoside]{book} \usepackage[demo]{graphicx} %%% remove demo in your file \usepackage{multicol} \usepackage{caption} ...

0

Try the following code \documentclass{article} \usepackage[demo]{graphicx} \usepackage{subfigure} \begin{document} \begin{figure} \centering \subfigure[Title Image 1]{\label{fig:I1}\includegraphics[width=0.3\textwidth]{Chapter-1/figs/Image1.pdf}}\qquad \subfigure[Title Image ...

4

You missed the width for subfigure which is the mandatory argument: \begin{subfigure}{0.45\textwidth} Use any length instead of 0.45\textwidth as you need. Also don't leave blank lines in between two subfigures as it will amount to a par break. With this I get: \documentclass{article} \usepackage{subcaption} \usepackage[demo]{graphicx} %% no demo in ...

0

No neeed to complicate your life for this sort of things \documentclass{article} \usepackage[demo]{graphicx} \begin{document} \begin{figure} (a)\includegraphics[width=2cm,height=2cm]{image1}% (b)\includegraphics[width=2cm,height=2cm]{image1} (c)\includegraphics[width=2cm,height=2cm]{image1}% (d)\includegraphics[width=2cm,height=2cm]{image1} \end{figure} ...

5

It is better to use tabular than array: \documentclass[demo]{article} %% remove demo in your file \usepackage{amsmath} \usepackage[export]{adjustbox} %% gives valing key \usepackage{graphicx} \begin{document} \begin{figure} \centering \begin{tabular}{r@{\hspace{2pt}}lr@{\hspace{2pt}}l} (a) & \includegraphics[valign=b,height=2cm]{image1.jpg} ...

3

Just a minor modification to your MWE, but better output: \documentclass{article} \usepackage{amsmath} \usepackage{graphicx} \begin{document} \begin{figure} \[ \begin{array}{rlrl} (a) & \includegraphics[height=2cm]{image1.jpg} & (b)& \includegraphics[height=2cm]{image3.jpg} \\ (c) & \includegraphics[height=2cm]{image2.jpg} & (d)& ...

7

This is very easy and may be a duplicate too. Any way, I am posting this and if this is closed a duplicate, I will delete this answer. \documentclass[tikz,border=2mm]{standalone} \begin{document} \begin{tikzpicture} \node[anchor=south west,inner sep=0] (image) at (0,0,0) {\includegraphics[width=4in]{example-image-a}}; \begin{scope}[x={(image.south ...

1

The following should achieve your goal I think: \documentclass{book} \usepackage{graphicx} \usepackage{subcaption} \begin{document} \begin{figure}[H] \centering \begin{subfigure}{0.45\linewidth} \centering \includegraphics[width=\linewidth]{Example-Image} \caption{} \label{fig:dragratio} \end{subfigure} \hfill ...

0

Directory/File structure Thesis/Section1/section1.tex Thesis/Figures/figure1.tex main.tex \documentclass{article}% \usepackage{graphicx}% \begin{document} \input{Section1/section1} \end{document} section1.tex \section{First} \input{Figures/figure1} figure1.tex \begin{figure} \includegraphics[scale=1]{example-image-a.jpg} \end{figure} ...

0

Use a tex file for each figures details and insert using \input{figdetails} at the correct point in the text. Add the package endfloat at the start of the document.

0

If you wish to mix-and-match the use of a floating and non-floating figure or table, then you should use the float package's [H] float specifier. Here's a small example: \documentclass{article} \usepackage[margin=1in]{geometry}% Just for this example \usepackage{float,lipsum,graphicx} \begin{document} \lipsum[1] \begin{figure}[H]% Non-floating figure ...

1

Code \documentclass[a4paper]{article} \usepackage{amsmath} \usepackage[numbers,square]{natbib} %The following is uesd to make the caption colored \usepackage{xcolor} \definecolor{ocre}{RGB}{1,160,233} \usepackage{caption} \usepackage[font={small,color=ocre}]{caption} \usepackage{graphicx,subfigure} \usepackage[hidelinks]{hyperref} % hyperlinks ...

1

\documentclass{article} \usepackage[demo]{graphicx} \usepackage{lipsum} \begin{document} \twocolumn \begin{figure*}[t] \begin{minipage}[c]{.47\linewidth} \null \includegraphics[width=\textwidth,height=8cm]{example} \end{minipage}\hfill \begin{minipage}[c]{0.47\textwidth} \caption{\protect\lipsum[3] } \label{fig:1} \end{minipage} ...

1

By default, matlab2tikz produces the code that enable scale only axis option of the axis environment (see 4.10.1 Common Scaling Options of the pgfplots documentation). Just remove that line from your .tikz file to solve the first issue. The second problem is more about your personal representation of the data, so I may only suggest to reduce the font or ...

8

I am not too sure if getting advice from TeX hackers on typography is good advice but certainly is solid advice on anything related to LaTeX. My own preference is to mix both floating and non-floating figures and I like non-floating figures. Here are some samples: Here is the same "style" for an arts page Here is one "Life Magazine style" These and ...

7

The answers depend a lot on what kind of document you are producing. LaTeX's float placement algorithm is a lot better and has a lot more parameters than many users believe. See Frank's description One of the most common problems of course is that when things don't go quite as people expect they use [h] which makes it much more likely that the figure can ...

3

This is a bit long for a comment, but here we go: exam is based on article, and thus the figure environment is defined. You can define a new environment using a minipage, but i do not recommend to redefine the original figure-environment. But doing this, the order of the figures (and the captions) can be messed up pretty badly. You need to decide, let them ...

0

Actually I think just embedding the label in the caption is sufficient: \caption{ \label{figure} Caption ...}

1


2

I changed your given MWE. There are several mistakes included, for example should package hyperref be the last called package. I added the command \ihead[Test]{Beispiel 1} % [plain]{scrheadings} to show you that the part included with [] is shown on the first page of a chapter or TOC and the part included in {} is showed on all other pages ...

5

You have to use the proper header names of columns. Your columns have names parameter and test but you are using name and surname. Change them to columns/parameter/.style={column name=$\epsilon$, column type={|c|}}, columns/test/.style={column name=$\phi$, column type={|c|}}, Code: \documentclass{article} \usepackage{pgfplotstable} ...

0

With or without placeins you can prevent a float floating "backwards" to the top of the page with its definition by using \usepackage{flafter] which is part of the base latex distribution.

1

To reduce the spacing between figures and text, you can use \belowcaptionskip if all your figures have a \caption: \setlength\belowcaptionskip{-3ex} \begin{figure}[h] \centering Figure contents \caption{Figure caption} \end{figure} In order to reduce the spacing between paragraphs, set \parskip: \setlength{\parskip}{0mm} To see the current ...

1

Beware of spaces at the end of lines between environments/commands! The hint is that you have a comment character at the end of your first subfigure. If you change all of these lines so that they look like \end{subfigure}% Then all is well:

1

XeLaTeX should handle eps files with non problem. But your eps file might contain extraneous material, suche a bitmapped screen preview of the real image. Therefore try converting it into another acceptable format, for example pdf with ps2pdf and import the pdf image instead of the eps one. Maybe that the extraneous material forbids a suitable ...

3

You haven't provided your requirements for quite a few design aspects, so I have to make some assumptions. In particular, in the examples below I'll assume that the two side-by-side figures should jointly span the entire width of the text block. You also haven't indicated whether or not the side-by-side figures should be able to float, in the LaTeX sense ...

2

Here is the kind of thing I think you want although I'm not sure. You can fiddle with the sizes to make the most of the space but you need things smaller than in the MWE unless you want more than 2 lines of sub-figures which is another option. \documentclass[a4paper, 12pt]{article} \usepackage[left=3cm, right=2cm, top=3cm, bottom=4cm]{geometry} ...

4

\begin{figure} doesn't expand the optional argument; when expansion happens it's too late. \documentclass[10pt,a4paper]{article} \usepackage{keyval} \usepackage[demo]{graphicx}% draft is just for the example \makeatletter \define@key{image}{pos}{\def\i@pos{#1}} % define key-val \setkeys{image}{pos=!htbp} % set default \newcommand{\image}[2][]{% ...

0

If I understand your problem correctly, you're just trying to get a figure into a single column in the text. There's a few issues with your code: The \widetext environment is only intended for placing full width equations into the middle of two column text. Using figure* creates full width figures in two column documents which can only be placed at the top ...

0

The problem is I think quite simply that the \parbox in your step-files is too narrow to fit the text, so it overflows out of the parbox, and hence out of the \fcolorbox. If you use a large enough width, in this specific case 1.5\linewidth seems to fit well, the result is better: I'm not entirely sure why the second box is that narrow, but I suppose it ...

6

Since you're looking to make the two graphs larger, you could (a) increase the widths of the two subfigure environments to, say, 0.75\textwidth and (b) set the widths of the graphs to 1\linewidth, i.e., to the full width of the enclosing subfigure environments. LaTeX will automatically insert a line break between the two subfigures. ...

3

You can give three option for fonts: font = <options> → affects whole caption labelfont = <options> → affects only the caption label and separator and textfont = <options> → affects only the caption text What you need is font = bf (instead of labelfont=bf) in \usepackage[labelsep=newline,% line break after label ...

3

The problem is in the order with which you load the packages: stfloats (assuming you really want to use it) should go before fixltx2e or the float will disappear. I get no error from your minimal example, however, only the disappearance of the float. Note however that \ifCLASSINFOpdf \usepackage[pdftex]{graphicx} \else \fi is useless; just do ...

3

Each of your \subfigures is 1\textwidth wide - there's no way LaTeX could fit two of these in a row. Also you don't need the minipage there. Try something like this: \documentclass{article} \usepackage{graphicx} \usepackage{subcaption} \usepackage{mwe} \begin{document} \begin{figure*} \centering \begin{subfigure}[b]{0.475\textwidth} ...

3

You can put \processdelayedfloats just before the appendix: \documentclass[11pt]{article} \usepackage{morefloats} \usepackage{setspace} \usepackage[round]{natbib} \usepackage{booktabs} \usepackage[nomarkers,nolists]{endfloat} \begin{document} body here \begin{table}[htbp] \begin{tabular}{lc} 1&1\\ \end{tabular} \end{table} body here too \pagebreak ...

1

insbox is a set of generic macros that allow to insert (almost) any box (graphic file, equation, …) on the left ot the right of a paragraph. The two main commands are \InsertBoxL{n}{boxcontent}[correction] and \InsertBoxR{n}{boxcontent}[correction] where n is the number of lines at the beginning of the paragraph that remain untouched, and the optional ...

0

I use a similar solution to the one proposed by werner. However I prefer to define the minipage with text instead of line width: \begin{minipage}[c]{0.95\textwidth} \begin{lstlisting} \end{lstlisting} \end{minipage} "c" for centering and "0.95\textwidth" to make the listing a little bit smaller than the rest of the text.

1

A proposition: Don't use floating figures, remove \begin{figure}...\end{figure} around the graphics and caption Use caption package and \captionof{figure}{foo text} instead of standard \caption command Redefine the figure output command \thefigure to obtain the \thetheorem.\arabic{figure} output (Optional) Use a resetting of figure counter by theorem, i.e. ...

0

It ends up that Apple's Preview application opened and displayed the .eps file properly. If, at that point I choose to Save... the document everything is fine, and I get a correctly formatted .pdf file with correct margins, etc. But, if I choose Export as PDF..., it exports and shows the .pdf on the screen properly. However, on disk the margins are much too ...

6

The easiest way is to put each float in a separate file of the form \expandafter\ifx\csname r@fig:A\endcsname\relax\else\expandafter\endinput\fi \begin{figure} ..... \caption{This is figure A.}\label{fig:A} \end{figure} then use \input{figAfile}\ref{fig:A} the figure will only be set once even if you input it multiple times as the \ifx test ...

0

Perhaps what you are looking for is how to wrap a your text around your figure. This can be done with the wrapfigure environment (inspired by the LaTeX Wikibook) \documentclass{report} \usepackage{wrapfig} \usepackage[demo]{graphicx} \usepackage{kantlipsum} %To generate lipsum \begin{document} \kant %Lipsum \begin{wrapfigure}{r}{0.5\textwidth} ...

2

Here is the relevant excerpt from the user manual: Let's start with an exercise taken from a book by James Davies, \textit{Life and Death}\footnote{Elementary Go Series vol. 4, Kiseido Publishing Company, \copyright 1975, 1996}~: \medskip \begin{minipage}[c][1.0\height][c]{0.65\textwidth} \begin{verbatim} \white{b4,c4,d4,e4,f4,g3,g2,c3} ...

1

As mentioned in my comments, you can try with the subcaption package which allows you to specify the width of the box that contains the subfigure. That way you can set them to be equal. E.g.: \documentclass{report} \usepackage{subcaption} \usepackage[demo]{graphicx} \begin{document} \begin{figure} \centering \begin{subfigure}[b]{.45\linewidth} ...

0

If you want LaTeX to move a figure to another page, if appropriate, do not tell it to try to include the figure HERE! no matter what. That is, omit the [H] argument to the figure environment or, if you prefer, you can specify other positions in addition to H e.g. Htb or something. The important point is to let LaTeX move the figure somewhere suitable if ...

0

@Torbjørn T. Thank you very much. The problem has been solved. For anyone facing the same problem, the steps are as follows: Change the Document>Settings>Text Layout to Indentation: Default (Even if you still want to keep your document not-indented as I do) This will be quite tedious! For all figures: inside the figure float, change the paragraph settings ...

2

(It is a little bit difficult to say for sure, but I think I know why this happens. At least partly.) There are two problems relating to the paragraph settings of the paragraphs containing the floats that can produce additional whitespace. 1. Empty paragraphs If you look at the LaTeX source of one of the figures you'll see something like \noindent ...

Top 50 recent answers are included