# Tag Info

2

\includegraphics[quiet... %%%%%

2

Better lie! The following tells LaTeX that the box containing the image is 0pt in width, but then puts an image with width .5\paperwidth inside. This corrects the centring and prevents complaints about overfull boxes. (It should therefore only be used when you are sure you do not want to hear TeX's warnings!) \documentclass[12pt]{article} ...

1

It seems rather pointless to include an image like this but anyway tex can allow boxes bigger than \maxdimen so long as you never do any arithmetic on the lengths: \documentclass[10pt,notitlepage]{article} \usepackage{graphicx} \begin{document} \centering \mbox{\pdfimage height \textheight{image.pdf}} \end{document}

1


4

Try this config file: \Preamble{xhtml} \Configure{@HEAD}{\HCode{<link href="basic.css" rel="stylesheet" type="text/css" />\Hnewline}} \DeclareGraphicsRule{.png}{bmp}{.xbb}{} \ConfigureEnv{figure} {\ifvmode\IgnorePar\fi\EndP\HCode{<div class="figure"\Hnewline>}% \bgroup \Configure{float}{\ShowPar}{}{}% } {\egroup ...

2

This should do the trick: \raisebox{-0.3\height}{\includegraphics[scale=0.6]{figures/warning.png}}

3

The simplest method for arranging material in rows and columns is with tabular, in this case nested ones. \documentclass{article} \usepackage{graphicx} \begin{document} \begin{figure} \centering \begin{tabular}{@{}cc@{}}% outer tabular \begin{tabular}{@{}c@{}}% inner tabular for the big picture \includegraphics[height=3cm,width=4cm]{duck} ...

2

You could place the rectangle in one minipage and the six squares in another. \documentclass{article} \usepackage[demo]{graphicx} % remove 'demo' option in real document \begin{document} \begin{figure} \centering \begin{minipage}{2.5cm} \includegraphics[width=2.5cm,height=1cm]{rectangle} \end{minipage} % note: no line break after end of minipage ...

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} ...

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} ...

3

You can use \captionof from the capt-of or caption packages and place the captions inside nodes of the desired width (I chose \linewidth, but make the adjustments that best suit your needs); the positioning library was used to easily place the captions under the images: The code: \documentclass{article} \usepackage{graphicx} \usepackage{tikz} ...

0

\includegraphics does not recognise the key page. This is not an option. You cannot specify a particular page. If you need to specify a page or pages, you need to use the \pdfpages package and \includepdf[pages=<spec>]{filename}. Do not use the extension .pdf_tex if the file is a PDF. You need to use the correct extension for packages such as ...

0

Snapshot of a Simulink model: Open the Simulink system which you would like to print to file. Switch to the Matlab application and run the following code: print -dpdf -s <outputFileName>.pdf %vector format print -dpng -r225 -s <outputFileName>.png %raster format For vector format: I'm using r2013b, which has pdf capability despite ...

1

It's easier if you place the image in the same folder as your .tex file and then just input the filename without the extension (it's not necessary). Like \includegraphics[width=6.5cm]{SSE Ari&Geo} The & causing errors is inconsistent (it seems to throw the error when there is a space in the filename though). In any case, I'd suggest removing it to ...

0

You shouldn't use the subfigure, which hasn't been maintained for may years. I suggest using the subfigure environment from subcaption, and the epstopdf package to compile with pdflatex: \documentclass{article} \usepackage{graphicx} \usepackage{subcaption} \usepackage{epstopdf} \begin{document} \begin{figure}[t] \centering \begin{subfigure}{3.5in}{ ...

3

To set-up the captions use the caption package, together with setspace to cope with the double spacing requirement for figure captions. Now you can use \captionsetup[table] and \captionsetup[figure] to define the styling of captions for the two environemnts. There are hooks for the different fonts involved, the justification of the text and the formatting ...

1

If you do not want the figures to float away, just do not use a floating environment like figure. I can not test your case, as I have no real MWE, but I guess that something is pushing your figure to a position, LaTeX sees better fit in. Below I show you how to get the same result with a center (second figure). This environment does not float. % arara: ...

1

Following up on Sean's idea, I've put together a working solution that postprocesses the pdf output and then updates the .synctex file. Using the original SyncTex data (and the C parser provided by jerome laurens), it's easy to figure out where the first line of each pageXXX.tex ended up in the pdf output, and from that the 2up version is easily generated ...

1

Here is another way, with \stackinset. In this MWE, I inset it 10pt from the right-top of the main image. Those values can be changed in the argument list, even including negative offsets. \documentclass{beamer} \usepackage{stackengine} \begin{document} \begin{frame}{Title} \begin{figure} \centering ...

4

You can remove white margins from a pdf file with pdfcrop, in the simplest version pdfcrop file.pdf which generates a maximally cropped output file named file-crop.pdf. You can also specify new own margins in points (default is zero), and name your output file as you want, as in pdfcrop --margins 10 input.pdf output.pdf

2

You may be interested in the following setup: \documentclass{beamer} \usepackage{adjustbox} \begin{document} \begin{frame} \frametitle{My title} \centering \adjustbox{valign=T}{\begin{tabular}[t]{@{}c@{}} \includegraphics[width=.7\linewidth]{example-image-a} \\ Some caption \end{tabular}}% ...

0

I too faced the same problem, but after several trials, i corrected the error. finally the settings shown in the figure are working.

1

From data, which you provide, I only can suggest to ad option h to figure environment. If after line, to which follows figure is enough place, figure will stay there, otherwise it will move on top to next column/page. \begin{figure}[h]% <--- h as here, sometime help !h \centering \caption{Original Image} ...

7

Interesting. Not seen that before, I'd work around it as follows but we should probably make it not do that (not sure if it's graphics or pdftex.def at present) \documentclass{article} \usepackage{graphicx,fancyhdr} \newbox\zzz \sbox\zzz{\includegraphics[height=2cm]{example-image-a}} \fancypagestyle{xxx}{\fancyhead[C]{\usebox\zzz}} ...

2

Closest i can come up with just looking at the picture. \documentclass{article} \usepackage{geometry} \geometry{top=0cm,a4paper,left=3cm,right=2cm,bottom=1.5cm} \usepackage{graphicx} \usepackage{scrextend} \usepackage{tgadventor} \begin{document} \begin{titlepage} \sffamily \vspace*{.5cm} \begin{addmargin}[0cm]{-2cm} ...

1

I would use the package adjustbox here. Please note the option valign=t I added to each image: % arara: pdflatex \documentclass[headsepline]{scrreprt} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \PassOptionsToPackage{demo}{graphicx} % you can remove this. \usepackage[export]{adjustbox} \usepackage{tikz} \usetikzlibrary{positioning} ...

0

I was also looking for a way to fix this issue with flowing text around full page figures. To extend on David Carlisle's answer for figures that are not the full page height on their own, I've found that putting a full page minipage environment inside a figure float seems to do the trick. \begin{figure} \begin{minipage}[c][\textheight][c]{\textwidth} ...

Top 50 recent answers are included