{graphics} is about inclusion of external graphic files in your document. For questions about vector graphics created programmatically inside a (La)TeX document, use {diagrams} instead, or preferably the tag for specific packages like {tikz-pgf}, {pstricks}, or {metapost}.

learn more… | top users | synonyms (3)

12
votes
1answer
4k views

Cropping/Trimming an image with includegraphics by specifying percentages

Say I have an image my_image.png that I am loading in my LaTeX document using: \begin{figure} \includegraphics[width=0.5cm]{my_image.png}} \end{figure} Is there a way of telling LaTeX to only ...
12
votes
3answers
911 views

Compiling LaTeX straight to an image

This is probably going to sound like a strange request (trust me that there's a good reason for it), but is it possible to have LaTeX compile straight to an image file instead of to something like ...
12
votes
1answer
4k views

How do I embed an external image within tikzpicture?

I tried the following: \begin{tikzpicture}[] \pgftext{\includegraphics[width=150pt]{pic1.png}} at (0pt,0pt); \pgftext{\includegraphics[width=150pt]{pic2.png}} at (100pt,0); \end{tikzpicture} ...
12
votes
1answer
9k views

How to float figure within multicol text

I have a simple two-column text, and want to place figures within the text. I used this code \documentclass{article} \usepackage{multicol} \usepackage{graphicx} \usepackage{caption} \begin{document} ...
12
votes
1answer
646 views

Page Bordering with an image?

I want a custom border for my document. I was thinking of doing something like this, creating a border with a graphics tool(only the outer frame) and then placing it in the beginning of the document, ...
12
votes
2answers
447 views

How to tell when to use pdflatex, latex, and xelatex for any given tex file?

I'm writing an automatic compiling pipeline that should be able to compile any given tex file into a pdf. The diversity of the input tex files mainly shows up in what format of figures they use and ...
12
votes
1answer
195 views

Simple way to switch inline asymptote figures on and off

I use the inline asymptote environment \begin{asy} to draw a lot of the figures in my papers. To those not familiar with asymptote, the asymptote package creates *.asy files for each of the asy ...
12
votes
2answers
817 views

(How) Can I create picture effects with TeX and Friends?

I'm looking for a way to create subtle picture effects in beamer. I've got a few illustrations with a background that contrast offensively against a white background, and look completely out-of-place ...
12
votes
2answers
350 views

How to emulate some options of \node from TikZ

Code \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \foreach \a in {0,45,...,315}% {\node[line width = 0pt, rotate = \a, anchor = ...
12
votes
1answer
2k views

Trim image by number of pixels

Is it possible to trim an image by a certain number of pixels rather than a length? I have a set of images that I'm including, and in one figure, a trim of 135 on the bottom works nicely, but a ...
11
votes
3answers
795 views

Typographic conventions for width of figures in LaTeX data analysis reports

I posted this question on stats.SE, but the consensus was that it was better suited to tex.SE. Context: I've been thinking recently about conventions for figure width in data analysis reports that ...
11
votes
3answers
5k views

Problem with a very heavy EPS image - scatter plot too heavy as EPS

Using Stata, I produced a scatter plot of some variables. I saved the image as an EPS file. There are around a 1000 dots in the scatter plot - and this makes the EPS file to be 26MB. I need to use ...
11
votes
3answers
3k views

Unknown graphics extension: .1.png

I have a file called xxxx_0.1.png, and want to import it as an image in my document. I am using graphicx with the following command: \includegraphics[width=0.5\textwidth]{images/xxxx_0.1.png} and ...
11
votes
4answers
3k views

Inkscape → PDF → includegraphics → XeLaTeX → changed colors

I have an SVG file, which I have made/edited with Inkscape. I want to include this image in my thesis. The svg file is here: http://brussense.be/temp/theSVG.svg (because Inkscape uses a non-standard ...
11
votes
2answers
1k views

Suppress the processing of all images

I am trying to make a draft by forcing LaTeX to ignore all images. How do I tell LaTeX to suppress all the image filenames (in the \includegraphics command) and just insert an empty box? The problem ...
11
votes
4answers
5k views

LaTeX is putting a border around my figures

I'm trying to embed a few images in a figure, but LaTeX keeps putting a border around three of the sides. Is there any way for me to keep it from adding this border? The code that I used to create ...
11
votes
3answers
15k views

How to overlap images in a beamer slide?

I'm creating a beamer presentation. I want to make one frame that has a couple of images overlapped, like a stack of photos. Actually, I want something like this: .-----. | AAA | | AAA | '-----' ...
11
votes
2answers
1k views

Is there an advantage to using LaTeX graphics instead of eps or pdf?

Back in my first courses I learned that the best graphic format to use when plotting data with gnuplot (which will later be used in a LaTeX document) is eps (encapsulated postscript). I didn't really ...
11
votes
2answers
310 views

Can I conditionally scale an image with graphicx

In particular, when I include a graphic, I would like it to have width=\linewidth if it's width is greater than \linewidth, but I'd like it to have \scale=1 if it is smaller than the line width. In ...
11
votes
2answers
4k views

Path From and To Same Node in tikz Flowchart

I'm working on creating flowcharts directly inside LaTeX documents using tikz. I am admittedly an extreme novice with tikz, although I have quite a bit of experience using LaTeX. My problem is when ...
11
votes
4answers
476 views

Drawing picture from math's test

In Finnish matriculation examination there were the following problem. How can one draw those pictures using LaTeX? A square ABCD is in coordinate system such that AB is on the x-axis and A=(0,0), ...
11
votes
3answers
4k views

Using LaTeX to draw time series graphs and histograms

I have some graphs I drew in maple, some simple line plots and histograms. Now I'd like to redraw these graphs in LaTeX, so I can do fancy stuff in beamer like have one histogram appear, and then ...
11
votes
1answer
786 views

Creating Bezier surfaces using procedural graphics

Are there any package for LaTeX that can create Bezier surfaces? I mean a actual existing function that takes matrices as arguments and generates the surface, not a function written by myself.
11
votes
4answers
7k views

Scale (resize) large images (graphics) that exceed page margins

Background A large number of screen captures have been scaled 300% at 288dpi. They appear correctly when embedded in OpenOffice, but not LyX. Problem Images that do not extend beyond the margins ...
11
votes
2answers
25k views

Move a figure a bit right

I'm trying to place include a pdf figure in a beamer presentation. I'm using \begin{frame}{foo} \includegraphics[scale=0.6]{bar} \end{frame} the figure is always placed a bit too much to the ...
11
votes
3answers
450 views

Exam Class : With Question with images and border

I'm learning Exam Class to generate question paper. Sample tex code is mentioned below: \documentclass{exam} \usepackage{tikz} \newcommand*\circled[1]{\tikz[baseline=(char.base)]{ ...
11
votes
2answers
2k views

Macro for \textwidth, \textheight and keepaspectratio

I'm using many pictures within my beamer presentation. Somehow I'm tired of writing: \begin{figure} \includegraphics[width=0.8\textwidth,height=0.8\textheight,keepaspectratio]{source} ...
11
votes
2answers
1k views

Side brace around image with underbrace

I have an image and I want to put a side brace on the left and an underbrace on the bottom. The underbrace works fine, but the left becomes twice the image height for some reason. I'm sure the image ...
11
votes
3answers
246 views

Fit text to linewidth, shrinking only

I often have AVMs/tables that are just a bit too large and use \resizebox to fit everything in one line. Now, if the linewidth changes (switch from twocolumn to onecolumn) this results in enlarging ...
11
votes
4answers
799 views

Thumbnails of other frames in beamer

I would like to make a presentation with beamer, and have a few frames (at the start or the end) containing thumbnails of the other frames, hyperlinked to them, with something like 4x3 or 5x4 ...
11
votes
2answers
5k views

A3 pages within A4 doc

I'm writing my thesis and I'd like to insert A3 pages within my A4 document. Is it possible to place figures with captions (as normal) on those A3? I'm able to include full PDF pages which are A3 by ...
11
votes
1answer
218 views

Copyright issue, replace bitmaps by empty frame

I have a thesis to submit tomorrow as .pdf. The University requires written permission from the copyright holder for every figure taken from book/journal--a thing I don't have, and I didn't know was ...
11
votes
3answers
497 views

How to trim / clip / crop graphics without trial and error?

Often I include graphics with the trim option. Everytime I have to start a trial and error search for the right values. Is it possible to do it more straight forward?
11
votes
3answers
1k views

Print frames rather than boxes with demo/draft version of graphics/graphicx

I recently switched to demo such that I could compile my .tex file without needing the actual image files. Now, instead of the image there is a black box. Is there anyway to get a black border such ...
11
votes
8answers
2k views

What do people use for modifying figures?

I usually create figures for my articles in Matlab: various plots of numerical and analytical solutions. One thing that I don't like about it is that the font is different in the figure and in the ...
11
votes
1answer
1k views

How to produce Latex QR-Code (or in general 2d codes) as Vector graphic?

The pst-barcode package is great to produce bar-codes in all flavors. And it does 1d bar-codes like a charm. Also it is capable of generating 2d bar-codes with a command like this for a qrcode: ...
11
votes
1answer
286 views

Use images for drawing an arrow

Is it possible to draw arrows (preferential with TikZ) with two images: One for the line and one for the tip? I would like to realize something like this:
11
votes
2answers
3k views

Changing the working directory when including files in a subdirectory

I'm working on a mathematics magazine that involves multiple articles from different authors. I would like to give each article a sub-directory in which I can store all the relevant files - .tex, ...
11
votes
1answer
131 views

XeTeXpicfile in vertical mode

Given a minimal like \line{% \vtop{\hsize=.6\hsize Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse tempor lectus sit amet laoreet convallis. Quisque at est lacinia, porttitor ...
11
votes
1answer
210 views

How do I use same figure multiple times?

Is there a way to use same figure multiple times -- without reinserting it? That is I don't want to pay it's weigth several times in the output pdf file. I remember I saw someone telling adjustbox ...
11
votes
2answers
278 views

Creating a URL downloading command to be used with e.g. \includegraphics

We were just talking about an idea that may be a little further out there. Would it be possible to patch URL support into graphicx.sty or is there a package that would support this on a wider scale (I ...
11
votes
1answer
384 views

Using graphicx with invoice results in strange PDF output

I try to create an invoice with a logo in the background. But I get a strange result when I use graphicx and invoice in the same document. Here is my minimal example: \documentclass{scrlttr2} ...
11
votes
2answers
8k views

Put an image header in \documentclass{letter}

Is there is any possibility to put an image header in a letter class document? I can put a footer image and an image for my signature, but I want to put an image on the top of the letter.
11
votes
1answer
319 views

Telling Tikz/Tex to produce raster instead of vector in resulting PDF

I am using MikTeX and Tikz package to generate images (playing cards on A4 paper). The result is nice, but slow (too many vector objects, printing is hell slow). Is there a way to directly tell TeX ...
11
votes
1answer
124 views

Compile a LaTeX file ignoring missing EPS graphics

I am proofreading a paper for someone else. I have the .tex file but no EPS graphics files. I would like to make a PDF file to read the changes in text that I made, but I keep getting errors because ...
11
votes
5answers
7k views

Graphicspath for MikTeX

Is there a way to specify a \graphicspath that includes all sub-directories? I know I could put all my graphics in a texmf tree, but I'd like to have them in another directory tree. As far as I can ...
11
votes
1answer
66 views

Inline purified PostScript (MPS)

I just learned how to inline PDF code using the \pdfliteral command and that purified Encapsulated PostScript generated by METAPOST or purifyeps can be converted to PDF code by pdfLaTeX. However, I ...
11
votes
1answer
323 views

Drawing primitive shapes with TikZ

I want to draw this picture as a noob, the way I usually do (for all other images) is to painstakingly draw line by line and manually adjusting their coordinates to get the shapes I want. I have ...
11
votes
1answer
881 views

Embedding images with an encoding algorithm

Friends, sometimes I had to create a self-contained PHP script. That means the PHP script could have any files within it due to some encoding/decoding algorithm, like Base64. For example, this code is ...
11
votes
1answer
571 views

Resulting document size when Including a graphics file multiple times - pgf vs. graphicx

In his answer to the question Tikz: using external images as building blocks. Stefan Kottwitz says: The pgf way may be preferred if the document size matters and graphics are multiply used or if ...