26

I'm trying to add space to a line so that it lines up with the text above it which is bulletpointed. If I add \indent to the second line it indents the above line too so that it is all shifted over.

\documentclass[10pt]{article}
\begin{document}

\indent $\bullet$ This is the first line 
\\ This is the second line

\end{document}

I want the "This"'s to line up. I've tried adding \ to the line but it doesn't work at the start of the line.

LlamaD
  • 383

4 Answers4

61

For those who would like to know how to achieve space at the beginning of any line:

Tex prevents that, it has to have breakable text in front of white space. \- is the key for breakable, therefore \-\ Text works.

DennisH
  • 1,667
13

Seems like you're trying to reinvent something.

\begin{itemize}
    \item This is the first line \\ %line with dot
          This is the second line   %line without dot 
    \item Next line with dot
\end{itemize}

enter image description here

Rico
  • 6,097
  • Just the first two lines would be closer to each other. I suggest \item One \item[] Two \item Three. – yo' Jan 13 '13 at 18:43
1
\documentclass{article}
\def{\b}{\thinspace} % \b gives on unit spacing.
\begin{document}
This is what is wri \b \b tten. This is what is writ \b ten. This \b \b \b is what is written.
\end{document}
 Here is the answer.

\noindent I do not want to answer.\\
\indent\hspace{2cm}I do not want to answer.\\
\indent\hspace{5cm}I do not want to
 answer. \\

\end{document}

Better to define once own term like def{\b} {\thinspace} def{\c}{\hspace{1cm}} This may work. When I entered the text it added single \ which is command beginning. That was error.

Please enter your text so that I can compile and answer.

vaman
  • 81
0

You can create an invisible character:

\texttt{if (true)\\
\hphantom{~~~~}do();}

enter image description here

But it doesn't work this way with an indented paragraph:

\indent $\bullet$ This is the first line \\
\hphantom{$\bullet$} This is the second line\\
This is the third line

enter image description here

see How do I create an invisible character?

Yola
  • 481