New answers tagged

4

A way to make such a diagram with pstricks: \documentclass[svgnames]{article} \usepackage{pst-node} \usepackage{auto-pst-pdf} \begin{document} \[ \psset{arrows=->, arrowinset=0.12, labelsep=2pt, linejoin=1} \begin{psmatrix}[mnode=circle, framesep = 10pt, fillstyle = solid, rowsep=2.4cm ] %%% nodes [fillcolor=Lavender!60, linecolor=DarkMagenta] A &...


7

Something like this? \documentclass{article} \usepackage[svgnames]{xcolor} \usepackage{tikz-cd} \tikzset{set/.style={circle,draw=#1,fill=#1!20}} \begin{document} \[\begin{tikzcd} |[set=red]|A \arrow[rr,bend left=10,"f"] \arrow[dr,bend left=10,"h"] & & |[set=DarkGreen]| B \arrow[ll,bend left=10,"f^{-1}"] \arrow[dl,bend left=10,"g"]\\[3em] & |...


7

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


0

Note: I usually use overleaf for LaTeX, so my answer is specific to that. With your Latex file open, find the "Upload" button in the top-right corner of the screen. Here's a picture showing where it is: Then, just reference the file by name in your document: \begin{figure} \includegraphics[width=3.0in]{demand.jpg} \caption{\label{demand} caption text} \...


1

You can convert the pdf to a pdf without text with ghostscript (version 9.15 or newer): gswin64c -o a-with-outlines.pdf -dNoOutputFonts -sDEVICE=pdfwrite a.pdf Then include the a-with-outlines.


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


2

Welcome! With forest, which is based on TikZ, this is straightforward. You need to replace X,Y,Z by your numbers. \documentclass{article} \usepackage[margin=1cm]{geometry} \usepackage{forest} \begin{document} \begin{forest} for tree={parent anchor=south} [{$(1,1,1)$} [{$(2,1,1)$} [{$(2,5,1)$} [{$(13,1,5)$} [{$(X,Y,Z)$} [{$(X,Y,Z)$} ...


0

According to your question title I gues that you look for something like this: (red lines indicate text area borders) Do I'm right? Edit: I reduce your document to MWE (Minimal Working Example) in which I consider from its preamble only packages which are relevant to your problem and only one example of a combination table/image. By it is produced above ...


3

\documentclass[twocolumn]{article} \begin{document} See my nice R plot in fig. \ref{fig:test} <<test,dev='tikz',echo=F,fig.cap="Example plot">>= with (iris, plot(Petal.Length,Petal.Width)) @ \end{document} 1) Save the above file with the .Rnw extension (e.g. test.Rnw). 2) Open it with RStudio. 3) Push the "Compile PDF" button. 4) Take ...


2

I propose this, based on tabularx: \documentclass[10pt]{letter} % 10pt font size default, 11pt and 12pt are also possible \usepackage{geometry} % Required for adjusting page dimensions %\longindentation=0pt % Un-commenting this line will push the closing "Sincerely," to the left of the page \usepackage[demo]{graphicx} \usepackage[export]{adjustbox} \...


1

Using use package graphicx (which call graphics) instead of graphics works fine with recent MikTeX (just upgraded): \documentclass{article} \usepackage[demo]{graphicx} % <--- in real document remove option "demo" \begin{document} \begin{figure} \includegraphics{MC_Antenna_Gain} \end{figure} \end{document} result:


15

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{% ...


0

No idea how this could be done automatically, would require a bit of patching of beamer's internals. The following does it manually, using minipages, which is not adviced by beamer, but for some reasons we have to use \only before \tableofcontents, or else the \only macros for the images wouldn't work correctly. \documentclass[30pt]{beamer} \...


1

The standard way of doing this is, or used to be, TikzDevice. I used it many years ago, and it worked well then. The original author retired from the fray some years ago, but it looks like it is still maintained, more or less. You're probably better off asking for help directly from the developer(s), though. Or possibly from an R forum. This is really more ...


3

If you save the plots in a scalable format such as PDF you should be able to include them with no loss of quaility in LaTeX using \includegraphics{file.pdf}


0

One easy way is use multicol: \documentclass{article} \usepackage{lipsum} \usepackage{graphicx} \usepackage{multicol} \begin{document} \lipsum[1][1-7] \begin{multicols}{2} \section*{\centering GEOMETRY} \noindent\includegraphics[width=\linewidth]{example-image-a} \subsection*{Description \#1} \lipsum[2][1-4] \vfill\null\columnbreak \section*{\centering ...


5

This is very similar to the other two answers with the main difference being that I install a local coordinate system on the pic to make things more convenient. You still need to find out the coordinates by looking, but now the clip path becomes \clip (0.6345,0) -- (0.963,1) -| (1,0) -- cycle; where the coordinates are such that (0,0) is the lower left ...


0

The following should give you the desired result: \documentclass{article} \usepackage{lipsum} \usepackage{graphicx} \begin{document} \lipsum[4] \medskip\noindent \begin{minipage}{0.5\textwidth} \centering \textbf{Algebra} \includegraphics[scale=0.5]{example-image} \begin{itemize} \item The algebraic properties \item another item \end{itemize} \end{...


6

Another solution clipping images included as nodes: \documentclass[tikz,border=2mm]{standalone} \begin{document} \begin{tikzpicture} \begin{scope} \path[clip] (0,0)--++(0:3.5cm)--++(75:3cm)-|cycle; \node[anchor=south west] {\includegraphics[width=6cm]{Q7xB7}}; \end{scope} \begin{scope} \path[clip] (6,0)--++(180:2.3cm)--++(75:3cm)-|cycle; \node[anchor=south ...


6

To expand on Ulrike's comment, here is a quick and dirty example on how to clip an external image that is directly taken from the pgf manual \documentclass[12pt,a4paper]{article} \usepackage{graphicx,tikz} \begin{document} \begin{tikzpicture}[path image/.style={ path picture={ \node at (path picture bounding box.center) { \includegraphics[height=3cm]{#1} };}...


0

If all images have the same size, than is convininet to define their width on the way, that all fill text width. For example: \documentclass{article} \usepackage[demo]{graphicx} \usepackage{array} %---------------- show page layout. don't use in a real document! \usepackage{showframe} \renewcommand\ShowFrameLinethickness{0.15pt} \renewcommand*\...


10

This is just a nested loop. \documentclass[tikz,border=3mm]{standalone} \begin{document} \begin{tikzpicture} \foreach \X in {1,...,5} {\foreach \Y in {1,2,3} {\draw (\X,\Y) circle[radius=4mm] (\X,\Y) -- ++(180-45*\X:0.4); }} \end{tikzpicture} \end{document} But one can do better using some existing post. \documentclass[tikz,border=3.14mm]{standalone} ...


0

I had the same problem, and what worked for me is a variant of Dmitry Zotikov's solution : just commenting out some lines didn't do it for me (I've no clue why!). Instead, I just renamed this file : /etc/ImageMagick-6/policy.xml --> /etc/ImageMagick-6/old-policy.xml and now LyX handles pdf files nicely again. Now, have I just created some horrible security ...


1

You can use something like the following. It creates two macros, \logoA and \logoB with which you can define the used logos and the optional argument which should be passed to \includegraphics. By setting the length \cus@logo@sep you can specify whether the two logos are used on one line or on two, if it is positive or 0pt the logos are used on one line with ...


1

Is not still clear for me what you want exactly, if a matrix of images in landscape or portrait mode, or if this should be part of some text document or a single page. Anyway, this could be a start point for a landscape page: \documentclass[a4paper,landscape]{article} \usepackage{graphicx} \usepackage[margin=0cm]{geometry} \begin{document} \centering ...


0

For one caption for both figures, you can try something like this \begin{figure}[!t] %first figure \begin{minipage}[h]{1.0\linewidth} \centering \includegraphics[width=\linewidth]{xomp} \end{minipage} \vspace{0.00mm} %second figure \begin{minipage}[h]{0.5\linewidth} \centering \includegraphics[width=\linewidth]{ins} \end{minipage} %\vspace{0.00mm} ...


1

With pdflatex/lualatex it should work. With xelatex you need \XeTeXLinkBox: \documentclass{article} \usepackage{hyperref} \usepackage{graphicx} % \begin{document} \href{https://google.com}{\XeTeXLinkBox{\includegraphics[scale=0.05]{example-image.png}}} \href{https://google.com}{\includegraphics[scale=0.05]{example-image.png}xxx} \end{document}


1

Here are three possible layout options using minipages as already suggested earlier: \documentclass{article} \usepackage[demo]{graphicx} \usepackage{multirow} \begin{document} \begin{figure} \begin{minipage}{0.18\textwidth} \centering \includegraphics[width=\linewidth]{4.png} \textbf{(a)} \end{minipage}\hfill \begin{minipage}{0.18\...


0

Similar to what I already described in the comments: \documentclass{article} \usepackage{graphicx} \usepackage{subcaption} \begin{document} \begin{figure} \begin{minipage}{0.7\linewidth} \begin{subfigure}[b]{0.5\textwidth} \includegraphics[width=.9\linewidth]{example-image-a} \caption{} \end{subfigure}% \begin{subfigure}[b]{0.5\...


5

Here's a version that attempts to reproduce the color gradient and font shadow effects of the Zenodo badges. The color gradient is not rendered as well as in the SVG versions, unfortunately. \documentclass{article} \usepackage{fontspec} \usepackage{relsize} \usepackage{libertine} \usepackage{calc} \usepackage{tikz} \usepackage[margin=1cm]{geometry} \...


2

As suggested, you can place two minipages side-by side and manually construct the placement of the sub-figures. \documentclass{article} \usepackage{graphicx} \begin{document} \begin{figure} \begin{minipage}{.6\linewidth} \makebox[.5\linewidth]{\includegraphics[width=.45\linewidth]{example-image-a}}% \makebox[.5\linewidth]{\includegraphics[width=...


3

Only as a supplement to the answer of @leandris for the KOMA-Script part: The KOMA-Script class provides environments captionbeside and captionofbeside. \documentclass[12pt,a4paper]{scrartcl} \usepackage{showframe} \usepackage{graphicx} \usepackage{lipsum} \usepackage{float}% if position H is really needed \KOMAoption{captions}{nooneline,centeredbeside,...


1

Looking through access.tex that comes with the ieeeaccess.cls file, we can find the following line that corrensponds to the following output (in access.pdf): \Figure[t!](topskip=0pt, botskip=0pt, midskip=0pt){fig1.png} {Magnetization as a function of applied field. It is good practice to explain the significance of the figure in the caption.\label{fig1}} ...


7

Another idea (not yet packaged in a command) with a sidebyside tcolorbox \documentclass[border=1mm]{standalone} \usepackage[utf8]{inputenc} \usepackage{hyperref} \hypersetup{pdfborder={0 0 0}} \RequirePackage[usenames,tables]{xcolor} \definecolor{ABlue}{HTML}{127bca} \definecolor{LHScolor}{HTML}{555555} % -------------------- % Text blocks % --------------...


4

In order to align the image to the right margin, you might want to use foatrow's \floatsetup[figure]{margins=raggedleft} command. You can either use it globally by putting it into the preamble or locally as shown in teh following MWE: \documentclass[12pt,a4paper]{article} \usepackage[showframe]{geometry} \usepackage[demo]{graphicx} \usepackage{lipsum} \...


3

Add a \strut to before #3 of \fcolorbox so they are the same height.


2

With minipage You can also do this using a minipage: Here's the corresponding LaTex code where the image appears at the same time¹ as the third text item: \documentclass{beamer} % No "Figure:" prefix for image captions \usepackage{caption} \captionsetup[figure]{labelformat=empty} % Define appearance of the slides \usetheme{Rochester} \usecolortheme{...


2

Probably the following is close to what you want to achieve: \documentclass{article} \usepackage{caption} \usepackage{graphicx} \usepackage{pdflscape} \usepackage{adjustbox} \usepackage{xcolor} \begin{document} %\begin{landscape} \begin{figure} \begin{adjustbox}{minipage=0.45\linewidth,frame=1pt 5pt} \includegraphics[width=\linewidth]{example-image-a} \...


Top 50 recent answers are included