1

I created one doc here. It has two pages, code seems correct as per me but there are some issue with it.

  1. I used \hfill to put the title in center. IS it wrong?
  2. In email, I made only this word bold. Why next text and content appearing in bold? though it has not be assigned
  3. At group_id in page 1, I want to add link, when user click on it it should be take to Group schema. Is this possible to add link to next page(or any other page)?

Demonstration : https://www.sharelatex.com/project/5374a2ebeb2b8d651828ef64?r=380e068e&rs=ps&rm=d

Code:

\begin{document}   

\hfill \boldtitle{\textbf {User schema}}  \hfill    
{\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. 

$$
accesslog: \red { Array }
\left(\vcenter{
  \hbox{$\left\{\
      \vcenter{\parindent=0pt
         \hbox{\textbf{date}: \red{string}  Data -- da ocorrncia.}
         \hbox{\textbf{ObjectId}: \red{Usuário} --  que executou.}
         \hbox{\textbf{action}: \red{String} --  Aço Executada.}
   }\right.$}
   \bigskip
   \hbox{$\left\{\
      \vcenter{\parindent=0pt
         \hbox{\textbf{date}: \red{string}  Data -- da ocorrncia.}
         \hbox{\textbf{ObjectId}: \red{Usuário} --  que executou.}
         \hbox{\textbf{action}: \red{String} --  Aço Executada.}
   }\right.$}
}\right.
$$    
\textbf {group_id : } \textcolor{red}{ ObjectId } - Id do  grupo. 
}
  • The exercise wasn't done perfectly. Use \hbox{accesslog: \red { Array }} instead pure accesslog: \red { Array } and watch the difference. I'll not comment the rest of your code. – wipet Jun 8 '14 at 10:55
  • @wipet: thanks dude, silly mistake. CAn you please tell me how to add link at group_id? when user click on it, he should go to the page, where there is group schema – cyclic Jun 8 '14 at 13:37
1

For centering use the environment center. Use the mathmode only if needed. However, there are some errors in your code. A working one:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\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.
\]

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

\end{document}

enter image description here

Hyperlinks can be set with \label{..} and \href{text}{link}. I do not really understand what you mean by "email". In general it is set with \url.

|improve this answer|||||
  • I want to add link for another schema. Let's say Group schema. When user on User schema clicks on Group_id, he should go to the page where is 'User schema' – cyclic Jun 8 '14 at 13:36
  • But is the page that contains "User schema" in the same document? – Bernard Jun 8 '14 at 20:00
  • @cyclic: with \href you can jump to any place in the local doc. – user2478 Jun 8 '14 at 20:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.