2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-26 06:48:04 +02:00
LaTeX-examples/tikz/url-structure/url-structure.tex
Martin Thoma 7740f0147f Remove trailing spaces
The commands

find . -type f -name '*.md' -exec sed --in-place 's/[[:space:]]\+$//' {} \+

and

find . -type f -name '*.tex' -exec sed --in-place 's/[[:space:]]\+$//' {} \+

were used to do so.
2015-10-14 14:25:34 +02:00

44 lines
1.1 KiB
TeX

\documentclass{article}
\usepackage[pdftex,active,tightpage]{preview}
\setlength\PreviewBorder{2mm}
\usepackage{tikz}
\usetikzlibrary{shapes, decorations}
\usepackage{amsmath,amssymb}
\begin{document}
\begin{preview}
% Define box and box title style
\tikzstyle{mybox} = [
draw=red,
fill=blue!20,
very thick,
rectangle,
rounded corners,
inner sep=10pt,
inner ysep=20pt
]
\tikzstyle{fancytitle} =[fill=red, text=white]
\begin{tikzpicture}
\node [mybox] (box){
\begin{minipage}{0.9\textwidth}
$\underbrace{\text{http}}_{\text{protocol}}
\text{://}
\underbrace{
\overbrace{\text{martin-thoma}}^\text{2\textsuperscript{nd} level domain}
\text{.}
\overbrace{\text{com}}^\text{TLD}
}_\text{hostname}
\underbrace{\text{/why-to-study-math/}}_\text{path}
\text{\#}
\underbrace{\text{Math\_is\_fun}}_\text{Fragment identifier}$
\end{minipage}
};
\node[fancytitle, right=10pt] at (box.north west) {The URL};
\end{tikzpicture}
\end{preview}
\end{document}