图片右对齐但标题不靠右

2019-12-09 16:42发布

\documentclass[]{article}\usepackage{caption,graphicx}%opening\begin{document}\begin{figure}[htbp] ...

\documentclass[]{article}
\usepackage{caption,graphicx}
%opening

\begin{document}


\begin{figure}[htbp]
\flushright
\includegraphics[width=2.in]{111.png}
\caption{}
\label{yyhdj}
\end{figure}

\end{document}

1条回答
论坛 github.com/C
2019-12-09 17:45
```tex \documentclass{article} \usepackage{graphicx} \usepackage{mwe} \usepackage{caption} \captionsetup[figure]{singlelinecheck=off, justification=raggedleft} \begin{document} \begin{figure}[htbp] \flushright \includegraphics[width=2in]{example-image} \caption{} \end{figure} \end{document} ``` 参考资料,`caption` 宏包文档,sec. 2.2。 ------ 另:源码请放在代码块中,用法见 https://wenda.latexstudio.net/q-1474.html 。

一周热门 更多>