3

Here is my basic problem:

I want to write on a line

Thesis: "something really long that
         should continue here like this"

How can I do that? (without tabular)

Edit:

I am using this inside a tabular environment like this:

\documentclass[a4paper,10pt]{article}

\begin{document}
\begin{tabular}{r|p{11cm}}  
other lines & text here \\
&Thesis: "something really long that\\
&should continue here like this"\\
\end{tabular}

\end{document}
1

2 Answers 2

3

Use \phantom{Thesis:}. This will leave as much space as would be taken up by Thesis:

Here are two methods for your specific case:

\documentclass{article}

\begin{document}
\begin{tabular}{r|l}
other lines & text here \\
&Thesis: "something really long that\\
&\phantom{Thesis: }should continue here like this"\\
\end{tabular}

\hrule
\begin{tabular}{r|p{11cm}}
other lines & text here \\
&Thesis: "something really long that\\
&\noindent\phantom{Thesis: }should continue here like this"\\
\end{tabular}
\end{document}
4
  • Thank you Peter. This works fine in the general case. Unfortunately something gets messed up in my use, I should have been more clear on the description. I'm using this inside a tabular, and if I use the phantom command, it just skips a line. I edited the question.
    – george
    Aug 1, 2011 at 5:10
  • 1
    Please provide a minimum working example (including \documentclass) that illustrates the problem. Difficult to provide guidance otherwise. Aug 1, 2011 at 5:14
  • You are right, I included a complete example now.
    – george
    Aug 1, 2011 at 5:21
  • Have updated the solution to reflect the MWE. Aug 1, 2011 at 5:22
1

You can use the hanging package for this sort of thing:

Here I've created a command which takes one argument, and creates a hanging paragraph with the indent equal to the width of the argument. (I've changed your column width to show the wrapping.)

\documentclass{article}
\usepackage{hanging}
\usepackage{calc}
\newlength{\hangwidth}
\newcommand{\myhang}[1]{\settowidth{\hangwidth}{#1}\hangpara{\hangwidth}{1}#1}
\begin{document}
\begin{tabular}{r|p{3cm}}
other lines & text here \\
&\myhang{Thesis: }``something really long that
should continue here like this''\\
\end{tabular}
\end{document}

output of code

You must log in to answer this question.

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