New answers tagged

9

TikZ has a predefined 3d coordinate system, which is not orthographic, but more than sufficient to stack some objects in the z direction. \documentclass[tikz,border=3mm]{standalone} \definecolor{fb}{RGB}{128,158,204} \definecolor{db}{RGB}{111,141,191} \begin{document} \begin{tikzpicture} \foreach \Z in {0,0.5,1,1.5} {\draw[fill=fb,draw=db] (-2,-2,\Z) ...


2

You can draw something like this with TikZ but only if you provide more information1 one can be sure that you achieve what you want. \documentclass[tikz,border=3mm]{standalone} \usetikzlibrary{chains} \newsavebox\ClippedPicA \newsavebox\ClippedPicB \sbox\ClippedPicA{\begin{tikzpicture} \node[outer sep=0pt,inner sep=0pt] (c) {\phantom{\includegraphics[width=...


0

\documentclass[paper=a4, pagesize, fontsize=11pt]{scrartcl} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage[ngerman]{babel} \usepackage{float} \usepackage{geometry} \usepackage[demo]{graphicx}%<---------------remove demo option in actuals \usepackage{subfig}%<-----------------------add \begin{document} \begin{figure}[...


1

You want \linewidth not \textwidth in an indented list. \documentclass{scrartcl} \usepackage[demo]{graphicx} \usepackage[export]{adjustbox} \begin{document} \begin{enumerate} \item \includegraphics[width=\linewidth,valign=t]{E53a}% \end{enumerate} \end{document} one way of tackling enumerate in a theorem is to make sure it isn't first (add \mbox{} if ...


2

This redefines \caption locally (inside the \parbox). Every cell in a p column is a separate \parbox. \caption@caption is the original name used by the caption package. This uses \csname to implement the @ symbol, which in turn requires \expandafters. \documentclass[12pt]{article} \usepackage{graphicx} \usepackage{longtable} \usepackage{caption} \begin{...


0

Frames normally overlap, unless specifically set to not overlap. I don't have any experience with \onecolumninarea etc. If I need two columns on a page, I just use two flow frames. \documentclass[a4paper]{report} \usepackage[margin=1in]{geometry} \usepackage{color} \usepackage{flowfram} \usepackage[colorlinks]{hyperref} \usepackage{graphicx} \...


1

You code was not compiling correctly so I stripped it from what I believe what not necessary to provide the required output, but it should work all the same in your original code. My proposal is based on Max's very nice answer to one of my previous questions, using TikZ. Using the technique proposed, you can easily show an image then add some overlayed ...


1

A partial attempt MWE \documentclass[margin=2mm,tikz]{standalone} \usepackage[american]{circuitikzgit} \usetikzlibrary{arrows, backgrounds, calc, positioning, circuits.logic.US, circuits, arrows,shapes.gates.logic.US,shapes.gates.logic.IEC} \tikzset{flipflop AB/.style={flipflop,flipflop def={t1=S, t3=R, t6=Q, t4= {\ctikztextnot{Q}}, td=rst, nd=1, c2=1, ...


0

You could try without the figure-environment: \newcommand{\image}[4][40mm]{ \centering% \fcolorbox{frameColor}{white}{\includegraphics[width=\textwidth, height = #1, keepaspectratio]{#2}} \captionof{figure}{#3}% \label{#4} }


1

The problem is not related to the image, the page breaking logic would be the same if you had text on that line. To prevent a page break you need to hide the height of the content or make the page bigger. LaTeX has a standard command to do the latter: if you add \enlargethispage{2cm} somewhere on the first page then the content will be allowed to extend ...


1

I did experiments with unicode accent and it seems to be alchemy. Maybe it heavily depends on Unicode renderer too. The following example is using OpTeX (because I don't use LaTeX). If you want to use LaTeX then you can use idea and re-write the code. The constant -8.5pt is so called "guess constant":) \fontfam[lmfonts] % use OpTeX \newbox\gravebox \setbox\...


4

Ok. Sit down because this will be long --- let's see if I can do a tutorial. You have to have done the TikZ tutorial to fully understand this, especially the calc package and the |- coordinate operator. Looking at the circuit to draw, I see that there is a basic block: the flip-flop with the added three-port circuit to the left. The main distance to respect ...


0

The conflict with subfig and \hyperref does exist: it's not just a rumor, which is why I prefer subcaption as I almost invariably need hyperref. Also, \begin{subfigure}[b]{0.475\textwidth} should give a cleaner finish, still with plenty of space between the figures. Place: \usepackage{graphicx} \usepackage{caption} \usepackage{subcaption} in the ...


0

This MWE here: \documentclass{article} \usepackage[T1]{fontenc} \usepackage{graphicx} \usepackage{fancyhdr} \usepackage{lipsum} \fancypagestyle{mystyle} { \setlength{\headheight}{15pt} \lhead{} \chead{} \rhead{\includegraphics[scale=0.05,trim ={0.25mm 0.25mm 0.25mm 0.25mm},clip=true]{example-image}} \lfoot{} \cfoot{\thepage} \rfoot{} \renewcommand{\...


0

Here is an option with textpos % !Mode:: "TeX:UTF-8" % !TEX TS-program = xelatex \documentclass[UTF8]{beamer} \usetheme{Warsaw} \usepackage[absolute, overlay]{textpos} \usefonttheme{serif} \begin{document} \begin{frame} \frametitle{title} \begin{textblock}{8}(1.0, 3.0) \begin{itemize} \item<1-> this is an example \item [] \item<2-> this is ...


1

Here is a way to do that with titlesec: \documentclass[11pt]{article} \usepackage{xcolor} \newcommand{\myblackbox}[1]{\colorbox{black}{\parbox{0.5\textwidth}{#1}}} \usepackage{titlesec} \titleformat{\section}{\Large\bfseries}{}{0pt}{\color{white}\myblackbox}% [{\raisebox{1ex}[0pt]{\rule[1ex]{\textwidth}{0.8pt}}}] \begin{document} \section{Properties of ...


1

Here is my version: \documentclass[border=10pt]{standalone} \usepackage[pdftex]{graphicx} \usepackage{pgfplots} \usepgfplotslibrary{colormaps} \begin{document} \begin{tikzpicture}[yscale=2, xscale=1] \begin{axis}[axis line style={draw=none}, view={170}{-20}, grid=major, xmin=0,xmax=2, ymin=0,ymax=2, zmin=0,zmax=4, ...


1

you use ancient version of the pgfplots package (version 1.9). Recent version is 1,17! I strongly encourage you to upgrade it. I suspect, that you like to have in line y-axis of diagrams, am I right? This can be achieved by adding option trim left to each \tikzpicture: \documentclass[ % -- opções da classe memoir -- 12pt, openright, ...


1

Here is a compilable, slightly more compact version of your code. I added some ylabel style options to give a minimum width to the label, to make it independent of the actual letter. I also regrouped the common axis options so to clarify the code. The small frames are here only to show the actual width of the modified label with this option \documentclass[]...


2

Not knowing whaht the Y column type is, I replaced it with X. You can either use \raisebox{-0.5\totalheight}{…} or load the adjustbox package with option export and use \includegraphics[valign=c].` \documentclass{article} \usepackage[demo, export]{adjustbox} \usepackage{float, tabularx, booktabs, caption} \begin{document} \setcounter{table}{4} \...


0

\documentclass{article} % \usepackage[flushleft]{threeparttable} \usepackage{graphicx} \usepackage{booktabs} \usepackage{array} \begin{document} \begin{table} \caption{Classification} \label{tbl:Longwall systems} \footnotesize \centering \begin{tabular}{m{0.4\linewidth}m{0.5\linewidth}} \toprule Classifications & ...


4

This is a start. Drawing a graph with a common vertex is as simple as saying {subgraph I_n [n=12,radius=2.5cm, counterclockwise,phase=105] -- x} where I_n is a standard graph that (in this usage) puts the nodes on an circle with equal distances. We can specify the number of nodes, the radius and the phase. If you want to see which node lives where, ...


5

This does not really produce the figures you want. I am not even sure if you should do a plot of that type when you neither have real data nor a function at hand. Rather, you can just draw the ellipses as you need them. I am posting this because in your link the nontrivial principle axes of the Gaussian were obtained by rotating the picture. Here, on the ...


2

This is because of the different widths of your ylabels, i.e. x, v, a. Each tikzpicture will simply start at the leftmost position. The width of all your plots is not exactly the same! If you move all your ylabels slightly to the right, the plots will be aligned correctly: ylabel style={at={(0.05,0.9)} Another possibility is to put all plots inside one ...


2

You need to use \includepdf{file} from pdfpages package and no center \documentclass[]{} \usepackage{pdfpages} \begin{document} \includepdf[page=1]{Deckblatt.pdf} \pagenumbering{Roman} \chapter*{Abstract} ... \end{document}


1

In your provided MWE, you didn't include the package graphicx, just include that package your MWE works fine for me, and the modified MWE is: \documentclass[a4paper]{article} \usepackage[margin=1.5in]{geometry} % For margin alignment \usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage{algorithm} \usepackage{arevmath} % For math ...


11

There are plenty of posts for each of these, now there is one more post. For instance, the neuronal network is very similar to the one of this post. \documentclass[tikz,border=3mm]{standalone} \usetikzlibrary{arrows.meta,chains} \begin{document} \begin{tikzpicture}[neuron/.style={circle,inner sep=1em,draw}, neuron missing/.style={ scale=1.25, ...


2

The graphicx package allow the insertion of external images (in png, jpg or pdf format using pdflatex, or eps format using latex) with the \includegraphics command, but this has nothing to do with the figure environment, that can be used without any package, and without any image: \documentclass{article} \begin{document} \begin{figure} \hfil (...


0

Let me spell out my comment: In your code fragment you have to much closed curly braces in main caption. Packages subfig, \subfigure (which is obsolete) and subcaption are not compatible. In your code fragment, you use only last one, so delete the other two. Using article document class, a MWE (minimal Working Example) with your code fragment should be: \...


0

Does this meet your requirement \documentclass{article} % ========== Packages ========== \usepackage{graphicx, geometry} \usepackage{xcolor} \usepackage{caption} \usepackage{subcaption} \usepackage{float} \begin{document} \begin{figure} \centering \begin{subfigure}[b]{0.4\textwidth} \centering \includegraphics[width=\textwidth]{...


2

It seems thatyou like to draw superposition $0.5 + \sin(x)$. This function in pgfplots is {0.5+sin(180*x)}: \documentclass[margin=3mm]{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ xlabel=$x(t)$, ylabel=$t$, grid=major, xmin=-5, xmax=5, ymin=-2, ymax=2, domain=-5:4.5, samples=201] \...


1

Fast answer: include \usepackage{float} and use [H] instead of [h] Explained answer: There's the errors or recommendations that I have founded: Use lowercase letters for labels, path of folders, and others that usually refers object. For example use \label{tbl:its an example} instead of \label{tbl:Its An Example}. Why? because usually we forgot uppercase ...


0

You need to specify [H] like the code below \begin{figure}[H] \centering \includegraphics[width=0.95\textwidth]{image.png} \caption{Caption.} \label{fig:image1} \end{figure} Add \usepackage{float}


0

In LuaLaTeX you can use io.popen to capture a list of files. It will return the first file found. As in the "pure LaTeX" answer commented before, you'll need to use --shell-escape. %!TEX program = lualatex \documentclass{article} \usepackage{luacode} \usepackage{graphicx} \usepackage{shellesc} \begin{document} \begin{luacode*} f = assert(io.popen("ls ".....


2

Assuming a Unix system: \documentclass{article} \usepackage{xparse} \usepackage{graphicx} \ExplSyntaxOn \NewDocumentCommand{\includegraphicsfromfolder}{O{}mm} {% #1 = options, #2 = folder path, #3 = extension \sys_get_shell:nnN { ls~-m~#2/* } { } \l_tmpa_tl \seq_set_split:NnV \l_tmpa_seq { , } \l_tmpa_tl \seq_map_inline:Nn \l_tmpa_seq { \...


1

I think the problem is happening when TeX Live version is upgraded. You can fix this issue by changing the the TeX Live version in the Menu bar to the date that you created your original project. That worked for me.


1

To locally correct the vertical position of the image inserted via \titlegraphic, i.e. without redefining the titlepage, you can use \titlegraphic{\vspace{-<shift>}\raisebox{<shift>}{\includegraphics[<options>]{<image>}}} If you only use \raisebox, the image will be shifted but so will be the title. The \vspace makes the shift ...


0

Old question I know, but I was looking for a solution today so I guess still relevant. Here is the solution I am using, I simply put this in the preamble of my document. \usepackage{graphicx} \setkeys{Gin}{width=\linewidth} This works because under the hood what is being use is \includegraphics and I just set the default width of those images to the width ...


1

Well, yes and no, depending on the actual requirements. You could use the animate package to create animations representing the change of a parameter. See the following example taken from https://www.uweziegenhagen.de/?p=3048 \documentclass{article} \usepackage[paperwidth=5.5cm,paperheight=5.3cm,left=0cm,right=0cm,bottom=0cm,top=0.25cm]{geometry} \...


0

Yeah after asking five years of this question, today I face same issue. When I used xcolor or colortbl, I faced same error. Thanks to @Mauramz whose answer here gives me hint and I figure out error which comes because of xthesis package, then I found solution of this problem here LaTex error: \begin{document} ended by \end{table} The error was in xthesis....


0

On this exemple, you can see something similar: https://www.latextemplates.com/template/arsclassica-article If you try to transpose, it could be a code like that: \begin{figure}[tb] \centering \subfloat[Image of Open Cluster Messier 37.]{\includegraphics[width=.45\columnwidth]{Plot M37 with parameters to see more stars.png}}\label{fig:0} \quad \subfloat[...


0

\documentclass{article} \usepackage{xcolor,mdframed} \usepackage{graphicx} \usepackage{caption} \captionsetup[figure]{box=colorbox,boxcolor=red,slc=off} \begin{document} \begin{figure}[htbp] \begin{mdframed}[backgroundcolor=blue!50,linecolor=blue!50] \includegraphics[width=\linewidth]{example-image-a4-landscape.pdf} \...


1

The code below defines two new commands, \ChapterImages and \InsertImage, that lets you set a comma separated list of image names and insert next image, respectively. Using these commands you can set the images for your chapters using \ChapterImages{ example-image-a, example-image-b, example-image-c } and you can insert these images on your ...


1

Intention of MWE below is to serve as starting point how you can write your appendices. Since we haven't your images it may happen, that some figure will not fit in page. In this case, you probably should reorganize figures and change number of sub-figures in them. It is also unusual, that your figures haven captions (or it may be that I misunderstood, that ...


-1

If you have multiple subfigures having this issue in a composite figure, the best way to solve it is to make those subfigures have transparent background. Then the final pdf compiled by LaTeX wouldn't have these boundaries (for each of the subfigures).


1

memoir already includes an own mechanism for subfigures and their captions. You could use it instead of the subcaption package: \documentclass{memoir} \usepackage[T1]{fontenc} \newsubfloat{figure} \setcounter{lofdepth}{2} \usepackage{graphicx} \begin{document} \listoffigures \begin{figure} \subbottom[subfigure caption]{\includegraphics{example-image}}...


1

\documentclass{article} \usepackage[capbesideposition=right, facing=yes,capbesidesep=qquad]{floatrow}%can use quad also \usepackage{rotating} \begin{document} \begin{figure} \fcapside[\FBwidth] {\caption{A nice figure with a very very very very long long caption}\label{key}} {\rule{4cm}{4cm}} %Replace with image \end{figure}...


1

You can (most likely) force the second float to the bottom of the page by using [!b] but only do this after all editing done as float positioning depends on the surrounding text not just the figures themselves.


1

LaTeX tries to avoid placing diagrams in the flow of text. It is widely considered preferable to place diagrams either at the top of the page or at the bottom (or on its own page if it's big enough) and to call it out inline using a \ref. You can give an optional argument to the figure environment to specify which behavior you want: \begin{figure}[...


2

I'm not sure how useful this would be. If you use \includegraphics inside a figure environment, you just specify \centering in the environment. However, here's an implementation that also allows a nocenter option, \documentclass{article} \usepackage{xparse,graphicx} \ExplSyntaxOn \cs_set_eq:NN \plasma_includegraphics:w \includegraphics \cs_new_protected:...


Top 50 recent answers are included