Graphics, Figures & Tablesviewpoint option of includegraphics in xelatex

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
su5gut
Posts: 2
Joined: Fri Jul 30, 2021 5:19 am

viewpoint option of includegraphics in xelatex

Post by su5gut »

Dear Colleagues,

I am using xelatex and wishing using the following command to include pictures in my document and to do a little cutting and composing operations

\includegraphics[clip=true,viewpoint=0 0 500 300]{exPict.png}

But I always get notices ``Package keyval Error: viewpoint undefined''.

Can anyone give me a way out? The following is my full illustrating file. It can be processed properly when delete the "viewpoint=0 0 500 300" option.

Code: Select all

 %!TEX encoding = UTF-8 Unicode 
 %!TEX TS-program = xelatex
 \documentclass[10pt,mathserif]{beamer}
 \usepackage{graphics}
 \begin{document}
 \begin{frame}{}
 \includegraphics[totalheight=60mm,clip=true,viewpoint=0 0 500 300]{exPict.png}
 \end{frame}
 \end{document}
Last edited by Stefan Kottwitz on Fri Jul 30, 2021 9:58 am, edited 1 time in total.
Reason: code marked

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Bartman
Posts: 369
Joined: Fri Jan 03, 2020 2:39 pm

viewpoint option of includegraphics in xelatex

Post by Bartman »

Next time please build a Infominimal working example and use the code block so we can test it.

beamer already loads graphics by loading graphicx.

I conclude from the similar name of the option and its assignment that you want to use the viewport option. A look into the manual can be enlightening.
su5gut
Posts: 2
Joined: Fri Jul 30, 2021 5:19 am

viewpoint option of includegraphics in xelatex

Post by su5gut »

deep thanks to Bartman. It is a really stupid error!

Yes, when I change "viewpoint" to "viewport", everything goes properly
Post Reply