Tag Info

New answers tagged

4

Use \usepackage{capt-of} and then: as illustrated in this example \begin{center} \includegraphics[scale=0.6]{sharpideq2.pdf} \captionof{figure}{Blah blah} \end{center} For the same reason \documentclass[11 pt,a4paper,oneside,openany, notitlepage]{article} \usepackage{graphicx} \usepackage{xcolor} \usepackage{amsmath, amssymb} \usepackage{amsthm} ...


1

An alternative is to define an non-float environment for tablehere, but still capable of caption ability without using package. Update: tablehere is changed to the table, but renew it to non-float when preview mode is used. So remove all % below for preview mode. \documentclass[fontsize=16pt]{scrartcl} %\usepackage[active,tightpage]{preview} ...


1

Update In the link you have posted, the author of the standalone package mentions that floats are now possible in standalone and that one should have a look into the manual on the float option. Doing this for you, I got the following code, which should work for you. Edit I also included the required option to get the scrartcl-look and the desired ...


1

Here's one possibility using a temporal counter. For me it wasn't clear why you used \addtocounter{subfigure}{1} but I respected this in my example codes below. \documentclass{article} \usepackage{subfigure} \usepackage[demo]{graphicx} \newcounter{tmp} \begin{document} \begin{figure} \centering ...


2

\begin{center} \includegraphics[width=.4\textwidth]{a} \includegraphics[width=.4\textwidth]{b} \includegraphics[width=.4\textwidth]{c} \includegraphics[width=.4\textwidth]{d} \end{center} \caption{ 4 figures}


1

If you set the pagestyle to empty for just that page, then you can add the page number into the figure using \thepage. \documentclass{scrreprt} \usepackage[demo]{graphicx} \begin{document} \thispagestyle{empty} \begin{figure} \centering \includegraphics[height=24cm]{name}\\ \thepage \end{figure} \pagebreak \begin{figure} \centering ...


0

You simply need to replace [!htbp] by [!p] otherwise, it will get placed as a top float. Cheers!


0

You can use use the insbox set of generic macros: it has an \InsertBoxC command that, at the point of insertion, first terminates the current line of text, then places the content of its argument (centred) and lastly continues the text. For the caption and label referencing, you can use the captionof command from the caption package. So in your case, this ...


2

This is what I have in my preamble: \usepackage{caption} \DeclareCaptionLabelSeparator{colquad}{:\quad} \captionsetup{labelsep=colquad}


2

Do not leave blank lines between the two objects; a blank line is just \par, so the second object starts a new paragraph: \documentclass{article} \usepackage{tikz-qtree} \begin{document} \begin{figure} \begin{minipage}[b]{0.5\linewidth} \centering \begin{tikzpicture}[scale=.85,sibling distance=0pt] \Tree [.TP [.DP \edge[roof]; {a 'we'} ] ...


6

Doesn't generalize very well, but... \documentclass[tikz,border=5]{standalone} \begin{document} \begin{tikzpicture}[x=4cm,y=.5cm, >=stealth] \foreach \i [evaluate={% \x=\i<4 ? \i : (\i<16 ? 1 : (\i<22 ? 2 : 3)); \y=\i<4 ? 1 : (\i<16 ? 2-\i : (\i<22 ? 11-\i : 15-\i)); }] in {1,...,23} \node (text-\i) at (\x,\y) {Text \i}; ...


2

\FloatBarrier of package placeins could be put before \begin{lstlisting} to output the pending floats before the long listing that should not be interrupted by floats.


6

A PSTricks solution: \documentclass{article} \usepackage{pstricks} \usepackage{multido} \begin{document} \begin{pspicture}(8,8.1) \psline{->}(0,0)(8,3) \psline{->}(0,7)(8,4) \multido{\iA = 1+3, \iB = 1+1}{3}{\rput(\iA,8){Text~\iB}} \multido{\r = 5.975+-0.45, \i = 4+1}{12}{\rput(1,\r){Text~\i}} \multido{\r = 4.625+-0.45, \i = ...


6

Something like this? \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{arrows} \begin{document} \begin{tikzpicture} % Line of Text \node at (0,7) {Text 1}; \node at (4,7) {Text 2}; \node at (8,7) {Text 3}; % First column of Text \node at (0,5.5) {Text 4}; \node at (0,5) {Text 5}; \node at (0,4.5) {Text 6}; \node at (0,4) {Text 7}; \node at ...


4

This modifies LaTeX's top float positioning so that it puts the top floats in the centre of the page, or at least as close to the centre as possible, if the text flow has a an unbreakable box or math display at the centre the vsplit will not split it at exactly the centre. It's not extensively tested but it works on this page:-). It applies to all top floats ...


3

Please always post complete code in future. This is an alternative. Since you are not using separate captions (which are not needed for a presentation IMO), you need not use subcaption package. Simple minipage will do. Further, if you can save your pictures as .tikz files (I hope you use tikz for those pictures, if not I will discard this answer), you can ...


3

Using the insbox set of generic macros, it reduces to using the \InsertBoxC command if there is no caption. This command can be used anywhere in a paragraph: at the point of insertion, the macro first ends the line with the following text, then inserts what you want to insert, and ends with the rest of the paragraph. If there is caption is more mysterious ...


3

Something more like this? The White Rabbit will always appear on page 2 in the centre of the page scaled to 37.5% of \textheight, taking 40% total including a little breathing room. Other pages are formatted much as usual: This uses flowfram. This drastically changes the way TeX outputs text and may not suit your purposes depending on the other content ...


0

The float package will do this. Use the [H] option for the float. \documentclass{article} \usepackage{float} \usepackage{tikz} \begin{document} Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec varius dapibus metus eget ultrices. Nulla sagittis mauris rutrum, blandit augue eget, laoreet augue. Phasellus enim odio, sagittis in mi sed, ...


2

memoir provides its own interface for caption management, and there may be some clashes when using it in conjunction with caption (see section 10.13 The class versus the caption package (and its friends), p 206 of the memoir user manual). However, you can update \caption to grab its contents, evaluate whether the argument is empty/not, and condition ...


1

If you really don't use captions anywhere, redefine \caption to do nothing. \renewcommand{\caption}{} Which I think will do what you want.


0

I found a way by adjusting the minpage's width: \begin{figure} \centering \begin{minipage}[t]{.45\textwidth} \centering \includegraphics[scale=FIGURE1_SCALE]{images/Figure1.pdf} \caption{My Figure1 Caption} \end{minipage}\hfill \begin{minipage}[t]{.3\textwidth} \centering \includegraphics[scale=FIGURE2_SCALE]{images/Figure2.pdf} \caption{My Figure2 Caption} ...


3

You need to know as with the first figure whether there are more figures to follow within the same environment, or not. Unfortunately, LaTeX is not able to perform that sort of “look ahead” on its own. Anyhow, you can use .aux-files to store the total number of figures within each Job-environment and process that very number at the beginning of each ...


4

You can use chngcntr package and do \usepackage{chngcntr} \counterwithin{equation}{Job} %% you can do this too because you defined it %% \counterwithin{figure}{Job} Full code: \documentclass[10pt,demo]{article} %%% remove demo \usepackage{graphicx, thmtools, lipsum, float} \declaretheorem{Job} \makeatletter \let\c@equation\c@figure ...


1

If it is practicable for you, you can reset the figure counter in each theorem. Maybe, you want to redefine the theorem environment, to do this automatically, but I don't know, how to do this. One line per theorem should be OK. For your exact problem: I don't know, how LaTeX shall notify, if one or two figures are included in one theorem. I think, it is ...


1

My understanding of the question is, that you want \addcontentsline on a "virtual" page with new page number, but without having the page in the final document, because it is generated elsewhere. \addcontentsline uses deferred writing \write that is actually executed, if the page is shipped out, which contains the write node. However TeX also knows an ...


3

You were almost there with the \@maketitle redefinition: \documentclass{sigchi} \usepackage{capt-of,etoolbox} \makeatletter \patchcmd\@maketitle\null{{\myfigure{}\par}}{}{} \makeatother \begin{document} \newcommand\myfigure{% \centering \rule{2cm}{2cm}%\includegraphics \captionof{figure}{Some stuff about the teaser} \label{fig:teaser} } \title{My ...


11

I'm using the method developed in Making the text fit in a specific space in Latex to explore various aspects to this question. I am not rearranging any items, but am assuming that I have a string of N images that I am being asked to stuff into a certain size rectangle. I am treating each image as text, and allowing line breaking to create the rows. So ...


7

The only purpose of the figure environment is to allow LaTeX to move the figure, and a minipage inside figure has no purpose at all unless you have footnotes, so you just need %\begin{figure} % \begin{minipage}{\textwidth} \includegraphics[width=75.5mm]{myimage} % \end{minipage} %\end{figure} and the image will appear wherever you have ...


5

Figure is an floating object and minipage is not, so by encapsulating a minipage in a figure object you make the minipage floating. Another option is using the "H" position specifier; http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions That being said, I prefer to let LaTeX control the position of the image and use a reference to that figure in ...


2

h floats don't really make sense in two column. In the standard twocolumn mode the first column may already have been set to full height by the time the float is seen, and it can't be undone at that point, which is why the system always adds floats to the next page. b could have been supported with the same restrictions as t it just wasn't added. There are ...


2

floatpag also provides \thisfloatpagestyle to adjust the page styles only for the page of floats it is used in: \documentclass{article} \usepackage{floatpag,mwe} \begin{document} \blindtext \begin{figure} \thisfloatpagestyle{empty}% empty page style _only_ for this page \includegraphics[width=\linewidth,height=1.02\textheight]{example-image-a} ...


4

I didn't have had success with the \topfraction, but there is another important setting which gave me less float-only pages. With \renewcommand{\floatpagefraction}{.8}% I was able to specify that only pages with more than 80% of floats, will become pure float-only pages. The default is 0.6 so if a figure consumes 60% of the page it will get its own ...


5

You should be able to go \begin{table*}...\end{table*} \begin{figure*}....\end{figure*} (There is no h option for 2-column floats). If you do that and they don't both appear on the same page then presumably that would invalidate some of the constraints on the number of floats, or of the proportion of the page that may be allocated by floats. If you want ...


6

You can simply put the code together in one floating environment, and choose the captions appropriately by using captionof from the caption package. % arara: pdflatex \documentclass[twocolumn]{article} \usepackage{lipsum} \usepackage{caption} \begin{document} \begin{figure*}[!t] \centering Figure code goes here \caption{Figure} table code goes here ...


6

Just move the \centering out of the math material enclosed in $...$. \documentclass[a4paper]{article} \usepackage{amsmath} \begin{document} \begin{figure}[ht] \centering $\begin{bmatrix} 0 & C_l & 0 & 0 & \dots & \dots & \dots & 0 \\ 0 & 0 & ...


5

If you want a figure (floating), replace $\begin{bmatrix} ... $ with \begin{equation*}\begin{bmatrix} ... \end{equation*}: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{figure}[ht] \centering \begin{equation*} \begin{bmatrix} 0 & C_l & 0 & 0 & \dots & \dots & ...


2

My solution is suited for 'fixed' positioning of content with a caption, i.e. the content should not float around. \documentclass[10pt]{scrbook} \usepackage{caption} \usepackage{amsmath} \begin{document} \chapter{My very sophisticated matrix} \begingroup \centering% \(% \begin{bmatrix}% 0 & C_l & 0 & 0 ...


4

Gonzalo showed how to use subcaption package to solve the problem. This also uses that package, but shows how stacks and \subcaptionbox can be used to increase the inter-image gap arbitrarily, using the \setstackgap{S}{length} command. By using the \subcaptionbox variant of subcaption, arbitrary placement of the figures is possible, as also shown in this ...


8

subfigure is an obsolete package which shouldn't be used anymore. You can use subfig or subcaption instead. Below, an example using \subcaptionbox from subcaption: \documentclass{article} \usepackage{subcaption} \usepackage[demo]{graphicx} \begin{document} \begin{figure} \centering \subcaptionbox{$n = 10$ steps\label{cw_10}}{% ...


7

In addition to getting rid of the table and minipage "wrappers", you could also use array environments instead of tabular environments. I suggest this because the contents of the tables are all in math mode, and array environments are meant to be used for math material. (tabular environments, in contrast, are meant for tables that contain mostly text.) Being ...


10

You can't really nest floating environments (it doesn't make sense logically). That's the main problem, and may stem from the fact that you think you need a table environment in order to place a tabular. That's not the case. You're probably after the following: \documentclass{article} \usepackage{braket} \begin{document} \begin{table}[ht] \centering ...


2

The caption package allows you to use \captionlistentry{figure}{my caption} for a caption entry in the list of figures (or any other specified float type) without making a caption in the float itself.


0

In addition to the comment above, you can have a look at the caption package which allows for many customizations. http://www.ctan.org/pkg/caption


1

Since you just have a string of figures, I recommend making them NOT float. Here would be a setup for a given page of two figures. \clearpage...Rinse... repeat. \documentclass{article} \usepackage{caption} \usepackage[demo]{graphicx} \begin{document} {\centering \vfill \includegraphics[width=5in, height=3in]{Model1Active0yrs.png} ...


6

mcode internally uses listings to typeset matlab codes. Hence you can add a caption using listings itself. \documentclass[german,11pt,twoside,a4paper,final,titlepage,openany]{amsbook} \usepackage[ngerman]{babel} \usepackage[latin1]{inputenc} \usepackage{graphicx} %% don't use [pdftex] \usepackage{mathrsfs,amssymb} \usepackage{amsbsy,amsmath} ...


2

I put this together to demonstrate how you can do this. Since you did not give a full example, I can't guarantee that it will fit right into what you are doing. I used newfloat to create a new float type listing, as you seem to have. minipages are used to set the listings themselves into the sub-floats. Depending on what you have already, this may be ...


5

The techniques explained at the linked answer work with subfigure package also. \documentclass{article} \usepackage{graphicx,showframe} %% remove showframe \usepackage[hang]{subfigure} \begin{document} \begin{figure*} \makebox[\linewidth][c]{% \centering \subfigure[Caption]{\label{fig:a}\includegraphics[width=0.35\textwidth]{example-image-a}}% ...


2

Add to your Document > Settings... > LaTeX Preamble the following code: \makeatletter \@addtoreset{figure}{part}% Reset figure numbering at every part \makeatother \renewcommand{\thefigure}{\arabic{part}.\arabic{figure}}% Figure number is part.figure The default numbering of parts in KOMA-Script is Roman, so I've used \arabic{part} since. However, if ...


1

You could use the sidewaysfigure environment from the rotating package. This will place the rotated figure on a separate page. \documentclass[12pt,a4paper]{scrbook} \usepackage{rotating} \usepackage{floatrow} \begin{document} \begin{sidewaysfigure} \includegraphics[width=.9\linewidth]{example-image-16x10.pdf} \caption[setupt]{text.} \label{fig:setup} ...



Top 50 recent answers are included