Tag Info

New answers tagged

4

No need for extra packages; simply include your image with a standard \includegraphics and use \smash, as in The Netherlands\hfill \smash{\includegraphics[width=3cm]{example-image-a}} A complete example: The code: \documentclass[10pt,a4paper]{article} \usepackage[a4paper,margin=0.75in]{geometry} \usepackage[english]{babel} \usepackage{graphicx} ...


0

You can place the image explicitly. There are different possibilities to do this. In my opinion the easiest one is to use TikZ Type \usepackage{tikz} inside your preamble to load the package. To include the image write below \begin{document} \begin{tikzpicture}[remember picture, overlay] \node [anchor=north east, inner sep=0pt] at (current page.north ...


2

I would duplicate the figure contents, just using a new environment that does some setup which avoids problems: \documentclass{article} \usepackage{graphicx} \usepackage{hyperref} % \begin{reusefigure}[<float spec>]{<ref>} \newenvironment{reusefigure}[2][htbp] {\addtocounter{figure}{-1}% \renewcommand{\theHfigure}{dupe-fig}% If you're ...


5

This should give you the desired caption font: \DeclareCaptionFormat{neofont}{\captionfont\small#1#2#3} \captionsetup{format=neofont,labelfont=bf,margin={0cm,0cm},justification=justified,singlelinecheck=off} A complete reduced example: \documentclass[12pt,a4paper,english]{report} \usepackage{caption} \usepackage{fontspec} ...


2

Here is what you may want your picture look like. If you need to center the figure caption as well, just add \usepackage{caption} in your preamble below \documentclass[journal]{IEEEtran}. I used the following MWE for brevity: \documentclass[journal]{IEEEtran} \usepackage{graphicx} \usepackage{lipsum} \begin{document} \title{Orthogonal Frequency ...


3

The class is designed to follow IEEE design style which is mostly left justified, however it has a conference option that uses centred captions. \documentclass[conference]{IEEEtran} \usepackage[demo]{graphicx} \begin{document} \title{Placing Imaging in LaTex} \section{INTRODUCTION} would like to make a list of math exercises. Formatting that intend this ...


0

I initially used following command to look for the size of image \fbox{\includegraphics[scale=0.150,angle=0]{imagefilename.eps}} Then I used following to remove extra space in the image: \includegraphics[scale=0.150,trim=300 450 300 500,clip]{imagefilename.eps} It worked fine. Detailed information is given at following link An .eps image, whose caption is ...


7

You can use endfloat, telling it that it shouldn't process the delayed floats: \documentclass{article} \usepackage{graphicx} %%% Remove the next two lines if you want the figures at their place \usepackage[figuresonly,nolists,nomarkers]{endfloat} \renewcommand{\processdelayedfloats}{} \usepackage{lipsum}% mock text \begin{document} \lipsum[1] ...


6

The reason is, you have a list of figures, where your citation is also displayed. This is the first occurrence of a citation and therefore, it is the number one. There are two things you can do: use the optional argument for the caption: \caption[caption without citation for lof]{caption with citation} you can use the notoccite package.


0

What I've done with figures in the past is use a negative vspace in my document so that would yield something like: \includegraphics[scale=0.5]{PTS.eps} \vspace{-0.3cm} \caption{Figure PTS} You would just have to play around with the value of the \vspace to whatever you want. Keep in mind a negative value will decrease the space and a positive will add ...


3

You have to use figure* here. Also reduce the width of minipages to \begin{minipage}{.0.48\textwidth}. And in \includegraphics the width can be \linewidth. Further, you may need the [t] alignment specifier for minipages and a \hfill in between the minipages. There is no need of using \captionof, use \caption straight away.. ...


3

In your case the height of the images is too much. So you have to reduce their height, for example scaling the images with something like \includegraphics[scale=0.9]{animation1} Adjust the scaling factor to your needs. I'd also suggest to use p as a floating specifier so to have your big figure in a page of floats. An example fith fake images ...


1

Another alternative is use of matrix of nodes from tikz via a style definiiton called phase that drasw a black circle. Then put all the nodes in a matrix form with unique internal labels, connect them with lines via draw command. \tikzset{ phase/.style = {draw,fill,shape=circle,minimum size=3pt,inner sep=0pt}, } Code \documentclass[]{standalone} ...


1

The macro \dx[] provides a horizontal space of length \dxO. The optional argument specifies a multiple of \dxO. The macro \link{y1}{y2} specifies the vertical bars, where y1 and y2 are integers that are multiplied by \dz which is the grid spacing. \documentclass{article} \usepackage[usestackEOL]{stackengine} \def\gline{\rule{2in}{1pt}} \newlength\dz ...


1

The following packages/software can do probably more than you require, as it can draw general quantum circuits. Still, it should do as necessary. QCircuit (I know the page is ugly) One example would be (this requires downloading Qcircuit.tex from the link and placing it in your folder of the tex-file) \documentclass{amsart} ...


1

An unorthodox solution: put the caption inside the tabularx environment (as would be done for longtable). Some comments about your code: with threeparttablex, the tablenotes is replaced with TableNotes is declared at the very beginning, and is inserted later wheare you please with the \insertTableNotes commands. Also, if you really want to have a table with ...


5

Here's an option using floatrow - an extension of the float package: \documentclass[twocolumn]{article} \usepackage[paper=a5paper]{geometry}% Just for this example \usepackage{graphicx,environ} %\usepackage{float} %\newfloat{Box}{htbp}{lob}% float package usage \usepackage{floatrow} \DeclareNewFloatType{Box}{ placement=htbp, fileext=lob} ...


1

What do you mean by lining up? To change the border color please look at the answer from this link: How to change the border of mdframed? Here is the result on my computer \documentclass{article} \usepackage{amsmath,amssymb} \usepackage{pgfplots} \usepackage{xcolor} \usepackage{mdframed} \mdfdefinestyle{mystyle1}{ backgroundcolor=white!20, ...


4

Below I present one option using tcolorbox to define a figurebox environment. This environment has an optional argument to specify placement options (just as for the standard figure environment). Instead of using two boxes, I just used one box; the upper part is used for the image and the lower one, for the caption. Use \tcblower just before \caption. The ...


1

In order to do this, you have to combine the figure and algorithm in a special way. Specifically, you have to put the algorithm inside the figure environment with a (non-floating) [H] specifier: \documentclass{article} \usepackage[linesnumbered,ruled,vlined]{algorithm2e} \NoCaptionOfAlgo \begin{document} \begin{figure}[htb] \begin{algorithm}[H] ...


0

IEEEtran has a conference mode which automatically centers all the captions. Adding following to your LaTeX code would center all the captions. \documentclass[conference]{IEEEtran} Although, I would also agree with @Werner, that it's best to stick to the format specified by the journal you are submitting.


1

Alternatively, you can let wrapfig.sty work out the width and the number of lines: \documentclass{article} \usepackage{graphicx} \usepackage{wrapfig} \begin{document} \begingroup \setlength{\intextsep}{0pt} \setlength{\columnsep}{3pt} \parindent0pt \begin{wrapfigure}{l}{0cm}\includegraphics[height=1.75\baselineskip]{SS_Today}\end{wrapfigure} This work is ...


2

Bingo! \documentclass{article} \usepackage{graphicx} \usepackage{url} \usepackage{wrapfig} \begin{document} \noindent \begin{wrapfigure}[2]{l}{1cm} \centering \includegraphics[width=1cm]{example-image-a}\\ \end{wrapfigure} This work is licensed under the Creative Commons Attribution-Share Alike 3.0 License (CC BY-ND 3.0 ): ...


6

You don't need \captionof here. Add a \hfill in between two minipages. \documentclass{article} \usepackage[demo]{graphicx} \usepackage{kantlipsum} \begin{document} \begin{figure} %\centering \begin{minipage}{0.48\textwidth} \centering \includegraphics[width=0.97\linewidth]{a} \caption{\kant*[1]} \end{minipage} \hfill \begin{minipage}{0.48\textwidth} ...


2

You can make your minipages narrower and push them as far as possible (they are just separated by a word space in your posted code). \begin{minipage}{0.4\textwidth} \includegraphics[width=0.97\linewidth]{a.eps} \captionof{figure}{caption as in image} \end{minipage}\hfill \begin{minipage}{0.4\textwidth} \includegraphics[width=0.97\linewidth]{b.eps} ...


6

You used to see that error quite a bit when the color package was introduced back in 1994, but you would normally expect that any class file that has been used in the last 20 years would have been updated by now. The ieee class re-instates the LaTeX2.09 float handler so removes support for the ! float option, for color (which causes the error message) and ...


2

No need of fancy packages: \documentclass[a4paper]{article} \usepackage{graphicx} \begin{document} \begin{figure}[htp] \centering \makebox[0pt][r]{\rotatebox[origin=c]{90}{% \hspace{.5cm}% \includegraphics[height=.5cm,width=3cm]{example-image}% }\hspace{.2cm}}% \begin{tabular}{c@{}} \includegraphics[height=2cm,width=0.7\linewidth]{example-image-a} \\ ...


2

There are some possibilities to achieve this: Use the graphics files as side/bottom panels (Change the width/height to appropiate settings specific to the dimensions of the files (not known to me) Use a direct font approach, i.e. with text as side/bottom legends \documentclass[a4paper]{article} \usepackage[demo]{graphicx} \usepackage{multirow} ...


5

\changefontsizes is not really explained in the documentation, but is definitely in the experts section. So, hands off. The correct way to change the size is to use the interface \KOMAoption{fontsize}{11pt}. Or if you are feeling funny you can choose 10.999999 pt. KOMA will look for an existing file with predefined settings, and if it doesn't find one, it ...


1

You can put your pictures into two separate varwidth environments to do the trick: \documentclass[varwidth,border=5pt]{standalone} \usepackage{tikz} \usepackage{tikz-3dplot} \usetikzlibrary{arrows} \usetikzlibrary{3d} \tikzset{>=latex} \begin{document} \begin{varwidth}{\linewidth} \begin{tikzpicture} \draw[-] (0,0)--(3,0)--(3,2)--(0,2)--cycle; ...


1

2nd version: So the problem seems to include different figures in one pdf file. There are several solutions but as you use standalone class and TiKZ you just need to include tikz as an option to your original example (\documentclass[tikz,varwidth,border=5pt]{standalone}) and will get a pdf file with as many pages as tikzpictures. You can include figures in ...


6

You can use \begin{table*} ... \end{table*} to let a table span two columns. And to be honest, not much of your code is "needed to illustrate the current problem". For example, it has nothing to do with the SelfArx class you're using (and I first had to look for), and most of the other code you posted. Here's a much more minimal version of your code ...


0

The first table in the documentation of the ctable package is a good example, having footnotes in the caption as well as in the table cells. Works for figures, too.


1

Another option based in raster library and \tcbincludegraphics command from tcolorbox. Within a tcbraster environment you can select how many columns has it, the distance between rows and columns and the style applied to all tcolorboxes included in it. Next code shows two example, one with the default style for tcolorbox which add some space and frame to ...


1

The latex float placement algorithm assumes that the size of the float is fixed, if it is different then many of the tests and assumptions would be wrong and it would take a major rewrite in general although just making page floats always full page probably wouldn't be impossibly difficult (but still not supported out of the box)


5

You can insert two minipages inside a single figure environment. \documentclass{IEEEtran} \usepackage[demo]{graphicx} \usepackage{lipsum} \begin{document} \lipsum[1-8] \begin{figure}[htbp] \begin{minipage}[t]{0.45\linewidth} \includegraphics[width=\linewidth]{figs1.eps} \caption{caption1} \label{f1} \end{minipage}% \hfill% ...


3

See Frank Mittelbach's answer to How to influence the position of float environments like figure and table in LaTeX? Here's the relevant passage from that answer Double-column floats are always deferred first When LaTeX encounters a page-wide float environment (indicated by a * at the end of the environment name, e.g., figure*) in two column-mode, it ...


2

This uses the tcolorbox package and a lot of its options to generate a framed caption, although this looks a little bit strange, in my point of view. \documentclass[12pt]{article} \usepackage[demo]{graphicx} \usepackage{caption} \usepackage{tcolorbox} \captionsetup{width=0.45\textwidth} \begin{document} \begin{figure}[ht!] \centering ...


2

Read the comment by @Peter Grill in the OP. As he said, the figure environment is a float. LaTeX will position wherever it think it's convenient. You can force it to put the figure in the place where you include it, with an option [placement specifier] \begin{figure}[specifier] ... \end{figure} You can use "h" (without quotes) for here, "t" for top of the ...


3

This may give you some ideas. \documentclass{article} \usepackage{graphicx} \usepackage{subcaption} \begin{document} \begin{figure} \centering \begin{subfigure}[t]{.4\textwidth} \centering \includegraphics[width=\linewidth]{example-image-a.pdf} \caption{}\label{fig:fig_a} \end{subfigure} % \begin{subfigure}[t]{.4\textwidth} \centering ...


4

The problem is actually independent of flafter, it happens even if you comment out the package altogether: as the section appears on page 2 why is the "h" float not after the section but on top of it? The reason for this behavior is that a \section command attempts to keep the material following it on the same page. Therefore while LaTeX is still processing ...


7

That looks like a potential bug, but as a workaround you can force the page break where the page break finally happened, before the section, then the float placement gets in sync: \documentclass{article} \usepackage{mwe} \usepackage{flafter} \begin{document} \blindtext[4] paragraph1 %paragraph2 \clearpage \section{My section} \begin{figure}[hbpt] ...


2

It's not a \maketitle problem. The class you are using doesn't permit you to place floats in the first page. Since it seems to be so well hardcoded, I think that if you are using that document class, you should accept it as a requirement for the journal. But if you really want to go against their directives, you can do the following. Load the capt-of ...


3

This is straight-forward in LaTeX. The idea would be to save the larger image in a box. Once this is done, you can measure it's height and move the smaller image up by some distance relative to the larger one. In terms of LyX you can follow these instructions: Insert the following in your Document > Settings... > LaTeX Preamble: \newsavebox{\savedimage} ...


4

You can use one of the commands \captionof, \captionaboveof or \captionbelowof defined by the KOMA-Script class: \documentclass{scrartcl} \usepackage{mwe} \begin{document} \section{Examples} \blindtext \begin{center} \begin{minipage}{\linewidth} \centering \captionaboveof{table}{First Table} \fbox{Table} \end{minipage} \end{center} ...


9

To address your questions in order: LaTeX has a formal algorithm for how it handles floats. It cannot, for example, fit a figure where there is no space. You can alter the parameters which affect these calculations (see http://www.tex.ac.uk/cgi-bin/texfaq2html?label=floats) Most people ignore the placement while developing the document, allowing LaTeX to ...


3

This is a (very late!) supplement to lockstep's answer which just offers a visual demonstration of the difference between the use of \centering and the center environment within figure environments. Each page shows 2 figures, one using \centering and one using center. The differences in spacing are the result of ordering the two figure environments ...


0

Ok, fiddled about with it and I've used a couple of fixes. For those who are interested, the preamble is included below (not entirely my choice. I've been provided with a template that I have to use). The problem was that on the page following this there was a title for the following section. LaTeX was spacing things out so the title didn't begin at the ...


0

This link works perfectly and it helps in making footnotes in figure environment http://blog.peschla.net/2012/11/latex-footnotes-in-captions/#comment-756


4

The package stfloats allows to have bottom two column floats: \documentclass[twocolumn]{article} \usepackage{graphicx} \usepackage{stfloats} \usepackage{kantlipsum} \begin{document} \kant[1-3] \begin{figure*}[b] \centering \includegraphics[width=.8\textwidth,height=4cm]{example-image} \caption{A caption to this wonderful picture} \end{figure*} ...



Top 50 recent answers are included