Previously, this answer contains the full shape definition.
It has been moved to the ext.shapes.superellipse
library of my tikz-ext
package and can simply be loaded by
\usetikzlibrary{ext.shapes.superellipse}
A superellipse shape.
Keys:
superellipse x exponent
,
superellipse y exponent
,
superellipse step
(the stepwidth of the plot-loop) and
superellipse exponent
(sets both x and y exponent).
The anchors on the border are found trough intersections
which takes a bit of time.
The radii evaluation is the same as for the ellipse
shape which multiplies the values with √2. To fit a lot of text on a page we use a text width of 1/√2 * \linewidth
and of that we subtract the inner xsep
s as well as the \pgflinewidth
(so that even the line of the shape doesn't protrude into the margin.
text width=.7071067\linewidth-\pgfkeysvalueof{/pgf/inner xsep}*2-\pgflinewidth
I've also set align=flush center
to get centered text that is not hyphenated.
Inside the node, the dimension \linewidth
is a long as the text width
is so we can use this directly for the horizontal \rule
.
Even though, the whole tikzpicture
is now as wide as \linewidth
I'll still put it into the center
environment which doesn't indent the line and is its own paragraph.
At the end of the preamble are some commands to show the vertical lines of the page. These are not needed otherwise.
Code
\documentclass{article}
\usepackage{tikz}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\usepgflibrary{ext.shapes.superellipse}
% Begin: adjust frame of geometry
\usepackage[pass,showframe]{geometry}\usepackage{etoolbox}
\makeatletter
\preto\Gm@vrule{\color{red}}\let\Gm@hrule\@empty\let\Gm@hruled\@empty
\makeatother
% Begin: end frame of geometry
\begin{document}
\begin{center}
\tikz\node[draw=green, line width=2pt, superellipse, align=flush center,
text width=.7071067\linewidth-\pgfkeysvalueof{/pgf/inner xsep}*2-\pgflinewidth
]{
{\Huge\color{blue}Apunts de Matemàtiques
per a l'Accés a la UIB per a majors de 25 anys\par}
{\color{gray}\rule[.5ex]{\linewidth}{1pt}\par}
{Teoria i exercicis per a la preparació de les
``Proves d'accés a la Universitat de les Illes Balears per a majors de
25~anys i menors de 40~anys'' de l'assignatura de Matemàtiques\par}};
\end{center}
\end{document}
Output