4

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}
Jason Zentz
  • 4,158

1 Answers1

2

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

enter image description here

Notes:

  • The showframe package was used just to show the page margins. It is not needed in your actual use case.

Code:

\documentclass{article}
\usepackage{showframe}
\usepackage{gb4e}
\begin{document}
\begin{exe}
  \ex \hfill This sentence is short.\hfill\null
\end{exe}
\end{document}
Peter Grill
  • 223,288
  • \hspace*{\fill} won't disappear. Using \null is not the best option, as it is an undocumented command. – egreg Aug 06 '15 at 16:25