Tag Info

New answers tagged

0

In the MWE, the text of \lipsum[4] picks up on page 1, thus avoiding the empty space at page bottom to which the OP made reference. I used a \makebox[\textwidth]{} to extend an extra wide picture past the horizontal margins. I used a \smash to collapse the vertical extent of the image. However, just this would leave the caption mid-page vertically, so I ...


3

The counter postfigure needs to also be reset, like so: \documentclass{article} \usepackage[demo]{graphicx} \usepackage[nofiglist]{endfloat} \begin{document} \listoffigures \clearpage \section{Test} As we see in figure \ref{fig1} (and also in supplemental figure \ref{figS1}) \ldots \begin{figure} \includegraphics{fig1} \caption{ One. } \label{fig1} ...


2

The counter used for the numbering “in place” is called postfigure, so also this one should be changed. Here's a solution that exploits \appendix. The instruction for changing the counter representation and resetting the counter is written in the .fff file, so it will enter into action when the actual typesetting of figures takes place. ...


3

You can have figure information saved in the same place as the tables, and hence output at the same time, by adding the following lines in your preamble: \makeatletter \def\ext@figure{lot} \makeatother \renewcommand*\listtablename{List of Figures and Tables} Here is a minimal working example: \documentclass{article} \makeatletter \def\ext@figure{lot} ...


9

Just set draft=false for the picture you want to be shown anyway: \documentclass[draft]{article} \usepackage{graphicx} \begin{document} \includegraphics[width=50pt]{example-image-a} \includegraphics[draft=false,width=50pt]{example-image-b} \includegraphics[width=50pt]{example-image-c} \end{document}


6

Create a macro \includegraphicsfinal (say) which will always be set in final mode, regardless of whether your document is set in final or draft mode: \documentclass[draft]{article} \usepackage{graphicx} \makeatletter \newcommand{\includegraphicsfinal}[2][]{{% \Gin@draftfalse% Turn draft mode off \includegraphics[#1]{#2}}% Include graphic ...


1

How to do this by \halign in plain TeX: \input opmac \def\rmbrackets{\adef({{\rm(}}\adef){{\rm)}}}\rmbrackets \hfil\vbox{ \halign{\hfil\it#\unskip\ &\hfil$#$\hfil&\ \it#\hfil\cr Formula &\to& Primitive Formula\cr &|& (Formula Connective Formula)\cr &|& $\neg$ Sentence\cr &|& ...


4

Floats in two-column documents don't really work or stick to columns the way the author intends it to. As such, you typically need to do some legwork to bend things your way. Below I've pushed the second "float" a little further in the code and delayed its output using afterpage. The allows it to be placed into the second page before all the roll-over text ...


0

Your algorithm floats in a figure environment, which fills up two columns, regardless of the width of the contents. To have the algorithm constrained to one column, change it to a figure* environment.


2

Assuming that you want two big images at the top of each page, and there are not previous unprocessed floats, you only need two floats with the [t] option. Placements of floats do not need precision shooting: Both can be inserted at some point in the previous odd page or the even page. This way, you avoid disrupting the flow of text with commands like ...


0

You can also try to restrict images placement in the document: \FloatBarrier \begin{figure} Figure 1 \end{figure} \begin{figure} Figure 2 \begin{figure} \FloatBarrier If figures fit entire page they will be placed on consequentive pages one after another.


4

First you want to force yourself onto an even (left) page using \clearevenpage defined in various places but eg Make sections begin on even-numbered pages in documentclass article then \clearevenpage \begin{figure}[p] ..\end{figure} \clearpage \begin{figure}[p] ..\end{figure} \clearpage


0

what should i do when I have footnotes? this approach puts the figure below the footnotes. for example in ieee.cls, the author affiliations are put in the footnote of the 1st page. So how to put the figure above it?


1

EDITED to line up top of right stack with top of "Subject" Following "Subject" in the header, I used a right-aligned \Longunderstack for the right-hand text, pushing it to the right with an \hfill. I had to \smash it so that it did not affect the vertical spacing on the left. Also, because the word "Subject" was scaled up by a factor of 1.55, I had to ...


7

You can use align* for this. \documentclass{article} \usepackage{mathtools,calc} \newcommand{\ent}[1]{\mathit{#1}} % `entity' \newcommand{\alt}[1][\to]{\mathrel{\mathmakebox[\widthof{$#1$}]{\vert}}} \begin{document} \begin{table} \caption{Recursive definition of a formula} \label{fig:formula} \begin{align*} \ent{Formula} &\to ...


0

I can't get this to work for man but it works for doc. The tables and figures are still displayed after the reference list even if i add "flotsintext". Anyone have any idea why this might be? Do i need to define a "float" environment in addition to the "table" and "figure" environments?


7

This typesetting task seems to be handled most easily with a tabular environment. In the code below, I load the array package to set up separate formatting directives for columns 1 and 3 (automatic italics mode) and for column 2 (automatic math mode). Doing this makes it unnecessary to insert lots of $ symbols and \itshape directives in the body of the ...


3

It seems to be an interaction between stfloats and the class or other packages used. removing that and changing [b] to [!bp] to allow more flexibility in the float positioning produces a better result:


1

You can use the subcaption package and do the computation as suggested by David. \documentclass{article} \usepackage{graphicx}% images from mwe package \usepackage{subcaption} \newlength{\twosubht} \newsavebox{\twosubbox} \begin{document} \noindent\hrulefill The text width\hrulefill \begin{center} \makebox[.9\textwidth]{\hrulefill 90\% of text ...


0

\documentclass[a4paper,12pt]{article} \usepackage{graphicx} \usepackage{adjustbox} \usepackage{fp} \usepackage{subcaption} \newlength{\totalimgwidth} \newlength{\imgspacingwidth} \newlength{\firstimgorigwidth} \newlength{\firstimgorigheight} \newlength{\secondimgorigwidth} \newlength{\secondimgorigheight} \newlength{\firstimgwidth} ...


6

You can include them to the same (more or less arbitrary) height then scale them together to the desired width \documentclass{article} \usepackage{graphicx}% images from mwe package \begin{document} \noindent X\dotfill X \begin{center} \resizebox{.9\textwidth}{!}{% \includegraphics[height=3cm]{example-image-a}% \quad ...


1

[More of a comment, but to move off the unanswered list] With the standard document classes, loading dblfloatfix would allow some flexibility here. However, as you are using REVTeX that does not work (you can load the package but it has no effect). The best that you can do is miss out the positional arguments entirely: LaTeX will then at least be able to ...


4

\documentclass[twocolumn]{article} \usepackage{capt-of} \def\a{One two three four five six seven eight nine ten. } \def\b{\a\a\a\a\par\a Red green blue. \a\a\a Yellow. \a.\par} \title{zzz} \author{me} \begin{document} \maketitle \enlargethispage{-3.2cm} \noindent\begin{picture}(0,0) \put(0,-390){\begin{minipage}{\textwidth} \centering ...


1

One possibility using subcaption: The code: \documentclass{article} \usepackage{graphicx} \usepackage{subcaption} \begin{document} \begin{figure} \centering \begin{subfigure}{0.333\textwidth} \centering \includegraphics[width=.8\linewidth]{example-image-a} \caption{} \end{subfigure}% \begin{subfigure}{0.333\textwidth} \centering ...


4

As it stands, your document does not contain enough text for LaTeX to put the figure at the top of a page. On the first page, floats at the top are banned. There is no second page (of text). So, having the figure left at the end of the document, LaTeX does whatever it must to place it: it puts it on a page of floats and, by default, that means the floats are ...


0

\usepackage{float} \begin{figure}[H] This will force LaTex to put your figure where you want it to be.


1

\documentclass{article} \usepackage{todonotes} \usepackage{marginnote} \usepackage{blindtext} % for dummy text \usepackage{tikz} % for dummy pic \begin{document} \blindtext % dummy paragraph \begin{figure} % dummy figure \marginnote{I need this comment to be situated beside the figure...} \centering \begin{tikzpicture}\draw(0,0) ...


0

Here is a way. I use the makecell and rotating packagesz, plus hhline (the ordinary horizontal last line and vertical first line do not join well) and caption (for a correct vertical spacing between caption and table): \documentclass{article}% \usepackage{graphicx} \usepackage[ margin = 2.5cm]{geometry} \usepackage{tabularx, booktabs, array, rotating, ...


2

A short code with pst-node: I define \hbeads, \vbeads, domino and cross macros and put the elements in a psmatrix: \documentclass[pdf, x11names]{article}% \usepackage{pst-node, multido} \newcommand\domino[2][]{% \fpSub{#2}{1}{\lastB}\def\ori{\numexpr-\lastB/2\relax}\psset{#1} \multido{\n=0+1}{#2}{\dotnodes(\n,0){A\n}(\n,1){B\n}}\psframe(A0)(B\lastB) }% ...


2

Like in the answer I referenced in my comment, I used my boxhandler package as a starting point, and modified it by creating the macros \storeFigure[label]{caption}{content} and \recallFigure[htbp]{label}. With boxhandler, figures (and tables) are created with macros, not environments. The package provides flexible captioning options. Disclaimer: clearly, ...


1

If you are willing to define your figures (and/or tables) with macros, rather than environments, the boxhandler package has figure/table deferral, using the macros \holdFigures and \clearFigures. In both approaches, commenting a single line of code changes the figures from appearing inline to being collected at the end of the document. APPROACH 1: Using ...


1

A very simple solution with the floatrow package. It is an extension of the float package, and you shouldn't load it when loading floatrow. The \FBwidth optyion sets the caption width to the width of the figure. \documentclass[letterpaper,11pt]{article} \usepackage{graphicx} % omit 'demo' option in real doc \usepackage[space]{grffile} % for filenames with ...


3

I would use a single figure environment, start the adjustwidth environment inside the figure environment, and use two minipage environments, side by side, to display the two images; each can be given its own \caption. (The frame lines in the screenshot depict the ordinary page margins.) \documentclass[letterpaper,11pt]{article} ...


3

You can add an empty minipage before the last image: \begin{minipage}[b]{0.3\textwidth} \end{minipage} and the result is: Full MWE: \documentclass{article} \usepackage{graphicx,subcaption} \begin{document} \begin{figure*}[!htb] \begin{minipage}[b]{0.3\textwidth} \caption{The quick brown fox jumps over the lazy} ...


8

Several comments: Since you're (i) using the agsm bibliography style, which is distributed with the harvard citation management package and (ii) loading the natbib package rather than the harvard package, you should load the har2nat package as well. As its name indicates, it "translates" various macros that are defined by the harvard package (and which are ...


3

This can go wrong if the figure floats after LaTeX has typeset other numbered equations, but here it is anyway: \documentclass{scrreprt} \usepackage{amsmath, amssymb,siunitx} \begin{document} \begin{equation} \label{eq:periodischefunktion} f(t)=f(t+T), \end{equation} \begin{figure}[ht] \renewcommand*\figurename{Gleichung} \makeatletter ...


4

This is one possible solution. pics techniques from tikz 3.0 are used. They are defined as mybox and myline, both taking the number of nodes as input, then a conditional check will determine which code is used to draw the image around the page, including the center one. Every pic can be allocated on the page anywhere, if given the coordinates. Code ...


3

Just for the sake of showing another possibility... Without the need of any additional package, you can modify the original definition of \@makecaption as found in article.cls, which is responsible of the caption. That is, add the following lines in your preamble: \makeatletter \long\def\@makecaption#1#2{% \vskip\abovecaptionskip ...


5

Easy with caption package: \documentclass{article} \usepackage{graphicx} \usepackage{caption} %%<--- add this line \captionsetup[figure]{labelfont=bf,labelsep=period} %%<--- and this line \begin{document} \begin{figure} \centering \includegraphics[width=3cm]{example-image} \caption{This is a ...


2

This solution may be very specific to your case and not applicable to the general question title. More on the topic can be found in this question. As everything except the image should stay the same as in the normal portrait mode, you should probably just rotate the image and rotate the page only with a pdf attribute instead of using pdflandscape. I had to ...


4

This seems to do what you want, unless you want text in your subcaptions. \documentclass[a4paper]{article} \usepackage{graphicx} \usepackage{caption,subcaption} \newcommand{\figurerow}[6]{% \sbox{0}{\includegraphics[width=.3\textwidth]{#1}}% \sbox{2}{\includegraphics[width=.3\textwidth]{#3}}% \sbox{4}{\includegraphics[width=.3\textwidth]{#5}}% ...


0

Very briefly: \question\mbox{} \includegraphics{...}


3

Easiest is to load \usepackage[export]{adjustbox} and then put valign=t in the options of \includegraphics \documentclass[12pt,a4paper]{exam}%,answers \usepackage{tikz} \usepackage{alphalph} \usepackage{amsmath,amssymb} \usepackage[margin=1in]{geometry} \usepackage{graphicx} \usepackage{pgfplots} % for plots \usepgfplotslibrary{groupplots} ...


4

Each directory in \graphicspath should be put into a set of curly braces and should end with the directory separator: \graphicspath{{H:/NewFolder/}} The command is documented in section "4.5 Other commands in the graphics package". Also the path can be directly specified in \includegraphics: \includegraphics{H:/NewFolder/vanessa} The use of option bb ...


1

Do not use \centerline but \centering Do not use \epsfig but \includegraphic from graphicx Do not use floats on a poster as this does not make sense % arara: pdflatex \documentclass{a0poster} \usepackage[demo]{graphicx} \usepackage{showframe} % for demo \begin{document} \noindent\fbox{% % for demo \begin{minipage}{50cm} \centering ...


9

If you have not used the optional argument anywhere then you can define \makeatletter \def\fps@figure{hp} \makeatother and they will all act as if [hp] (I think float package has a wrapper declaration that does this without needing @ commands) Any figure that has an explicit optional argument such as [b] will over-ride this default unless you redefine ...


0

Another solution via @Werner: Make sure that you also remove the use of babel in your preamble. That is, under Document > Settings... > Language, select None in terms of the language package to use: See this answer for more information.


2

Make sure that you also remove the use of babel in your preamble. That is, under Document > Settings... > Language, select None in terms of the language package to use: babel adapts caption titles depending on the language, which is something you don't want in this case.


1

The problem seems very similar to the one in Problems with TikZ when I change document class The solution given there should work also for your setting: \documentclass[12pt,a4paper,twoside,openright]{report} % %==== \usepackage{graphicx} % save a copy of \@xfloat \makeatletter\let\latex@xfloat\@xfloat\makeatother \usepackage{killer} % redefine \@xfloat ...


2

This shows two figures each scaled by the same amount, such that the larger of the two is \linewidth wide: \documentclass{article} \setlength\textwidth{.5\textwidth} \setlength\textheight{1.2\textheight} \usepackage{graphicx} \begin{document} \sbox0{\includegraphics{house.png}} \makeatletter \Gscale@div\myscale\linewidth{\wd0} \makeatother ...



Top 50 recent answers are included