文本与图形对齐

文本与图形对齐

帮助,我需要将文本与图形对齐,就像图片中那样 在此处输入图片描述 在此处输入图片描述

\usepackage[utf8]{inputenc}
\usepackage[spanish]{babel}
\usepackage{parskip}
\usepackage{amsmath}
\usepackage{geometry}
\geometry{top=2cm, bottom=2cm, left=4.4cm, right=4.4cm}
\usepackage{setspace}
\usepackage{enumitem} 
\usepackage{siunitx} 
\sisetup{detect-family,per-mode = symbol}
\spanishdecimal{.} 
\usepackage{tikz,pgfplots} 
\pgfplotsset{compat=1.18}
\usetikzlibrary{arrows.meta}



\title{E7}
\author{Ing. Luque }
\date{\today}

\begin{document}

\maketitle

\section{Enunciado}

\LARGE
La gráfica corresponde al movimiento uniformemente acelerado que realiza un cuerpo. En el intervalo desde $x=0$ hasta $x=\SI{4}{\metre}$, podemos afirmar\\

\begin{figure}[h!]
\LARGE
    \centering
    \begin{tikzpicture}
    
    \begin{axis}[x=1cm, xtick distance = 1, y=1cm, ytick distance = 1,xmin=0,xmax=4.8,ymin=0,ymax=4.8,axis x line =center, axis y line =center,xlabel=$X(\si{\metre})$,ylabel=$V^{2}(\si{\metre\squared\per\second\squared})$, x label style={at={(ticklabel* cs:1.2)}},y label style={at={(ticklabel* cs:1.1)}},
    axis line style={-{Stealth[scale=1.2]}}]
    \addplot[very thick, samples=200, domain=0:4]{4-x};

    
    \end{axis}

    \end{tikzpicture}
    
\end{figure}

\begin{enumerate}[label=\Alph*),align=parleft,leftmargin=*]
    \item nula.
    \item \SI{4}{\second}.
    \item No se puede
    \item \SI{8}{\metre\per\second}.
    \item \SI{2}{\metre\per\second\squared}.

\end{enumerate}

\end{document}

答案1

您可以minipages并排使用两个,调整它们的宽度以适合您的内容。

如果你想对齐使用

\begin{minipage}[t][][b]{<width>}

左侧和右侧(第二张图)

A

b

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[spanish]{babel}
\usepackage{parskip}
\usepackage{amsmath}
\usepackage{geometry}
\geometry{top=2cm, bottom=2cm, left=4.4cm, right=4.4cm, showframe}% changed to show the margins<<<
\usepackage{setspace}
\usepackage{enumitem} 
\usepackage{siunitx} 
\sisetup{detect-family,per-mode = symbol}
\spanishdecimal{.} 
\usepackage{tikz,pgfplots} 
\pgfplotsset{compat=1.18}
\usetikzlibrary{arrows.meta}

\title{E7}
\author{Ing. Luque }
\date{\today}

\begin{document}
    
    \maketitle
    
    \section{Enunciado}
    
    \LARGE
    La gráfica corresponde al movimiento uniformemente acelerado que realiza un cuerpo. En el intervalo desde $x=0$ hasta $x=\SI{4}{\metre}$, podemos afirmar \bigskip
            
    \begin{minipage}{0.45\linewidth}
        \begin{enumerate}[label=\Alph*),align=parleft,leftmargin=*]
            \item nula.
            \item \SI{4}{\second}.
            \item No se puede
            \item \SI{8}{\metre\per\second}.
            \item \SI{2}{\metre\per\second\squared}.                
        \end{enumerate}
    \end{minipage}\hfill
    \begin{minipage}{0.55\linewidth}
        \begin{tikzpicture} 
            \begin{axis}[x=1cm, xtick distance = 1, y=1cm, ytick distance = 1,xmin=0,xmax=4.8,ymin=0,ymax=4.8,axis x line =center, axis y line =center,xlabel=$X(\si{\metre})$,ylabel=$V^{2}(\si{\metre\squared\per\second\squared})$, x label style={at={(ticklabel* cs:1.2)}},y label style={at={(ticklabel* cs:1.1)}},
                axis line style={-{Stealth[scale=1.2]}}]
                \addplot[very thick, samples=200, domain=0:4]{4-x};             
            \end{axis}          
        \end{tikzpicture}
    \end{minipage}  

    \newpage 
    
    \begin{minipage}[t][][b]{0.45\linewidth}
    \begin{enumerate}[label=\Alph*),align=parleft,leftmargin=*]
        \item nula.
        \item \SI{4}{\second}.
        \item No se puede
        \item \SI{8}{\metre\per\second}.
        \item \SI{2}{\metre\per\second\squared}.                
    \end{enumerate}
    \end{minipage}\hfill
    \begin{minipage}[t][][b]{0.55\linewidth}
        \begin{tikzpicture}         
            \begin{axis}[x=1cm, xtick distance = 1, y=1cm, ytick distance = 1,xmin=0,xmax=4.8,ymin=0,ymax=4.8,axis x line =center, axis y line =center,xlabel=$X(\si{\metre})$,ylabel=$V^{2}(\si{\metre\squared\per\second\squared})$, x label style={at={(ticklabel* cs:1.2)}},y label style={at={(ticklabel* cs:1.1)}},
                axis line style={-{Stealth[scale=1.2]}}]
                \addplot[very thick, samples=200, domain=0:4]{4-x};             
            \end{axis}          
        \end{tikzpicture}
        \end{minipage}
        
\end{document}

相关内容