New answers tagged

0

I have found that defining the spacing for that area of text to cause the text to properly wrap, especially for figures that have a transparent background. Use \begin{spacing}{1.0} ending with \end{spacing}, for example. You will need the setspace package: \usepackage{setspace}.


1

Possibly the simplest fix here is to add \looseness=-1 as in: \begin{figure}[p] \includegraphics[width=\textwidth,height=\textheight,keepaspectratio]{imagenotfound.jpg} \end{figure} \looseness=-1 Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam ...


2

See, if the following solution is close to ones you looking for: To your MWE I add showframe (for see page layout, in real use it should be omitted), options font=small and justification=RaggedRight to package caption (with this the height of images is slightly reduced) and usetwo image environment for hack to obtain desired form of page. Package lipsum ...


2

You have a runaway argument as you are using graphicx syntax [height=...] with the graphics package. You need \usepackage{graphicx} That will fix the runaway argument error but then as other commenters have noted you will need to use " around filenames with spaces, or preferably don't have spaces in filenames.


1

Yet another option using TikZ: \begin{figure} \centering \begin{tikzpicture} \node[draw] (fig) { \includegraphics[YOUR_SETTINGS_HERE]{figures_PAL} }; \node [anchor=north east,color=darkgray,inner sep=0,xshift=-5pt,yshift=-3pt] at (fig.south east) {\footnotesize Source: YOUR_SOURCE}; \end{tikzpicture} \caption{Simplest ...


3

Speaking of scaling an image to fit the remaining page... (Needs to run twice.) \documentclass{article} \usepackage{mwe} \usepackage{lipsum} \usepackage{tikzpagenodes} \usepackage{showframe} \newlength{\maxheight} \newcommand{\maxgraphics}[1]% #1 = filename {\settoheight{\maxheight}{\includegraphics[width=\columnwidth]{#1}}% \tikz[remember picture]{% ...


1

Your image only showed the one frame. Additional frames can be created using \fbox and minipage in exactly the same way as the first one. \documentclass[a4paper,fleqn,12pt]{article} \usepackage[hypcap]{caption} \usepackage{graphicx} \usepackage{subcaption}% bundled with caption \begin{document} %\title{Facing and obstacle} %\maketitle ...


0

See, if the following can help you: \documentclass{book} \usepackage{graphicx} \usepackage{showframe} \begin{document} \newpage \section{Appendix} \label{append} \vfill \begin{table}[htb] \includegraphics[width=\textwidth]{example-image} \caption['Tis table1]{'Tis table1} \label{table1} \end{table} \vfill \clearpage next page \end{document} I assume, ...


1

This combines sidwaysfigure and pdflscape into one environment. Nore: The everypage hook runs after the page is laid out, whereas \afterpage runs before the next page starts. The result appears to be compatible with pdflscape. \documentclass{article} \usepackage{blindtext} \usepackage{graphicx} \usepackage{everypage} \usepackage{afterpage} ...


1

Based on this answer to another question (suggested by @UlrikeFischer), I hit upon the atbegshi package, which lets you run things when a page is being typeset (in this case, adding the /Rotate 90 command to the PDF page). I originally tried to make do like this (simplified some things that seemed unnecessary from the original answer, as well as changing it ...


5

A float environment is like \savebox all macros are resolved at the point the environment is met and the content typeset into a box register. LaTeX maintains lists of (numbers of) box registers starting with a "free list", as each float is encountered a box is taken from the free list and filled with typeset the environment contents. At a page break LaTeX ...


5

You are using a KOMA-Script class that loads tocbasic to manage floats and lists of floats (and nonfloats). So you can use this package to declare a new list: \DeclareNewTOC[ type=diagram, float, floattype=4, floatpos=htb, name=Diagram, listname={List of Diagrams}, hang=2.3em,% like figures and tables indent=1.5em,% like figures and tables ...


0

The macro \fps@figure doesn't have an H option. To implement the H option from the figure package, you would need something like this: \documentclass{article} \usepackage{caption} \usepackage{mwe} \usepackage{showframe} \newenvironment{Hfigure}{\setcaptiontype{figure}% \vskip\textfloatsep\begin{minipage}{\columnwidth}}% ...


0

Key things that can change the size/location of the figure are 1) the first two arguments to \atxy which govern the x and y placement of the sideways page number. 2) the width= and height= specification of the axis specification, which govern the size of the graph. 3) the value of the downward shift of the image as the first argument to the \raisebox 4) ...


0

You could try something like this: \documentclass{scrbook} \usepackage{graphicx} \usepackage{lipsum,atbegshi} \usepackage{floatpag} \usepackage{zref-abspage,zref-user} \AtBeginShipout{\MyShipoutHook} \makeatletter \newlength\oripaperwidth \oripaperwidth\paperwidth \newcommand\MyShipoutHook{% \ifnum\c@page=\zref@extractdefault{mylargefigure}{abspage}{0} ...


3

I'm a bit in a rush so I will comment the code later. I hope this can inspire you. The Code \documentclass{report} \usepackage[utf8x]{inputenc} \usepackage{fancyhdr} \usepackage[left=4cm,top=6cm,right=3cm,bottom=3cm,headheight=5cm]{geometry} \pagestyle{fancy} \usepackage{tikz} \usetikzlibrary{calc} \usepackage{tikzpagenodes} ...


5

Here is a solution, with geometry and titleps, instead of fancyhdr: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{microtype} \SetTracking[no ligatures={f}]{encoding=*}{40} \usepackage{graphicx, array} \usepackage[headheight=136pt, top=6.5cm]{geometry} \usepackage{titleps} \usepackage{lipsum} % ...


0

I cant reproduce your problem. Probably because I wrote own MWE (since you not provide your): \documentclass{article} \usepackage{graphicx} \usepackage[export]{adjustbox} \begin{document} \begin{figure}[h] \begin{minipage}[t]{0.45\textwidth} \centering \includegraphics[width = 1\textwidth,fbox]{example-image-a} ...


0

You could add the following instructions to the document's preamble: \newcommand{\chprefix}{5.4} \renewcommand\theequation{\chprefix.\arabic{equation}} \renewcommand\thefigure{\chprefix.\arabic{figure}} \renewcommand\thetable{\chprefix.\arabic{table}} That way, if the publisher decides to change the chapter number from 5.4 to, say, 6.7, only the \chprefix ...


1

First as a non-float. Then, as a float. EDITED to put caption outside of box. EDITED to introduce new float, InfoBox. \documentclass{article} \usepackage{caption,graphicx,newfloat} \DeclareCaptionType{InfoBox} \begin{document} \fboxsep=8pt\relax \fboxrule=2pt\relax \begin{center} \fbox{\centering \includegraphics[width=2in]{example-image-A}}\par ...


1

See, if I understand you correctly: \documentclass[tikz,border=2mm]{standalone} \usepackage{circuitikz} \usetikzlibrary{chains,fit,positioning} \begin{document} \begin{tikzpicture}[ node distance = 20mm and 5mm, start chain = going right, block/.style = {draw, minimum height=20mm, minimum width=5mm, font=\boldmath,on chain}] % ...


2

Edit (2): Regarding received comments I now imagine three possible solution of grouping of lines and numbers of antennas: 8 input lines, 4 lines between blocks x and HT, and other blocks have only two lines and two antennas 2 x 4 input lines, 2 x 2 lines between x and HT, and other blocks have only two lines and two antennas 8 input lines, 4 lines between ...


3

Note that using a floating environment like figure inside a minibox environment does not make sense. The way around makes sense. caption.sty provides an undocumented macro \captionbox which comes handy for your use case: \documentclass[a4paper]{article} \usepackage{caption,graphicx,geometry} \geometry{showframe} \begin{document} \begin{figure}[t] ...


2

Cheat! ;-) \documentclass{article} \usepackage{graphicx} \begin{document} \begin{figure}[htp] \centering \begin{minipage}[b]{.45\textwidth} \centering \includegraphics[height=5cm,width=3cm]{example-image-a} \begin{minipage}[t]{\textwidth} \caption{This is a short caption on two lines} \end{minipage} \end{minipage}% \hfill ...


1

Slightly adopted @egreg answer in given link (that now you have two figures and not sub-figures): \documentclass{article} \usepackage{graphicx} \usepackage{subcaption}% added for test in parallel with @egreg solution \usepackage{showframe}% only for show page layout. in real use it had to be omitted! % new lengths and save boxes \newlength{\twosubht} ...


1

Perhaps something like this: \documentclass[12pt]{article} % the showframe option is used to visualize the output \usepackage[showframe]{geometry} % packages mwe and lipsum are simply for this example \usepackage{mwe, lipsum, graphicx, float} \usepackage[justification=centering]{caption} \usepackage{subfig} \newlength\halfwd \newlength\halfwdsep ...


0

The other alternative would be to use the changepage package and adjustwidth environment, \usepackage{changepage} \begin{adjustwidth}{.3\textwidth}{} \end{adjustwidth}


2

Enclose your picture and text below it in \parbox or in minipage: \documentclass[11cm,a4paper]{article} \usepackage{geometry} \usepackage{xcolor} \usepackage{graphicx} \usepackage{tikz} \definecolor{color0}{rgb}{0,0,0}% black \definecolor{color1}{rgb}{0.22,0.45,0.70}% light blue \definecolor{color2}{rgb}{0.45,0.45,0.45}% dark grey % <<<tikz block ...


0

Use short titles so that the images don't show up in the table of contents. The macro \sectioncalc computers \titlewidth to be used for section titles. (The section number is not included.) A lot depends on how wide your titles are and how big the images (and how you want them placed relative to the titles). And you don't HAVE to use \maketitle. The ...


2

The easiest method would just be to fill the circles with white after filling the yellow circle. If that's not an option, things are less straightforward but the following more-or-less works. That is, it works but you may get artefacts, depending on your viewer. (I do as you see in the screenshot.) \documentclass[border=10pt,tikz,multi]{standalone} % code ...


3

Beside of the figure* float, that have the already mentioned inconvenient that should be in the top of a page, you can use cuted to show the figure at any place on double-column pages. Note that cuted is not fully compatible with floats, so you should use some package as capt-of for captions without a figure environment. Note also that text flow in this way ...


2

The solution here is probaly just to not let them 'float' via the \begin{figure} ... \end{figure} environment. But one can also use the \FloatBarrier command from the placeins package. \documentclass{article} \usepackage{lipsum, mwe}% just for this example \usepackage{capt-of} % uncomment the \FloatBarrier to see it in action \usepackage{placeins} % Note ...


2

Floating environments for non-floating stuff is not the right choice here. Images can be easily imported enlarged and centered on the page via package pdfpages: \documentclass[10pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{pdfpages} \usepackage{tikz} \usepackage{hyperref} \usepackage{bookmark} \pagestyle{empty} ...


0

As a workaround I got the idea to generate the pdf file without bookmarks first. After that one could include the generated pdf file in a new LaTeX document and than use the bookmark package with explicit page numbers. This method is also shown on this page. % Taken from http://michaelgoerz.net/notes/pdf-bookmarks-with-latex.html \documentclass{article} ...


1

equation* does not use equation (or whatever numbers). Either use equation and something like \label[figure]{foo} with cleveref package or use a \tag approach. \documentclass{article} \usepackage{xypic} \usepackage{mathtools} \usepackage{blindtext} \usepackage{cleveref} \begin{document} \blindtext[3] \begin{equation} \xymatrix{% \text{some text} ...


1

If it is only about the picture and it should not be floatable you can also try this (it will force(!) the picture to the top by definition): \documentclass[twocolumn]{article} \usepackage{lipsum} \usepackage[demo]{graphicx} \newcommand\ImageOnTop[2][]{% \def\toppic{\includegraphics[#1]{#2}\vspace{2em}} \twocolumn[\toppic] } \begin{document} ...


2

figure*-environments will always be placed at earliest on the next page. So you either need to move the code in your document. Or you can try the stfloats which will place the figure on the current page if it is defined in the first column. \documentclass[twocolumn]{article} \usepackage[showframe]{geometry}% http://ctan.org/pkg/geometry \usepackage{lipsum}% ...


0

There is also the figcaps package, which has two simple switches to forward all floats to the end in \figcapson (enabled by default) and \figcapsoff. \documentclass{article} \usepackage[printfigures]{figcaps} % printfigures to display figure floats %\figcapsoff % enable to keep floats in their positions \begin{document} <contents> \end{document} ...


5

If you click on the "compile error" or "warning" label on the upper right, that should display the error message or warning message window (if it's not already open). There's a recompile from scratch option at the bottom of this message window; you can click on that to delete the auxiliary files (.aux, .toc, .lof...)


3

You have the \label command in the wrong place: when the center environment is closed, LaTeX won't remember the number assigned to the caption, so your label will refer to something earlier. However, also using center is wrong: \begin{figure} \centering \includegraphics[scale=0.5]{arnoldtonguesstandart.png} \caption{Arnold tongues for a classical family ...


1

Something like this \documentclass[11pt,a4paper]{memoir} \usepackage[utf8]{inputenc} % Tikz is used to draw the figure \usepackage{tikz} % Just some changes to the margins \setlrmarginsandblock{3cm}{*}{0.875} \setulmarginsandblock{3cm}{*}{1.2} \checkandfixthelayout[nearest] \usepackage{caption} % The new floating environment ...


3

Yes, it is possible. Insert \ContinuedFloat right after \begin{figure}[h!] of the 2nd figure (and change \caption{\roman{4}} to \caption{}), i.e.: \documentclass{article} \usepackage[demo]{graphicx} \usepackage{subcaption} \renewcommand{\thesubfigure}{\roman{subfigure}} \begin{document} \begin{figure}[h!] \begin{subfigure}{.32\textwidth} ...


3

You have to place the \label command after the \caption command, since it is the latter that steps the subfigure counter. Also, you can use \ref{<thesubfigurelabel>} to get output like 1(a). If you want space between the figure and subfigure counter, e.g. 1 (a), then you can use \makeatletter \renewcommand\p@subfigure{\thefigure\,} \makeatother as ...


3

You can just save the original section command before placeins alters it: \documentclass{book} \let\origsection\section \usepackage[section,above,below]{placeins} \usepackage{graphicx} \begin{document} \show\section \chapter{Only chapter} This very short introduction leaves most of the page empty... % ---- HERE, A PAGE BREAK OCCURS ---- ...


1

As Andrew has already mentioned in his comment to your question one solution would be to use the groupplots library of pgfplots, which I also present in my solution. But this approach can be adapted to three normal axis environments next to each other as well. Also for that you simply add some dummy lines to the first plot so all the entries you want to ...


0

FWIW, my Float(s) lost error seemed to have been due to introducing a todo in a footnote probably because the package I use for adding todos uses marginpar internally.


2

You need to make a second float:figure, and move some of the subfloats to this one. In the second figure float, insert a TeX Code box (Ctrl + L) at the top and write \ContinuedFloat in this. You need to load the caption package as well for this, so if that isn't already loaded either by LyX or yourself, go to Document --> Settings --> LaTeX Preamble and add ...



Top 50 recent answers are included