2

The Latex code is

\documentclass{article}
\begin{document}
Beginning

\Large{Title1}

\medskip

\large{\textbf{subtitle1}}
\medskip

\setlength{\leftskip}{1cm}
2012\textendash 2015 \quad \quad wp1.1.\\
\quad pos1.1.\\
\quad tsk1.1.
\medskip

2012\textendash 2015 \quad \quad wp1.2.\\
\quad pos1.2.\\
\quad tsk1.2.
\medskip

2012\textendash 2015 \quad \quad wp1.3.\\
\quad pos1.3.\\
\quad tsk1.3.
\medskip

\setlength{\leftskip}{0cm}
\medskip

\large{\textbf{subtitle2}}
\medskip

\setlength{\leftskip}{1cm}
2010\textendash 2012 \quad wp2\\
\quad pos2\\
\quad tsk2
\setlength{\leftskip}{0cm}

End
\end{document}

The output is

enter image description here

Why does indenting fail after subtitle2? Also there is a problem of font size of "End" which should be equal to the font size of "Beginning".

2
  • For the fot size problem, \Large is a switch, not a command with an argument. Everything after this command will have the Large size, until you change it to (probably) \normalsize.
    – Bernard
    Commented Dec 5, 2016 at 10:59
  • you are making the entire document \Large but also you should never set \leftskip directly it is a tex primitive and setting it will break many latex constructs not least all list constructs. Why are you not using heading commands for the headings? Commented Dec 5, 2016 at 12:05

2 Answers 2

4

Beginning a new paragraph should solve the problem:

\documentclass{article}
\begin{document}
Beginning

\Large{Title1}

\medskip

\large{\textbf{subtitle1}}
\medskip

\setlength{\leftskip}{1cm}
2012\textendash 2015 \quad \quad wp1.1.\\
\quad pos1.1.\\
\quad tsk1.1.
\medskip

2012\textendash 2015 \quad \quad wp1.2.\\
\quad pos1.2.\\
\quad tsk1.2.
\medskip

2012\textendash 2015 \quad \quad wp1.3.\\
\quad pos1.3.\\
\quad tsk1.3.
\medskip

\setlength{\leftskip}{0cm}
\medskip

\large{\textbf{subtitle2}}
\medskip

\setlength{\leftskip}{1cm}
2010\textendash 2012 \quad wp2\\
\quad pos2\\
\quad tsk2

\setlength{\leftskip}{0cm} %here a new paragraph - PS

End
\end{document}

enter image description here

(And certainly your \Large acts globally).

4
  • What did you change? Where did you insert and how the beginning of a new paragraph?
    – Viesturs
    Commented Dec 5, 2016 at 11:17
  • 1
    @Viesturs A new paragraph is obtained by adding a new line before last \setlength{\leftskip}{0cm}. Commented Dec 5, 2016 at 11:33
  • @Viesturs Now it is marked %here a new paragraph - PS. Commented Dec 5, 2016 at 11:37
  • you left the OPs error that the entire document is \large Commented Dec 5, 2016 at 12:03
6

A syntax such as \large{word} will make the entire document \large it should be {\large word} but explicit size changes and spacing should be avoided wherever possible, and markup should be used that is closer to the intended meaning, headings here. Also it is not supported to set the \leftskip primitive directly in LaTeX, many constructs notably any list environment needs to be able to set this internally and set latex parameters such as \lineskip to compatible values at the same time.

I would suggest a markup closer to

enter image description here

\documentclass{article}
\newcounter{wp}[subsection]
\renewcommand\thewp{\arabic{subsection}\ifnum\value{wp}>0.\arabic{wp}\fi}

\newcommand\WPsection[1]{%
\refstepcounter{subsection}%
\subsection*{#1}}

\newcommand\SWP[1]{%
\refstepcounter{wp}%
\subsubsection*{#1\qquad wp\thewp}%
}
\newcommand\WP[1]{%
\subsubsection*{#1\qquad wp\thewp}%
}

\newcommand\pos{\par \noindent\hspace{2em}\makebox[2em][l]{pos}\thewp\par}
\newcommand\tsk{\par \noindent\hspace{2em}\makebox[2em][l]{tsk}\thewp\par}
\begin{document}
Beginning

\section*{Title1}



\WPsection{subtitle1}

\SWP{2012--2015}
\pos
\tsk



\SWP{2012--2015}
\pos
\tsk


\SWP{2012--2015}
\pos
\tsk


\WPsection{subtitle2}

\WP{2010-2012}
\pos
\tsk


End
\end{document}

You must log in to answer this question.

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