簡體   English   中英

如何在 ShareLateX(編輯器)或 Latex(一般)中居中這段文本?

[英]How to center this piece of text in ShareLateX (editor) or Latex (in general)?

我正在寫一份簡歷,並希望將包含我的姓名和電子郵件詳細信息的文檔頂部的文本居中,如下所示

在此處輸入圖像描述

我使用了 \begin{center} 和 \end{center} 但它似乎不起作用

這是我的代碼:


\begin{document}
\begin{tabular*}{\linewidth}{l@{\extracolsep{\fill}}r}

\vspace{-4mm}
\textbf{\LARGE Samuel Adams}
\\
 & \\  \textbf{Notsville, TX} $|$
\textbf{\phone \ \ +1 (000) 000 0000} $|$ 
\textbf{cxcx@gmail.com} $|$  \textbf{{www.linkedin.com/ffdfs}}\\

\end{tabular*}

\vspace{1 mm}

誰能幫我把這段文字居中?

這就是它現在的樣子。 我希望將兩條線居中,就像我們在 word 中那樣。

表格將位於頁面中間一次

  • 你使左右邊距大小相同

  • 在表格前面使用\noindent以避免它被縮進為新段落的第一行

(我實際上不確定您為什么為此使用表格,您從不使用第二列......)


\documentclass[a4paper,10pt]{article} 
\usepackage[empty]{fullpage} 
\usepackage{xcolor} 
\usepackage{url} 
\usepackage{wasysym} 
\usepackage{hyperref} 
\usepackage{enumitem} 
\usepackage[utf8]{inputenc} 
\usepackage[a4paper,bindingoffset=0.3in, left=0.5in,right=0.5in,top =0.8in,bottom=-5in, footskip=.25in]{geometry} 

\begin{document}
\noindent\begin{tabular*}{\linewidth}{l@{\extracolsep{\fill}}r}
\textbf{\LARGE Samuel Adams} & \\
\textbf{Notsville, TX} $|$ \textbf{\phone \ \ +1 (000) 000 0000} $|$ 
\textbf{cxcx@gmail.com} $|$ \textbf{{www.linkedin.com/ffdfs}} & \\
\hline
\end{tabular*}

\vspace{1 mm}
\end{document}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM