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

I am using spreadtab to prepare financial statements for presentation. However, I wish to present negative numbers in brackets (parentheses) within the table: -3,210 as (3,210)

I don't even know if this is possible. I am a total beginner as far as LaTeX is concerned, so please forgive my ignorance.

share|improve this question
    
Welcome to TeX.sx! Usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Upvoting is the preferred way here to say "thank you" to users who helped you. –  egreg May 10 '12 at 7:58
    
It would be helpful to compose a fully compilable MWE that illustrates the problem including the \documentclass and the appropriate packages. That way those trying to help can focus on solution as opposed to setting up the problem test case which may not match how you are using it. –  Peter Grill May 10 '12 at 17:56
add comment

1 Answer

An example of your input might be useful for giving better advice, but this code in the preamble seems to do what you need:

\makeatletter
\renewcommand\STprintnum[1]{\FPifneg{#1}(\@gobble#1)\else#1\fi}
\makeatother

The \@gobble macro swallows the minus sign, whose presence is tested with \FPifneg (section 3.2 in the manual of spreadtab).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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