0

I am working with Python and have an array of numbers. For example:

    a = (1,2,3,4,5,6)
    b = (1,3,5)
    c = (2,4,6)

Now I want to print these array in Latex Table as below format:

a   c   b
1       1
2   2  
3       3
4   4
5       5
6   6

I dont know how to print the void places. Any help?

  • 1
    Please clearify what you want to achieve here. Is it a mathematical or programming language array or shall it be displayed as table? – user31729 Jul 22 '15 at 8:28
  • @ChristianHupfer, i have edited the question. thanks for asking. yap, I have got the arrays from Python program which I want to publish in Latex. – Sakil Chowdhury Jul 22 '15 at 8:35
  • I like Monty Python, but I've no idea of Python as a language, but isn't PythonTeX designed for this? – user31729 Jul 22 '15 at 8:38
  • Are your arrays always sorted? Is the first array always a "superarray" of the others? There are repeated numbers within each array? If there are repeated numbers, how do you plan to align them? Anyway, these seems a programming problem (sequence alignment), not a LaTeX question. I would solve it within Python. You can align sorted arrays in linear time. – ASdeL Jul 23 '15 at 12:03

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.