\newcommand{\ressubheading}[4]{
\begin{tabular*}{6.5in}{l@{\extracolsep{\fill}}r}
\textbf{#1} & #2 \\
\textit{#3} & \textit{#4} \\
\end{tabular*}\vspace{-6pt}}
我正在使用這個命令
\ressubheading{Graph Plotter (Course Project)}{CSE, XYZ} {Guide: Prof.ABC}{Autumn, 2013}
但項目符號和文字開頭有一點偏移。
我該如何解決呢?
答案1
首先接觸水晶球!您很可能正在使用此範本:
\documentclass[letterpaper,11pt]{article}
%-----------------------------------------------------------
%Margin setup
\setlength{\voffset}{0.1in}
\setlength{\paperwidth}{8.5in}
\setlength{\paperheight}{11in}
\setlength{\headheight}{0in}
\setlength{\headsep}{0in}
\setlength{\textheight}{11in}
\setlength{\textheight}{9.5in}
\setlength{\topmargin}{-0.25in}
\setlength{\textwidth}{7in}
\setlength{\topskip}{0in}
\setlength{\oddsidemargin}{-0.25in}
\setlength{\evensidemargin}{-0.25in}
%-----------------------------------------------------------
%\usepackage{fullpage}
\usepackage{shading1}
%\textheight=9.0in
\pagestyle{empty}
\raggedbottom
\raggedright
\setlength{\tabcolsep}{0in}
%-----------------------------------------------------------
%Custom commands
\newcommand{\resitem}[1]{\item #1 \vspace{-2pt}}
\newcommand{\resheading}[1]{{\large \parashade[.9]{sharpcorners}{\textbf{#1 \vphantom{p\^{E}}}}}}
\newcommand{\ressubheading}[4]{
\begin{tabular*}{6.5in}[t]{l@{\extracolsep{\fill}}r}
\textbf{#1} & #2 \\
\textit{#3} & \textit{#4} \\
\end{tabular*}\vspace{-6pt}}
%-----------------------------------------------------------
\begin{document}
\begin{tabular*}{7in}{l@{\extracolsep{\fill}}r}
\textbf{\Large David Grant} & 604-555-5555\\
\#666-1234 Main Street & davidgrant-at-gmail.com \\
Vancouver, BC A1B 2C3 & http://www.davidgrant.ca\\
\end{tabular*}
\\
\vspace{0.1in}
\resheading{Education}
\begin{itemize}
\item
\ressubheading{University of Waterloo}{Waterloo, ON}{M.A.Sc., Electrical Engineering (Grades: 80\%)}{Sep. 2002 - May. 2004}
\begin{itemize}
\resitem{Relevant courses: Semiconductor Devices: Physics and Modelling, Digital VLSI Design, Amorphous Silicon, Mixed-signal modelling with VHDL-AMS}
\end{itemize}
\item
\ressubheading{University of British Columbia}{Vancouver, BC}{B.A.Sc. Engineering Physics (Electrical Engineering Option)}{1997-2002}
\begin{itemize}
\resitem{Graduated with Honors, \textbf{86\%} cumulative average, and Dean's Honour List each year.}
\resitem{Relevant courses: Solid-state physics, Quantum Mechanics, Semiconductor Devices (BJT, HBT, FET, analog IC layout and simulation), Digital Systems Design using VHDL, Waveguides and Photonics, RF, Analog/Digital Communications Systems, Analog Hardware Design}
\end{itemize}
\end{itemize}
\ressubheading{Graph Plotter (Course Project)}{CSE, XYZ}
{Guide: Prof.ABC}{Autumn, 2013}
\end{document}
在此範本中,頁面佈局已精確定義,因此可以安全使用
\begin{tabular*}{6.5in}
但當你改變佈局時,就會發生奇怪的事情。
\documentclass{article}
\usepackage{showframe} %% just for demo
%-----------------------------------------------------------
\newcommand{\ressubheading}[4]{
\begin{tabular*}{6.5in}[t]{l@{\extracolsep{\fill}}r}
\textbf{#1} & #2 \\
\textit{#3} & \textit{#4} \\
\end{tabular*}\vspace{-6pt}}
%-----------------------------------------------------------
\begin{document}
\ressubheading{Graph Plotter (Course Project)}{CSE, XYZ}
{Guide: Prof.ABC}{Autumn, 2013}
\end{document}
6.5 英寸的尺寸太大了,因此東西會溢出到右側。\indent
表格之前也有需要關心的
將定義更改為:
\newcommand{\ressubheading}[4]{% %%%<--- Better to put a % here
\noindent %% < this added
\begin{tabular*}{\linewidth}[t]{l@{\extracolsep{\fill}}r} %%% 6.5in → \linewidth
\textbf{#1} & #2 \\
\textit{#3} & \textit{#4} \\
\end{tabular*}\vspace{-6pt}}
你得到: