我是 LaTex 编码新手,所以请耐心等待 ;) 只要有人问到这种问题就告诉我。我有一些图表想放在我的 LaTeX 文档中,我希望它们尽可能大以便能够看到细节(因此,它们的宽度至少为 1)。为了描述它们,我希望在它们旁边有一些文字。图像和文本应该占据整个页面(也应该忽略边距)。我到目前为止尝试过:
- 两个小页面 + 逐项列出(这并不令人满意,因为小页面没有考虑页面的大小(所以我的关键点被切断了)并且我在小页面之间丢失了一些空间
但无法按我想要的方式对齐
floatrow 并尝试将关键点写入标题;我也无法对齐它(图像只是浮动在页面外的某个地方)
图形和子图形将其正确放入标题中,但无法将所有图像放在彼此之上并在其旁边写上标题。
\documentclass{article}
\usepackage{graphicx}
\usepackage[a4paper, top=2cm]{geometry}
\usepackage{arydshln}
\usepackage{booktabs}
\usepackage{bbding}
\usepackage{caption}
\usepackage{lipsum}
\usepackage{wrapfig}
\usepackage{fullpage}
\usepackage[utf8x]{inputenc}
\usepackage[english]{babel}
\usepackage{xcolor}
\usepackage{csvsimple}
\usepackage{subcaption}
\begin{document}
\begin{minipage}{0.8\textwidth} %this cuts off my points
\includegraphics[width=1\textwidth]{image.png}
\end{minipage}
\begin{minipage}{0.8\textwidth}
\begin{itemize}
\item
\end{itemize}
\end{minipage}
\begin{figure}[h] %this is on one another and the text is below it
\begin{minipage}{1\textwidth}
\includegraphics[width=1\textwidth]{image.png}
\end{minipage}
\begin{minipage}{1\textwidth}
\includegraphics[width=1\textwidth]{image.png}
\end{minipage}
\end{figure}
Some text that should be right or left next to it or around bit is above
\begin{wrapfigure}{l}{0.6\textwidth}
\vspace{-20pt}
\centering
\includegraphics[width=0.8\textwidth]{image.png} \vspace{-20pt}
\vspace{-10pt}
\end{wrapfigure}
\end{document}
我根本不关心解决方案,只要它对我有用就行
答案1
和wrapfigure
?
\documentclass{article}
\usepackage[a4paper, margin=2cm]{geometry}
\usepackage[demo]{graphicx}
\usepackage{caption}
\usepackage{wrapfig}
%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%
\usepackage{lipsum}
\begin{document}
\begin{wrapfigure}[11]{l}{0.6\textwidth}
\centering
\includegraphics[width=\linewidth]{image.png}
\caption{My wrapped figure}
\end{wrapfigure}
\lipsum[1-2]
\end{document}
或者在图像的正确尺寸上列出一些描述:
\documentclass{article}
\usepackage[a4paper, margin=2cm]{geometry}
\usepackage[demo,
export]{adjustbox}
\usepackage[skip=1ex]{caption}
\usepackage{tabularx}
%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\begin{table}[ht]
\begin{tabularx}{\linewidth}{XX}
\includegraphics[width=\linewidth, valign=T]{image.png}
& \begin{itemize}
\item some text some text some text some text some text some text some text
\item some text some text some text some text some text some text some text
\item some text some text some text some text some text some text some text
\end{itemize} \\
\caption{Figure with description on the right side}
&
\end{tabularx}
\vspace{-\baselineskip}
\end{table}
\lipsum[2]
\end{document}
(在机器人示例中,红线显示页面布局/文本边框)
编辑:
- 图像的宽度由第一列(左列)的宽度决定
- 您可以通过两种方式更改列宽:
- 当第二列是列表时(如上面的 MWE 中所示,则使用
p{...}
列,例如:
- 当第二列是列表时(如上面的 MWE 中所示,则使用
\begin{tabularx}{\linewidth}{Xp{0.4\linewidth}}
- 当第二列包含普通文本时,您可以确定列宽,例如:
\begin{tabularx}{\linewidth}{>{\hsize=0.8\hsize}X
>{\hsize=1.2\hsize}m{0.8\linewidth}}
\includegraphics[width=\linewidth, valign=c]{image.png} % <---
& \lipsum[66] \\