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.

Using spreadtab with glossaries I define a glossary entry A with a field user1=12. Now, if I call this field in a spreadtab table with \glsentryuseri{A}, spreadtab does not recognize it as a number. Could I convince spreadtab somehow that it is a number?

share|improve this question
    
Would you please add a minimal example? –  egreg May 26 '11 at 11:23
    
@egreg: \newglossaryentry{A}{name={foo}, user1=12} and then something like \begin{spreadtab}{{tabular}{ll}} \glsentryuseri{A}&1\\ \end{spreadtab} –  leh May 26 '11 at 11:43
1  
Please, add the code for a minimal compilable example to your question; there should be also the names of the packages to load –  egreg May 26 '11 at 16:42

1 Answer 1

It seems that spreadtab chokes on macros with arguments. To get around this, you can just store the value inside a macro without an argument by using

\newcommand{\glsentryuseriA}{\glsentryuseri{A}}

and it will work. Here's the complete code:

\documentclass{article}

\usepackage{spreadtab}
\usepackage{glossaries}

\makeglossaries

\newglossaryentry{A}{name={foo}, user1=12}
\newcommand{\glsentryuseriA}{\glsentryuseri{A}}

\begin{document}

\begin{spreadtab}{{tabular}{ll}} \glsentryuseriA&[-1,0]*2\\ \end{spreadtab}

\printglossaries

\end{document}
share|improve this answer
    
thanks, but the main idea was to use arguments. If spreadtab does not like those I have to look for an another solution. –  leh Jun 20 '11 at 8:29
    
@leh: try contacting the author of spreadtab. I have seen him on this site, so probably he just hasn't seen your question. –  Philippe Goutet Jun 21 '11 at 23:28

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.