23

As noted in the question, this is an issue in the way MiKTeX has integrated the latest LaTeX kernel change. The graphics package has been updated but not the LaTeX kernel, and this leads to the error. A temporary fix is to add the necessary definitions to your source file: luckily these are small \documentclass{article} \makeatletter \def\set@curr@file#1{% ...


18

TeX doesn't track the nesting of brackets as it does for braces. When you nest braces {.... { .... } ....} 1 2 2 1 then TeX knows which pairs belong together. This doesn't happen for brackets. Here the code simply looks for the next closing bracket. So TeX will pair them like this \item[\includegraphics[width=0.5cm]{example.png}] 1 ...


16

The core of this issue has been fixed (on 2019-10-06) in MikTeX, but since the situation involves formats and is overall a bit tricky I wrote up a guide at https://github.com/MiKTeX/miktex-packaging/issues/131 explaining (roughly) what is happening here and what you can do if you are still suffering from this issue. This is copied pretty much verbatim from ...


11

If you specify both height and width keys, and specify keepaspectratio then the values are taken as upper bounds and the image is scaled so that both height and width fit within the specified areas, so you need something like \includegraphics[width=\textwidth, height=.75\textheight,keepaspectratio]{..} if the caption takes .25\textheight


9

You get this error if you load graphics instead of graphicx (with x) \documentclass{article} \usepackage{graphics} %<-- change to graphicx \begin{document} \includegraphics[width=0.5\paperwidth]{example-image-a} \end{document}


9

It depends on the engine. With pdftex the current list (which you can find in pdftex.def) is: \def\Gin@extensions{% .pdf,.png,.jpg,.mps,.jpeg,.jbig2,.jb2,% .PDF,.PNG,.JPG,.JPEG,.JBIG2,.JB2% } That means that e.g. pdf will be prefered, then png etc.


8

I avoided to overload \includegraphics and defined a new command that, when label is not specified among the keys, behaves exactly as \includegraphics. \documentclass{article} \usepackage{graphicx} \usepackage{xcolor} \usepackage{xparse} \ExplSyntaxOn \keys_define:nn { miguel/label } { label .tl_set:N = \l_miguel_label_tl, unknown .code:n = \...


8

By default the turkish language option makes = into an active character, essentially ruining any key=val interface (as they assume = to be a normal character). The standard method of dealing with this is \shorthandoff{...}: \documentclass{article} \usepackage[turkish]{babel} \usepackage{graphicx} \begin{document} \begin{figure} \shorthandoff{=} \...


8

All graphics are written to the PDF with a scale factor. When you specify a size the package just converts it to an appropriate scale factor. You can make \Gscale@box remember that scale factor for you (source). You can use the same \thelastscalefactor as many times as you need: \documentclass{article} \usepackage{graphicx} \makeatletter \let\ORG@Gscale@...


7

I integrated draw.io into my LaTeX workflow for my thesis as follows: Tested on Ubuntu 18.04. Directory paths need to be adjusted accordingly. Install "draw.io Desktop" from https://about.draw.io/integrations/ I used draw.io-amd64-10.7.7.deb as I use Ubuntu. Start draw.io Desktop and use it to create figures.Store them under ./document/images/drawio/ with ....


7

\photo command wants a file suitable to be included with an \includegraphics command. Therefore, I think the easiest solution would be to create your own qrcode within an standalone document and use the result as photo in moderncv. %File qrcode.tex -> qrcode.pdf \documentclass{standalone} \usepackage{qrcode} \begin{document} \qrcode[hyperlink,height=64pt]...


7

Use \begin{pspicture}[showgrid](0,-7)(12,1) \rput[lb](0,-7){\includegraphics[width=12cm,height=8cm]{tiger}} [...] \documentclass[border=10pt]{standalone} \usepackage{pst-node,pst-tools,multido} \usepackage{graphicx} \begin{document} \psRegisterList{Name}{M,A,T,H,E,M,A,T,I,C,S}% \psRegisterList{Color}{red!90,yellow!80,blue!70,green,orange,pink}% %%% \...


7

Since you use the same image at all items, it may be easier to modify the \imagebullet macro as you wish, then just insert [\imagebullet]. \documentclass{article} \usepackage{graphicx} \newcommand{\imagebullet}{$\vcenter{\hbox{\includegraphics[width=0.5cm]{example-image}}}$} \begin{document} \begin{itemize} \item[\imagebullet] This works ...


6

Answering my own question, the draw.io tool has the possibility to crop PDF output to the size of the actual diagram. How? Select PDF... from the list of available exports. Then tick the Crop checkbox and now include the PDF in your LaTeX code. Compiling your document with PDF images is nicer but also slower than PNGs so while you are at it, also create a ...


6

Put a \makebox[0pt][c] around the \includegraphics. This tells the typesetting algorithm that the image has a width of 0pt and lets it overlap on both sides. \documentclass[10pt]{article} \usepackage{amsmath,amsfonts,amssymb} \usepackage{graphicx} \usepackage{hyperref} \hypersetup{ colorlinks=true, linkcolor=blue, filecolor=magenta, ...


6

The MPS support file is loaded \AtBeginDocument so you need to typeset after that: \documentclass{article} \usepackage{graphicx} \newbox\mypic \AtBeginDocument{% \sbox\mypic{\includegraphics[height=6.5ex]{moral-compass-lliw10}} \begin{document} Hylo byd! \end{document} It has been that way for a long time, although texlive 2016 is the oldest version I ...


6

\documentclass[12pt]{article} \usepackage{graphicx} \usepackage[Export]{adjustbox} \begin{document} \begin{enumerate} \item %1 \includegraphics[width=5cm,valign=t]{example-image.png} \end{enumerate} \end{document}


6

You could try this: \documentclass{article} \usepackage{graphicx} \usepackage{etoolbox} \makeatletter \appto\GPT@setup@scale{\wlog{x-scale: \Gin@scalex, y-scale: \Gin@scaley}} \begin{document} \includegraphics[width=\textwidth]{example-image-duck} \includegraphics[width=\textwidth]{example-image-a} \end{document} It will log File: example-image-duck.pdf ...


6

Don't use wrapfigure here as it is for running text, i.e. paragraphs, not for broken lines like this. You can fit in the image using adjustbox, which you load anyway. Just add a \hfill after the name to push the image to the right, then align the image using adjustbox keys vertically and/or horizontally and remove its official height and depth so that the ...


6

It looks like your editor could be set to 'draft mode' on Overleaf (this skips compiling images to render a PDF faster). You can turn it off on the dropdown menu on the Recompile button: Hope this does the trick, if you still see issues it could be worth writing to Overleaf support, at support@overleaf.com (I work there)


6

You can keep the width= on the graphics and trim/clip separately so not affecting the scaling, see the last example here: \documentclass{article} \usepackage{graphicx,adjustbox} \begin{document} \includegraphics[width=.4\textwidth]{example-image} \bigskip \includegraphics[clip,trim=1cm .5cm .7cm .1cm, width=.4\textwidth]{example-image} \bigskip \...


6

This is the same fix proposed here, adapted to Plain. The differences are that \makeatletter becomes \catcode`\@=11, \m@ne becomes -1. Also graphicx.sty expects @ to be catcode 11, so we move the \catcode`\@=12 (\makeatother) after loading it: \input miniltx % Start fix \catcode`\@=11 \def\set@curr@file#1{% \begingroup \escapechar=-1 \xdef\@curr@...


5

There is a warning: Package multicol Warning: Floats and marginpars not allowed inside `multicols' environment!. Thus, floats like figure are not allowed, but \includegraphics works fine. The star forms figure* or table* can be used inside environment multicol, but the float elements are put outside.


5

First, give an ECM. I have removed all that is unnecessary to understand and reproduce the problem. To solve the problem, just use the \visible command instead of \only \documentclass{beamer} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \begin{document} \setbeamercovered{transparent} \frame{\titlepage} \begin{frame}{Birds} \begin{...


5

This is an ↗XY Problem: Secondary, Y Problem: Embedding a PDF with an animate-generated animation into another document as an attempt to work around the actual problem X below. Answer: Any interactivity in the included PDF, such as animate-generated animations, gets lost. The same happens to hyperref-generated links and bookmarks, to PDF layers, embedded ...


5

This works in pdflatex but fails in the lua part of luatex's inclusion (this must be the most crazy filename ever seen:-) \documentclass[aspectratio=1610,10pt]{beamer} \begin{document} \begin{frame} \includegraphics{"plots/task-1/ABC123_/qa_pt:0.20-2.00/VtxZ (-10.00, 10.00)/charged; eta (-0.80, 0.80)/FB: 16; eta (-0.80, 0.80)/eff/eta_phi".pdf} \end{...


5

Solution This is possible by calling ImageMagick within TeX (simplified MWE): \documentclass{standalone} \usepackage{graphicx,tikz} \immediate\write18{convert whale.png -transparent white tmp.png} \begin{document} \begin{tikzpicture} \node[circle,draw=black,line width=0.1mm,minimum size=70mm] at (0mm,0mm){}; \node(img){\includegraphics[width=70mm]...


5

This is what you probably need: a combination of caption and subcaption: \documentclass[a4paper]{article} \usepackage{graphicx} \usepackage{caption} \usepackage[labelformat=simple]{subcaption} \renewcommand\thesubfigure{\alph{subfigure})} \begin{document} \thispagestyle{empty} \begin{figure} \begin{subfigure}{0.5\textwidth} \centering \caption{} \label{...


Only top voted, non community-wiki answers of a minimum length are eligible