0

I need to position each textbox like the following image

enter image description here

code

 \documentclass[10pt,twoside]{article}
\usepackage[spanish,es-lcroman, es-tabla, es-noshorthands]{babel}
\usepackage[paperwidth=8.8cm, paperheight=11.1cm, top=0.6cm, left=0.5cm, right=0.8cm, bottom=0.4cm,nomarginpar]{geometry}
% COMANDOS PERSONALES   ----------------------------------------------
\newcommand{\sen}{\mathop{\rm sen}\nolimits}
\newcommand{\tg}{\mathop{\rm tg}\nolimits}
\newcommand{\ctg}{\mathop{\rm ctg}\nolimits}
% nuevo
\usepackage{fancyhdr}
\usepackage{tikz,amsmath,colortbl}
\usepackage{fancyhdr}
\usepackage{calc}
\usepackage[lining,tabular]{fbb} 
\parindent=0cm
\usetikzlibrary{matrix,arrows, positioning,shadows,shadings,backgrounds,
calc, shapes, tikzmark}

\fancyhf{}

\newcommand{\margenes}{% \begin{tikzpicture}[remember picture, overlay] \draw [line width=0.5pt,blue] ($ (current page.south west) + (0.5cm,0.4cm) $) rectangle ($ (current page.north east) + (-0.8cm, -0.6cm)$); \end{tikzpicture}}

\newcommand{\mydos}{% \begin{tikzpicture}[remember picture, overlay] \def\A##1{($ (current page.south west) + (0.5cm,0.4cm) + ##1 $)}; \def\B##1{($ (current page.north east) + (-0.8cm, -0.6cm) + ##1 $)}; \draw [line width=0.5pt,blue] \A{(0cm,0cm)} rectangle \B{(0cm,0cm)}; \draw [line width=0.5pt,blue] \A{(0cm,4.4cm)} -- \A{(3.4cm,4.4cm)}; \draw [line width=0.5pt,blue] \A{(0cm,7.8cm)} -- \A{(7.5cm,7.8cm)}; \draw [line width=0.5pt,blue] \A{(3.4cm,7.8cm)} -- \A{(3.4cm,0cm)} ; \draw [line width=0.5pt,blue] \A{(3.4cm,6.2cm)} -- \A{(7.5cm,6.2cm)}; \draw [line width=0.5pt,blue] \A{(3.4cm,3.8cm)} -- \A{(7.5cm,3.8cm)}; \draw [line width=0.5pt,blue] \A{(3.4cm,1.8cm)} -- \A{(7.5cm,1.8cm)}; \draw [line width=0.5pt,blue] \A{(5.8cm,0cm)} -- \A{(5.8cm,1.1cm)}; \end{tikzpicture}} \begin{document} \fontsize{5}{5}\selectfont \mydos \put(2,-107){ \begin{minipage}[c]{3.4cm} %\centering IDENTIDADES TRIGONOMÉTRICAS \

$\sen^2A+\cos^2A = 1$ \

$1 + \tg^2A = \sec^2A$ \

$1 + \ctg^2A = \csc^2A$ \

$\tg A = \sen A/\cos A$ \

$\ctg A = \cos A/\sen A$ \

$\sec A = 1/\cos A$ \

$\csc A = 1/\sen A$ \

$\ctg A = 1/\tg A$ \

\end{minipage}}\

\put(2,-127){ \begin{minipage}[c]{3.4cm} %\centering ÁNGULO DOBLE \

$\sen 2A =2\sen A\ \cos A $ \ $\cos 2A\ =\cos^2 A-\ \sen^2 A $ \ $\hspace*{0.625cm} =1-2\sen^2 A $ \ $\tg 2A=\dfrac{2\tg A}{ 1-\tg^2 A} $\

ÁNGULO MITAD\ $\sen \dfrac{A}{2} = \sqrt{\dfrac{1-\cos A}{2}}$\ $\sen^2x = \dfrac{1}{2}(1-\cos 2x)$\ $\cos \dfrac{A}{2} = \sqrt{\dfrac{1+\cos A}{2}}$\ $\cos^2x = \dfrac{1}{2}(1+\cos 2x)$ \end{minipage}}\

\newpage \margenes

\end{document}

results

Simon Dispa
  • 39,141
  • https://tex.stackexchange.com/questions/193572/dividing-page-into-equally-sized-sections-vertically-and-horizontally – js bibra Oct 18 '21 at 14:44
  • https://tex.stackexchange.com/questions/549274/how-to-split-whole-page-into-two-unequal-size-using-minipage – js bibra Oct 18 '21 at 14:52
  • Mostly you just need two minipages, one for the left and right columns. You could add glue to \baselineskip to increase or decrease the spacing. – John Kormylo Oct 18 '21 at 20:49

2 Answers2

2

This solution is based on the xcoffin package. No minipages or tikz are required.

Simply put, you fill the contents into boxes and then join one to the other by the corners.

E.g. \JoinCoffins\Framex[l,t]\titulo[l,t] will join the left top corners of \Framex and \titulo.

\Framex will collect all the other boxes, including the separator and margin lines, and the result will be typeset on the first line of the text area.

Once the width of the two columns is defined, there are no distances to guess. The boxes will adjust their heights to their content and everything else will be automatically calculated from them.

z

\documentclass[10pt,twoside]{article}
\usepackage[spanish,es-lcroman, es-tabla, es-noshorthands]{babel}
\usepackage[paperwidth=8.8cm, paperheight=11.1cm, top=0.2cm, left=0.8cm, right=0.8cm, bottom=0.4cm,nomarginpar]{geometry}

\setlength{\parindent}{0cm} % COMANDOS PERSONALES ---------------------------------------------- \newcommand{\sen}{\mathop{\rm sen}\nolimits} \newcommand{\tg}{\mathop{\rm tg}\nolimits} \newcommand{\ctg}{\mathop{\rm ctg}\nolimits} \newcommand{\lgo}{\mathop{\rm Log}\nolimits}

% nuevo \usepackage{fancyhdr} \usepackage{amsmath,colortbl}

\usepackage{calc} \setlength{\parindent}{0cm} \fancyhf{}

\usepackage{newtxtext,newtxmath} %better fonts for smaller size <<<<<<<<<<<<<<< \usepackage{xcoffins} % added <<<<<<<<<<<

% allocate \NewCoffin\titulo \NewCoffin\Framex \NewCoffin\identidades \NewCoffin\angdoble \NewCoffin\sumdif \NewCoffin\transprod \NewCoffin\transsum \NewCoffin\logaritmo \NewCoffin\hrulex \NewCoffin\vrulex \NewCoffin\vrulexx

\newlength{\leftcolwidth} \newlength{\rightcolwidth}

\setlength{\leftcolwidth}{2.8cm} % adjust columns width <<<<< \setlength{\rightcolwidth}{4.5cm}

\begin{document}

\setlength{\abovedisplayskip}{0pt} % reduce vertical space in align* \setlength{\belowdisplayskip}{2pt} \setlength{\abovedisplayshortskip}{0pt} \setlength{\belowdisplayshortskip}{0pt}

\SetVerticalCoffin\titulo{\leftcolwidth+\rightcolwidth}{% \vspace*{15pt} \centering \sffamily \Large Title

\vspace*{15pt}% reserved for the title }

\SetVerticalCoffin\identidades{\leftcolwidth}{% \setlength{\parindent}{1ex} \tiny \smallskip

IDENTIDADES

TRIGONOMÉTRICAS\smallskip

$\sen^2A+\cos^2A = 1$ \smallskip \begin{align}
1 + \tg^2A &= \sec^2A \
1 + \ctg^2A &= \csc^2A \
\tg A &= \sen A/\cos A \
\ctg A &= \cos A/\sen A \
\sec A &= 1/\cos A \
\csc A &= 1/\sen A \
\ctg A &= 1/\tg A \end{align
} \color{blue}\rule{\leftcolwidth}{0.5pt} }

\SetVerticalCoffin\angdoble{\leftcolwidth}{% \setlength{\parindent}{1ex} \tiny \smallskip

ÁNGULO DOBLE \smallskip \begin{align}
\sen 2A &=2\sen A \cdot \cos A \ \cos 2A &=\cos^2 A - \sen^2 A \ &=1-2\sen^2 A \ \tg 2A &=\dfrac{2\tg A}{1-\tg^2 A} \ \end{align
}

ÁNGULO MITAD\smallskip \begin{align}
\sen \dfrac{A}{2} &= \sqrt{\dfrac{1-\cos A}{2}}\ \sen^2x &= \dfrac{1}{2}(1-\cos 2x)\ \cos \dfrac{A}{2} &= \sqrt{\dfrac{1+\cos A}{2}}\ \cos^2x &= \dfrac{1}{2}(1+\cos 2x) \end{align
} }

\SetVerticalCoffin\sumdif{\rightcolwidth}{% \setlength{\parindent}{1ex} \tiny \smallskip

SUMA Y DIFERENCIA DE ÁNGULOS\smallskip
\begin{align} \sen \left(A \pm B \right) &= \sen A \cdot \cos B \pm \cos A \cdot \sen B\ \cos \left(A \pm B \right) &= \cos A \cdot \cos B \mp \sen A \cdot \sen B\ \tg \left(A \pm B \right) &= \dfrac{\tg A \pm \tg B}{1 \mp \tg A \cdot \tg B } \end{align} \color{blue}\noindent\rule{\rightcolwidth}{0.5pt} }

\SetVerticalCoffin\transprod{\rightcolwidth}{% \setlength{\parindent}{1ex} \tiny \smallskip

TRANSFORMACION EN PRODUCTO\smallskip
\begin{align}
\sen A + \sen B &= 2 \sen \dfrac{A + B}{2}\cos \dfrac{A - B}{2} \ \sen A - \sen B &= 2 \cos \dfrac{A + B}{2}\sen \dfrac{A - B}{2} \
\cos A + \cos B &= 2 \cos \dfrac{A + B}{2}\cos \dfrac{A - B}{2} \ \cos A - \cos B &= -2 \sen \dfrac{A + B}{2}\sen \dfrac{A - B}{2}
\end{align
} \color{blue}\noindent\rule{\rightcolwidth}{0.5pt}
}

\SetVerticalCoffin\transsum{\rightcolwidth}{% \setlength{\parindent}{1ex} \tiny \smallskip

TRANSFORMACION DE PRODUCTO EN SUMA\smallskip \begin{align}
\sen A \cdot \cos B &= \dfrac{1}{2}\left[\sen (A + B) + \sen(A - B)\right]\ \sen A \cdot \sen B &= \dfrac{1}{2}\left[\cos (A - B) + \cos(A + B)\right]\
\cos A \cdot\cos B &= \dfrac{1}{2}\left[\cos (A + B) + \cos(A - B)\right]
\end{align
} \color{blue}\noindent\rule{\rightcolwidth}{0.5pt}
}

\SetVerticalCoffin\logaritmo{\rightcolwidth}{% \setlength{\parindent}{1ex} \tiny \smallskip

LOGARITMO: $\lgo_{b}{N} = x \Leftrightarrow N = b^x$

\phantom{LOGARITMO:} $ b > 0, b \neq 1, N > 0$ \medskip

PROPIEDADES: \smallskip \begin{align}
\lgo{(A \cdot B)} &= \lgo{A} + \lgo{B}; &\lgo_{b}{b}&= 1 \ \lgo{(A/B)} &= \lgo{A} - \lgo{B}; &\lgo{1} &=0 \ \lgo{A^n} &= n\lgo{A} \end{align
} }

\SetVerticalCoffin\hrulex{\leftcolwidth+\rightcolwidth}{% \color{blue}\rule{\leftcolwidth+\rightcolwidth}{0.5pt} }

\SetHorizontalCoffin\vrulex{ \color{blue}\rule{0.5pt}{\CoffinTotalHeight\titulo+\CoffinTotalHeight\identidades +\CoffinTotalHeight\angdoble} }

\SetHorizontalCoffin\vrulexx{ \color{blue}\rule{0.5pt}{\CoffinTotalHeight\identidades +\CoffinTotalHeight\angdoble} }

% join \JoinCoffins\Framex[l,t]\titulo[l,t] \JoinCoffins\Framex[l,b]\identidades[l,t] \JoinCoffins\Framex[\identidades-r,\identidades-t]\sumdif[l,t] \JoinCoffins\Framex[\sumdif-l,\sumdif-b]\transprod[l,t] \JoinCoffins\Framex[\identidades-l,\identidades-b]\angdoble[l,t] \JoinCoffins\Framex[\transprod-l,\transprod-b]\transsum[l,t] \JoinCoffins\Framex[\transsum-l,\transsum-b]\logaritmo[l,t]

% put the rules \JoinCoffins\Framex[\titulo-l,\titulo-t]\hrulex[l,t] \JoinCoffins\Framex[\angdoble-l,\angdoble-b]\hrulex[l,t] \JoinCoffins\Framex[\titulo-l,\titulo-b]\hrulex[l,t]

\JoinCoffins\Framex[\titulo-l,\titulo-t]\vrulex[hc,t] \JoinCoffins\Framex[\titulo-r,\titulo-t]\vrulex[hc,t] \JoinCoffins\Framex[\identidades-r,\identidades-t]\vrulexx[hc,t]

% typeset the assembly \noindent\TypesetCoffin\Framex

\end{document}

See other examples of this very useful package in

complex layout for a scholarly edition

create a word/equation/diagram collage

Simon Dispa
  • 39,141
1

This can be done with the tcolorbox package, either as a raster or as a poster. The poster environment provides more flexibility, but the content is not breakable across pages, whereas rasters are breakable. To get a 40:60 split in the column widths, I declared 5 poster columns with the content spanning columns 1-2 for the first column of material, and spanning columns 3-5, for the second column of material. There are some comments in the code to explain the syntax.

enter image description here

\documentclass[10pt,twoside]{article}
\usepackage[spanish,es-lcroman, es-tabla, es-noshorthands]{babel}
\usepackage[paperwidth=8.8cm, paperheight=11.1cm, top=0.6cm, left=0.5cm, right=0.8cm, bottom=0.4cm,nomarginpar]{geometry}
\usepackage{newtxtext,newtxmath} %Scalable fonts for text &  math
\usepackage[most]{tcolorbox} % Load most of the tcolorbox libraries
\setlength{\parindent}{0cm} % don't indent paragraphs

% COMANDOS PERSONALES ---------------------------------------------- \newcommand{\sen}{\mathop{\rm sen}\nolimits} \newcommand{\tg}{\mathop{\rm tg}\nolimits} \newcommand{\ctg}{\mathop{\rm ctg}\nolimits}

\begin{document} \begin{tcbposter}[ coverage = {spread}, fontsize=8pt, % base font size poster = { % showframe, %show frame to assist with bx placement, if necessary columns=5, % page has 5 columns colspacing=2mm, %space between columns rowspacing=2mm %space between rows }, boxes = { size=tight, %no between the text content and the frame of the box colback=white, %colour of box background colframe=blue, %colour of box frame title style={left color=black,right color=cyan}, %style for box title center title, %box title alignment fonttitle=\bfseries\normalfont\scshape, %font for title fontupper=\scriptsize, %size of box content relative to fontsize= } ] \posterbox[ halign=center, %centre the subtitle adjusted title = TITLE %box title ]{name= Box0,column=1,span=5,below=top} %box placement: col 1, span cols 1-5 {Trig cheatsheet} %subtitle

\posterbox[ adjusted title= Identidades trigonométricas, ]{name= Box1,column=1,span=2,below=Box0}{ %start in col 1, span cols 1-2, placed below Box0 \begin{align} \sen^2A+\cos^2A &= 1 \ 1 + \tg^2A &= \sec^2A \ 1 + \ctg^2A &= \csc^2A \ \tg A &= \sen A/\cos A \ \tg A &= \cos A/\sen A \ \sec A &= 1/\cos A \ \csc A &= 1/\sen A \ \ctg A &= 1/\tg A \end{align} }

Ross
  • 5,656
  • 2
  • 14
  • 38