# gb4e center example text

I'm writing an article with several short example sentences. The document as a whole would look better if my example sentences were horizontally centered rather than left-aligned. Of course, I still need the labels on the left. How can I achieve this? Here's a simple MWE:

\documentclass{article}
\usepackage{gb4e}
\begin{document}
\begin{exe}
\ex This sentence is short.
\end{exe}
\end{document}

• Use hfil like: \ex \hfil This sentence is short. – user11232 Oct 12 '14 at 4:59

You need to use \hfill and \hfill\null:

## Code:

\documentclass{article}
\usepackage{showframe}
\usepackage{gb4e}
\begin{document}
\begin{exe}
\ex \hfill This sentence is short.\hfill\null
\end{exe}
\end{document}

• \hspace*{\fill} won't disappear. Using \null is not the best option, as it is an undocumented command. – egreg Aug 6 '15 at 16:25