0

I need help in formatting the titlepage. Here is how it looks (generating an extra empty empty page):

enter image description here

Here is my MWE:

\documentclass[12pt]{book}
\usepackage{graphicx}
\begin{document}
\begin{titlepage}
\hbox{
\hspace*{0.2\textwidth} 
\rule{1pt}{\textheight} 
\hspace*{0.05\textwidth}
\parbox[b]{0.75\textwidth}{
{\noindent\Huge\bfseries Java \\[0.5\baselineskip] Notes}\\[2\baselineskip] 
\includegraphics{logo}
{\Large \textsc{Subham Soni}} 
\vspace{0.5\textheight}
}}

\end{titlepage}
\end{document} 

1 Answer 1

1

You can use the framed-package to solve your problem.

\documentclass[12pt]{book}
\usepackage{graphicx}
\usepackage{xcolor}

\usepackage{framed}

\newenvironment{newfbox}[1][0.5\hsize]
{%
    \def\FrameCommand
    {%
        {\color{black}\vrule width 1pt}%
        \hspace{0.05\textwidth}
        \fboxsep=\FrameSep\colorbox{white}%
    }%

    \MakeFramed{\hsize#1\advance\hsize-\width\FrameRestore}%
}
{\endMakeFramed}

\begin{document}
\begin{titlepage}

\begin{newfbox}
{\noindent\Huge\bfseries Java \\[0.5\baselineskip] Notes}
\\[2\baselineskip] 
\includegraphics{logo}
{\Large \textsc{Subham Soni}} 

\end{newfbox}

\end{titlepage}
\end{document} 

Change the number before \hsize for horizontal alignment

\newenvironment{newfbox}[1][0.5\hsize]

and the \hspace to get more or less distance to the rule.

\hspace{0.05\textwidth}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .