Bu using the default positioning of an image inserted with \includegraphics, from the graphicx package, an image following some text (not a new line) is aligned in such a way that it sticks out from the top, and the bottom of the text line is aligned with the image's bottom border, as you can see in the image below:

image aligned inconveniently

I would rather like the image to stick out from the bottom, in such a way that the top of the text line (in this case, "Question #2") be aligned with the top border of the image.

How do I achieve this effect using only the graphicx package and \includegraphics command, and nothing else, if possible? Excuse me for this imposed limitation. This is for homework, and I don't have the time to wrap my head around something like TikZ for now.

Here's a MWE, where I just stripped everything from my document but Question #2 and the command definitions and packages required to make it compile successfully (look at the line that starts with \includegraphics under the "body" header):

\usepackage[letterpaper, top = 0.5in, bottom = 1in, left = 0.5in, right = 0.5in]{geometry}

% ===== for math =====

% ===== for question numbering =====

% ===== for graphics, including images and plots =====
\graphicspath{ {./images/} }

% ===== body =====
 \begin{enumerate}[label=\textbf{Question \#\arabic*}, align=left, leftmargin=*]
  \item % Question #2
  \begin{enumerate}[label=\textbf{(\alph*)}]\item{ % (a)
  \Given graph\\
  \Required \( \lim\limits_{x\to3^-}{f(x)} \)\\
  \Statement \( \lim\limits_{x\to3^-}{f(x)} = 1 \)
  \item{ % (b)
  \Required \( \lim\limits_{x\to3^+}{f(x)} \)\\
  \Statement \( \lim\limits_{x\to3^+}{f(x)} = -2 \)
  \item{ % (c)
  \Required \( \lim\limits_{x\to3}{f(x)} \)\\
  \( \lim\limits_{x\to3^-}{f(x)}\neq\lim\limits_{x\to3^+}{f(x)} \)\\
  \( \therefore\lim\limits_{x\to3}{f(x)}\DNE \)\\
  \Statement\( \lim\limits_{x\to3}{f(x)}\DNE \)
  }\end{enumerate} % end alpha
 \end{enumerate} % end question numbering

Here's question2.pdf, for testing purposes.

  • Use \raisebox to move the picture down. Or use the adjustbox package. Feb 2, 2023 at 7:19
  • @UlrikeFischer Thanks for your comment! Can you show me a small sample of code so I can see how that \raisebox function works in my context? Thank you again.
    – GPWR
    Feb 2, 2023 at 12:49
  • sure, it you provide some small sample of code (a "Minimal Working Example", MWE) that I can use to insert and test my code. tex.meta.stackexchange.com/q/3343/2388 tex.meta.stackexchange.com/q/228 Feb 2, 2023 at 12:53
  • @UlrikeFischer Thank you for your comment. I edited my question to include a MWE.
    – GPWR
    Feb 3, 2023 at 17:06
  • I can't compile that as I don't have question2.pdf. Please test such a example in a new, empty folder to avoid to have local dependencies. Feb 3, 2023 at 17:14

1 Answer 1

 \begin{enumerate}[start=2,label=\textbf{Question \#\arabic*}, align=left, leftmargin=*]
  \item % Question #2
  more text

enter image description here

  • That solves it perfectly. I appreciate it greatly, and I wish you a great day. Thanks for your time.
    – GPWR
    Feb 3, 2023 at 17:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .