1

I am currently using this but the matrix is too much to the right. I want to shift it up and to the left without changing textwidth.

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{amsmath}
\begin{document}
\begin{figure}
    \centering
    \begin{minipage}{.5\textwidth}
        \centering
        \includegraphics[scale=0.5]{k3.png}
\caption{Fig 3}
\label{fig:Fig 3}
    \end{minipage}%
    \begin{minipage}{\textwidth}
        \begin{equation*}
{p} = 
\begin{bmatrix}
0 \\
\alpha_{1,2} \alpha_{1,3}  \\
(\alpha_{1,2}+ \alpha_{2,3})\alpha_{1,3}  \\ 
\end{bmatrix}
=
\begin{bmatrix}
p_{v_1} \\
p_{v_2} \\
p_{v_3} \\
\end{bmatrix}
\end{equation*}
\end{minipage}
\end{figure}
\end{document}
  • Welcome to TeX.SX! – Bobyandbob Oct 7 '17 at 22:21
  • I've taken the liberty of transforming your code snippet into a compilable MWE (minimum working example). – Mico Oct 8 '17 at 0:00
1

after repairing of inconsistency in your code and correct all errors (missing code lines), i obtain:

enter image description here

(red lines indicate text borders). is this what you looking for?

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{amsmath}

%-------------------------------- show page layout, only for test
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%

\begin{document}
    \begin{figure}
\begin{minipage}{.5\textwidth}
    \centering
    \includegraphics[scale=0.5]{k3.png}
\caption{Fig 3}
\label{fig:Fig 3}
\end{minipage}%
\begin{minipage}{0.5\textwidth}
\[
{p} =
\begin{bmatrix}
0 \\
\alpha_{1,2} \alpha_{1,3}  \\
(\alpha_{1,2}+ \alpha_{2,3})\alpha_{1,3}
\end{bmatrix}
=
\begin{bmatrix}
p_{v_1} \\
p_{v_2} \\
p_{v_3}
\end{bmatrix}
\]
\end{minipage}
    \end{figure}
\end{document}

or with use tabularx instead of minipage:

enter image description here

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{amsmath}
\usepackage{tabularx}

%-------------------------------- show page layout, only for test
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%

\begin{document}
    \begin{figure}
\renewcommand\tabularxcolumn[1]{m{#1}}
\begin{tabularx}{\textwidth}{XX}
    \centering
    \includegraphics[width=\linewidth]{k3.png}
&
\[
{p} =
\begin{bmatrix}
0 \\
\alpha_{1,2} \alpha_{1,3}  \\
(\alpha_{1,2}+ \alpha_{2,3})\alpha_{1,3}
\end{bmatrix}
=
\begin{bmatrix}
p_{v_1} \\
p_{v_2} \\
p_{v_3}
\end{bmatrix}
\]      \\
\caption{Fig 3}
\label{fig:Fig 3}
&
\end{tabularx}
    \end{figure}
\end{document}
  • @Mico, i thought about this option, but then left as op selected because to me unknown reason. i will correct this as you suggested – Zarko Oct 8 '17 at 0:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.