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

6
  • 1
    Regarding the bracket: you need \left\{ not just \left{. Jun 11, 2014 at 19:04
  • @JohnWickerson: thanks, I used \left\{ and ended with }\right.. But it shows just small brackage. Not convering entire content. please see sharelatex.com/project/5374a2ebeb2b8d651828ef64
    – cyclic
    Jun 11, 2014 at 19:10
  • 1
    Remove the } before \right. Jun 11, 2014 at 19:15
  • @JohnWickerson: still issue persist, can you please see the link
    – cyclic
    Jun 11, 2014 at 19:17
  • You still need the full stop though. That is, "\right." not "\right" Jun 11, 2014 at 19:20

1 Answer 1

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} -- ....

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .