2

I am trying to create a title page for my thesis. I did this code with the help of friends on this site. Now I have a new problem. In my code I want to change the text height and line spacing in only one text block (last block). And also I want to include a paragraph indent in this block. Or can I write a normal text in here but it must start 26.5 cm below the top of the page? Could you show me a way to do this?

\documentclass{book}
\usepackage[turkish]{babel}%türkçe karakter
\usepackage[utf8]{inputenc}
\usepackage{textpos}

\newcommand{\fromtop}[1]{%
\dimexpr-1in-\topskip-\topmargin-\headheight-\headsep+#1\relax
 }
\newcommand{\fromleft}[1]{%
\dimexpr-1in-\oddsidemargin+#1\relax
}

\begin{document}

\begin{titlepage}
\setlength{\parindent}{0pt}

\begin{textblock*}{\paperwidth}(\fromleft{0cm},\fromtop{3cm})
\centering
    \textbf{ASDGGSDFG ÜNİVERSİTESİ\\
    DASDGG ENSTİTÜSÜ}
\end{textblock*}

\begin{textblock*}{\paperwidth}(\fromleft{0cm},\fromtop{6.5cm})
\centering
\textbf{DHFGHDH ANABİLİM DALI}
\end{textblock*}

\begin{textblock*}{\paperwidth}(\fromleft{0cm},\fromtop{9.5cm})
\centering
\textbf{ASGFHFDHDGH\\
DFHSGFHDFHG}
\end{textblock*}

\begin{textblock*}{\paperwidth}(\fromleft{0cm},\fromtop{15cm})
\centering
\textbf{DOKTORA TEZİ}
\end{textblock*}

\begin{textblock*}{\paperwidth}(\fromleft{0cm},\fromtop{16cm})
\centering
    \textbf{adgdfhf}\\
    \textbf{124356}
\end{textblock*}

\begin{textblock*}{\paperwidth}(\fromleft{0cm},\fromtop{19.5cm})
\centering
    \textbf{Tezin Savunma Tarihi    : 00.00.0000}
\end{textblock*}

\begin{textblock*}{\paperwidth}(\fromleft{0cm},\fromtop{23cm})
\centering
    \textbf{Tez Danışmanı   : asdf}
\end{textblock*}

\begin{textblock*}{\paperwidth}(\fromleft{4cm},\fromtop{26.5cm})
Bu Yüksek Lisans/Doktora Tez Çalışması FDGSDFGHH Üniversitesi\\………………’nolu        Proje ile desteklenmiştir.
\end{textblock*}

\end{titlepage}

\end{document}
  • What size paper are you using? You cannot change the \textheight for just one block of text on the page because this dimension is the height of the entire text block for the page i.e. everything except the page margins, header, footer and so on. – cfr Jan 10 '16 at 0:28
  • Paper size is A4 (210x297 mm^2). May be i couldn't tell clearly :( Text height mean letter size like 12 pt or 11 pt. – Cengiz Görkem DENGİZ Jan 10 '16 at 8:04
2

Here's a way to indent the final block by limiting the scope of the \setlength{\parindent}{0pt} and adding an explicit skip at the start.

\documentclass{book}
\usepackage[turkish]{babel}%türkçe karakter
\usepackage[utf8]{inputenc}
\usepackage{textpos}
\newcommand{\fromtop}[1]{\dimexpr-1in-\topskip-\topmargin-\headheight-\headsep+#1\relax}
\newcommand{\fromleft}[1]{\dimexpr-1in-\oddsidemargin+#1\relax}
\begin{document}

\begin{titlepage}

    \begin{textblock*}{\paperwidth}(\fromleft{0cm},\fromtop{3cm})
      \centering
      \textbf{ASDGGSDFG ÜNİVERSİTESİ\\
        DASDGG ENSTİTÜSÜ}
    \end{textblock*}

    \begin{textblock*}{\paperwidth}(\fromleft{0cm},\fromtop{6.5cm})
      \centering
      \textbf{DHFGHDH ANABİLİM DALI}
    \end{textblock*}

    \begin{textblock*}{\paperwidth}(\fromleft{0cm},\fromtop{9.5cm})
      \centering
      \textbf{ASGFHFDHDGH\\
        DFHSGFHDFHG}
    \end{textblock*}

    \begin{textblock*}{\paperwidth}(\fromleft{0cm},\fromtop{15cm})
      \centering
      \textbf{DOKTORA TEZİ}
    \end{textblock*}

    \begin{textblock*}{\paperwidth}(\fromleft{0cm},\fromtop{16cm})
      \centering
      \textbf{adgdfhf}\\
      \textbf{124356}
    \end{textblock*}

    \begin{textblock*}{\paperwidth}(\fromleft{0cm},\fromtop{19.5cm})
      \centering
      \textbf{Tezin Savunma Tarihi    : 00.00.0000}
    \end{textblock*}

    \begin{textblock*}{\paperwidth}(\fromleft{0cm},\fromtop{23cm})
      \centering
      \textbf{Tez Danışmanı   : asdf}
    \end{textblock*}%

  \begin{textblock*}{\paperwidth}(\fromleft{4cm},\fromtop{26.5cm})
    \hskip \parindent Bu Yüksek Lisans/Doktora Tez Çalışması FDGSDFGHH Üniversitesi\\………………’nolu        Proje ile desteklenmiştir.
  \end{textblock*}

\end{titlepage}

\end{document}

If you need to alter the spacing of the text within this block, you could load the setspace package. You can then use

\begin{singlespace}
  <content>
\end{singlespace}

\begin{onehalfspace}
  <content>
\end{onehalfspace}

\begin{doublespace}
  <content>
\end{doublespace}

for single, 1.5 and double spacing or

\begin{spacing}{<whatever>}
  <content>
\end{spacing}

if you need a different value.

It is not clear what you mean by changing the text height. The \textheight is the height of the entire text block i.e. everything except the margins, so obviously cannot be changed for only part of a page.

EDIT

I'm still not entirely clear how the last block should be formatted. Do you want something like the following?

block formatting

The final block here is formatted like this:

  \begin{textblock*}{\paperwidth-80mm}(\fromleft{4cm},\fromtop{26.5cm})
    \begin{doublespace}
      \large Bu Yüksek Lisans/Doktora Tez Çalışması FDGSDFGHH Üniversitesi\\………………’nolu        Proje ile desteklenmiştir.
    \end{doublespace}
  \end{textblock*}

As mentioned by egreg, we can actually drop the zeroing of the \parindent as all blocks except the last are centred anyway. So we can just let the natural paragraph indentation indent the first line.

\large increases the font size, relative to the document default.

Changing the width of the text block ensures that it has 4cm indentation on both the left and right sides of the page.

Complete code:

\documentclass{book}
\usepackage[turkish]{babel}%türkçe karakter
\usepackage[utf8]{inputenc}
\usepackage{textpos,calc,setspace}
\newcommand{\fromtop}[1]{\dimexpr-1in-\topskip-\topmargin-\headheight-\headsep+#1\relax}
\newcommand{\fromleft}[1]{\dimexpr-1in-\oddsidemargin+#1\relax}
\begin{document}

\begin{titlepage}
  \begin{textblock*}{\paperwidth}(\fromleft{0cm},\fromtop{3cm})
    \centering
    \textbf{ASDGGSDFG ÜNİVERSİTESİ\\
      DASDGG ENSTİTÜSÜ}
  \end{textblock*}
  \begin{textblock*}{\paperwidth}(\fromleft{0cm},\fromtop{6.5cm})
    \centering
    \textbf{DHFGHDH ANABİLİM DALI}
  \end{textblock*}
  \begin{textblock*}{\paperwidth}(\fromleft{0cm},\fromtop{9.5cm})
    \centering
    \textbf{ASGFHFDHDGH\\
      DFHSGFHDFHG}
  \end{textblock*}
  \begin{textblock*}{\paperwidth}(\fromleft{0cm},\fromtop{15cm})
    \centering
    \textbf{DOKTORA TEZİ}
  \end{textblock*}
  \begin{textblock*}{\paperwidth}(\fromleft{0cm},\fromtop{16cm})
    \centering
    \textbf{adgdfhf}\\
    \textbf{124356}
  \end{textblock*}
  \begin{textblock*}{\paperwidth}(\fromleft{0cm},\fromtop{19.5cm})
    \centering
    \textbf{Tezin Savunma Tarihi    : 00.00.0000}
  \end{textblock*}
  \begin{textblock*}{\paperwidth}(\fromleft{0cm},\fromtop{23cm})
    \centering
    \textbf{Tez Danışmanı   : asdf}
  \end{textblock*}%
  \begin{textblock*}{\paperwidth-80mm}(\fromleft{4cm},\fromtop{26.5cm})
    \begin{doublespace}
      \large Bu Yüksek Lisans/Doktora Tez Çalışması FDGSDFGHH Üniversitesi\\………………’nolu        Proje ile desteklenmiştir.
    \end{doublespace}
  \end{textblock*}
\end{titlepage}

\end{document}
  • Thank you. I tried your suggestion. Line spacing worked well but parindent not. For parindent i want to write justify two side for last block and parindent for first line of this block. The margins of this paper (A4) is for left 4 cm and the other sides 2.5 cm. And textheight i mean text size or letter size like 12 pt, 11 pt. – Cengiz Görkem DENGİZ Jan 10 '16 at 8:01
  • 1
    \centering sets a zero parindent by itself. – egreg Jan 10 '16 at 13:17
  • @egreg Thanks. I didn't notice all the blocks except the last were centred anyway. – cfr Jan 10 '16 at 17:13
  • 1
    @CengizGörkemDENGİZ So just adjust the width to whatever you want. I took 80mm off \paperwidth. Probably you'll want to take off 65mm. Although it probably won't look any different since the lines are not long enough to wrap in any case. But however you want it, you just specify it as shown in the example I posted. – cfr Jan 10 '16 at 19:22
  • 1
    @CengizGörkemDENGİZ Did you add the calc package as shown in my example? – cfr Jan 10 '16 at 19:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.