Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a document. This is my code

\documentclass[a4paper, 12pt]{article}
\usepackage{fouriernc}
\usepackage{amsmath,amsfonts,enumerate,tabularx,calrsfs,esvect, multicol}
\usepackage{graphics}
\usepackage[left=15mm,right=20mm,top=15mm,bottom=10mm]{geometry}
\usepackage[thmmarks,standard,thref]{ntheorem}
\usepackage{pgf,tikz}
\usetikzlibrary{arrows}
\pagestyle{empty}

\theoremseparator{.}
\theorembodyfont{\upshape}
%\theorembodyfont{\normalfont}
\newtheorem{pro}{Problem}
\renewcommand{\baselinestretch}{1.5}
\begin{document}

\thispagestyle{empty}
\begin{pro}
Solve  the following equations:
\begin{enumerate}[\quad 1)]
\item $\dfrac{\cos^2 2x}{\cos x + \cos\dfrac{\pi}{4}} = \cos x - \cos\dfrac{\pi}{4}$;
\item $\dfrac{\cos^2 2x}{\cos x + \cos\dfrac{\pi}{4}} = \cos x - \cos\dfrac{\pi}{4}$;

\item $(\sqrt{3}\sin x + 2\cos x)\cdot (1 - \cos x) = \sin^2 x$.
\end{enumerate}
\end{pro}


\begin{pro}
\begin{minipage}[b]{0.3\textwidth}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\clip(-0.5,-0.5) rectangle (4.3,4.5);
\draw (0,0)-- (4,0);
\draw (4,0)-- (2,3.46);
\draw (2,3.46)-- (0,0);
\begin{scriptsize}
\fill [color=black] (0,0) circle (1.5pt);
\draw[color=black] (-0.03,-0.19) node {$B$};
\fill [color=black] (4,0) circle (1.5pt);
\draw[color=black] (4.1,-0.19) node {$C$};
\fill [color=black] (2,3.46) circle (1.5pt);
\draw[color=black] (1.99,3.72) node {$A$};
\end{scriptsize}
\end{tikzpicture}
\end{minipage}
\begin{minipage}[b]{0.615\textwidth}
Write the equation of the plane which passes the point and perpendicular to the line $\Delta$ 
\end{minipage}
\end{pro}
\end{document} 

I want to Problem 2 above, the equilateral triangles on the left and content of the problem on the right. Moreover, the total widths of the two minipapes equal to width of the page. How do I do that? Thank you.

share|improve this question
4  
Welcome to TeX.sx! Please trim your question to a minimal working example (MWE) that illustrates your problem. –  Matthew Leingang Oct 8 '12 at 14:35
    
I tried, but I can not. –  minthao_2011 Oct 8 '12 at 14:47
    
@minthao_2011 Have a look at the resources Matthew linked you to! Without a proper MWE, your question will most likely be closed. –  doncherry Oct 9 '12 at 18:57
add comment

closed as too localized by doncherry, Thorsten, zeroth, Martin Schröder, Claudio Fiandrino Oct 11 '12 at 9:07

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

up vote 7 down vote accepted

Here's one possibility; I used t for the optional argument for the minipages (to get top vertical alignment) and baseline=(current bounding box.north) for the tikzpicture. I also removed a spurious blank space after the first \end{minipage} so that now the width for both minipages can add up to \linewidth. Also I used font=\scriptsize for the nodes of the diagram. Depending on the desired position for the label "Problem " one can obtain different alternatives; the following code shows two possibilities:

\documentclass[a4paper, 12pt]{article}
\usepackage{fouriernc}
\usepackage{amsmath,amsfonts,enumerate,tabularx,calrsfs,esvect, multicol}
\usepackage{graphics}
\usepackage[left=15mm,right=20mm,top=15mm,bottom=10mm]{geometry}
\usepackage[thmmarks,standard,thref]{ntheorem}
\usepackage{pgf,tikz,lipsum}
\usetikzlibrary{arrows}
\pagestyle{empty}

\theoremseparator{.}
\theorembodyfont{\upshape}
%\theorembodyfont{\normalfont}
\newtheorem{pro}{Problem}
\renewcommand{\baselinestretch}{1.5}
\begin{document}

\thispagestyle{empty}
\lipsum[2]
\begin{pro}
Solve  the following equations:
\begin{enumerate}[\quad 1)]
\item $\dfrac{\cos^2 2x}{\cos x + \cos\dfrac{\pi}{4}} = \cos x - \cos\dfrac{\pi}{4}$;
\item $\dfrac{\cos^2 2x}{\cos x + \cos\dfrac{\pi}{4}} = \cos x - \cos\dfrac{\pi}{4}$;

\item $(\sqrt{3}\sin x + 2\cos x)\cdot (1 - \cos x) = \sin^2 x$.
\end{enumerate}
\end{pro}


\begin{pro}\mbox{}\\
\begin{minipage}[t]{0.3\linewidth}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm,baseline=(current bounding box.north),every node/.append style={font=\scriptsize}]
\clip(-0.5,-0.5) rectangle (4.3,4.5);
\draw (0,0)-- (4,0);
\draw (4,0)-- (2,3.46);
\draw (2,3.46)-- (0,0);
\fill [color=black] (0,0) circle (1.5pt);
\draw[color=black] (-0.03,-0.19) node {$B$};
\fill [color=black] (4,0) circle (1.5pt);
\draw[color=black] (4.1,-0.19) node {$C$};
\fill [color=black] (2,3.46) circle (1.5pt);
\draw[color=black] (1.99,3.72) node {$A$};
\end{tikzpicture}
\end{minipage}%
\begin{minipage}[t]{0.7\linewidth}
Write the equation of the plane which passes the point and perpendicular to the line $\Delta$ 
\end{minipage}
\end{pro}

\noindent\begin{minipage}[t]{0.3\linewidth}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm,baseline=(current bounding box.north),every node/.append style={font=\scriptsize}]
\clip(-0.5,-0.5) rectangle (4.3,4.5);
\draw (0,0)-- (4,0);
\draw (4,0)-- (2,3.46);
\draw (2,3.46)-- (0,0);
\fill [color=black] (0,0) circle (1.5pt);
\draw[color=black] (-0.03,-0.19) node {$B$};
\fill [color=black] (4,0) circle (1.5pt);
\draw[color=black] (4.1,-0.19) node {$C$};
\fill [color=black] (2,3.46) circle (1.5pt);
\draw[color=black] (1.99,3.72) node {$A$};
\end{tikzpicture}
\end{minipage}%
\begin{minipage}[t]{0.7\linewidth}
\begin{pro}
Write the equation of the plane which passes the point and perpendicular to the line $\Delta$ 
\end{pro}
\end{minipage}

\end{document} 

enter image description here

As a personal note, perhaps you could reconsider the change for \baselinestretch?

Another request has been made in a comment: the problem to the left, the figure to the right:

\documentclass[a4paper, 12pt]{article}
\usepackage{fouriernc}
\usepackage{amsmath,amsfonts,enumerate,tabularx,calrsfs,esvect, multicol}
\usepackage{graphics}
\usepackage[left=15mm,right=20mm,top=15mm,bottom=10mm]{geometry}
\usepackage[thmmarks,standard,thref]{ntheorem}
\usepackage{pgf,tikz,lipsum}
\usetikzlibrary{arrows}
\pagestyle{empty}

\theoremseparator{.}
\theorembodyfont{\upshape}
%\theorembodyfont{\normalfont}
\newtheorem{pro}{Problem}
\renewcommand{\baselinestretch}{1.5}
\begin{document}

\thispagestyle{empty}

\noindent\begin{minipage}[t]{0.7\linewidth}
\begin{pro}
Write the equation of the plane which passes the point and perpendicular to the line $\Delta$ 
\end{pro}
\end{minipage}%
\begin{minipage}[t]{0.3\linewidth}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm,baseline=(current bounding box.north),every node/.append style={font=\scriptsize}]
\clip(-0.5,-0.5) rectangle (4.3,4.5);
\draw (0,0)-- (4,0);
\draw (4,0)-- (2,3.46);
\draw (2,3.46)-- (0,0);
\fill [color=black] (0,0) circle (1.5pt);
\draw[color=black] (-0.03,-0.19) node {$B$};
\fill [color=black] (4,0) circle (1.5pt);
\draw[color=black] (4.1,-0.19) node {$C$};
\fill [color=black] (2,3.46) circle (1.5pt);
\draw[color=black] (1.99,3.72) node {$A$};
\end{tikzpicture}
\end{minipage}

\end{document}

enter image description here

share|improve this answer
    
I'd move the whole pro environment inside the second minipage, adding \noindent in front of the first one. But that depends on where "Problem 2" is desired. Probably the best is to have the figure on the right. –  egreg Oct 8 '12 at 14:57
    
@egreg yes, that's another option; I'll add it to my answer. –  Gonzalo Medina Oct 8 '12 at 15:01
    
Thank you very much. –  minthao_2011 Oct 8 '12 at 15:06
    
How can I put the the figure on the right and the content of problem on the left? Please help me. –  minthao_2011 Oct 9 '12 at 4:55
    
@minthao_2011 please see my updated answer. –  Gonzalo Medina Oct 9 '12 at 18:27
show 1 more comment

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