简体   繁体   English

对齐项目LaTex中的图和文本

[英]align the figure and the text in itemization LaTex

I am trying to use "itemize" function in latex to illustrate some icons, icons on the left and explanations on the right, two problems 1)left figure not align up with the right text, text always lower than the figure.我正在尝试在Z25F7E525B5C0641E1EB1FB3BDEBEB15B5Z中使用“itemize”function来说明一些图标,左边的图标和右边的解释,两个问题1)左图与右图不对齐,文字总是低于图。 2)the whole items block is too close to the left edge, add left space for the whole itemize block? 2)整个items块太靠近左边缘,为整个itemize块添加左边的空间?

\begin{itemize}

    \item[{\includegraphics[width=7em]{ui_t_1.jpg}}] \textbf{Home}\\ Select to go to the Main Menu screen.\\
    \item[{\includegraphics[width=7em]{ui_t_2.jpg}}] \textbf{History}\\ Select to check the running history.\\
    \item[{\includegraphics[width=7em]{ui_t_3.jpg}}] \textbf{System}\\ Select to set up the system parameters.\\
    \item[{\includegraphics[width=7em]{ui_t_4.jpg}}] \textbf{Log Off}\\ Select to log off or shut down the system.\\
\end{itemize}

adjustbox 's export option allows you access to valign within \includegraphics , where you can specify the v ertical align ment of the image you're including with respect to surrounding document elements. adjustboxexport选项允许您访问\includegraphics中的valign ,您可以在其中指定所v的图像相对于周围文档元素的垂直align方式。 You're most likely after valign=c .您最有可能在valign=c之后。

在此处输入图像描述

\documentclass{article}

\usepackage[export]{adjustbox}

\begin{document}

\begin{itemize}
  \item[{\includegraphics[width=2em,valign=B]{example-image-a}}] \textbf{Home}
  
  Select to go to the Main Menu screen.
  
  \item[{\includegraphics[width=2em,valign=c]{example-image-b}}] \textbf{History}
  
  Select to check the running history.
  
  \item[{\includegraphics[width=2em,valign=t]{example-image-c}}] \textbf{System}
  
  Select to set up the system parameters.
  
  \item[{\includegraphics[width=2em,valign=c]{example-image}}]  \textbf{Log Off}
  
  Select to log off or shut down the system.
\end{itemize}

\end{document}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM