New answers tagged

1

Here is simple solution, assuming this is the last page. \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{graphicx} \title{bla} \author{Hello} \date{March 2021} \begin{document} \maketitle Some work were done, some work were done, some work were done, some work were done, some work were done, some work were done, some work were done, some ...


1

That line expects to add .tif support to LaTeX by using ImageMagic (convert executable on Linux; I think on Windows it's called magick) to convert a .tif into a .png before graphics inclusion, because no TeX engine/backend (as far as I know) can include TIFF files natively. That line was probably inspired by this part of grfguide: which invokes the zcat ...


3

You can use the canvas setting and pic definition to draw angle easily. For example, if you draw on xy plane, simly define the canvas as \draw [canvas is xy plane at z = 0] <code here>; Here is the sample code, based on your code, as a starting point: \documentclass[tikz,border=10pt]{standalone} \usepackage{tikz-3dplot} \usetikzlibrary{angles,quotes} \...


0

Here's an approach involving stacking and scaling. \documentclass{article} \usepackage{graphicx,scalerel,stackengine} \setstackEOL{\\} \begin{document} \begin{figure}[ht] \centering \setstackgap{S}{0pt}% inter-image gap \setstackgap{L}{52pt}% baselineskip for (b) (c) (d) \scalerel{\includegraphics[height=10pt]{example-image}}% 10pt placeholder {\hspace{30pt}...


0

This is task for classical TeX manipulation with boxes. Only what you need to know, is behavior of \hbox, \vbox, \vcenter and \vtop TeX primitives: \hbox to\hsize{% \vtop{\vbox{\hbox{<picture a in .7\hsize width>}}% \medskip\hbox to.7\hsize{\hss(a)\hss}}\hss \vbox to <height of big picture a>{ \hbox{$\vcenter{\hbox{<...


2

You have not provided any example, and the space at the top is not expected, and I can not reproduce. I correct for it here anyway causing the image to protude above the text. Mostly the space at the bottom is forced by the \\ which should never be used at the end of a paragraph, and causes TeX to warn about the underfull box with badness 10000 (ie, the ...


4

You can add 'dotted' to draw \draw[brown, dotted] (-2,0.4) -- (2,0.4);


0

It is not clear which names has particular path, but it is simple to correct/insert names. By using quotes library you can ad them as follows: \documentclass[border=3mm]{standalone} \usepackage{tikz} \usetikzlibrary{quotes} \begin{document} \begin{tikzpicture}[ C/.style = {circle, draw}, % C: circle every edge quotes/.style = {auto, font=\footnotesize,...


1

\begin{tikzpicture} \node[shape=circle,draw=black] (0) at (0,0) {$0$}; \node[shape=circle,draw=black] (4) at (6,0) {$1$}; \node[shape=circle,draw=black] (1) at (3,-1) {$2$}; \node[shape=circle,draw=black] (2) at (3,2) {$3$}; \draw (0) -- (1) node[pos=.5, below, sloped, rotate=0] {e1}; \draw (0) -- (2); \...


3

Using this solution from Tom Bombadil, you can adjust each axis to give it the angle and aspect you want. \documentclass[tikz,border=3.141592mm]{standalone} \begin{document} \newcommand{\xangle}{30} \newcommand{\yangle}{90} \newcommand{\zangle}{-10} \newcommand{\xlength}{1} \newcommand{\ylength}{0.5} \newcommand{\zlength}{1} ...


1

A recent version of TikZ introduces patterns.meta library which defines new patterns which can be parametrically adapted. It seems that the new library is still experimental and can be changed. But it does what you want. \documentclass[11pt]{amsart} % %%%%%%%%%%%%%%%%% Packages %%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage{amsmath,amssymb} \usepackage{tikz} \...


2

This is a small cheat with TikZ's library shading. I don't know how to rotate rainbow's colors. % with Nguyen Quang Dung \documentclass[tikz,border=5mm]{standalone} \usetikzlibrary{shadings} \begin{document} \begin{tikzpicture} % decorations \def\a{1.1} \def\b{.03} \draw[gray,nodes={black,scale=.5}] (0,-\a) node[below]{$0$} node[below=4mm]{$x$} (1,-1-\b)--(...


6

With use of the arrows.meta, automata, positioning and quotes library: \documentclass[border=3mm]{standalone} \usepackage{tikz} \usetikzlibrary{arrows.meta, automata, positioning, quotes} \begin{document} \begin{tikzpicture}[auto, > = Stealth, every edge quotes/.style = {font=\footnotesize}, % if you like ...


5

Here is my attempt: \documentclass[border=0.2cm]{standalone} % required packages and libraries \usepackage{tikz} \usetikzlibrary{automata, positioning} \begin{document} \begin{tikzpicture} [draw=cyan!70!black, node distance = 3cm, on grid, auto, every initial by arrow/.style = {thick}] % State q0 \node (q0) [state, initial, ...


2

Let me spell out my comment ... If you not specify position of floats (figure, table) they will float to the top of page, so your case you only need to specify positioning for table too: \documentclass{article} \usepackage{graphicx} \usepackage{lipsum} % for dummy text \begin{document} \begin{figure}[ht] % <--- \centering \includegraphics[scale=0.8]{...


0

\documentclass{article} \usepackage{titlesec} %1inch=25,4mm %\titlelabel{{\hspace*{1cm}\makebox[1cm][l]{\thetitle}}} %\usepackage{indentfirst} \usepackage{lipsum} \usepackage{showframe} \usepackage[demo]{graphicx} \begin{document} \newpage \begin{figure}[] \centering \includegraphics[scale=0.8]{./supply} \caption{Some ...


0

One thing I just discovered is that filenames that include an extra dot (.) in their name, not including the dot before the file extension will throw this error in XeTeX. I had a series of PDF plots produced with a function in R, and pdfinfo showed identical size statistics for all of them, but those with an extra dot in their filenames had issues with ...


6

If I correctly understood your question, then you after something like this: I took the liberty and rewrite your picture code, from preamble remove packages which are loaded by beamer (xcolor, graphicx and hyperref) and not used package (booktabs, adjustbox). Use adjustbox for scaling of tikzpicture is not a good idea, the image is just fine without any ...


0

If this code is good enough for you, possibly the answer of @StevenB.Segletes here is what you were looking for... \documentclass{article} \usepackage{array} \usepackage{float} \usepackage{graphicx} \usepackage{verbatimbox} \let\oldincludegraphics\includegraphics \renewcommand\includegraphics[2][]{\addvbuffer[3pt 0pt]{\oldincludegraphics[#1]{#2}}} \begin{...


8

TikZ offers lots of possibilities of "filters" (not what kids these days know as filters, please) to apply over an image by using PDF transparency layers. Section 23.3 (Blend Modes) of the TikZ manual explains this feature with the possible "blend modes": normal, multiply, screen, overlay, darken, lighten, color dodge, color burn, hard ...


14

You can use the decodearray={rmin rmax gmin gmax bmin bmax} option to \includegraphics (the default colour coding is decodearray={0 1 0 1 0 1}). \documentclass{article} \usepackage{graphicx} \begin{document} \noindent \includegraphics[decodearray={0 1 0 1 0 1},width=\textwidth]{ingmar.png}\\ \includegraphics[decodearray={1 1 0 1 0 1},width=\textwidth]{ingmar....


0

I solved the problem by commenting out the line \clip(-0.3389395786418886,-5.446714475426916) rectangle (29.61267394193468,14.931419757586356);


3

When you want to use a path in some fashion but don't want the actual path to be drawn then the way to achieve this is usually to define the path using \path rather than \draw. In addition, if all you want to do is decorate the path then you can use the decoration on the path directly and not via a postaction. Looking at the rest of the code, I'd also ...


0

You should use \clearpage instead of \newpage (the former flushes out the floats in the stack), and it should come after the figure. \documentclass{article} \usepackage[demo]{graphicx} \usepackage{lipsum} \setlength{\parindent}{0pt} \begin{document} \section*{sec 1} \lipsum[1] \begin{figure}[p] \centering \includegraphics{noimage} \end{figure} \clearpage ...


1

ANSWER: After playing around in the document for a while, I found that the image did not convert from bitmap to a PNG correctly so after exporting the image as a PNG once more and then adding it into the document solved this problem.


0

Like this: Insert image and table in the same float, for example figure and than for table use \captionof{table}{...} defined in the caption or capt-of package: \documentclass{article} \usepackage{graphicx} \usepackage{caption} \usepackage{lipsum} \begin{document} \lipsum[11] \begin{figure}[htb] \centering \includegraphics[width=0.8\textwidth,...


1

As supplement to nice @John Kormylo answer (+1). It should be used with some care: at positioning of sub-floats are considered only squares, so it can happened, that images in them will overlap. Also, images can overlap text above images. This can be prevent with inserting \vspace*{<v distance>} after \begin{figure} and \hspace{<h distance}. Size of ...


2

This solution puts extra white space to the left of the center (2,3). I also trimmed excess white space from unknown cause. \documentclass{article} \usepackage{subcaption} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{figure}[ht]% freinds don't let frineds use [H] \centering \subfloat[$K_4$] {\begin{tikzpicture}[scale=.65] \draw[][draw, ...


2

OK, I'll try again, but you'll have to finish it... \documentclass[12pt]{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \tikzset{vnode/.style={draw,thick,circle,minimum width=1cm,inner sep=0pt}}; \def\dist{3} % Nodes \begin{scope}[every node/.style={vnode}] \node (a1) {$a_1$};...


2

welcome to TeX StackExchange! The problem with your code is that you forgot to end each \node by ';' (and also on your last \draw). Your code should look like this: \usetikzlibrary{fit,positioning,arrows,automata} \usetikzlibrary{positioning,arrows,shapes} \usepackage{mhchem} \usepackage{chemformula} \let\ce\ch \begin{tikzpicture}[node distance=2cm,minimum ...


0

The current directory was set to the home directory by vim. Hence it was unable to find the files. By the changing the current directory to the working directory, I was able to get it working. This follows from a comment given in the vim forum of StackExchange.


0

You were on the right track. In the class tstextbook.cls the background figure for a chapter is fixed. In order to change it according to the chapter number, you need to do two things: (1) Add the code to change the command used by the class \@makechapterhead as shown in the code, where the original line {\includegraphics[width=\paperwidth]{background}}; ...


1

Your configuration file works for me. I would change it a bit though. First of all, we can add a configuration file for the subcaption package, subcaption.4ht: \NewConfigure{subfigure}{2} \ConfigureEnv{subfigure}{\a:subfigure}{\b:subfigure}{}{} \ConfigureEnv{subtable}{\a:subfigure}{\b:subfigure}{}{} \Hinput{subcaption} It defines new configuration hooks ...


0

Here is a solution that uses the (relatively) new \AddToHook macro. \documentclass{article} \usepackage{graphicx} \usepackage{lipsum} \AddToHook{shipout/background}{% \put (0in,-\paperheight){\includegraphics[width=\paperwidth,height=\paperheight]{mybg.pdf}}% } \begin{document} \lipsum[1-5] \end{document} (The background package now gives a warning ...


3

You could place each subgroup of subfigures (pun intended), along with the overall figure caption, in a separate minipage environment. \documentclass[demo]{article} % remove 'demo' option in real document \usepackage{graphicx,subcaption} \captionsetup[subfigure]{skip=0.25\baselineskip} \begin{document} \begin{figure} \begin{minipage}[t]{0.475\textwidth} % ...


0

Quick-and-dirty way: the trick is to use overlay to hide the size of the text to LaTeX. You have to adjust manually the coordinates, though. \documentclass{article} \usepackage{lipsum} \usepackage{tikz} \begin{document} % This is attached to the start of the paragraph, do not insert % blank lines \tikz[overlay, scale=2, transform shape] \node [font=\...


3

You can draw these with \rules and tabulars for the structural layout: \documentclass{article} \begin{document} Consider the following partition: \begin{center} \begin{tabular}{ c @{\quad} c @{\quad} l } \makebox[2em]{$I_1$}\makebox[6em]{$I_2$} \\[-.4\normalbaselineskip] \rule[.5ex]{2em}{.4pt}\rule{.4pt}{1ex}\hspace{-.4pt}\rule[.5ex]{6em}{.4pt} &...


2

It's a fitting job for xcoffins. It is a package created to facilitate the layout of stuff on the page: text, tables, images, graphics, etc., in a very simple way. Handy to construct cover and title pages, and collages... It works like a graphic design program (almost, no GUI, you have to compile to see the changes) in the sense that it uses the relative ...


0

The answer given in the comments by Przemysław Scherwentke works perfectly: simply use \resizebox{\textwidth}{!}{\input{m1.pgf}}


1

The problem is that the current version of TeX4ht configuration file for svg.sty doesn't pass dimension parameters to \includegraphics, so images are displayed at their original size. Here is a better version, which constructs correct dimensions for \includegraphics and it also support \svgpath. Save this code as svg.4ht: % svg.4ht (2018-12-30-09:31), ...


1

You are already loading tikz, why not use it? The image will automatically be trimmed to fit the page. \documentclass{article} \usepackage[table]{xcolor} % for the custom frontpage color \usepackage[breakable,most,skins,listings]{tcolorbox} \newsavebox\tempbox \begin{document} \savebox\tempbox{\begin{tcolorbox}[% for tikzpicture inside another tikzpicture ...


0

\documentclass{article} \usepackage{lipsum} %% gives dummy text for this file \usepackage{eso-pic,graphicx} \AddToShipoutPictureBG{% \AtPageLowerLeft{\includegraphics[width=\paperwidth,height=\paperheight]{example-image-a}} } \begin{document} \lipsum \end{document}


1

An other solution usign tcolorbox package : \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[a4paper, total={16.5cm, 23cm}]{geometry} \usepackage{lipsum} \usepackage{graphicx} \usepackage{tcolorbox} \tcbuselibrary{skins} \begin{document} \begin{tcolorbox}[enhanced, sidebyside, lefthand ratio=.3, sidebyside align=center] \rotatebox{90}{ ...


1

Here is a way ... but you have to know where to place the table and what to place next to it. \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[a4paper, total={16.5cm, 23cm}]{geometry} \usepackage{lipsum} \usepackage{lscape} \usepackage{graphicx} \usepackage{rotating} \usepackage{capt-of} \newsavebox{\testBox} \begin{document} \lipsum[2-8] ...


0

\documentclass[border=2pt]{standalone} \usepackage{tikz} \usetikzlibrary{positioning,arrows} \begin{document} \begin{tikzpicture}[on grid,node distance=1.5cm and 2.5cm,>=stealth',thick] % \Ellipse[options]{name}{label} \newcommand\Ellipse[3][]{\node[draw,rounded corners,inner sep=2pt,#1](#2){#3};} % \R[options]{index} defines node Rain_index \...


1

A way to make this diagram with a psmatrix: \documentclass{article} \usepackage{amsmath} \usepackage{pst-node, multido} \begin{document} \[ \def\pscolhooki{\psset{mnode=p}}\def\pscolhookv{\psset{mnode=p}} \begin{psmatrix}[mnode=circle, rowsep=1cm, colsep=1.2cm, framesep=1pt] & \text{Rain}_{t-1} & \text{\enspace Rain}_{t}\enspace & \text{Rain}...


1

As I mentioned in my comment: with tikz-cd is simple to draw your hidden Markov model: \documentclass[margin=3.1415692mm]{standalone} \usepackage{tikz-cd} \usetikzlibrary{arrows.meta, shapes.geometric} \usepackage{amsmath} \begin{document} \begin{tikzcd}[sep=large, cells={nodes={ellipse, draw, inner xsep=0pt}}, ...


1

Here's a possible way implementing relative positioning. \documentclass{book} \usepackage{tikz} \usetikzlibrary{positioning} \usetikzlibrary{arrows.meta} \begin{document} \begin{tikzpicture}[every node/.style={circle, draw, thick, align=center, minimum width=1.5cm}] \coordinate (BEGIN); \coordinate[right=of BEGIN] (1STRAIN); ...


3

Add the option [t] after each \begin{subfigure}. This will align the images with their bottom lines. \documentclass{article} \usepackage[textwidth=15cm]{geometry} \usepackage{graphicx} \usepackage{subcaption} \begin{document} \begin{figure} \centering \begin{subfigure}[t]{0.24\textwidth} \includegraphics[width=\textwidth]{example-image} \...


2

Basically, you can't. Sizes of the circuitikz components are built based on a standard size; you can tweak it to have, for example, 2-input ports at a given distance (if you do not rescale the TikZ coordinates), see here: Needing a dipchip of CircuiTikz with exact pin distance --- you will need to put them at 0.5 cm to have your example with straight lines. ...


Top 50 recent answers are included