New answers tagged

8 votes
Accepted

Clockwise and counterclockwise path around the origin

Here is a macro \loops that draws your figure. \loops{2}\hspace{2cm}\loops[<]{4} produces the following: The required argument is the number of loops around the origin. The optional argument is &...
user avatar
  • 19.8k
1 vote

Rotation number of a vector field

Here is a TikZ solution. Define a pic which is an arrow of length \rotlen (I set at .5cm) in the direction of (1,f(x,y)). Then using foreach during the drawing of each segment of the curve, place the ...
user avatar
  • 19.8k
0 votes

Wrapfig after subsection near page break

I started to do a paracol solution, only to realize that the best solution is to place the two figures side by side. This will not be true in general, but you can't expect the software to do ...
user avatar
  • 69.4k
2 votes
Accepted

Rotation number of a vector field

When it comes to rotation numbers, it is not the size of the vectors in the field that matter, but only their directions. I therefore prefer to draw all vectors with the same length. For the arrows ...
user avatar
  • 3,820
0 votes
Accepted

insert picture in a table - Latex Overleaf

Welcome to TeX.SE! Edit: Two examples. Both use graphicx, enumitem and etoolbox packages for table body: Table with tabularxenvironment: \documentclass{article} \usepackage{graphicx} \usepackage{...
user avatar
  • 250k
2 votes

Graphics Alignment

Don't like the tabular and minipage. It just involve too much space to your picture. This is a easy way to make your figure more compacted. \documentclass[12pt,a4paper]{report} \usepackage[left=3.00cm,...
user avatar
  • 1,258
2 votes

Colored and inclined boxes

The solution by @user187803 using tcolorbox is probably the right way to do this, especially is you want the fuzzy shadow. For variety, here is a TikZ solution using drop shadow. \usepackage[...
user avatar
  • 19.8k
0 votes
Accepted

Graphics Alignment

I suggest using the allignment command \centering at the beginning of the second minipage. \begin{minipage}{0.5\textwidth} \centering \includegraphics[scale=0.8]{caminotoro.pdf} \\ ...
user avatar
4 votes

Colored and inclined boxes

You can use tcolorbox: \documentclass{article} \usepackage[most]{tcolorbox} \newtcbox{mybox}[2]{ enhanced, frame hidden, colback=#2, arc=2pt, tikz={rotate=#1,transform shape}, ...
user avatar
  • 2,390
4 votes

Draw the flat torus

A nice solution was posted by @Vincent (+1) but this was already in the works so I figured I'd post it as an alternative. Here is a macro \flattorus that takes two arguments (and one additional ...
user avatar
  • 19.8k
6 votes
Accepted

Draw the flat torus

Here's an option. I defined a command \flattorus with three arguments: (optional) The side of the square in the TikZ picture, in cm. I put 4 as the default value, but of course you can easily change ...
user avatar
  • 15.4k
2 votes

Draw the flat torus

Try this code: \documentclass[10pt,a4paper]{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[scale=10] \draw[gray!30,xstep=.3333,ystep=.25] (0,0) grid (1,1); ...
user avatar
0 votes

How to prevent figures from appearing at the top of a page?

So, the way i fixed this was by using center instead of figure: \begin{center} \centering \includegraphics[width=0.95\textwidth]{image.png} \caption{Caption.} \label{fig:image1} \end{center}
user avatar
1 vote

Join graphs tikz + pgfplots

Not really sure if I understand correctly your question... if you want the two diagram together, just put them together. You can use the baseline option for vertical alignment, or you can look here. I ...
user avatar
  • 28.7k
0 votes

pdf file containing a cropped image is displayed as if the image is not cropped already

As answered by Ingmar and Tom The \documentclass{standalone} and package tikz will do the job. Thank you both. Cheers,
user avatar
0 votes
Accepted

Displaying moderator analysis with 3 variables with LaTeX

This should solve your problem. Next time, please add a MWE as @SebGlav suggested. \documentclass[tikz,border=4]{standalone} \usetikzlibrary{arrows.meta} \usetikzlibrary{calc} \usetikzlibrary{...
user avatar
  • 215
0 votes
Accepted

how to subreference in floatrow package - hyperref?

This provides a subcaption compatible version of \sidesubfloat. The tricky bit is that caption (even \captiontext) always fills the space given, so we need to measure the needed space first by faking ...
user avatar
  • 69.4k
0 votes

how to subreference in floatrow package - hyperref?

Use \ref{fig:a} and \ref{fig:b} (missing in your code). \documentclass[12pt]{report} \usepackage{floatrow} \floatsetup[figure]{subcapbesideposition=top} \usepackage{graphicx} \usepackage[label font=...
user avatar
  • 24.4k
2 votes

TikZ: prevent overlapping boxes when using fit

You can draw path around nodes, which you like to annotated by some transparency fill: \documentclass[margin=3mm]{standalone} \usepackage{tikz} \usetikzlibrary{arrows.meta, calc, ...
user avatar
  • 250k
4 votes
Accepted

TikZ: prevent overlapping boxes when using fit

You want to merge those red fit nodes with the same opacity, it can be done using a scope and the transparency group option. See the code below. Nevertheless, when doing that, you still get some dots ...
user avatar
  • 16.2k
4 votes
Accepted

add some elements in tikz picuture - advanced tikz commands

Like this? Neural network is drawn from scratch. Defined are new styles, used are calc, chains and positioning libraries for positioning of neurons. Comments in code describe function of code parts: ...
user avatar
  • 250k
0 votes

How to use background image in LaTeX?

Something I figured out that I looked a while for what how to skip a background image for a specific page. I have discovered the best way to do this is with: \usepackage[pages=some]{background} \...
user avatar
3 votes
Accepted

Framework for interactive graphics in LaTeX documents

\label commands are whatsits and can affect spacing. E.g. a simple variant of your problem is \documentclass{article} \usepackage{zref-savepos} \begin{document} \rule{\textwidth}{1pt} \zsavepos{A}% ...
user avatar
2 votes
Accepted

Managing pgfplot labels

With scaled y ticks=false, the y-axis tick labels will be 1 \cdot 10^6, 2 \cdot 10^6, and 3 \cdot 10^6. To configure the number format, you can add /pgf/number format/... options to tick label style={....
user avatar
  • 20.4k
2 votes
Accepted

Putting subfigures side by side using subcaption and caption package

I can suggest two remedies: Keep the widths of the subfigure environments unchanged, but insert % (comment character) immediately after the first instance of \end{subfigure}. Reduce the widths of ...
user avatar
  • 435k
2 votes

Import Simulink figures in LaTeX

Quick and easy solution to save Simulink figures as eps: The above mentioned solutions didnt work or were not exactly what I wanted so here is my solution. Step 1: Have your Simulink project open and ...
user avatar
  • 21
0 votes

Trouble with vertical alignment of text and images in table

If image can be drawn as tikzpicture (as can be concluded from image in question), than with use of tabularray` package can be easy obtain the following result: Content of the first two columns are ...
user avatar
  • 250k
2 votes

PDFLatex producing absurdly large pdf when using axessibility package

Likely Overleaf has modified the structure of the package to set the \pdfcompresslevel=1 which produces a compressed version of the pdf. arXiv has not customized the behavior of this package in any ...
user avatar
  • 673
1 vote

Align baselines of figure and table using minipage and stackunder

The MWE requires only small changes. For the tabular, you used \stackunder{<caption>}{<tabular} which associates the overall baseline with the <caption>. Instead, use \stackon{<...
user avatar
2 votes
Accepted

How to write graphics using subfig package or other?

Here is a possibility for the first graph, with pstricks: \documentclass[pstricks, border=6pt]{standalone} \usepackage{pstricks-add} \begin{document} \begin{pspicture}(-2,-2)(6,6) ...
user avatar
  • 259k
2 votes

Problem with a side by side image in beamer

You do not need to load graphicx (beamer loads it already) and you don't need figure or minipage \documentclass{beamer} \begin{document} \begin{frame}{Comparison} \includegraphics[width=.47\...
user avatar
1 vote

Loading a graphics image in Tikz given the position of the bottom side?

With sloped TikZ option you can already go a long way: (read the notes in the code to understand what it does) %! TEX program = pdflatex \documentclass{article} \usepackage{tikz,fp} \usetikzlibrary{...
user avatar
  • 1,414
1 vote
Accepted

How do I calculate offset to \put picture from left bottom page corner?

\documentclass{extreport} \usepackage{graphicx} \begin{document} \mbox{}%something on the page \AddToHook{shipout/background} %or \AddToHookNext {\put(0,-\paperheight){\frame{\includegraphics{...
user avatar
0 votes

How do I calculate offset to \put picture from left bottom page corner?

Probably easiest to load the eso-pic package which has a \AtPageLowerLeft specifier: \documentclass{extreport} \usepackage{graphicx} \usepackage{eso-pic} \begin{document} Other stuff on page, or if ...
user avatar
  • 35.4k
0 votes

Vertical Alignment of an External Image in a Display

It is hard to answer without an MWE, however, whatever is your graph, you can always add a proper \coordinate to use as baseline. Main: \documentclass{article} \usepackage{amsmath} \usepackage{tikz} \...
user avatar
  • 53.8k
4 votes
Accepted

Draw in latex without downloading the pdf

Your problem is solved by @David Carlisle comment. In the case, that you like to include code for image from the link in your question, you can do on the following way: \documentclass[12pt]{article} %...
user avatar
  • 250k

Top 50 recent answers are included