![将图片与文本对齐](https://linux22.com/image/427198/%E5%B0%86%E5%9B%BE%E7%89%87%E4%B8%8E%E6%96%87%E6%9C%AC%E5%AF%B9%E9%BD%90.png)
我需要在文本中放置一所大学的徽标,但使用该命令时无法对齐\newtheorem
。我尝试使用该\hspace
命令,但不起作用。对于没有定理、命题等的文本,图形是对齐的。我的代码:
\documentclass[a4paper,12pt]{article}
\usepackage[pctex32]{graphics}
\usepackage{ amsmath, amsfonts}
\usepackage[brazil]{babel}
\usepackage[utf8]{inputenc}
\usepackage{amssymb, amsmath, amsthm}
\usepackage{graphicx}
\usepackage{float}
\newtheorem{theorem}{Teorema}
\begin{document}
\begin{minipage}{0\linewidth}
\begin{figure}[H]
\includegraphics[scale=0.25]{logoUTFPR}
\end{figure}
\end{minipage}
\begin{minipage}{\linewidth}
\begin{center}
\textbf{Roteiro de Atividades\\
Professor Mateus Eduardo Salomão}
\end{center}
\end{minipage}
\begin{theorem}[Teorema de]
Seja $f$
\end{theorem}
\end{document}
答案1
编辑:
第一次尝试时我误解了您的问题。现在已更正。您只需要插入noindent before first
minipage and use
raggedright` 以在其中放置图形。
顺便说一句:你永远不应该将浮动 figure
(或table
)封闭在小页面或类似的框内。
\documentclass[a4paper,12pt]{article}
%\usepackage[pctex32]{graphics}
%\usepackage[utf8]{inputenc}
\usepackage[brazil]{babel}
\usepackage{amsmath, amssymb, amsthm}
\usepackage{graphicx}
\usepackage{float}
\newtheorem{theorem}{Teorema}
\begin{document}
\noindent\begin{minipage}{0.3\linewidth}
\raggedright
\includegraphics[width=0.8\linewidth]{example-image-duck}%{logoUTFPR}
\end{minipage}%
\begin{minipage}{0.7\linewidth}
\centering
\textbf{Roteiro de Atividades\\
Professor Mateus Eduardo Salomão}
\end{minipage}
\begin{theorem}[Teorema de]
Seja $f$
\end{theorem}
\end{document}