tikzsd-1.0.0: A program for generating LaTeX code of string diagrams.
CopyrightAnthony Wang 2021
LicenseMIT
Maintaineranthony.y.wang.math@gmail.com
Safe HaskellSafe-Inferred
LanguageHaskell2010

TikzObjects

Description

TikzObjects defines data structures to represent objects such as coordinates and paths. See the tikzpgf manual for more details.

Synopsis

Documentation

class ShowLatex a where Source #

A class for data structures which can be converted into LaTeX code.

Methods

showLatex :: a -> String Source #

Instances

Instances details
ShowLatex TikzPath Source # 
Instance details

Defined in TikzObjects

ShowLatex TikzPathOperation Source # 
Instance details

Defined in TikzObjects

ShowLatex TikzCoordinate Source # 
Instance details

Defined in TikzObjects

ShowLatex TikzStringDiagram Source # 
Instance details

Defined in TikzStringDiagram

data TikzCoordinate Source #

Data structure representing points on a 2 dimensional TikZ canvas.

Constructors

Canvas

Specifies a point by its coordinates

Fields

NamedCoordinate

Specifies a coordinate by a name. A node or coordinate path operation can create a new named coordinate.

Fields

Instances

Instances details
Show TikzCoordinate Source # 
Instance details

Defined in TikzObjects

ShowLatex TikzCoordinate Source # 
Instance details

Defined in TikzObjects

data TikzPathOperation Source #

A data structure for specifying path operations, which are chained to create paths. See the tikz manual for details on these operations.

Instances

Instances details
Show TikzPathOperation Source # 
Instance details

Defined in TikzObjects

ShowLatex TikzPath Source # 
Instance details

Defined in TikzObjects

ShowLatex TikzPathOperation Source # 
Instance details

Defined in TikzObjects

toNamedCoord :: TikzPathOperation -> Maybe TikzCoordinate Source #

If a path operation has a name, it defines a NamedCoordinate. toNamedCoord of a path operation returns Just this named coordinate for operations with names, otherwise it returns Nothing.

type TikzPath = [TikzPathOperation] Source #

A TikzPath is made by sequencing TikzPathOperations.

partialShowLatex :: TikzPath -> String Source #

A helper function used to define showLatex of a TikzPath.