3

I tried to add curly brackate using

  1. \left{ , \begin{array}{@{}ll} but no help. What is the way to add large brackate to cover as in image?

  2. Is is possible to create black strip as in image behind Users-schema?

Source code DEMO : https://www.sharelatex.com/project/5374a2ebeb2b8d651828ef64f

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{hyperref}
\usepackage[a4paper, total={6in, 8in}]{geometry}
\setlength\parindent{0pt}
\usepackage{xcolor}
\usepackage{setspace}
\begin{document}

\begin{center}
\textbf {User schema}
\end{center}

\setstretch{1.5}
\textbf {ID : }  \textcolor{red}{ObjectId }- Id do registro \\
\textbf {Name: } \textcolor{red}{ String  } - Name co usuario \\
\textbf {date: } \textcolor{red}{ Date } - Date de Cadastro \\
\textbf {ren\_date: } \textcolor{red}{ Date }  -  Data de 

\textbf {email: } \textcolor{red}{ String } - Lorem ipsum dolorsitamet, consecteturadipisicingelit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minimveniam, exercitationullamcolaborisnisi ut aliquipexeacommodoconsequat. Duisautereprehenderit in voluptatevelit esse cillumdolore eu fugiatnullapariatur. Occaecatcupidatat non proident, sunt in culpa quiofficiadeseruntmollit. 

\[
\text{accesslog: \textcolor{red}{ Array }}
  \left(
  \begin{array}{@{}ll}
  \left\{\begin{tabular}{l}
       \textbf{date}: \textcolor{red}{string}  Data -- da ocorrncia.\\
       \textbf{ObjectId}: \textcolor{red}{Usuário} --  que executou.\\
       \textbf{action}: \textcolor{red}{String} --  Aço Executada.\\
   \end{tabular}\right.\\
   ~\\
   \left\{
   \begin{tabular}{l}
         \textbf{date}: \textcolor{red}{string}  Data -- da ocorrncia.\\
         \textbf{ObjectId}: \textcolor{red}{Usuário} --  que executou.\\
         \textbf{action}: \textcolor{red}{String} --  Aço Executada.\\
   \end{tabular}\right.
   \end{array}
\right.
\]

\hyperlink{page.2}{\textbf {group\_id : }} \textcolor{red}{ ObjectId } - Id do  grupo. 

\pagebreak

\begin{center}
\textbf {Group schema}
\end{center}

\setstretch{1.5}

\textbf {ID : }  \textcolor{red}{ObjectId }- Id do registro \\
\textbf {Name: } \textcolor{red}{ String  } - Name co usuario \\
\textbf {date: } \textcolor{red}{ Date } - Date de Cadastro \\
\textbf {ren\_date: } \textcolor{red}{ Date }  -  Data de 

\textbf {email: } \textcolor{red}{ String } - Lorem ipsum dolorsitamet, consecteturadipisicingelit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minimveniam, exercitationullamcolaborisnisi ut aliquipexeacommodoconsequat. Duisautereprehenderit in voluptatevelit esse cillumdolore eu fugiatnullapariatur. Occaecatcupidatat non proident, sunt in culpa quiofficiadeseruntmollit. 

\[
\text{accesslog: \textcolor{red}{ Array }}
  \left(
  \begin{array}{@{}ll}
  \left\{\begin{tabular}{l}
       \textbf{date}: \textcolor{red}{string}  Data -- da ocorrncia.\\
       \textbf{ObjectId}: \textcolor{red}{Usuário} --  que executou.\\
       \textbf{action}: \textcolor{red}{String} --  Aço Executada.\\
   \end{tabular}\right.\\
   ~\\
   \left\{
   \begin{tabular}{l}
         \textbf{date}: \textcolor{red}{string}  Data -- da ocorrncia.\\
         \textbf{ObjectId}: \textcolor{red}{Usuário} --  que executou.\\
         \textbf{action}: \textcolor{red}{String} --  Aço Executada.\\
   \end{tabular}\right.
   \end{array}
\right.
\]

\textcolor{blue} { \textbf {group\_id : }} \textcolor{red}{ ObjectId } - Id do  grupo. 


\end{document}

result should be like :

enter image description here

cyclic
  • 1,557
  • 2
  • 11
  • 8

1 Answers1

3

This should get you going:

enter image description here

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage[a4paper, total={6in, 8in}]{geometry}
\setlength\parindent{0pt}
\usepackage{xcolor}
\begin{document}

\colorbox{black}{\makebox[\dimexpr\linewidth-2\fboxsep]{\color{white}\textbf {User schema}}}

\[
  \text{Users} \left\{ \begin{tabular}{@{}p{.8\linewidth}@{}}
    \textbf{ID}:  \textcolor{red}{ObjectId} -- Id do registro \\
    \textbf{Name}: \textcolor{red}{String} -- Name co usuario \\
    \textbf{date}: \textcolor{red}{Date} -- Date de Cadastro \\
    \textbf{ren\_date}: \textcolor{red}{Date} -- Data de \\
    \textbf{email}: \parbox[t]{.9\linewidth}{\raggedright\textcolor{red}{String} -- Lorem ipsum dolorsitamet, consecteturadipisicingelit, sed do 
      eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minimveniam, exercitationullamcolaborisnisi ut 
      aliquipexeacommodoconsequat. Duisautereprehenderit in voluptatevelit esse cillumdolore eu fugiatnullapariatur. Occaecatcupidatat 
      non proident, sunt in culpa quiofficiadeseruntmollit.\strut} \\
    \textbf{accesslog}: \textcolor{red}{Array} \begin{tabular}[t]{@{\ }|l@{}}
      \strut \\[-\normalbaselineskip]
      $\left\{\begin{tabular}{p{.7\linewidth}}
         \textbf{date}: \textcolor{red}{string} Data -- da ocorrncia. \\
         \textbf{user}: \textcolor{red}{ObjectId} -- que executou. \\
         \textbf{action}: \textcolor{red}{String} --  Aço Executada. \\
       \end{tabular}\right.\kern-\nulldelimiterspace$ \\
      $\left\{\begin{tabular}{p{.7\linewidth}}
         \textbf{date}: \textcolor{red}{string} Data -- da ocorrncia. \\
         \textbf{user}: \textcolor{red}{ObjectId} -- que executou. \\
         \textbf{action}: \textcolor{red}{String} -- Aço Executada. \\
       \end{tabular}\right.\kern-\nulldelimiterspace$
    \end{tabular}
  \end{tabular}\right.\kern-\nulldelimiterspace
\]

\end{document}

It would be advisable, for consistency and ease-of-updating, to define a macro that formats your list-like items. Something like

\newcommand{\entry}[1]{\textbf{#1}:}
\newcommand{\entrytype}[1]{\textcolor{red}{#1}}

and then use \entry{ID} \entrytype{ObjectId} -- ....

Werner
  • 603,163