我在这里创建了一个文档。它有两页,代码对我来说似乎正确,但其中存在一些问题。
- 我以前总是
\hfill
把标题放在中间。这样错了吗? - 在 中
email
,我只做了这个词bold
。为什么下面的文字和内容以粗体显示?虽然它尚未分配 - 在
group_id
第 1 页,我想添加链接,当用户点击它时,应该转到Group schema
。是否可以将链接添加到下一页(或任何其他页面)?
演示:https://www.sharelatex.com/project/5374a2ebeb2b8d651828ef64?r=380e068e&rs=ps&rm=d
代码:
\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.
}
答案1
要居中,请使用环境center
。仅在需要时使用数学模式。但是,您的代码中存在一些错误。一个有效的代码:
\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}
超链接可以用 和 来设置\label{..}
。\href{text}{link}
我不太明白你说的“电子邮件”是什么意思。一般是用 来设置的\url
。