0

I would like to be able to call in a rectangular image into Latex and have it appear as a parallelogram instead of a rectangle.

For instance,

\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{minipage}[]{\textwidth}
  \centering
  \includegraphics[width=0.45\textwidth]{example-image}    
\end{minipage}
\end{document}

produces the rectangular image

enter image description here

QUESTION: How may I have it appear as a parallelogram inclined slightly to the right (say, base angles 85 degrees and 95 degrees, respectively) with the lengths of the corresponding sides the same as that of the rectangle?

Something like this:

enter image description here

Thank you.

DDS
  • 8,816
  • 4
  • 9
  • 36
  • 2
    Does the answer to this question help? The \slantbox will give a parallelogram with width as the base and height as the vertical height, not the side length. – Willoughby Mar 31 '21 at 20:03
  • @Willoughby I had looked at that before posting my question. However, it seems that the answers are not directly related to a pre-existing image; but rather, for instance, one that is being produced on the spot. But thank you for your comment. – DDS Mar 31 '21 at 22:22
  • @mlchristians would u like to add a hand sketch of the desired output – js bibra Apr 01 '21 at 00:06
  • @Willoughby I just modified the question to include a hand-drawn sketch. Thank you. – DDS Apr 01 '21 at 00:39
  • @Willoughby's link has this answer, the second example of which involves loading an external image (in png format) and slanting it using TikZ. – Willie Wong Apr 01 '21 at 01:05
  • @Willie Wong Thank you for pointing out the second example which imports an external image. I am unfamiliar with much of the syntax---but have begun to play around with it to see what it does. – DDS Apr 01 '21 at 02:53
  • Yes. My comment was generated automatically because I voted to close the question because it's a potential duplicate. Sorry for the confusion. – Dr. Manuel Kuehner Apr 01 '21 at 03:32

0 Answers0