1

I want to set the current text / box insertion point to the point where the current line originally started, no matter where I am on that line. Ordinarily, this would mean I would start overlaying text on existing text, but I'm drawing a pyramid shape (a syntactic tree), and know that the text won't actually overlap, though the bounding boxes do.

The effect would be something like \vspace*{-\baselineskip}\\, but is there a better way?

Edit

Here's a MWE of my layout (the frames and \hrules are intended to help visualize the margins and aid in debugging). (1) demonstrates the default indentation that linguex imposes. (2) is what I get with the default. (3) is what I want, but I'd like to be able to achieve this without the \hskip-\Exlabelwidth\hskip-\Exlabelsep hack. Is there some (La)TeX primitive to do this without having to know where I am on the line?

Linguex examples

\documentclass{minimal}
\usepackage[vmargin=.25in,hmargin=.5in,paperwidth=4.6in,paperheight=6.75in]{geometry}
\usepackage{linguex}
\AtBeginDocument{\settowidth{\Exlabelwidth}{(2)}}
\usepackage{tikz}
\usetikzlibrary{backgrounds} % for [framed] option
\usepackage{tikz-qtree}

\newcommand{\drawtree}{%
  \begin{tikzpicture}[framed,baseline={([yshift={-\ht\strutbox}]current bounding box.north)}]%
    \tikzset{level distance=22pt, every tree node/.style={align=center,anchor=north}}%
    \Tree [.CP
        [.DP {D\\The}
          [.NP {N\\horse}
            [.CP {C\\{[that]}}
              [.VP
                [.V$'$ \edge[roof]; {[was] raced past} ]
                [.DP {D\\the}
                  [.NP \edge[roof]; {barn} ]]]]]]
        [.VP {V\\fell} ]]
  \end{tikzpicture}}

\begin{document}

Consider the following basic example:

\ex. The horse raced past the barn fell.

Consider also its tree form:

\medskip\hrule

\ex. \drawtree

Or, properly centered on the page:

\medskip\hrule

\ex. \hskip-\Exlabelwidth\hskip-\Exlabelsep\hfil\drawtree\hfil

\end{document}
  • 2
    Please provide a Minimum Working Example (MWE). Especially given that you are drawing rather than in standard text mode. – cfr Jul 17 '16 at 0:40
  • If you know for sure you're at the beginning of the line, you can write text and go back to the beginning of the line wi the \rlap{ some text} command. – Bernard Jul 17 '16 at 1:35
  • If you are inside the paragraph and you need to print something at the start of current line, use \vadjust primitive. But your question is not clear (and it is without example), so I do nothing more explicit. – wipet Jul 17 '16 at 8:01
  • 1
    If boxes overlap, then you have to use some sort of overlay trick. For vertical overlap \raisebox{1.6\baselineskip}[0pt]{...} is probably best. For horizontal overlap, \hspace{\dimexpr \linewidth-\textwidth} works for any list environment. – John Kormylo Jul 18 '16 at 16:53

Your Answer

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

Browse other questions tagged or ask your own question.