{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)

10
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} ...
10
votes
1answer
316 views

How to know the number of pages in a PDF file?

I use graphicx to include pages of a PDF file. I want to know in LaTeX how many pages are in the file. How to do this?
10
votes
2answers
535 views

A Tunisian flag on Tikz using a macro “m-grams”

I tried to represent the flag of my country. I typed this code. But I believe that the position of stars, circles, ... is not so respected. In addition I have a left margin "white band" I want to ...
10
votes
2answers
1k views

Set standard default scaling of \includegraphics

I am using Sphinx and the plantuml package to include UML diagrams. The plantuml package for Sphinx generates the following LaTeX code: \includegraphics{%s} Anyways - the diagrams are to big, so ...
10
votes
1answer
402 views

Placing graphics inside figure captions

Similar to putting a tikzpicture inside a \caption{}, I would like to insert an external icon inside figure captions, something like: \begin{figure} \caption{text with \includegraphics{icon} ...
10
votes
2answers
147 views

How I could add an image in the bottom of pages of my document

Hello! In the picture you can see the bottom of pages 2-7 of one document that I found. I would like to apply the same format in my document and I would like your help. As you can see the document ...
10
votes
1answer
314 views

Can you embed an image so it doesn't need to be stored as a separate file?

I'd like to know whether it is possible to embed an image file into LaTeX code, such that the picture will appear in a resulting PDF file without it having to be stored in a separate .eps file during ...
10
votes
2answers
4k views

Two images to fill one beamer frame: most appropriate method?

Suppose I have two images: one a solid blue square and another a yellow. What is the most appropriate way to divide and fill an entire beamer frame with these images? Horizontally (i.e., left half ...
10
votes
3answers
1k views

How do I include a click-to-zoom thumbnail picture in a non-beamer document?

The Beamer class for presentations provides a way (using the \framezoom command) to include a picture in the document on which one can click to zoom in, and then zoom back out with another click. How ...
10
votes
1answer
345 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} ...
10
votes
1answer
1k views

Use \setkeys{Gin} to set default scale value doesn’t work

I’d like to make all my graphic a little smaller and tried to set the scale-value of \includegraphics globally with \setkeys{Gin} but while changing width works fine scale has no effect. ...
10
votes
1answer
1k views

Kindly explain use of framezoom in beamer

I want to use framezoom to zoom in on India in this map. How can I do it? Can someone explain in a simple language (non-technical) the use of \framezoom function in beamer?
10
votes
1answer
107 views

How to include icons in table?

Question I want a table with little icons on the left and corresponding descriptive text on the right. However, LaTeX seems to make this as painful as getting your teeth pulled out, and my current ...
10
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: ...
10
votes
2answers
7k 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.
10
votes
1answer
1k views

Embedding MetaPost in LaTeX document

I have problem using the emp package in TeXlive 2010. When I try to use it with empcmds it prints contents to output. If I use emp it parser fails after first character. Also - how should I import ...
10
votes
1answer
282 views

Adding dimensions to TikZ pictures

How do you add dimension labels to TikZ pictures? Ideally, it would look something like this: |<----- dimension ----->| I would like to do this to show the measurement of both straight lines ...
10
votes
1answer
208 views

Table-aligned, randomized, repeatingly smaller icons for eyesight-chart

My daughter needs to train her eyesight in accordance to the LEA eyesight chart tests. I have manually created a new chart for her, but it really takes a long time randomzing the four icons and ...
10
votes
1answer
1k views

How to align picture top left in a table?

is there a way to create a table with 2 columns, in the left column should be some text, in the right column should be a picture. The problem is - to align both to the left, top corner. The image ...
10
votes
1answer
668 views

Images off the page in multicols environment

Before my question, some background information. I’ve created an algorithm (not latex) which will generate a catalog for a collection of books dynamically. A user supplies information to query an SQL ...
10
votes
1answer
305 views

Is it possible to frame text using a graphic border

I've got a document where in a few cases I'm using the framed package and a single \begin{framed} <text> \end{framed} to visually separate text that is something akin to commentry on the main ...
10
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 ...
10
votes
2answers
1k views

Correct way to distribute/embed an image in a LaTeX package/document?

I am creating a new document class that needs to render an image (e.g., a logo) on the title page. What is the correct way to distribute image with the class? Should the image file be distributed ...
10
votes
1answer
608 views

Redefine memoir Part to allow image

I am preparing a book with memoir. The book has three parts. I would like to have the Part title raised and to insert an image directly below the title. I am able to raise the Part title to the upper ...
10
votes
1answer
475 views

Reusing an image without duplicating it

PGF has a nice feature, declaring an image and re-using it again and again. With a PDF backend, it reduces the size of the output, as the image is embedded in the file only once. However, the PGF ...
10
votes
1answer
553 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 ...
10
votes
1answer
167 views

Random number without repetition in an \includegraphics

I have 58 images in PDF format. At the moment, each of them is in a separate PDF, such as 1.pdf, 2.pdf etc. I would like to include those 58 images in a random order without repetition. I found the ...
10
votes
1answer
872 views

Two column layout with text and knitr chunk

When making presentations (with latex beamer class), I often go for a frame layout with text and equations on the left and a corresponding figure on the right. My standard solution has been to wrap ...
10
votes
1answer
523 views

graphics - dynamic image placement

This is a follow up to my post here: Graphics - Images off the page in multicolumn environment Using C#, XML, SQL, and LaTeX, I've managed to create a system which retrieves database information and ...
10
votes
1answer
397 views

Change on click in beamer

Is the following possible using the beamer class: You have two images image1.jpg and image2.jpg You define two "clickable" areas (a1 and a2) of your frame which you can overlay by an picture or ...
10
votes
1answer
1k views

Include trimmed multipage PDF in XeTeX

I have a multipage PDF manuscript (for example, my_PDF.pdf) that I would like to include in a new document. I would also like to trim/clip off the header and footer from each page of this included ...
10
votes
1answer
22k views

LaTeX Error: Cannot determine size of graphic in title.png (no BoundingBox)

I seem to be getting a strange error after updating MiKTeX 2.9. I am using pdfLaTeX and TeXmaker with the graphicx package to include .png images. When I try to compile, I get the error LaTeX Error: ...
9
votes
5answers
758 views

How can I clip an image via a bezier-path?

I have a rectangular image that I can not change. I'd like to clip the image with a bezier path so I get one that is rectangular at the top and the sides but has a curve at the bottom, preferable ...
9
votes
3answers
18k views

set a maximum width and height for an image

I would like to define a maximum height and a maximum width for an image at same time. I suppose there must be a package to do this, but actually I'm unable to find it...
9
votes
3answers
1k views

University's logo

How to put the logo before the date and after my name in the title? I write it as \begin{document} \title{} \author{} \titlepic{ \includegraphics[width=0.5\textwidth]{logo} \date{} but ...
9
votes
5answers
394 views

How to fill the limits of the two curves?

I want to fill the limits of the two curves (as shown). This is my code \documentclass[10pt]{article} \usepackage{pgf,tikz} \usetikzlibrary{arrows} \pagestyle{empty} \begin{document} ...
9
votes
6answers
498 views

Compiling a document to input more than 100 image files

What I want to achieve is to compile a document of pictures in .jpg format into a pdf file. The problem is that I would not want to input all the files one by one. The files follow a pattern in there ...
9
votes
3answers
936 views

Convert PNG image to TikZ code

I am trying to convert this image here into a somewhat clean TikZ code Now I downloaded potrace, and tried to convert the image to an eps, and then to use inkscape to convert it into TikZ code. ...
9
votes
2answers
635 views

Using an image as a table

I have an image containing tabular data and would not like to convert this to a real table. What I do want is for this image to have a proper caption and be included in the listoftables. Is it ...
9
votes
2answers
685 views

How to compose figure from text with latex?

I have an ascii image like +--------------- | xxxxxxx +--------------- | xxxxxxx +--------------- I want to show this in figure environment. So currently I try like this: \begin{figure} ...
9
votes
2answers
287 views

How to detect if in an exercise environment?

I found in How to use figure inside a exercise environment? that I can't use begin{figure} ... \end{figure} in an exercise environment. I also found situations where avoiding the use of such floats ...
9
votes
3answers
291 views

Inserting an image properly in a table

I'd like to insert those lines that from "Foo" point to the four different rows in the table. I've tries inserting an image but it doesn't come out right (please ignore the bad quality of the ...
9
votes
3answers
11k views

How to pause figures in beamer

I would to \pause two different images (as I can to do with text). This is the ideal code: \documentclass{beamer} \usetheme{Copenhagen} \setbeamercovered{dynamic} \begin{document} \begin{frame} ...
9
votes
2answers
341 views

Framed box, over framed text with image

Hi all, I'm a newby in LaTeX but after researching online, I have seen that it is possible to create boxes and frames adjusted to text and images. I am trying to achieve something like the image, ...
9
votes
2answers
500 views

TeX4ht: \includegraphics[page=10]{foo.pdf}

I have a long LaTeX document with lots of figures that were included using commands of the form \includegraphics[page=10]{foo.pdf} Everything compiles fine with pdfLaTeX. I planned to convert the ...
9
votes
2answers
636 views

Step-pyramid in LaTeX

How can I generate a step-pyramid in LaTeX? I'm guessing I would use a graph module to centre chart bars... I want to be able to select the length of each "row" of the pyramid, and show that number ...
9
votes
3answers
3k views

How to refer a figure as a table?

I have a question regarding LaTeX .. I have a table from an excel file which I print screened and posted as a figure in LaTeX. However, I want to make it a table. Problem is, the particular table has ...
9
votes
2answers
5k views

How to use \graphicspath?

I am using MikTex 2.9 and TeXstudio for my TeX preparation. I want to give a path to my figures folder containing all the figures, plots etc. required for my work. I used \graphicspath to give the ...
9
votes
3answers
603 views

how to make a cog/gear in LaTeX?

I was wondering what would be a good way to make this in LaTeX. Basically, what I want to do with this is use it as a chapter heading. So basically it will be something like this: cog chapter # ...
9
votes
2answers
357 views

How to use a macro inside \includegraphics options?

I have to do several figures like this: \begin{figure}[h!] \centering \includegraphics[trim = 9.55cm 1.8cm 10.25cm 4.05cm, ...