• No results found

Support for floating point operations on LATEX-Level – v. 0.02

N/A
N/A
Protected

Academic year: 2021

Share "Support for floating point operations on LATEX-Level – v. 0.02"

Copied!
2
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

Support for floating point operations on

L

A

TEX-Level

v. 0.02

Herbert Voß

January 24, 2019

Contents

1 Introduction 1 2 Package options 1

3 Using the macros 2

4 Optional arguments 2

1 Introduction

The upcoming LATEX3 can already be used. It is more or less stable and macros will change only if really

needed.

2 Package options

The package knows two optional arguments which, of course, have a corresponding name in package

siunitx. One can also use that one.

name siunitx description

useComma output-decimal-marker={,} Output always a comma instead of the default dot.

roundDigit round-mode=places,round-precision=<value> round the given digit number.

(2)

3 Using the macros

3 Using the macros

309 715.670 96 309715.67096

1\psCalculate{3.14126*314^2}\\ % Uses \num from siunitx 2\pscalculate{3.14126*314^2} % doesn’t use \num

Without using any additional argument all available digits are printed.

4 Optional arguments

All optional arguments of packagesiunitxcan be used: 309715.67096 2 194 697 ,089 505 619 2.194 697 089 505 619 · 106 2.194 697 089 505 619 × 106 21 946 .970 895 056 19 × 10 2 2 194 697.089 505 619 2 194 697.090 1\psCalculate[group-digits=false]{3.14126*314^2}\\ 2\psCalculate[output-decimal-marker={,}]{3.14126*314^2/sin(3)}\\ 3\psCalculate[exponent-product=\cdot,scientific-notation=true]{3.14126*314^2/sin(3)}\\ 4\psCalculate[scientific-notation=engineering]{3.14126*314^2/sin(3)}\\ 5\psCalculate[fixed-exponent=2,scientific-notation=fixed]{3.14126*314^2/sin(3)}\\ 6\psCalculate[round-precision=3]{3.14126*314^2/sin(3)}\\ 7\psCalculate[round-mode=places,round-precision=3]{3.14126*314^2/sin(3)}

For more optional argument to format the output have a look at the documentation ofsiunitx.

References

[1] The LATEX3 project: Theexpl3package and LATEX3 programming, 2017,CTAN:/latex/macros/contrib/l3kernel/ex

(visited on 2/4/2018).

[2] — Thexfppackage – Floating Point Unit,CTAN:/pkg/xfp(visited on 2/4/2018).

Referenties

GERELATEERDE DOCUMENTEN

Example 7: The following sequence of commands placed in the body of the document produces the label John Smith 123 Main Street.. City,

The italic numbers denote the pages where the corresponding entry is described, numbers underlined point to the definition, all others indicate the places where it is used.

Praesent pretium, magna in eleifend egestas, pede pede pretium lorem, quis consectetuer tortor sapien facilisis magna. Mauris quis magna varius nulla

(default: false) fancyvrb provides an option firstnumber that allows the starting line number of an environment to be specified.. For convenience, there is an option

A Moodle quiz can consist of several different types of questions—not only multiple choice or true/false questions, but also questions requiring a short phrase or numerical answer,

Expands tokens following the hfunctioni, removing any token with catcode 10 (space), then sets \g_primargs_token (globally) equal to the first non-space token and calls the

Each stub file will declare the document class and load some packages (including this one) and then input the rest of the document from a file common to all

The pgfopts package allows keys defined with pgfkeys to be used as class or package options, in the same way that kvoptions extends keyval.. Users of pgfopts should be familiar with