Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

This question already has an answer here:

I am a learn-by-example person. I have no idea to change every { and } to ( and ) respectively. Could you let me know which concept in Mathematica is related to this problem so I can learn it much faster?

The objective is to convert the output of

Tuples[{{a, b, c}, {1, 2}}]

which is

{{a, 1}, {a, 2}, {b, 1}, {b, 2}, {c, 1}, {c, 2}}

to LaTeX-friendly output as follows. I have learnt TeXForm but it must be called at the last phase.

$\{(a, 1), (a, 2), (b, 1), (b, 2), (c, 1), (c, 2)\}$
share|improve this question

marked as duplicate by Kuba, Oleksandr R., Michael E2, Pinguin Dirk, rm -rf Dec 30 '13 at 18:02

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
TeXForm is an output format. You can only achieve what you want as an output format, called at the last phase, like TeXForm. You can defined your own output formats, with Format, and the solutions to the linked question. –  Michael E2 Dec 30 '13 at 17:51
    
@Kuba: Thanks for the link. –  Please don't touch Dec 30 '13 at 17:51
    
Unless you have a large number of these it looks like a job for a text editor (preferably grep-friendly) or even a $\LaTeX$ macro that temporarily redefines {} (although it is also a nice hack to learn in MMA!). –  A.G. Dec 30 '13 at 19:51

1 Answer 1

I see...

StringForm["(``,``)", ##] & @@@ {{-3, 
    0}, {0, -1}, {1, -2}, {2, -5}, {4, 7}, {5, 4}, {6, 3}, {9, 
    2}} // TeXForm
share|improve this answer

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