latex - 在逐项 LaTex 中对齐图形和文本
问题描述
我正在尝试使用latex中的“itemize”功能来说明一些图标,左侧的图标和右侧的解释,两个问题1)左图与右文本不对齐,文本总是低于图。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
的export
选项允许您访问valign
within \includegraphics
,您可以在其中指定您所包含的图像相对于周围文档元素的v
位置。align
你最有可能在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}
推荐阅读
- python - 如何*不*在 Windows 中使用 python/anaconda 拥挤您的用户文件夹?
- kernel - 有没有办法使用内核驱动程序来挂钩 winhttp
- javascript - 为什么 onclick 事件中的 css 更改不会持续存在?
- typescript - 根据需要创建类型
- python - 除非常非常小的数字的意外结果(在 Python 和 JavaScript 中)
- r - 根据字符向量分配一组向量(自动化代码)
- python - 在 Pytorch 中为子张量赋值
- r - 使用 rvest 进行网页抓取时,如何在每个 html 换行标记处将字符串分解为列的元素?
- arrays - 如何根据对数公式连接数组
- ubuntu - Pentaho 9.1 CE 服务器 - MySQL 错误时间戳