GeneralMisalignment of \vrule

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
abikutn
Posts: 18
Joined: Sat May 12, 2012 8:44 pm

Misalignment of \vrule

Post by abikutn »

Hello, I have been writing my thesis and there is this one problem that I cant seem to figure out why it happens :
The following is a segment of the code from my thesis style sheet. This defines the first reader and second reader for my signature page.
And I have also attached a output snap of my pdf of the problem.
Can someone please tell me why this occurs ?

Code: Select all

Code, edit and compile here:
% Signature page
\def\signaturepage{%
\newpage
\thispagestyle{empty} % KS 2009
\begin{center}
\Large\uppercase\expandafter{\@title}
\end{center}
\vspace{.4in}
\centerline{\shortstack[c]{\vrule width 2in height 0.4pt\\
\@author}}
\vfill
% \vspace{0.15in}
% \hspace{0in} \rm APPROVED:
\leftline{ Approved:} % KS 2009
\vspace{0.15in}
\rightline{\shortstack[l]{\vrule width 3in height 0.4pt\\ \@adviser}}
% \vspace{0.15in}
\vfill
\leftline{Committee Members:} % KS 2009
% \vspace{0.375in}
\vspace{0.15in}
\rightline{\shortstack[l]{\vrule width 3in height 0.4pt\\ \@firstreader}}
% \vspace{.375in}
\vfill
\rightline{\shortstack[l]{\vrule width 3in height 0.4pt\\ \@secondreader}}
% \vspace{.375in}
\vfill
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Please see the mis-alignment in the first reader and second reader.
Please see the mis-alignment in the first reader and second reader.
signpage800.png (67.74 KiB) Viewed 7593 times
Last edited by cgnieder on Mon Nov 26, 2012 11:45 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX books
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Misalignment of \vrule

Post by cgnieder »

Could you make that code fragment into a Infominimal working example? I tried but cannot get the behaviour your picture shows:

Code: Select all

Code, edit and compile here:
\documentclass{article}
\makeatletter
\def\adviser#1{\gdef\@adviser{#1}}
\def\firstreader#1{\gdef\@firstreader{#1}}
\def\secondreader#1{\gdef\@secondreader{#1}}
% Signature page
\def\signaturepage{%
\newpage
\thispagestyle{empty} % KS 2009
\begin{center}
\Large\uppercase\expandafter{\@title}
\end{center}
\vspace{.4in}
\centerline{\shortstack[c]{\vrule width 2in height 0.4pt\\
\@author}}
\vfill
% \vspace{0.15in}
% \hspace{0in} \rm APPROVED:
\leftline{ Approved:} % KS 2009
\vspace{0.15in}
\rightline{\shortstack[l]{\vrule width 3in height 0.4pt\\ \@adviser}}
% \vspace{0.15in}
\vfill
\leftline{Committee Members:} % KS 2009
%\vspace{0.375in}
\vspace{0.15in}
\rightline{\shortstack[l]{\vrule width 3in height 0.4pt\\ \@firstreader}}
%\vspace{.375in}
\vfill
\rightline{\shortstack[l]{\vrule width 3in height 0.4pt\\ \@secondreader}}
%\vspace{.375in}
}
\makeatother
\author{Author}
\title{Title}
\adviser{Advisor\\Sample University}
\firstreader{Firstreader\\Sample University}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Regards

PS: For reference and information for potential helpers: this question has also been asked on TeX.sx. Our board rules require that a direct link is given for cross posts.
site moderator & package author
User avatar
Stefan Kottwitz
Site Admin
Posts: 10308
Joined: Mon Mar 10, 2008 9:44 pm

Re: Misalignment of \vrule

Post by Stefan Kottwitz »

I support Clemens' remark: also I would test your code if you would post a compilable example, with your thesis style as attachment to the post. Just click the "Upload attachment" link when editing.
Once we can test code, we would be able to fix it. ;-)

Stefan
LaTeX.org admin
abikutn
Posts: 18
Joined: Sat May 12, 2012 8:44 pm

Re: Misalignment of \vrule

Post by abikutn »

Oh ok. I can upload the style package and the master file.
Select AS_Thesis_Dev1.tex as master file to compile and view
Attachments
latex community.rar
UNRAR THIS and Select AS_Thesis_Dev1.tex to build and view.
(11.01 KiB) Downloaded 399 times
User avatar
Stefan Kottwitz
Site Admin
Posts: 10308
Joined: Mon Mar 10, 2008 9:44 pm

Misalignment of \vrule

Post by Stefan Kottwitz »

The \vrule of 3in is too short. The wider text below pushes it to the left. Redefine \signature to make it wider. One could simply patch, such as

Code: Select all

Code, edit and compile here:
\usepackage{etoolbox}
\newcommand*{\patch}[1]{%
\patchcmd{\signaturepage}{\vrule width 3in}{\vrule width 3.5in}{#1}{}}
\patch{\patch{\patch{}}}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Perhaps in your case it's easier to shorten the departments or to introduce a line break for the wider texts, such as

Code: Select all

\firstreader{E. Joe Charlson, Professor\\ Dept. of Electrical and\\ Computer Engineering}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Stefan
LaTeX.org admin
abikutn
Posts: 18
Joined: Sat May 12, 2012 8:44 pm

Re: Misalignment of \vrule

Post by abikutn »

Thank you cgnieder and sthephen. Great help and also I shall remem to post link to outside posts apart from this ...

Best,
Abhi=
Post Reply