Tag Info

2

Two options: Using some tabulars for each layer and the subcaption package: The code: \documentclass{article} \usepackage{subcaption} \usepackage{graphicx} \begin{document} \begin{figure} \begin{minipage}{\linewidth} \centering \begin{tabular}{ccc} \includegraphics[width=.28\linewidth,height=1cm]{example-image-a} & ...

-1

You can have multiple rows, e.g. look at this example from ClassicThesis: begin{figure}[bth] \myfloatalign \subfloat[Asia personas duo.] {\includegraphics[width=.45\linewidth]{gfx/example_1}} \quad \subfloat[Pan ma signo.] {\label{fig:example-b}% \includegraphics[width=.45\linewidth]{gfx/example_2}} \\ \subfloat[Methodicamente o ...

0

The error message hints that a figure or a table are lost, but I saw this a few times with no text or float loss. The problem may be that a float is used inside a box. What makes it tricky to nail is the fact that the error might not arise immediately, but only after text is added elsewhere. Try replacing \marginpar with \marginnote (of the marginnote ...

3

Here is a solution \documentclass{article} \usepackage{subfig} \usepackage{graphicx} \begin{document} \begin{figure*} \centering \subfloat[]{\includegraphics[width =\linewidth]{example-image}} \subfloat[]{\includegraphics[width =\linewidth]{example-image}} \subfloat[]{\includegraphics[width =.3\linewidth]{example-image}} ...

1

Use in not inches: \begin{figure} \includegraphics[width = 6in]{HHCircuit.png} \end{figure}

0

I had the same problem with tables some time ago and found a good solution without doing screenshots. First of all, I'm a linux user and thus have libreoffice. I go through these steps: create the table in libreoffice and layout it as desired. set printrange in a way that it only covers the desired part of my table and say that it should be on one page ...

5

If you're using revtex4-1 there is a hook \@caption@fignum@sep for determining the separator following the float number, which defaults to a period followed by a space: \def\@caption@fignum@sep{. } You can define a new command \colorcaption to be used instead of caption for colored figures. \makeatletter \newcommand{\colorcaption}[2][]{% \begingroup% ...

2

You can provide a sensible value (\columnwidth, for example) for the text width key of the \nodes: \documentclass[12pt,a4paper,twocolumn]{article} \usepackage[utf8x]{inputenc} \usepackage{listings} \usepackage{caption} \usepackage[framemethod=tikz]{mdframed} \lstset{ breaklines=true, breakatwhitespace=false, xleftmargin=1em, frame=single, numbers=left, ...

0

To elaborate on my previous comment: I don't know how to get the caption at the bottom of the page, but if you can live with the caption going on top of the next column, you might try something like this: \documentclass[a4paper,10pt,twocolumn]{scrartcl} \usepackage{graphicx} \usepackage{lipsum} \usepackage{sidecap} \usepackage{afterpage} \begin{document} ...

0

You cannot nest floating environments; \marginpar's are floats. You can define a command to mimic a marginpar by making it non-floating and invisible: \documentclass{article} \usepackage{listings,calc} \lstset{language=C++,numbers=left,escapeinside={(*@}{@*)}} \newcommand*{\marginnote}[1]{% \makebox[0pt][l]{% ...

0

Partial answer: use the package newfloat. \documentclass{scrartcl} \usepackage{newfloat, blindtext} \DeclareFloatingEnvironment[ fileext=lop, listname={List of Protocols}, name=Protocol, placement=p, within=section, %chapterlistsgaps=off, ]{protocoll} \begin{document} \blindtext \begin{protocoll} \caption{Exact integer division} ...

3

The \label must go after or inside the \caption command. It cannot be placed before. This is because \caption increments the relevant counter, which is what \label hooks onto. If you put the \label first, there is nothing onto which it might hook. For example, turning your code into a (semi-)Minimal Working Example by adding a preamble and substituting ...

0

You need to have enough text in order to surround your images with it. When I add some dummy-text here, it works just fine. If you do not have enough text, you can use a multicolumn environment or you put it in a tabbing or a simple tabular. This will make it less flexible but fully controllable. % arara: pdflatex \documentclass{amsart} ...

1

Since (per egreg's answer) the fxnotes do not work as marginpars and footnotes if placed in a caption, I have found a workaround to have a useful fxnote anyway. In article class the \fxnote command will generate an inline fixme note if placed in a caption. In Memoir this does not work. Instead you can use the inline option: \caption{But not in the caption ...

2

Section 3.5.5 of the manual: This section describes some other common problems that people have encountered using FiXme. Although FiXme might not be directly responsible for them, it is still good to keep them in mind. Footnotes and margin paragraphs in floats Using footnotes in figures (and a fortiori in a figure’s caption) does not work in ...

0

This is possible via the external library of TikZ and documented in the manual. You can either embed your external pictures inside a node inside a TikZ picture and externalize that or you can see the png export example in the manual (section 50.7 in the manual of version TikZ 3.0.0)

0

The table on on top of the first row seems to be quite tricky. Please see my link in comment. For the rest, you can do as in my MWE. As subcaption is not compatible with your documentclass, I just put them into minipages. If you want to have it 2x3, just reorder the blank lines and \hfils. % arara: pdflatex ...

2

If I understand your posting correctly, there are three separate formatting issues in play: On pages that contain floats and text, the floats must be at top or bottom of the page. On floats-only pages, if there are two or more floats, they must be "centered" on the page, i.e., the spaces above, between, and below the floats must be equal; and if ...

0

\documentclass[10pt]{article} \usepackage{graphicx}% to include graphics \usepackage{subcaption} % this package aligns images \begin{document} \begin{figure} \begin{subfigure}[b]{\textwidth} % placement of image and width of box for image \centering \includegraphics{a.jpg} \caption{figure one} \end{subfigure} \\ % space can be added using \\[] ...

0

To avoid this workaround, see Is there a way to divide ONE figure to reference the subparts of the figure?! It is also using \phantomsubcaption, but without adding the image twice!!!

3

I'd go with clipping the image and include it four times (this will have no impact on the final PDF size, because the resource will be loaded just once). With \clipbox* of the trimclip package you don't even need to know the image size. \documentclass{article} \usepackage{subcaption,graphicx,trimclip,hyperref,cleveref} \begin{document} \begin{figure} ...

13

standalone can be set up to recompile included pictures only if required. Otherwise, it will include the previously compiled PDF. So it is not necessary to switch to \includegraphics to benefit from pre-compilation. Here's a basic example. The figure: % mytikz.tex \documentclass[tikz,border=5pt]{standalone} \usetikzlibrary{cathod} \begin{document} ...

2

It seems to me that publications will mostly want pre-compiled graphics. You can ease your quandary relatively painlessly by moving your preamble and Tikz/PGF graphics to separate .tex files and use \input to give yourself a choice at compile time. For instance, your main document might look like: \documentclass{report} \input{preamble} \begin{document} ...

1

You can get latex back on track by using \clearpage before the section heading. Note that longtable should never be in center environment it does not affect the alignment of longtables as they are always full width, it just adds spurious vertical space). I also changed [h] to [ht] as [h] should never be used on its own. \documentclass[10pt]{article} ...

0

Partial but not permanent solution: If the table isn't breaking across a page, then when the longtable environment is enclosed in a table float \begin{table}[h!] \begin{center} \begin{longtable} ... \end{longtable} \end{center} \end{table} the problem goes away. However, the table will not break across the page, so if it subsequently becomes necessary ...

1

I didn't attempt to trace what your code is doing but the figureseries float code is losing the existing double column floats that are pending at this point. If you flush them out with \clearpage then no floats are lost. \documentclass{IEEEtran}% \RequirePackage{lipsum}% \RequirePackage{graphicx}% \RequirePackage{figureSeries}% % \begin{document}% % ...

0

This is a very late answer. But for people who may be having problems with full pages and refman, refart, refrep, etc. Just enclose what you want within a fullpage environment. \begin{fullpage} \end{fullpage} You don't need to define anything. It is a cleaner way to do this.

7

Because even after scaling it, the image's width is bigger than \textwidth so it protrudes to the right. With your example code you get a warning about this: Overfull \hbox (11.64403pt too wide) in paragraph at lines 10--10 Instead of scale, control the width using: \includegraphics[width=\textwidth]{tikz.pdf} or a fraction of \textwidth: ...

6

This is why I like compiling on the command line and not with TeXMaker etc. stuff: There is a clear warning in the .log file (and a often occurring error:) No floats inside multicols environment: Package multicol Warning: Floats and marginpars not allowed inside `multicols' environment!. This is documented behaviour, the multicol manual describes this ...

2

Try using a minipage as this: \documentclass[12pt,a4paper]{article} \usepackage{caption} \usepackage{graphicx} \begin{document} \makebox[0pt][l]{% \begin{minipage}{\textwidth} \centering \includegraphics[width=.4\textwidth]{example-image.pdf} \captionof{figure}{figure caption} \label{fig:fig1} \end{minipage} } \medskip I used Figure \ref{fig:fig1} ...

2

Don't use float environments, such as table or figure, in moderncv; since it makes no sense to have floating objects in a CV, they are not implemented by the class: notice also that the length \tabcolsep is not set by the class, so it has 0pt as value; you need to change it using something like \setlength\tabcolsep{6pt} otherwise, there will be no ...

3

Were you getting \ifeven from some package? \documentclass{article} \usepackage{afterpage} \usepackage{mwe} \newcommand{\placeonodd}[1]{% \ifodd\value{page}\afterpage{\placeonodd{#1}}% \else\afterpage{\thispagestyle{empty}\noindent% \includegraphics[height=\textheight,width=\textwidth]{#1}}% \fi } \begin{document} \placeonodd{example-image} ...

4

Here is a solution without using the wrapfig package. The idea is to define a macro \newcommand{\MyWrapFigure} with two arguments; the first is the figure and the second is the wrapping text. The macro calculates the dimensions of the figure and indents the text horizontally and vertically, accordingly. Caution should be taken, however, when using such ...

5

I know you asked for a non-wrapfig answer, though it is unclear why. They can work together. More importantly, I think, is that tcolorbox doesn't care much about how things outside the "colorboxes" look or behave, while wrapfig only cares about wrapping things around other things.... \documentclass{book} \usepackage[most]{tcolorbox} \usepackage{lipsum, ...

3

If you don't want the subfigure captions to show up in the \listoffigures and you can remember the alphabet, you can use: \documentclass{article} \usepackage{mwe}% for images only \begin{document} \begin{figure} \centering \includegraphics[width=0.32\linewidth]{example-image} \includegraphics[width=0.32\linewidth]{example-image} ...

1

This is the command I usually employ to cope with this situation: \newcommand*\cleantop{% \dimen@ \baselineskip \advance \dimen@ -\topskip \prevdepth \dimen@ } After this definition, I use \cleantop at the beggining of the floating environment, as I show in the following MWE: \documentclass{scrbook} \usepackage{lipsum} \usepackage{showframe} ...

5

I see nothing strange: \documentclass{scrbook} \usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc} \usepackage[ngerman]{babel} \usepackage{graphicx,float} \usepackage{lipsum} \usepackage{fancyhdr} \pagestyle{fancy} % just to show the head sep \begin{document} \makebox[0pt][l]{\vrule height0pt depth0.2pt width 30cm}% \lipsum[3] \newpage ...

3

No need to use the facilities of the adjustbox package; use \noindent instead, and set up the tabular's structure as \begin{tabular}{@{} l l }. I'd say, incidentally, that apa6 is a reasonably well known document class; I wouldn't call it "nonstandard". By the way, if you need the material in the table to be single-spaced, I'd encase the tabular ...

1

Here is a way to do it (I first show it with 4 figures, and later in the answer, with 2). It requires some work, but at least one does not have to manually calculate the widths of minipages. In my MWE, I show more than is needed, just for explanation purposes. I show my 4 figures (\figa through \figd) as simple \rule boxes of different colors. I then use ...

2

Something like this? \documentclass[french,tikz,border=5]{standalone} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{amsmath} \usepackage{palatino} \usepackage{mathpazo} \usepackage{tikz} \usetikzlibrary{shapes} \usepackage{pgf} \usepackage{schemabloc} \begin{document} \begin{tikzpicture} \sbStyleLien{ very thick} ...

5

Three options: Using a tabular* of width equal to \textwidth and m{<length>} columns. Using the adjustbox package. Boxing one of the images to measure its height (this assumes all four images have the same height). In all three cases the labels are placed inside a \rotatebox. The code: \documentclass{article} ...

0

I created a partial MWE, but without access to the university .sty file I couldn't get \listofalgorithms to do anything. Using \label and \ref worked as expected. The only thing written to the lom file was the title line. You should search for anything involving \@writefile{lom} or at least \@writefile. \documentclass{book} \usepackage{lipsum} ...

2

Instead of a caption you can also manually add values to the figure counter \documentclass{beamer} \usepackage[justification=centering,figurename=Abb.]{caption} \setbeamertemplate{caption}[numbered] \begin{document} \begin{frame} \begin{figure}[htbp] \includegraphics[scale=0.4]{pic} \addtocounter{figure}{1} \end{figure} \end{frame} \begin{frame} ...

1

This applies the very sophisticated package zref by Heiko Oberdiek, which extends the labelling/reference system tremendously. Labels have property lists, as such, the figure label should have a figsection property, which contains the section number in which the figure label is generated. \makeatletter \zref@newlist{section} % define a larger list of ...

0

Here is a solution, without the table environment — replaced with center. In case you still want a caption, I used the captionof command, supplied by the capt-of and the caption package. Don't forget % just before \begin{tabular} and just after \end{tabular}. \documentclass[12pt]{report} \usepackage[]{graphicx} \usepackage[table, x11names]{xcolor} ...

3

You cannot put a float such as table inside a \colorbox which is static. Go the other way around and use \colorbox inside table: \documentclass[12pt]{report} \usepackage[]{graphicx} \usepackage[]{xcolor} \usepackage{booktabs} \begin{document} \begin{table} \colorbox{yellow!20}{% \begin{tabular}{lll} \toprule ...

0

Encountered the same problem and been looking for a solution for quite a while. Today I encountered another StackExchange question, that is quite similar to this problem: The solution was posted by user Werner, suggesting a bug in the minitoc hint-printing macro. When loading the minitoc package without hints, the additional page is not created. Load the ...

0

My original answer attempt below was wrong It solved the problem in my minimal example and some other situations, but now the error appears in documents which previously did not exhibit it. :-( I now use the packages placeins and everypage in conjunction to do yet another hack: When I begin a floating figure series, I issue an ...

1

Why do you specify the float option if you don’t want the listing to float at all? You can have a caption option and a label option (beware: not \label) even without creating a floating object. Try this: \documentclass[a4paper]{article} \usepackage[T1]{fontenc} \usepackage[italian]{babel} \usepackage{color} % or xcolor \usepackage{listings} ...

3

Many options are available for placing two figures side-by-side. See this question and the answers therein, for example. Here is a solution using the the subfig package: \documentclass[12pt,a4paper]{article} \usepackage[demo]{graphicx} \usepackage[margin=1in,showframe]{geometry} \usepackage{subfig} \renewcommand{\thesubfigure}{Figure \arabic{subfigure}} ...

Top 50 recent answers are included