Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

It is hard to understand what and why should be done, but maybe the following will do the job. The presented solution is just blind plain work to avoid follow up questions. (It is hard to understand why vectors should be used, lists are better suited. And lists can be easily concatenated. But ok... )

x1 = var('x1', latex_name='x_1')                                                                                                                        
x2 = var('x2', latex_name='x_2')                                                                                                                        
x3 = var('x3', latex_name='x_3')                                                                                                                        
x4 = var('x4', latex_name='x_4')                                                                                                                        

e1 = var('e1', latex_name=r'\epsilon_1')                                                                                                                
e2 = var('e2', latex_name=r'\epsilon_2')                                                                                                                
e3 = var('e3', latex_name=r'\epsilon_3')                                                                                                                

b  = var('b' , latex_name='b')                                                                                                                          

v = [x1, x2, x3, x4, e1, e2, e3, b]

Then in the sage interpreter:

sage: vector(v)                                                                                                                                               
(x1, x2, x3, x4, e1, e2, e3, b)
sage: show(vector(v))                                                                                                                                         
\newcommand{\Bold}[1]{\mathbf{#1}}\left({x_1},\,{x_2},\,{x_3},\,{x_4},\,{\epsilon_1},\,{\epsilon_2},\,{\epsilon_3},\,{b}\right)
sage: latex(v)                                                                                                                                                
\left[{x_1}, {x_2}, {x_3}, {x_4}, {\epsilon_1}, {\epsilon_2}, {\epsilon_3}, {b}\right]