3

Code:

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{makeidx}
\usepackage{tkz-euclide}
\usetkzobj{all}
\usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations.markings}
\usepackage{graphicx}
\usepackage[width=0.00cm, height=0.00cm, left=0.80in, right=0.80in, top=0.80in, bottom=0.80in]{geometry}
\begin{document}
    \large
\noindent\begin{minipage}{0.5\textwidth}
In $\triangle{ABC}$ $\angle B = 90^{\circ}$,\\
By using Pythagoras Theorem,
\begin{align*}
AC^2&=AB^2+BC^2& \tag{$*$}
\end{align*}
\end{minipage}\hspace{2cm}
    \begin{minipage}{0.5\textwidth}
\begin{tikzpicture}

\tkzDefPoint(0:0){B}
\tkzDefPoint(0:5){A}
\tkzDefPoint(90:4){C}



\tkzLabelPoint[above](C){$C$}
\tkzLabelPoint[below,yshift=-0.6mm](A){$A$}
\tkzLabelPoint[below,yshift=-0.8mm](B){$B$}

\tkzDrawSegment[black!60!black](C,B)
\tkzDrawSegment[black!60!black](B,A)
\tkzDrawSegment[black!60!black](C,A)


\tkzLabelSegment[auto,swap,rotate=-38.5,xshift=-15mm,yshift=0mm](A,C){Hypotenuse}
\tkzLabelSegment[auto,rotate=0,xshift=0.3mm,yshift=-0.7mm](A,B){Adjacent Side}
\tkzLabelSegment[auto,rotate=90,xshift=15.3mm,yshift=3.8mm](B,C){Opposite Side}


%% here use the correct order. For example, BCA is inner angle and ACB is outer angle
\tkzMarkAngle[size=0cm,color=red,mark=](C,A,B)
\tkzMarkAngle[size=1cm,color=black,mark=](C,A,B)
\tkzMarkRightAngle(C,B,A)
\tkzLabelAngle[pos=1.4](C,A,B){$\theta$}
\end{tikzpicture}
\end{minipage}
\end{document}

Question: In my work the main issue is there is a some blank space in the left side of page, i mean whatever i written in the left side it is creating some blank space which is indicated by a red symbol. What is the solution to this problem?

7
  • Sorry sir i was facing some trouble while inserting image of my work – Math-Man Feb 20 '16 at 16:36
  • you have specified two minipages each .5\textwidth wise to be postioned with 2cm of space plus a normal word space between them. What do you want to happen in this case? they clearly will not fit side by side on the same line. – David Carlisle Feb 20 '16 at 16:37
  • Oh no, that was the issue. i am absolutely sorry – Math-Man Feb 20 '16 at 16:41
  • reason behind my 2cm space that i was looking for some distance between my minipages – Math-Man Feb 20 '16 at 16:43
  • 2
    there is nothing wrong with the hspace in itself but simple arithmetic suggests that .5\textwidth+.5\textwidth+2cm+.3em is more than \textwidth:-) use .4\textwidth and use \hfill for the space then it will expand to fill the .2\textwidth gap. – David Carlisle Feb 20 '16 at 16:47
3

I suggest you (a) make the minipage environments slightly less wide, say, 0.45\textwidth instead of 0.5\textwidth; (b) insert \hspace{\fill} between them; and (c) insert a \flushright instruction at the start of the right-hand minipage. (By default, items in minipage are fully-justified, i.e., they start out at the left-hand edge.)

enter image description here

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amsfonts,amssymb}
\usepackage{makeidx}
\usepackage{tkz-euclide}
\usetkzobj{all}
\usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations.markings}
%\usepackage{graphicx}
\usepackage[margin=0.8in]{geometry}
\begin{document}
\large
\noindent
\begin{minipage}{0.45\textwidth}
In $\triangle{ABC}$ $\angle B = 90^{\circ}$,\\
By using Pythagoras Theorem,
\begin{align*}
AC^2&=AB^2+BC^2& \tag{$*$}
\end{align*}
\end{minipage}\hspace{\fill}%
\begin{minipage}{0.45\textwidth}
\flushright
\begin{tikzpicture}

\tkzDefPoint(0:0){B}
\tkzDefPoint(0:5){A}
\tkzDefPoint(90:4){C}

\tkzLabelPoint[above](C){$C$}
\tkzLabelPoint[below,yshift=-0.6mm](A){$A$}
\tkzLabelPoint[below,yshift=-0.8mm](B){$B$}

\tkzDrawSegment[black!60!black](C,B)
\tkzDrawSegment[black!60!black](B,A)
\tkzDrawSegment[black!60!black](C,A)

\tkzLabelSegment[auto,swap,rotate=-38.5,xshift=-15mm,yshift=0mm](A,C){Hypotenuse}
\tkzLabelSegment[auto,rotate=0,xshift=0.3mm,yshift=-0.7mm](A,B){Adjacent Side}
\tkzLabelSegment[auto,rotate=90,xshift=15.3mm,yshift=3.8mm](B,C){Opposite Side}

%% here use the correct order. For example, BCA is inner angle and ACB is outer angle
\tkzMarkAngle[size=0cm,color=red,mark=](C,A,B)
\tkzMarkAngle[size=1cm,color=black,mark=](C,A,B)
\tkzMarkRightAngle(C,B,A)
\tkzLabelAngle[pos=1.4](C,A,B){$\theta$}
\end{tikzpicture}
\end{minipage}
\end{document}
1
  • @DavidCarlisle - Thanks for the edit! – Mico Feb 20 '16 at 16:52

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.