Functions

In Corca, a function is a structured mathematical object with a symbol and one or more arguments. Functions behave like reusable components. They can be evaluated, modified, and referenced throughout a document.

Functions are not plain text. Their arguments, parameters, and formatting remain editable at all times.

Creating a function

You create a function by typing its name and selecting it from suggestions. Type sin, select Sine from suggestions. Result: sin⁡ sine.

Built-in functions

Common mathematical functions are available by default.

Function

Example

Meaning

Sine

sin⁡x sine x

Trigonometric function

Cosine

cos⁡x cosine x

Trigonometric function

Tangent

tan⁡x tangent x

Trigonometric function

Logarithm

log⁡x log x

Logarithmic function

Natural log

ln⁡x l n x

Log base ℇ ℇ

Exponential

exp⁡(x) exp x

Exponential function

Square root

x the square root of x

Root function

The full list is here.

Functions behave consistently with standard mathematical definitions.

Defining your own function

You can define a custom function using assignment: ƒ⁡(x)=x2 f with hook of x equals x squared. A function named ƒ f with hook is created. You can now evaluate it: ƒ⁡(3) f with hook of 3. The result will be ƒ⁡(3)=9 f with hook of 3 equals 9.

The function remains linked to its definition.

Evaluating a function

Functions can be evaluated directly:

ƒ⁡(x)=x2 f with hook of x equals x squared

ƒ⁡(4)= f with hook of 4 equals

Press Tab.

Result: ƒ⁡(4)=16 f with hook of 4 equals 16

Evaluation uses the current function definition.

Multiple arguments

Functions can accept more than one argument: =x+y equals x plus y. Arguments remain individually editable.

Editing function properties

You can modify function details using the right panel. Editable properties include

Property

Description

Symbol

Function name

Arguments

Number of inputs

Labels

Subscripts or superscripts

Type

Function behavior

Parentheses visibility

Show or hide brackets

Color

Visual identification

Changes apply immediately to the function.

Parentheses behavior

Function parentheses are managed automatically.

Parentheses may be hidden in simple cases assin⁡x sine x. And they remain visible when needed to avoid ambiguity: sin⁡(x+1) the sine of open paren x plus 1 close paren.

You can control parentheses visibility manually from the right panel.

Nested functions

Functions can be used inside other functions: sin⁡(cos⁡x) sine cosine x.

Each function remains independently editable.

Functions in imported content

Functions imported from LaTeX or other formats are converted into structured objects. Example input:

\sin(x)

You get a structured sine function: sin⁡x sine x. Imported functions behave exactly like native ones.