我想将实习日期移至页面的右侧。
\documentclass[a4paper,10pt]{article}
\usepackage[margin=10mm]{geometry}
\raggedbottom
\usepackage{palatino}
\fontfamily{SansSerif}\selectfont
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage[hidelinks]{hyperref}
\usepackage{xcolor}
\definecolor{mygrey}{gray}{0.75}
\hypersetup{
colorlinks,
linkcolor={red!50!black},
citecolor={blue!50!black},
urlcolor={blue!80!black}
}
\usepackage{booktabs, makecell, tabularx}
\renewcommand\arraystretch{1.3}
\usepackage{verbatim}
\usepackage{pbox}
\usepackage{enumitem}
\setlist[itemize]{leftmargin=*}
\usepackage{url}
\setlength{\parindent}{0pt}
\pagestyle{empty}
\newcommand{\resheading}[1]{\medskip
\colorbox{mygrey}{\begin{minipage}{\dimexpr\textwidth-
2\fboxsep\relax}\small
\textbf{#1 \vphantom{p\^{E}}}
\end{minipage}}
\par\medskip}
\newcommand{\ressubheading}[3]{
\begin{tabular*}{\textwidth}{l @{\extracolsep{\fill}} r}
\textsc{\textbf{#1}} & \textsc{\textit{[#2]}} \\
\end{tabular*}\vspace{-8pt}}
\begin{document}
\linespread{1.25}
\begin{center} \textbf{TRIDEV} \end{center}
Roll No.: \textbf{2K20/AE/73} \\
Email-id : \textbf{tridev} \\
Mobile No.: \textbf{+91-} \\
\resheading{INTERNSHIPS}
\begin{itemize}
\item \textbf{Role, Company} \textit{(Dates)}
\begin{itemize}
\item Work description.
\end{itemize}
\end{itemize}
\end{document}
我在网上搜索过,但是其他人都使用了这个\section{}
方法,我只想使用这个\resheading{}
方法。
答案1
\hfill
快速技巧:在日期之前使用类似
\documentclass[a4paper,10pt]{article}
\usepackage[margin=10mm]{geometry}
\raggedbottom
\usepackage{palatino}
\fontfamily{SansSerif}\selectfont
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage[hidelinks]{hyperref}
\usepackage{xcolor}
\definecolor{mygrey}{gray}{0.75}
\hypersetup{
colorlinks,
linkcolor={red!50!black},
citecolor={blue!50!black},
urlcolor={blue!80!black}
}
\usepackage{booktabs, makecell, tabularx}
\renewcommand\arraystretch{1.3}
\usepackage{verbatim}
\usepackage{pbox}
\usepackage{enumitem}
\setlist[itemize]{leftmargin=*}
\usepackage{url}
\setlength{\parindent}{0pt}
\pagestyle{empty}
\newcommand{\resheading}[1]{\medskip
\colorbox{mygrey}{\begin{minipage}{\dimexpr\textwidth-
2\fboxsep\relax}\small
\textbf{#1 \vphantom{p\^{E}}}
\end{minipage}}
\par\medskip}
\newcommand{\ressubheading}[3]{
\begin{tabular*}{\textwidth}{l @{\extracolsep{\fill}} r}
\textsc{\textbf{#1}} & \textsc{\textit{[#2]}} \\
\end{tabular*}\vspace{-8pt}}
\begin{document}
\linespread{1.25}
\begin{center} \textbf{TRIDEV} \end{center}
Roll No.: \textbf{2K20/AE/73} \\
Email-id : \textbf{tridev} \\
Mobile No.: \textbf{+91-} \\
\resheading{INTERNSHIPS}
\begin{itemize}
\item \textbf{Role, Company} \hfill \textit{(Dates)}
\begin{itemize}
\item Work description.
\end{itemize}
\end{itemize}
\end{document}