I'm looking into AsciiDoctor and wondering how to perform calculations on varaibles.
It would be great if I could define variables and then use those at other places in my document to perform calculations.
I learned that I should use macros/extensions for this, but what is unclear atm is if I should create my won extension or if there is one already that allows me to do basic math (I didn't find one).
Interesting question. Can you elaborate on your use case? What are you trying to accomplish? Can you provide an example of how you would use such functionality?
One example would be to create an invoice e.g. a to sum up a column of a table. I'm not looking for a eleborate solution (although that would be great) to perform calculations; but even when I could just multiple, add, subtract etc. variables that would be great.
How would you write down summing a column of unknown length using attributes and arithmetic operations? Can you get the values in the column to be set using attributes the way you expect?
David Jencks
On Mar 9, 2020, at 1:52 PM, roxlu [via Asciidoctor :: Discussion] <[hidden email]> wrote:
One example would be to create an invoice e.g. a to sum up a column of a table. I'm not looking for a eleborate solution (although that would be great) to perform calculations; but even when I could just multiple, add, subtract etc. variables that would be great.
If you reply to this email, your message will be added to the discussion below: