I want to code an array on which the first row would be the first line. I used the array environment.

Here is what I get but it's not what I want (the line is centered on the second row).


Here is my code

C = \{ \,
(\bar q(0),\bar q(T)) 
\, |\, 
&\theta_i(0) = \theta_i(T)\;\; i=1,2, \\
&x(0)=0,\, x(T) = x_T \mbox{ (fixed)},\\
&q^0(0)=0\, \}.
  • 2
    Welcome to TeX SX! Write \begin{array}[t]{ll}. – Bernard Jul 25 '16 at 16:32

Some suggestions:

  • Use \mid to denote the conditioning operation

  • Suppress the intercolumn whitespace between the two columns of the array environment

  • Load the amsmath package and use \text instead of \mbox

  • Consider using slightly-enlarged curly braces and outer round parentheses, using \bigl and \bigr. If you choose to do so, you should also use \bigm| instead of \mid.

enter image description here

C = \bigl\{ \, \bigl(\bar{q}(0),\bar{q}(T)\bigr) \bigm| {}
   & \theta_i(0) = \theta_i(T), \quad i=1,2, \\
   & x(0)=0, x(T) = x_T \text{ (fixed)},\\
   & q^0(0)=0 \, \bigr\}.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.