Tag Info

New answers tagged

2

Closest i can come up with just looking at the picture. \documentclass{article} \usepackage{geometry} \geometry{top=0cm,a4paper,left=3cm,right=2cm,bottom=1.5cm} \usepackage{graphicx} \usepackage{scrextend} \usepackage{tgadventor} \begin{document} \begin{titlepage} \sffamily \vspace*{.5cm} \begin{addmargin}[0cm]{-2cm} ...


1

I would use the package adjustbox here. Please note the option valign=t I added to each image: % arara: pdflatex \documentclass[headsepline]{scrreprt} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \PassOptionsToPackage{demo}{graphicx} % you can remove this. \usepackage[export]{adjustbox} \usepackage{tikz} \usetikzlibrary{positioning} ...


0

I was also looking for a way to fix this issue with flowing text around full page figures. To extend on David Carlisle's answer for figures that are not the full page height on their own, I've found that putting a full page minipage environment inside a figure float seems to do the trick. \begin{figure} \begin{minipage}[c][\textheight][c]{\textwidth} ...


5

The package tikzscale delays its redefinition of \includegraphics at begin document, so you should do \AtBeginDocument{% \renewcommand{\includegraphics}[2][]{% \setlength{\fboxsep}{-\fboxrule}% \framebox{\rule{0pt}{0.6\linewidth}\rule{\linewidth}{0pt}}% }% } as well.


0

I find the following approach more convenient for my work. My figures are created via Inkscape and Python. MWE \documentclass[]{memoir} \usepackage{svg} \begin{document} \begin{figure}[!ht] \centering \includesvg[width=0.5\columnwidth, svgpath = /yourPATHtoSVG/]{filename} \end{figure} \end{document} One can compile MWE above with following command ...


3

Here is a suggestion using scrlayer-scrpage instead fancyhdr. Then you can define two new layers: one for odd and one for even pages. These layers can be added to the pagestyle scrheadings. So the images will not be on chapter pages because they are using the page style plain. \documentclass[a4paper,twoside]{report} \usepackage[T1]{fontenc} ...


2

Package preview was written for this purpose (to generate PNG images to be included in the emacs editor). \documentclass{article} \usepackage{chemfig} % A fixed `\chemname`, which takes the width of the name into account \newcommand*{\ChemName}[2]{% \begingroup \sbox0{#1}% \sbox2{#2}% \ifdim\wd2>\wd0 % \leavevmode \hbox to ...


1

Make a very minimal tex-file in which just the chemfig code is. % this is file isobutylChloride \chemfig{CH_3-CH(-[2]CH_3)-CH_2-Cl} \endinput Now, input that file in a standalone document and compile it with the -shell-escape flag. A png file will be created on the fly, a conversion program is needed to be installed, though. ...


1

Option trim together with clip help: \documentclass[a4paper,varwidth]{standalone} \usepackage{graphicx} \usepackage{caption} \usepackage{subcaption} \thispagestyle{empty} \begin{document} \begin{figure} \begin{subfigure}{.33\textwidth} \includegraphics[width=\linewidth]{uxfea.eps} \end{subfigure} \begin{subfigure}{.33\textwidth} ...


1

To build on David Carlisle's comment, there's a judgement call to make for plots with PNG (raster) vs PDF (vector). If you have a scatter plot with thousands of data points for example, there comes a point where vector graphics can make the resulting PDF document (alone or compiled into a LaTeX-produced document) large, slow and unresponsive. In such cases I ...


0

The following code snipped uses remember picture for positioning. \usetikzlibrary{calc} \begin{frame} \tikz[overlay,remember picture] \node[anchor=north east] at ($(current page.north east)+(0,-1)$) { Top-right float content. }; Regular content. \end{frame} It also uses the calc tikz library to specify an offset from the top left corner for ...


2

This is just me practising by experimenting with a package I wrote to answer another question. That package is justtrees and it is a simplified version of prooftrees which I wrote out of frustration. Both packages provide a forest style and the new versions offer a corresponding environment which has various advantages. This uses v0.03 of the package. Just ...


0

Without tabular, another solution could be use graphbox package to center vertically the image with the align=c option (or valign=c of the adjustbox package as showed in other answer, that does not matter, but beware of be confused) and enclose the rotated label in two \vrule. That allow an easy fine tuning of the format of the rules, the spaces and image ...


2

Use adjustbox's valign=c option as part of your \includegraphics option. This changes the vertical anchor from the baseline to the vertical center: \documentclass{article} \usepackage[export]{adjustbox} \begin{document} \begin{tabular}{|c|c|} \rotatebox[origin=c]{90}{{OZGUR}} & \includegraphics[scale=.25,valign=c]{example-image} \end{tabular} ...


4

The text is centered origin=c, then the rotation origin is the center of the rotated box. But then the vertical position will depend on both the width and height. This is avoided by origin=Bc, then the origin is on the baseline and the rotated text is vertically centered around the base line. Then the same can be achieved for the image using ...


1

Another way to do this is to use the adjustbox package. This provides a simpler and more memorable interface to the adjustment. \documentclass[10pt]{article} \usepackage[a4paper,margin=2cm]{geometry} \usepackage[brazilian]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \linespread{1.3} \usepackage[demo]{graphicx} ...


1

The image can be shifted via \raisebox. In the following example, the image is lowered until the top of the image is at the same height as the top of "B)". Option demo is only added because of the missing image file. \documentclass[10pt]{article} \usepackage[a4paper,margin=2cm]{geometry} \usepackage[brazilian]{babel} \usepackage[utf8]{inputenc} ...


8

The image is not properly cropped. The margins are still present, they are only made transparent. Bitmap images If the original image is a bitmap image, then use a better image editor (gimp, ...) to really remove the margins from the image. Example with the netpbm tools: pngtopnm -background white -mix <ruJ761V.png | pnmcrop | pnmtopng ...


0

Finally I decided to do it in a "not so beautiful way": % Gantt diagram in four pages \begin{figure} \centering \includegraphics[trim=0in 0in 26in 0in, clip, angle=90]{fig/gantt} \caption[Gantt diagram of the project.]{Gantt diagram of the project. Continues in next pages.}\label{fig:gantt} \end{figure} \clearpage \begin{center} ...


1

The non-printing seems to be a bug in AR because the print flag is set. As workaround the image can be put outside of \textattachfile: \documentclass[]{article} \usepackage{attachfile2,graphicx} \begin{document} \leavevmode \rlap{\includegraphics{image.png}}% \textattachfile{image.png}{\phantom{\includegraphics{image.png}}} \end{document}


4

Text can not be scaled, consequently it can happens that at scaling which shrink the picture texts will overlapping. A possible solution is that texts a, top pieces and b merge in one node. Nodes with fill will hide dashed lines: \documentclass{article} \usepackage{tikz} \usepackage[active,floats,tightpage]{preview}%for showing just a picture ...


0

The following is obviously not the source of your problem, but since it causes the same error, and this page is the first google hit for that error, I feel it might be useful for future readers to record it here anyway, if that's ok. So: the ! LaTeX Error: Not in outer par mode. can also be caused by forgetting to type an \end{table} a couple of lines ...


3

An appendix often consists of many many figures, or only figures. Having them float around will do no good. Hence, put the graphics inside the text directly. \documentclass{article} \usepackage{mwe} \usepackage{showframe} \begin{document} \begin{center} \includegraphics[width=.5\textwidth]{example-image-a}% ...


2

You have to reduce the width of your subfigures. Right now, you are using three times half of the \textwidth which cannot fit on the page. % arara: pdflatex \documentclass[12pt]{article} \usepackage[mongolian]{babel} \usepackage[utf8]{inputenc} \usepackage[a4paper, margin=1in]{geometry} \usepackage{mathtools} \usepackage{paracol} ...


2

You better use paracol instead of parcolumns. It's able to handle floats so (if there ever was,) there's no longer any need for wrapfigure. Also I used \begin{enumerate} ... \end{enumerate} for your enumeration. \documentclass[12pt]{article} \usepackage{amssymb,amsmath} \usepackage{paracol} \usepackage[a4paper, margin=1in]{geometry} ...


3

use \fbox{% \includegraphics[width=\dimexpr\textwidth-2\fboxrule-2\fboxsep]{blabla.jpg}% }


4

As mentioned in comment, we can use standalone conversion option, for example like this. (to generate phantom.png ) \documentclass[tikz,convert={outfile=phantom.png}]{standalone} \begin{document} \begin{tikzpicture} \node at (0,0) {\includegraphics[scale=1]{brain.png}}; \draw [gray!60,fill=gray!60] (1,0) ellipse (5mm and 10mm); \end{tikzpicture} ...


1

Here's an easy method to get a PNG file if you normally use a batch file to run LaTeX like I do (Windows version). You will need to have imagemagick installed. pdflatex sample.tex pdflatex sample.tex pdflatex sample.tex pdfcrop sample.pdf sample_cropped.pdf convert -density 150x150 sample_cropped.pdf sample_cropped.png pause This will result in a PDF and ...


1

You can do it adding an specific coordinate to your image using the node command and then drawing over it, for example, using this commands: \documentclass[border=2cm]{standalone} \usepackage[utf8]{inputenc} \usepackage{tikz} \begin{tikzpicture} \node at (0,0) {\includegraphics[scale=1]{brain.png}}; \draw [black,fill=gray!20] (0,0) ellipse (2cm and 1cm); ...


0

Add \usepackage{float} and use the option [H] in the figure. \documentclass{article} \usepackage{graphicx} \usepackage{float} %figure inside minipage \begin{document} \begin{minipage}{0.48\textwidth} \begin{figure}[H] \caption{\label{fig:label} Figure title} \includegraphics[width=\textwidth]{filename} \end{figure} \end{minipage} \end{document}


5

You need an expandable version of the padding. The following example redefines \theimgnr to expand to a number padded with zeros: \documentclass{article} \usepackage{graphicx} \newcounter{imgnr} \renewcommand{\theimgnr}{% \ifnum\value{imgnr}<10 0\fi \ifnum\value{imgnr}<100 0\fi \the\value{imgnr}% } \begin{document} % image names are ...


3

In TikZ you can use tikzfadingfrompicture from fadings library to clip using text. In the following example I use a shaded rectangle in place of your image. \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{fadings} \begin{document} % the clipping text \begin{tikzfadingfrompicture}[name=title] \node [text=transparent!0, text ...


3

We can use the command for spacing out parts here as well, but we give it a negative space. I tried to clean the code a bit. As you want to have extra margins for the titlepage, you can completely drop memoir here, do your titlepage and include it in the thesis. There is really no use for toubling with margins. \documentclass[a4paper]{article} ...


3

You could place the image in a \parbox and specify the height of that box. Say both your images originally had height=3cm. Add the \parbox with a height of 3cm, then you can reduce the size of the image inside, without the list below moving up. \documentclass{beamer} \usepackage{tikz} \begin{document} \begin{frame} \begin{columns} ...


0

I found the solution by using : \usepackage{grffile}


2

I answer to my own question. The problem was with the back and forward slashes. When all your files are in the same file, it is not necessary to write the path. You can just put the name of the eps file. Here it is the right code ; \begin{figure} [!htb]\centering \includegraphics[width=5in]{phasediagram1} \caption{Effect of ...} ...


2

write-math.com Direct link to the online service This service allows classification by drawing (even works on mobile devices!) and by text search: Disclaimer: I am the author of the service. Some information The handwriting recognition toolkit (hwrt) is one possibility to classify you recordings. There are still many rough edges and the software gets ...


0

You can force floats to stay in place by adding an exclamation mark after the location placement declaration for the figure. In this case you want in exactly where it lies in the text so "here". Therefore you can write \begin{figure}[h!]. You should also remove the \\. \documentclass[11pt]{article} \usepackage[utf8]{inputenc} \usepackage{listings} ...


14

Solution without TikZ Using text as clip path is supported by package pdfrender if pdfTeX (or LuaTeX) is running in PDF mode. \pdfsave and \pdfrestore saves and restores the current graphics state, thus that the clipping ends after \pdfrestore. Since the graphics state include the current transfer matrix (e.g., the current point on the PDF page), the ...


13

This is a slightly tweaked solution based on Mark Wibrow's answer. It adds the fit library so that the front node (the one with the text) stretches to cover the background image without having to set the size manually. This is the image source (place it in your Tex folder where the main document is, and rename it vegetation). Output Code ...


3

LaTeX uses TeX to compile. Or, these days, it uses pdfTeX but in TeX mode i.e. it behaves like TeX. This is the current version of the original engine. It doesn't know anything about PDF. It produces a DVI file which you can either view using a capable viewer or convert to PS, PDF or other format. pdfLaTeX uses pdfTeX to compile. That is, it uses pdfTeX in ...


2

Basically you just need to place the figure earlier and don't force a page break. \documentclass[paper=a4,fontsize=11pt]{scrreprt} \usepackage{graphicx} \usepackage{placeins} \begin{document} % content of page Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed ...


0

Example with TikZ: \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows.meta} \usetikzlibrary{calc} \pgfmathsetseed{3} \begin{document} \begin{tikzpicture} % Coordinate axes \begin{scope}[ semithick, ->, >={Stealth[]}, ] \draw (0, -3.5) -- (0, 3.5); \draw (0, 0) -- (6.5, 0); \end{scope} ...


1

From what I understand, your purpose is to align the frame of your axis with the column boundaries, right? I am unsure whether you are bound to standalone for the separate images. If so, my answer is inadequate. In fact, I am unsure whether you need separate pdfs at all.... ? My idea is to use \usetikzlibrary{external} in order to achieve the image ...


3

LaTeX in dvi mode, in which it is when tex4ht runs, doesn't support extraction of image dimensions for png or jpg images. This is because it supports only eps images. Because it doesn't know image dimensions, it can't scale them. Fortunately, there is a way to find image dimensions. Try this command: ebb -x TestImage.png this will create file ...


3

Too long for a comment. The base line of the last text line on the second page is correctly aligned with the bottom of the text area. According to \maxdepth, TeX allows the descenders to stick outside the text area to get a proper alignment of the base lines of the last text lines on the pages. The last text line of the first page does not reach the ...


3

For aligning the different parts of the frame environment, beamer offers the columns environment. Here you can stack two images in one and the other in another column in a pretty straightforward fashion. The other kind of placement options can be included as if you are operating in a regular frame inside a column. \documentclass{beamer} \usepackage{mwe} ...


0

There is a similar question, assuming that Spider Graph and Kiviat Diagram are synonyms (like supposed in wikipedia). Therefore here is another possibility with a package: Draw Kiviat Diagramms


2

The overfull box is the foot not the head, it's simply too wide. \documentclass[letterpaper]{article} \usepackage{graphicx} \usepackage{float} \usepackage[letterpaper, top=1.25in, headheight=1.02in, headsep=0.08in, bottom=0.85in, footskip=0.0in, left=0.75in, right=0.75in]{geometry} % showframe option handy for designing. \usepackage{fancyhdr} ...


1

I found my answer through the following link: How to include PDF pages without a newpage before the first page? I changed my code to be as follows and it works as I wish: \includepdf[pages=1,pagecommand=\section{Requirements Document}]{requirements_xlsx.pdf} \includepdf[pages=2-,pagecommand={}]{requirements_xlsx.pdf}



Top 50 recent answers are included