1
\documentclass[12pt, twoside]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[English]{babel}
\usepackage[width=17cm,height=22cm]{geometry}
\usepackage{fancyhdr}
\usepackage[square,numbers]{natbib}
\usepackage[nottoc,numbib]{tocbibind}
\pagestyle{fancy}
\setlength{\headheight}{20pt}
\linespread{1.1}
\fancyhead[E]{\thepage\hfill \textit{\nouppercase{\rightmark}}}
\fancyhead[O]{\textit{\nouppercase{\leftmark}}\hfill\thepage}
\renewcommand{\headrulewidth}{0.5pt}
\cfoot{}
\usepackage{amsmath,amssymb,mathtools}
\usepackage{url}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric}
\newcommand{\bD}{\mathbb{D}}
\newcommand{\bR}{\mathbb{R}}
\newcommand{\bZ}{\mathbb{Z}}
\newcommand{\bC}{\mathbb{C}}
\newcommand{\bN}{\mathbb{N}}
\newcommand{\cH}{\mathcal{H}}
\newcommand{\cA}{\mathcal{A}}
\renewcommand{\phi}{\varphi}
\newcommand{\arctanh}{\operatorname{arctanh}}
\newcommand{\sinc}{\operatorname{sinc}}
\newcommand{\eqdef}{\coloneqq}
\newcommand{\eps}{\varepsilon}
\newcommand{\de}{\delta}
\usepackage{amsthm}
\newtheorem{thm}{Teorema}
\newtheorem{prop}[thm]{Proposición}
\newtheorem{lem}[thm]{Lema}
\newtheorem{conj}[thm]{Conjetura}
\theoremstyle{definition}
\newtheorem{defn}[thm]{Definición}
\newtheorem{cor}[thm]{Corolario}
\newtheorem{ex}[thm]{Ejemplo}



\usepackage{xcolor}
\newenvironment{egornote}{\color{blue}}{}

\title{ hjk}
\author{ \\
[1cm]{Directores de tesis:
}}
\date{July 2021}
\begin{document}


   \begin{titlepage}
   \hspace*{-0.5in}
        \thispagestyle{empty}
        \begin{minipage}[c][0.17\textheight][c]{0.25\textwidth}
            \begin{center}
                \includegraphics[width=4.0cm, height=4.0cm]{imagenes/xc.jpg}
            \end{center}
        \end{minipage}
        \begin{minipage}[c][0.195\textheight][t]{0.75\textwidth}
            \begin{center}
                \vspace{0.3cm}
                \Large{\textbf{\textcolor{black} { University }}}\\[0.1mm]
                \vspace{0.3cm}
                \rule[3mm]{140mm}{3pt}
                \vspace{-0.1cm}
                \hspace{13pt}\rule[3mm]{130mm}{2pt}
                \vspace{-0.5cm}
        \normalsize{\textbf{\fontsize{40}{50}{Master Thesis}}}\\[ .2in]%[0.5cm]
            \end{center}
        \end{minipage}
\hspace*{-0.1in}
        \begin{minipage}[c][0.81\textheight][t]{0.25\textwidth}
            \vspace*{5mm}
            \begin{center}
                \hskip2.0mm
                \rule[-1cm]{6pt}{15cm} 
                \vspace{5mm}
                \hskip2pt
                \rule[0cm]{3pt}{14cm}
                \hskip1mm
                \rule[2cm]{2pt}{12cm} \\
                \vspace{5mm}
                \includegraphics[width =3cm, height=3.5cm]{imagenes/vb.jpg}
            \end{center}
        \end{minipage}
        \begin{minipage}[c][0.81\textheight][t]{0.75\textwidth}
            \begin{center}
               % \vspace{1cm}
                %{\large\scshape Master Thesis }\\[.2in]

               % \vspace{1cm}            

               % \textsc{\LARGE 
%\hspace{1.5cm}E\hspace{1.5cm}S\hspace{1.5cm}I\hspace{1.5cm}S}\\[0.5cm]
               \Large{\textbf{\textcolor{black} {topic}}}\\[0.5cm]
                 \normalsize{\textbf Submitted by :}\\[0.5cm]
                 \normalsize{\textbf {}}\\[0.5cm]
                 \normalsize{\textbf {Enroll\# : }}\\[0.5cm]          

                \vspace{0.3cm}

                \large{\emph Supervisors:\\[0.3cm] }\large{\textbf {Prof \\[0.2cm]}}

            \large{\textbf {Prof}}\\[.2in]

                \vspace{0.3cm}
                \begin{center}
                %\vspace{0.5cm}
                \normalsize{\textbf Thesis submitted }\\[.2in]
                \vspace{0.3cm}      
                 \end{center}
                \begin{center}
                %\vspace{0.5cm}
                \Large{\textbf{\textcolor{black} Institute of Earth and Environmental Sciences
}}\\[.2in]
                 \end{center}
                \normalsize{\textbf{place}}{ }\normalsize{\textbf{\today}}
            \end{center}
        \end{minipage}
    \end{titlepage}
\end{document}

egreg
  • 1,121,712
Umer
  • 11
  • 2
    Please add the code for your current title page, including the documentclass and all the packages that you use. Of course you can replace sensitive or personal information if needed. – Marijn Feb 08 '23 at 08:50
  • \rule[3mm]{140mm}{3pt} \vspace{-0.5cm} \hspace{13pt}\rule[3mm]{130mm}{2pt} \vspace{-0.5cm} \normalsize{\textbf{\fontsize{40}{50}{Master Thesis}}}\[ .2in] – Umer Feb 08 '23 at 08:58
  • \documentclass[12pt, twoside]{book} – Umer Feb 08 '23 at 09:01
  • 1
    @Umer please add a short, but compilable test document to your question. As you can see, comments are not good for sharing code, no line breaks etc. – samcarter_is_at_topanswers.xyz Feb 08 '23 at 09:05
  • 1
    Please edit the code into your question instead of in comments. Also it would be easier to reproduce if the code was complete, including \begin{document} and \end{document}, and anything else needed to be able to compile the document without errors resulting in the title page. – Marijn Feb 08 '23 at 09:05
  • It's mean i add the entire code for my title page or only a selective portion – Umer Feb 08 '23 at 09:10
  • a complete file people can run through latex to see your ruls and test answers – David Carlisle Feb 08 '23 at 09:12
  • \rule[3mm]{140mm}{3pt} \vspace{-0.5cm} \hspace{13pt}\rule[3mm]{130mm}{2pt} adds -0.5 cm after the second rule not between them, use \rule[3mm]{140mm}{3pt} \par\vspace{-0.5cm} \hspace*{13pt}\rule[3mm]{130mm}{2pt} – David Carlisle Feb 08 '23 at 09:13
  • Thanks a lot for your comment. I add the vspace command after the second rule but still same issue. Thanks – Umer Feb 08 '23 at 09:18
  • size commads do not take an argument \Large{..} , \normalsize{..} should not havee {} also we can not use \includegraphics[width=4.0cm, height=4.0cm]{imagenes/xc.jpg} – David Carlisle Feb 08 '23 at 09:21
  • I add the entire code for the title page. – Umer Feb 08 '23 at 09:40
  • 1
    Welcome. // Please delete packages from your code which are not needed to show your problem. After that cleanup (and update of your question) it may be a good idea to add a screenshot to your question "this is how it looks like after compile". // Also, kindly review the comments made so far, and enter relevant information and add-ons to your question. It's always difficult, to get peoples intention from a title and some long code only. Future readers will have a hard time, else. Thanks – MS-SPO Feb 08 '23 at 09:42
  • 1
    ". I add the vspace command after the second rule" no you want vspace between the rules, but as I wrote, put \par (or a blank line) before \vspace – David Carlisle Feb 08 '23 at 10:30

2 Answers2

2

A more reasonable example document would be

\documentclass{article}

\begin{document}

xxx

\rule[3mm]{140mm}{3pt} \vspace{-0.5cm} \hspace{13pt}\rule[3mm]{130mm}{2pt}

yyy

\end{document}

which makes

enter image description here

You have added both rules in the same paragraph, they only appear one above the other due to line breaking so the \hspace is discarded and the \vspace is inserted after the line, so raises yyy.

You want to stack vertically so use separate paragraphs, and use \hspace* if you want space at the start of a line.

\documentclass{article}

\begin{document}

xxx

\rule[3mm]{140mm}{3pt}

\vspace{-0.25cm} \hspace*{13pt}\rule[3mm]{130mm}{2pt}

yyy

\end{document}

enter image description here

David Carlisle
  • 757,742
1

\noindent removes the paragraph indentation. Don't use \hspace{-<length>}, which I think was meant to negate the indentation.

If you want to stack things vertically, such as texts, minipages, tables, figures etc., you have to form separate paragraphs. Either leave an empty line(s) (which is(are) converted to \par) or add \par, explicitly. I think that is one of your major problems.

If you want exact spacing between lines specified by \vspace{}, you may want to turn off extra glue LaTeX adds between paragraph lines. Either add \nointerlineskip before the next \rule or \offinterlineskip as the first thing in the current environment, such as minipage--don't use it globally because it affects everything in that scope!

Any item that requires width as a parameter, say \rule or \includegraphics, can take a relative width to its parent box, in your case the width of minipage if you use X\linewidth--particularly 1\linewidth or simply \linewidth means the full width of a parent box.

I removed all unnecessary packages. Currently, minipages do not add to the \textwidth. I left a stretchable gap by inserting \hfill between them. If you like, change proportions of both minipages. When they add to 1\textwidth, you no longer need \hfill but keep % after the first minipage! Also, minipage adapts height of its box based on the content. There is no need for extra parameters if you expect alignment w.r.t middle points.

This is one example solution for your title

\documentclass[12pt, twoside]{book}
\usepackage[width=17cm,height=22cm]{geometry}
\usepackage[draft]{graphicx}   % Remove [draft] to render images

%%% For demostration \usepackage{showframe} \renewcommand\ShowFrameLinethickness{0.2pt} \renewcommand\ShowFrameColor{\color{blue}}

\begin{document} \begin{titlepage} \thispagestyle{empty}

\noindent \begin{minipage}{0.25\textwidth} \centering \includegraphics[width=\linewidth, height=\linewidth]{imagenes/xc.jpg} \end{minipage}% <--- Keep % here to avoid extra space \hfill \begin{minipage}{0.7\textwidth} \offinterlineskip % all \vspace'es mean exact space \centering {\Large\textbf{University}} \par\vspace{0.15in}\rule{\linewidth}{3pt} \par\vspace{1mm}\rule{0.9\linewidth}{2pt} \par\vspace{0.25in}{\fontsize{40}{50}\selectfont\textbf{Master Thesis}} \end{minipage} \end{titlepage} \end{document}

enter image description here

Celdor
  • 9,058