# Tag Info

2

This is a way to span the tikzpicture across two column. adjustbox package is used where the width is set to \linewidth for the span. width=\columnwidth would back to regular result. Code \documentclass[twocolumn,11pt]{article} \usepackage{tikz} \usepackage{lipsum,adjustbox} \usetikzlibrary{calc,positioning} \begin{document} \definecolor ...

4

Here is an idea. Load the algorithm package and encase your programs in algorithms environments instead of figures. The command \listofalgorithms gives you the desired list. MWE \documentclass[ngerman]{scrbook} \usepackage{program} \usepackage[plain]{algorithm} \begin{document} \listofalgorithms \vspace{3cm} \begin{algorithm} \begin{program} ...

3

what do you want this package for? In LaTeX floats are all those objects that cannot be separated in pages. For example: tables, figures... Those are the standard float elements. But you can also create your own float elements. For example in LaTeX wiki, there is a very clear example: \documentclass{article} \usepackage{float} \floatstyle{ruled} ...

0

Typesetting several floats consecutively without allowing non-float material to be inserted as well, irrespective of bad spacing that may result, can be accomplished by loading the float package and using the [H] location specifier for the floats -- e.g., \begin{table}[H] -- in question.

0

One solution is to use tabular's and obtaining captions for them via caption package: http://www.ctan.org/pkg/caption. If it is too absorbing, one can manually use \clearpage after proper tables (Without true data I cannot sugest places). The result will not be too beautiful, but separating tables from text will be achieved.

3

Your chapter heading can do the same as article.cls \maketitle which is \global\@topnum\z@ % Prevents figures from going at top of page. the setting is global but only affects the current page. Depending on the context, you might need to use \makeatletter ... \makeatother.

1

Is this solution acceptable? \documentclass{article} \usepackage{wrapfig} \begin{document} \noindent \def \myasywidth {5cm} \begin{wrapfigure}{l}{\myasywidth} \vspace{0pt} \rule{\myasywidth}{\myasywidth} \end{wrapfigure} % % {\ttfamily\obeyspaces\obeylines settings.outformat="pdf"; [...listing ommited...] draw((x,0) -- striptop -- (x+dx,0) -- cycle, blue); ...

15

The Solution Simply use \includegraphics command from the graphicx package to include your image. This is nothing different from putting an image at any other location, including inside a figure environment. You use the figure environment only when your image is a float (which is true is most of the cases, though). In a footnote, as desired by you, it is ...

5

You should use \addvspace rather than \vspace then the space will combine with space for in text environments such as center or quote. However your space here is coming from a float. Normally floats are top or bottom of a page, in which case the space before your heading would be discarded at the page break. The extra space here is coming because it is an h ...

1

A fancy way for avoiding this problem is to add a short title to the figure (without the citation). This is possible in LyX without adding any additional package to the preamble.

7

In the former case there is some text where to anchor the "invisible" section. In the latter there isn't... A way to circumvent this issue, if you really don't want to insert any text in the invisible section, is to insert a "phantom" text in its definition: \makeatletter \newcommand\invisiblesection[1]{% \refstepcounter{section}% ...

1

\documentclass{article} \usepackage{subfig} \usepackage[pdftex]{graphicx} %ifpdf \makeatletter \def\thesubfigure{Fig. \@arabic\c@figure\Alph{subfigure}.} \makeatother \begin{document} \begin{figure} \centering \subfloat[Some caption]{\rule{.45\textwidth}{3cm}} %replace \rule... with \includegraphics[width=0.45\textwidth]{picname} \hspace{2em} ...

3

You need to move the figure* earlier in your source file so it lands on the page you want. You may need to say \addtocounter{equation}{2} (or some number instead of 2) before the figure* and \addtocounter{equation}{-2} after to get the correct equation number relative to the final position. It is not ideal but it is a hard limit in the latex float ...

4

Does something like the following work for you? (I am not sure whether you want this, since you say, continue normally on page 4 as if the two extra pages were not there. Do this mean that these will not increase the page number? If that is the case, my answer is incorrect and I will delete this.) \documentclass{IEEEtran} \usepackage{lipsum} ...

1

Here subfig package is used because I assume you want two figures in one page as said in the title. For two-column style, you need figure* environment which explains why your second figure doesn't work properly. Code \documentclass[twocolumn]{article} \usepackage{lipsum} %\usepackage{stfloats} \usepackage{subfig} \begin{document} \lipsum[1-5] ...

3

Here is a solution that gives you the possibility to add labels for your subfigures without a subcaption using the subcaption package. That's actually the way I'm used to handle subfigures because I do not like explicit subcaption but prefer to refer to the single pictures in the main caption. \documentclass{article} \usepackage{mwe} % only needed for the ...

4

LaTeX fills the top area before the bottom area and only attempts the bottom area if the float will not fit in the top. thus to encourage floats to go top and bottom you need to restrict the top \setcounter{topnumber}{1}% 2 in article would only allow one float at the top, or \renewcommand\topfraction{.5}% .7 in article would restrict the top area to ...

1

You ask for a way to suppress the plural "s" whenever the \cref macro outputs multiple cross-references to figures. One such way involves the \crefname macro. For instance, you could issue the instruction \crefname{figure}{fig.}{fig.} so that "fig." shows up regardless of whether a single cross-reference or multiple cross-references are generated via ...

1

\documentclass[a4paper]{scrreprt} \usepackage{booktabs} \usepackage[labelfont=bf, labelsep=newline,singlelinecheck=false,]{caption} \setcapindent{0em} \parindent=0pt \newsavebox\TBox \begin{document} \rule{\linewidth}{1pt}% only demo \begin{table}[htb] \centering \savebox\TBox{% save it to get the width of the table \begin{tabular}{lccccc}\toprule ...

2

You need to create floats in order to get the desired behavior regarding text and figure placements. Here is a minimal working example that makes 2 floats, each with 2 figures. If the figures are large enough, they will be split on 2 pages: \documentclass{article} \usepackage{graphicx} \usepackage{subcaption} \usepackage{mwe} \begin{document} Paragraph A ...

2

Expanding my comment, as requested by the OP, the idea is to force the bounding box of each figure to the region containing the included figure. This is easy, because the figure is included in a node. If the name of the node is c, for example, you only have to include the following path as part of the tikzpicture: \path[use as bounding box] (c.south west) ...

1

An quick fix without using package is to add a negative length to \abovecaptionskip{-<dimension>} and \belowcaptionskip{-<dimension>} which adjust the vertical space before and after the caption, as shown below. \documentclass[a4paper]{article} \usepackage{lipsum} % for dummy text only \usepackage{tikz} % for TikZ drawing ...

0

Use the caption package and reduce the skip with belowskip. \documentclass[a4paper]{article} \usepackage{lipsum} % for dummy text only \usepackage{tikz} % for TikZ drawing \usepackage[belowskip=-20pt]{caption} % reduce/increase the skip after the figure with belowskip \begin{document} \lipsum The system architecture is shown in ...

1

Here's one possible way to achieve this: \def\@multiqprefix{@MultiFig} \def\@multiq#1{\gdef\expandafter\noexpand\csname\@multiqprefix#1\endcsname{multifig}} \def\@ifNotMultiQ#1{\expandafter\if#1\relax} \def\@subfigpart#1#2{\@ifNotMultiQ{\csname\@multiqprefix\Roman{#1}\endcsname}\else{/\Alph{#2}}\fi} ...

3

The MWE package offers a nice solution: \documentclass{article} \usepackage{mwe}% or load ’graphicx’ and ’blindtext’ manually \begin{document} \blindtext \begin{figure} \includegraphics[width=.48\linewidth]{example-image-a}\hfill \includegraphics[width=.48\linewidth]{example-image-b} \caption{MWE to demonstrate how to place to images side-by-side} ...

22

Actually there are a number of ways of achieving what you are asking for. Without Using Any Package \documentclass{article} \usepackage{graphicx} \begin{document} \begin{figure}[!tbp] \centering \begin{minipage}[b]{0.4\textwidth} \includegraphics[width=\textwidth]{flower1.jpg} \caption{Flower one.} \end{minipage} \hfill ...

1

Here is my solution, open the nature.cls file and comment the last two lines. %\AtBeginDocument{\let\includegraphics\NAT@ignore} %\newcommand{\NAT@ignore}[2][]{} It seems to work now.

1

You don't want to add the period to \thesection, but rather to modify how the section titles are typeset, adding a period after the number; unfortunately there's no “official” user interface for this, but it's not difficult either. \documentclass[12pt,a4paper]{article} \usepackage[croatian]{babel} \usepackage{float} \makeatletter ...

6

When the caption is below the float contents, you can adjust the following caption parameters through \captionsetup: aboveskip (space between the float contents and the caption) belowskip (space after the caption) The default values are, for scrbook class, aboveskip=10pt and belowskip=0pt. Also, a \baselineskip is added by default before the floating ...

1

This is not easy in LaTeX as discussed in first point of this answer. Make a first compilation in which each figure had its outer box modified so that its surface is unchanged but its width is \textwidth. From the .log file, record the page on which each figure is, and the location of page breaks inside the flow of sentences. Then, at each pagebreak, ...

8

Updated \belowcaptionskip (default is 0pt) to a negative value: On the left is the default; on the right is \setlength{\belowcaptionskip}{-\baselineskip}.

7

You can load the caption package and use this setup (adjust -5pt to your needs): \captionsetup[figure]{belowskip=-5pt} Complete code: \documentclass[a5paper]{scrbook} \usepackage[demo]{graphicx} \usepackage{caption} \captionsetup[figure]{belowskip=-5pt} \begin{document} \chapter{Sample chapter} \section{Sample section} % % Some text more text more ...

1

You can use the optional argument of \caption. \caption[Figure 1 LoF Caption]{Figure 1 LoF Caption \cite{second}} If you are tired of typing things twice, you can put this in your preamble and use \nocitecaption instead: \DeclareRobustCommand\nocite[1]{% {\def\cite##1{\ignorespaces}#1}} \newcommand\nocitecaption[1]{\caption[\nocite{#1}]{#1}}

0

Well, I figured it out myself. I have to admit, it's a really stupid question. Instead of using \fbEpsfig, I should've used \fbEps (or \fbEpsM). Just in case anyone has got this problem in the future that's the solution ;-)

4

You can follow this way. First of all, you need to use the H specifier so to force the algorithm environment not to float. Then, since the H specifier is not allowed in two-column mode, you can use the workaround described by Werner in this answer, that is add the following lines in the preamble \makeatletter ...

2

Why not use subfigures? Code \documentclass{article} \usepackage{subcaption} \usepackage{graphicx} \usepackage{mwe} % provides images in this example \begin{document} \begin{figure}[h!] \begin{subfigure}[b]{\textwidth} \includegraphics[width=\linewidth]{image-a} \caption{Image A} \end{subfigure} \vskip10pt % add vertical space ...

2

The demo option is only to show the result without having your pictures. \documentclass{article} \usepackage[demo]{graphicx} \begin{document} \begin{figure}[h!] \centering \begin{tabular}{cc} %\centering \multicolumn{2}{c}{\includegraphics[width=.9\textwidth]{Figure1.pdf}}\\ \multicolumn{2}{c}{\footnotesize(a)} \\ ...

4

I don't know why \vspace{\fill} is not working in between. Hence this is a work-around using a parbox: \documentclass[10pt,a4paper]{article} \usepackage{graphicx} \usepackage{subcaption} \usepackage{showframe} %% just for demo \begin{document} \begin{figure} \begin{subfigure}{\textwidth} \parbox[t][.48\textheight]{\linewidth}{% .48 because ...

0

(too long for a comment) You're not making it any easier for yourself by specifying width=, height= and scale=. wikibooks has more information, but basically setting width and height would break your aspect ratio if it worked, while setting scale=1 says don't change the size. I don't think \textheight is what you're looking for either - that's the height ...

5

To have the legend occupy the same width as the associated graph, one may encase both in a minipage environment, as is done in the following MWE (minimum working example). Note the use of \par at the end of the footnote-sized material. Without it -- or a trailing blank line, which is the functional equivalent of a paragraph break in Tex -- you'd get the ...

2

Here even \tiny, not only \footnotesize :-) \documentclass{article} \usepackage{graphicx} \begin{document} \begin{figure} \includegraphics[width=2cm]{it} {\tiny I want to include a small note (i.e. footnotesize) below a figure. How do I do that? If I use caption, the note has a caption size and interferes with my caption.} \caption{Normal text } ...

2

A mild alternative to Dan's answer, inserts content based on a user-level command into the \@makecaption macro: \documentclass{report} \setcounter{topnumber}{3}% Just for this example \usepackage{regexpatch}% http://ctan.org/pkg/regexpatch \makeatletter % \.patchcmd{<cmd>}{<search>}{<replace>}{<success>}{<failure>} ...

4

I'm sure the caption package will have hooks that let you do it easily, but one can do it with basic latex: The command that provides for the text surrounding the number in the caption is \fnum@figure for figures and \fnum@table for tables. The default is essentially \figurename~\thefigure. You just want to add ~(above) to that \begin{figure} .\\ ..\\ ... ...

0

I've just discovered the FloatBarrier command from the placeins package, which is designed to resolve this exact problem; similarly to Max's answer on Clearpage without pagebreak?.

1

To prevent figures in the Appendix from appearing in the list of figures, you could simply comment out the line \label{This text appears in the List of Figures in front matter} which appears below the caption, by using %. This includes the figure in the stipulated place, but does not make reference to it in the List of Figures. Good for grouping images ...

0

I have a example for multiple figures. Try this code and then modify for your case : \begin{figure}[H] \centering %%----First subfigure---- \subfigure[]{ \includegraphics[width=0.4\textwidth]{../np/im1}} hspace{0.1\linewidth} %%----second subfigure---- subfigure[]{ ...

3

This is the default behaviour for figure* in a two-column document. You're going to have to avoid this. Anywhere before making a call to \maketitle, add the following (replacing example-image with your image, including the \includegraphics parameters): \makeatletter \let\@oldmaketitle\@maketitle% Store \@maketitle \renewcommand{\@maketitle}{\@oldmaketitle% ...

1

Not knowing what document class you're using, here's what I'm using with memoir to put "Figure" in the upper left over the LoF entries, and "Page" in the upper right over the LoF entries (but below the actual page number). \makepagestyle{lof} \makeoddhead{lof}{\figurename}{}{\enlargethispage{-3\onelineskip}\normalfont\thepage\par\vspace{\onelineskip}Page} ...

5

You are mixing the definition of spiral and its use. Put the definition in preamble. Also, the second \tikz is not needed. Further, there are & without \. It should be \&c., \&c. and add [htb] to the options of figure environment. \documentclass{tufte-handout} \usepackage{tikz} \def\spiral#1{% \pgfmathparse{int(#1)}% ...

1

By default the linked template does not set the twoside option. Without that option dpfloat has no preference for what a leftfullpage is. Just adding twoside as an option to report will fix the problem. For example, you can try the following cut down version of the template, with and without the twoside option to the document class. With twoside the ...

Top 50 recent answers are included