\newcommand{\ressubheading}[4]{
\begin{tabular*}{6.5in}{l@{\extracolsep{\fill}}r}
\textbf{#1} & #2 \\
\textit{#3} & \textit{#4} \\
\end{tabular*}\vspace{-6pt}}
Estou usando este comando
\ressubheading{Graph Plotter (Course Project)}{CSE, XYZ} {Guide: Prof.ABC}{Autumn, 2013}
mas o marcador e o início do texto estão um pouco deslocados.
Como devo resolver isso?
Responder1
Primeiro envolva a bola de cristal! Muito provavelmente você está usando este modelo:
\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}
Neste modelo, o layout da página é definido com exatidão e, portanto, é seguro usar
\begin{tabular*}{6.5in}
Mas quando você muda o layout, coisas malucas acontecem.
\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 pol. é uma dimensão muito grande aqui e, portanto, as coisas se espalham no lado direito. Há também \indent
um pouco antes do tabular para se preocupar
Altere a definição para:
\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}}
Você obtém: