In heavy-bottom saucepan, melt margarine. Add onions and pecans. Stir constantly until onions are translucent, about 6 minutes. Add rice and stir well to coat with margarine. Cook 1 or 2 minutes, stirring constantly. Add liquid and bring to a boil, then reduce heat and simmer for about 15 minutes, or until rice is just tender. Remove fromheat and let stand, covered, for 5 minutes.