I want to align left my text after two words like image given below. How can i fix the problem? Thank you.
\documentclass[12pt]{report}
\usepackage[hidelinks]{hyperref}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[turkish,english,shorthands=:!]{babel}
\usepackage{apacite}
\usepackage[a4paper,left=30mm,top=30mm,right=25mm,bottom=25mm]{geometry}
\usepackage{epigraph}
\usepackage{graphicx}
\usepackage{float}
\usepackage{mathptmx}
\usepackage[titletoc,title]{appendix}
\usepackage{afterpage}
\usepackage[doublespacing]{setspace}
\usepackage{tocloft}
\usepackage{url}
\usepackage{indentfirst}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usepackage{longtable}
\usepackage{lipsum}
\begin{document}
\thispagestyle{plain}
\phantomsection
\begin{center}
Yüksek Lisans Tezi\\
\singlespacing %\doublespacing
\addcontentsline{toc}{chapter}{ÖZET}
{\fontsize{12pt}{12pt}\selectfont \textbf{\MakeUppercase{Özet}}}\\
\vspace{\baselineskip}
THESIS NAME\\
\singlespacing
Writer's Name\\
\singlespacing
Teknik Üniversitesi\\
Fen Bilimleri Enstitüsü\\
A Anabilim Dalı\\
Danışman: Dr. John DOE\\
2019, 100 (Tez Sayfa), 5 (Ek Sayfalar)
\end{center}
%%% Özet
\par Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\\
\singlespace
\noindent \textbf{Anahtar Kelimeler} :Ullamco Laboris Nisi, Aliquip, Commodo, Consequat, Duis, Aute, Irure Dolor Reprehenderit, Voluptate, Velit, Vsse, Cillum, Dolore Deu Fugiat, Nulla, Pariatur, Excepteur, Sint, Occaeca Cupidatat, Proident
\clearpage
\end{document}
Best Answer
This answer probably makes little sense in 2018, but anyway…
Torbjørn T.’s answer is very good (I’ve upvoted it), but LaTeX users who are aware of what actually goes on inside the innards of the underlying TeX engine probably can’t help remarking that it puts an unnecessary burden on the typesetting engine itself. Indeed, the
tabularx
environment works by repeatedly typesetting each “X
-column” several times until it reaches the desired result; now, it is true that in this case the environment is capable of guessing the correct width of the uniqueX
-column in the first try, typesetting the column itself only once (as one can prove by experiment), and that Torbjørn’s solution can therefore be regarded as an automated version of Fran’s that doesn’t require to indicate manually the width of the\parbox
; it is true that, even if this were not the case, with the speed of today’s (and also of yesterday’s…) computers the overburden imposed by the use oftabularx
would anyhow be of no significance at all; but again, users acquainted with the underlying TeX engine know very well that it embodies a mechanism explicitly devoted to obtaining this effect (which is called hanging indentation in the typesetting world) as an integrant part of one of its most basic routines, the paragraphing algorithm. A solution that exploits this mechanism could therefore be of some interest, at least from the point of view of elegance. After all, if The TeXbook reminds us, on p. 208, thatwhat should be said of something that combines aesthetics and efficiency?
(Note that the present solution is also clearly superior in the management of the interline glue, a topic we don’t want to discuss here; moreover, it allows page breaks in the middle of the indented paragraphs, which could be a Good Thing or a Bad Thing, depending on the circumstances.)
In the code below, we define:
a command named
\mySingleParHangFrom
, which can be used to typeset a single paragraph with hanging indentation; normal margins will resume when this single paragraph ends;an environment named
myHangFrom
, which should be used if you want to typeset several paragraphs with hanging indentation; this hanging indentation will last until the end of the environment.The code:
The output it produces:
For further explanations, see The TeXbook, p. 102–103.