Tag Info

New answers tagged

2

Indeed, fixltx2e overwrites \@xfloat. The assumption is that it fixes content in the standard document classes, of which memoir is not. Since memoir manages things on its own, best would be to save-and-restore the memoir-specific version of \@xfloat, or just redefine it: \documentclass{memoir} \usepackage{fixltx2e} \makeatletter % Restore original memoir ...


0

Simply put angle=X in the \includegraphics command. For example \begin{figure}[!h] \centering \includegraphics[width=1\textwidth, angle=90]{fig.eps} \caption{The caption} \label{cap} \end{figure}


3

Well, really no need to go into source code surfing here. \KOMAoption{chapteratlists}{0pt} will set the chaptergap to zero point. All lists controlled by package tocbasic are influenced. Alternatively, you could use \KOMAoption{listof}{nochaptergap}.


2

The vertical spacing between chapters in a ToC is controlled by \@chapterlistsgap, having the default value of 10\p@. This could be redefined to any value > 0\p@ (Currently this done for all LoF/LoT, perhaps for the ToC too) \documentclass[a4paper,fontsize=11pt,oneside,parskip=half]{scrreprt} \usepackage[demo]{graphicx} \usepackage{scrhack} ...


0

To force a figure on a specific place you can use the parameter 'H'(ere) \begin{figure}[H] Although you can not specify the page number explicitly, the suggestion increases control over the placement of the figure (which still depends on the text around it).


3

If you don't know when in the text the desired page will appear, you can use a combination of packages to do what you want: The everypage package adds a hook that you can run at each page The afterpage package lets you insert code into the next page You can combine those like I did below, so that at every page, the page number is checked, and if its the ...


2

You can just place the figure physically near the text on the page 5 and use the following to get the figure on the top of the page: \begin{figure}[t] \includegraphics{fig} \end{figure}


2

This was fixed using [width=x\linewidth] where x is any number.


2

Basically, the image is just too big. For this problem, the limiting dimension is the height, not the width. (Come to think of it, this was also true in the original question. \documentclass{report} \usepackage{subfig} \usepackage{mwe} \newlength{\tempheight} \newlength{\tempwidth} \newcommand{\rowname}[1]% #1 = text ...


3

You're stating too big a bounding box for the picture; moreover you're forgetting the empty argument for the empty boxes. Note that \Large doesn't take an argument. \documentclass{article} \usepackage{pict2e} \begin{document} \begin{figure} \centering \begin{picture}(90,90) \put(0,0){\framebox(30,30){}} \put(30,0){\framebox(30,30){}} ...


2

I suggest you read the provided manual more carefully; that could save you a major portion of that frustration. \documentclass[twoside,openright,titlepage,numbers=noenddot,headinclude, footinclude=true,cleardoublepage=empty,abstractoff, BCOR=5mm,paper=a4,fontsize=11pt,ngerman,american,slovak% ]{scrreprt} \usepackage[utf8]{inputenc} \usepackage{caption} ...


2

Put the picture inside a minipage. This will allow it to be included in a figure environment, which will therefore allow a \caption. \documentclass{article} \usepackage{lipsum} \begin{document} \lipsum[1] \begin{figure}[ht] \centering \begin{minipage}{1.3in} \begin{picture}(185,90) \put(0,0){\framebox(30,30)} \put(30,0){\framebox(30,30)} ...


0

I guess, eps is not the native format of your photos. Let me suppose they are in jpg format. You converted them to eps because old TeX engines would require so. If you are free to choose, then migrate to xelatex, which will allow you to include jpg (without preventing you from also including eps). If your current problem has to do with bounding boxes, it ...


3

It occurred to me that what you really want is to make the entire page act as a float, rather than put a float into the page. Changing the margins was harder than I thought. KOMA is obscure on the subject, and geometry forces a \newpage. Even when I reset all the parameters myself, things like \centering or \vfill don't work. I got \vfill to work by ...


2

This is the way I did it from looking at a similar question (I don't remember which one but if someone recognizes it then please give credit): \usepackage{lscape} %allow certain pages to be formatted in landscape orientation \usepackage[paper=A4,pagesize]{typearea} \usepackage{afterpage} \begin{document} \afterpage{% Insert after the ...


3

[h!] just makes it harder for latex to position the figures, it complains a lot and changes it to [ht!] to give itself a chance, but you should always include p really unless you have a really good reason not to. Also it makes no sense to routinely use ! as that means to ignore the user-set constraints. It's better to change the constraints if they are not ...


1

Since \captionof uses \par and \vskip, you can't use it in a tabular. It's easier just to write your own caption macro, so long as you don't want all these subfloats showing up in the list of figures. \documentclass{memoir} \usepackage{mwe} \newlength{\tempdima} \newcommand{\rowname}[1]% #1 = text {\rotatebox{90}{\makebox[\tempdima][c]{\textbf{#1}}}} ...


2

Make sure your redefine the figure numbering before loading the subfigure package. Then you should get the output you wish. Note that \numberwithin already changes the label format, so your \renewcommands are redundant. If you wish to change the printed representation of part in these references, then you should do this by redefining \thepart. This will ...


3

algorithm uses the float package to style the algorithm environment using \floatstyles. Here are the float styles for plain and ruled: % The 'plain' float style \newcommand\fs@plain{\def\@fs@cfont{\rmfamily}\let\@fs@capt\floatc@plain \def\@fs@pre{}\def\@fs@post{}% \def\@fs@mid{\vspace\abovecaptionskip\relax}% \let\@fs@iftopcapt\iffalse} % The 'ruled' ...


3

There is nothing sacred, or even particularly useful, with \subfloat or \subfigure. I'm not sure what you intended to accomplish with the \labels. If you don't want the (a) - (r) to appear, having \ref{r} expand as (r) is not particularly useful. If you want to create hyperlinks, there is always \hypertarget and \hyperlink. \documentclass{memoir} ...


6

I believe that the following code can work as a starting point for you. Adjust all the dimensions as needed, and add decorations and labels as in your picture. Note that the coil is straight and does not follow the curve of the ring. To make it work, you need the mypathmorphing code from this answer: Modify TikZ coil decoration \documentclass{standalone} ...


4

I suggest you load the rotating package and its sidewaysfigure environment, which is a "floating environment" in LaTeX jargon. In contrast, the landscape environment is not a floating environment, and that's why you're getting the immediate page break when \begin{landscape} is encountered. Observe also that (i) it's possible to have several images, each ...


4

You can use afterpage package for this so that the figures are typeset after filling the current page. \documentclass{article} \usepackage{pdflscape} \usepackage{graphicx} \usepackage{afterpage} \usepackage{lipsum} \begin{document} \lipsum[1-2] \afterpage{% <--------------like this \begin{landscape} \begin{figure} \centering ...


1

Actually, Ulrike Fischer has given a brief answer (I up-voted her comment, accordingly), I will just detail it a bit. The only format you can include while compiling with latex is Encapsulated PostScript (EPS). Because an EPS file declares the size of the image, it makes it easy for systems like LaTeX to arrange the text and the graphics in the best way. ...


1

I believe I found the problem. Though I am not clear on why this happened, it appears that a number of my floats broke all at once. I had them referenced as "float: Model" (a custom module), and at some point they all were redesignated to the blank float choice. "float: model" appeared instead, but if you clicked on the float tag (the tab on the top left ...


2

Using \centering instead of \begin{center}...\end{center} fixed the problem (Miktex with Lualatex on Windows) [2]. When using \begin{center}...\end{center} additional vertical space is introduced inside the float environment. I suspect this might throw off LaTeXs computing of margins. In general the usage of \begin{center}...\end{center} is discouraged in ...


3

Package preview can be used to select the floats: \usepackage[active,tightpage,floats]{preview} Or more selective, e.g., figures only: \usepackage[active,tightpage]{preview} \PreviewSnarfEnvironment[{[]}]{figure} The result is a document, which contains the selected floats only. If you want to save compile time, then there are other options: TikZ: ...


1

You can use the copyrightbox package for that. It cooperates with hyperref, cleveref and tablefootnotes, provided your figures are set in a tableenvironment and you use\captionof{figure]{…}from thecaption` package: \documentclass{article} \usepackage{graphicx} \usepackage{caption} \usepackage{afterpage} \usepackage{mwe} \usepackage{copyrightbox} ...


0

Here is a slightly modified view on the float placement using a forced location - using the [H] float specifier from float: \documentclass{article} \usepackage{graphicx,float,etextools,lipsum,refcount} \makeatletter \newcommand{\markfootnote}{\edef\@currentlabel{\thefootnote}} \g@addto@macro{\footnotemark}{\markfootnote} \makeatother \begin{document} ...


4

The best practice is never use page footnotes inside floats. You can make show footnotes in a more "orthodox" way using \foonotemark inside the float and\footnotetext[2]{Source of the other image} outside, or a normal \footnote{} inside the float with the ftnxtra package. However, keep in mind that what is inside a float environment can fleet as the wind, ...


3

\queuepage works like \afterpage but will not run until the previous \queuepage is done. \documentclass{article} \usepackage{graphicx} \usepackage{caption} \usepackage{afterpage} \usepackage{mwe} \newcounter{nextqpage}% incremented when queued \newcounter{lastqpage}% incremented when used \newcommand{\queuepage}[1]% #1 = same as \afterpage ...


3

As mentioned in the documentation of the floatpag package, you need to specify the page style associated with full-page/page-only floats using \floatpagestyle{<pagestyle>}. You haven't done that. The following minimal example replicates and fixes your problem based on setting the appropriate page style: \documentclass{report} ...


1

I think you want \begin{table} rather than \begin{figure}


3

I think a better solution would be to use the cuted package from the sttools bundle. It is dedicated to insert some material full-width in a twocolumn environment: \documentclass[journal]{IEEEtran} \usepackage{cite} \usepackage{graphicx} \usepackage{refstyle} \usepackage{amssymb} \usepackage{amsmath} \usepackage{cuted, nccmath} \usepackage{lipsum} ...


0

You can use etoolbox package. Just set a \vskip with a negative value at the start (\BeforeBeginEnvironment or \AtBeginEnvironment) and at the end (\AfterEndEnvironment) of the environment figure. MWE: \documentclass{IEEEtran} \usepackage{lipsum} \usepackage{etoolbox} \BeforeBeginEnvironment{figure}{\vskip-2ex} \AfterEndEnvironment{figure}{\vskip-1ex} ...


0

I think I finally found a way: The Stackexchange-question \raggedouter to typeset marginal text in twoside book provides a definition for "raggedouter" captions, I turned it into "raggedinner". Thank you very, very much! NB: Be careful to use the right order 1. declare the command, 2. call the caption package, 3. declare the caption justification, and ...


2

In this case, \hsize returned the optimal width of the figure. \showthe\hsize returned 222.5 pt. When I made a 222.5 pt plot and included it in the paper using \includegraphics{myplot}, it fit perfectly without resizing. In most cases though, \hsize should be avoided. I thank @egreg for his comment that clarifies why. I thank @touhami for his comment ...


1

May be the float package is useful for you: \documentclass{article} \usepackage{float,lipsum,graphicx} \floatstyle{ruled} % try boxed \newfloat{fancyfloat}{tb}{fan}[section] \floatname{fancyfloat}{Fancy float} \begin{document} \listof{fancyfloat}{List of fancy floats} \section{Lore ipsum} \lipsum[1] \begin{fancyfloat} \hfill Some dummy content ...


2

Not quite finished, but correctly floating, as I would say. Just use the float option of tcolorbox environments. \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning} \usepackage{lipsum} \usepackage[most]{tcolorbox} \newtcolorbox{mybox}{colback=black!5!white,colframe=blue!75!black,float} \newtcolorbox[auto counter,number ...


0

You can control the placement (more or less) using the figure options. \usepackage{tikz} \usetikzlibrary{positioning} \usepackage{lipsum} \usepackage{tcolorbox} \newtcolorbox{mybox}{colback=black!5!white,colframe=blue!75!black} ...


0

Although I couldn't put the figure at the bottom, this has been a good approach: \documentclass[10pt, conference, compsocconf]{IEEEtran} \usepackage{graphicx} \usepackage{float} \title{new document} \begin{document} \makeatletter \g@addto@macro\@maketitle{ \begin{figure}[H] \setlength{\linewidth}{\textwidth} \setlength{\hsize}{\textwidth} ...


3

beamer adds center to figure which causes nag to complain whatever you do. You could not load nag or if you want to load it you can stop it messing with center \let\zcenter\center \let\zendcenter\endcenter \RequirePackage[l2tabu,orthodox]{nag} \documentclass[aspectratio=43]{beamer} \usepackage{mwe} \usepackage{lmodern} \begin{document} \let\center\zcenter ...


1

Use \KOMAoption{listof}{totoc,entryprefix} to get the entries of the lists in the table of contents and to print the prefixes in the lists: \documentclass[oneside,fleqn]{scrbook} \KOMAoption{listof}{totoc,entryprefix} \usepackage[ngerman,english]{babel} \usepackage[utf8]{inputenc} \usepackage[demo]{graphicx} \begin{document} \tableofcontents ...


2

You can use the newfloat package to create a floating environment graph for graphs. MWE \documentclass[a4paper,12pt, hidelinks]{report} \usepackage[czech]{babel} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{mwe} % for 'example-image' \usepackage{newfloat} \DeclareFloatingEnvironment{graph} \addto\captionsczech{% ...


3

Always call \usepackage[caption=false]{subfig} with the revtex4-1 document class, which is not compatible with caption. The option is indeed meant not to load the caption package along with subfig (it will emulate the needed features). Note that it's better avoiding blank lines inside \subfloat (not required, though). More importantly, you're missing ...


2

The comment environment looks ahead for the end of the environment so it does not play well when used inside other environments. The easiest way that I know to comment out a particular environment is to use the environ package: \documentclass[12pt]{article} \usepackage{mwe} \usepackage{graphicx} \usepackage{environ} \RenewEnviron{figure}{Nothing here} ...


2

If you only include stand-alone images, then you can easily "turn of" the \includegraphics command by loading the document class (or graphicx) with the draft option: \documentclass[draft]{article} \usepackage{graphicx} \begin{document} Image A: \includegraphics[height=2\baselineskip]{example-image-a} Image B: ...


0

I've removed unnecessary environments and packages. However, I suspect that the real problem must lie in white space in the images themselves or, perhaps, the size of the images is affecting placement. Here's what I get with the demo option for graphicx: \documentclass[a4paper]{article} \usepackage{subcaption} \usepackage{bicaption} \usepackage{lipsum} ...


0

You can use \ContinuedFloat from caption package. I have made some minor changes like using \columnwidth and 0.9\linewidth for \includegraphics and adding \centering etc. \documentclass{article} \usepackage{caption,subcaption} \usepackage{bicaption} \usepackage{graphicx} \DeclareCaptionOption{english}[]{ \renewcommand\figurename{Fig} ...


0

This is not possible. You cannot use a float inside a multicols environment. This means no unstarred figure or table environments. You can use the starred versions, although they will behave differently than outside multicols. If you look at the console output or log, you will see a message explaining this, as described on page 5 of the package ...



Top 50 recent answers are included