Complete Reference of Options
The default options of jQuery.Feyn's Feyn constructor are listed as follows
{
xmlns: 'http://www.w3.org/2000/svg',
xlink: 'http://www.w3.org/1999/xlink',
version: '1.1',
x: 0,
y: 0,
width: 200,
height: 200,
title: '',
description: 'Feynman diagram generated by jQuery.Feyn',
standalone: false,
selector: false,
grid: {show: false, unit: 20},
color: 'black',
thickness: 1.6,
tension: 1,
ratio: 1,
clockwise: false,
incoming: {},
outgoing: {},
vertex: {},
auxiliary: {},
fermion: {arrow: true},
photon: {period: 5, amplitude: 5},
scalar: {arrow: false, dash: '5 5', offset: 2},
ghost: {arrow: true, thickness: 3, dotsep: 8, offset: 5},
gluon: {width: 15, height: 15, factor: 0.75, percent: 0.6, scale: 1.15},
symbol: {},
node: {show: false, thickness: 1, type: 'dot', radius: 3, fill: 'white'},
label: {family: 'Georgia', size: 15, face: 'italic'},
image: {},
mathjax: false,
ajax: false
}
As you have alreaday seen, they can be overridden by passing an option object
to feyn method. However, options are not checked in any way,
so setting bogus option values may lead to odd errors. For JavaScript
internal errors excluding syntax errors, jQuery.Feyn will write the error
information to the container of your Feynman diagram to remind you of the case.
The following provides a complete list of available options:
- xmlns :
String ('http://www.w3.org/2000/svg') - Set the
xmlnsattribute of<svg>which binds the SVG namespace - xlink :
String ('http://www.w3.org/1999/xlink') - Set the
xlink:hrefattribute of<svg>which defines an IRI reference type as a URI - version :
String ('1.1') - Set the
versionattribute of<svg>which indicates the SVG language version - x :
Number (length | 0) - Set the
xattribute of<svg>which indicates a x-axis coordinate in the user coordinate system - y :
Number (length | 0) - Set the
yattribute of<svg>which indicates a y-axis coordinate in the user coordinate system - width :
Number (length | 200) - Set the
widthattribute of<svg>which indicates a horizontal length in the user coordinate system - height :
Number (length | 200) - Set the
heightattribute of<svg>which indicates a vertical length in the user coordinate system - title :
String (text) - Set the content for
<title>element which displays a title for the Feynman diagram - description :
String (text | 'Feynman diagram generated by jQuery.Feyn') - Set the content for
<desc>element which describes the Feynman diagram - standalone :
Boolean (true | false) - Enable or disable the SVG code editor to make fine adjustments and save as a standalone file
- selector :
Boolean (true | false) - Determine whether or not to set
idandclassattributes for SVG elements - grid :
Object -
- show :
Boolean (true | false) - Determine whether or not to display a grid system to facilitate your drawing
- unit :
Number (length | 20) - Set the length of subdivision for the grid system
- show :
- color :
String (paint | 'black') - Set global
strokeattribute for SVG elements which defines the color of the outline - thickness :
Number (length | 1.6) - Set global
stroke-widthattribute for SVG elements which specifies the width of the outline - tension :
Number (parameter | 1) - Set global parameter of arc radius and zigzag amplitude
- ratio :
Number (parameter | 1) - Set global parameter of elliptical arc for fermion, scalar, and ghost loop propagators
- clockwise :
Boolean (true | false) - Set global
clockwiseparameter for propagators - incoming :
Object -
- i1, i2, i3,
... :
String (position) - Set the coordinate pairs of graph nodes for incoming particles
- i1, i2, i3,
... :
- outgoing :
Object -
- o1, o2, o3,
... :
String (position) - Set the coordinate pairs of graph nodes for outgoing particles
- o1, o2, o3,
... :
- vertex :
Object -
- v1, v2, v3,
... :
String (position) - Set the coordinate pairs of graph nodes for vertices
- v1, v2, v3,
... :
- auxiliary :
Object -
- a1, a2, a3,
... :
String (position) - Set the coordinate pairs of graph nodes for miscellaneous symbols
- a1, a2, a3,
... :
- fermion :
Object -
- color :
String (paint | inherit) - Set the
strokeattribute for<g>into which fermion propagators are grouped - thickness :
Number (length | inherit) - Set the
stroke-widthattribute for<g>into which fermion propagators are grouped - tension :
Number (parameter | inherit) - Set the parameter of arc radius for fermion propagators
- ratio :
Number (parameter | inherit) - Set the parameter of elliptical arc for fermion propagators
- arrow :
Boolean (true | false) - Determine whether or not to show arrows for fermion propagators
- clockwise :
Boolean (true | false) - Set the direction of arrows for arc and loop fermion propagators
- line :
String (connections) - Set the directed edges between graph nodes for fermion lines
- arc :
String (connections) - Set the directed edges between graph nodes for fermion arcs
- loop :
String (connections) - Set the directed edges between graph nodes for fermion loops
- color :
- photon :
Object -
- color :
String (paint | inherit) - Set the
strokeattribute for<g>into which photon propagators are grouped - thickness :
Number (length | inherit) - Set the
stroke-widthattribute for<g>into which photon propagators are grouped - tension :
Number (parameter | inherit) - Set the parameter of arc radius for photon propagators
- clockwise :
Boolean (true | false) - Determine whether the first wiggle starts up or down for photon propagators
- period :
Number (parameter | 5) - Set the period parameter for photon propagators
- amplitude :
Number (parameter | 5) - Set the amplitude parameter for photon propagators
- line :
String (connections) - Set the directed edges between graph nodes for photon lines
- arc :
String (connections) - Set the directed edges between graph nodes for photon arcs
- loop :
String (connections) - Set the directed edges between graph nodes for photon loops
- color :
- scalar :
Object -
- color :
String (paint | inherit) - Set the
strokeattribute for<g>into which scalar propagators are grouped - thickness :
Number (length | inherit) - Set the
stroke-widthattribute for<g>into which scalar propagators are grouped - tension :
Number (parameter | inherit) - Set the parameter of arc radius for scalar propagators
- ratio :
Number (parameter | inherit) - Set the parameter of elliptical arc for scalar propagators
- arrow :
Boolean (true | false) - Determine whether or not to show arrows for scalar propagators
- clockwise :
Boolean (true | false) - Set the direction of arrows for arc and loop scalar propagators
- dash :
String (dasharray | '5 5') - Set the
stroke-dasharrayattribute for<g>into which scalar propagators are grouped - offset :
Number (length | 2) - Set the
stroke-offsetattribute for<g>into which scalar propagators are grouped - line :
String (connections) - Set the directed edges between graph nodes for scalar lines
- arc :
String (connections) - Set the directed edges between graph nodes for scalar arcs
- loop :
String (connections) - Set the directed edges between graph nodes for scalar loops
- color :
- ghost :
Object -
- color :
String (paint | inherit) - Set the
strokeattribute for<g>into which ghost propagators are grouped - thickness :
Number (length | 3) - Set the
stroke-widthattribute for<g>into which ghost propagators are grouped - tension :
Number (parameter | inherit) - Set the parameter of arc radius for ghost propagators
- ratio :
Number (parameter | inherit) - Set the parameter of elliptical arc for ghost propagators
- arrow :
Boolean (true | false) - Determine whether or not to show arrows for ghost propagators
- clockwise :
Boolean (true | false) - Set the direction of arrows for arc and loop ghost propagators
- dotsep :
Number (length | 8) - Set the
stroke-dasharrayattribute for<g>into which ghost propagators are grouped - offset :
Number (length | 5) - Set the
stroke-offsetattribute for<g>into which ghost propagators are grouped - line :
String (connections) - Set the directed edges between graph nodes for ghost lines
- arc :
String (connections) - Set the directed edges between graph nodes for ghost arcs
- loop :
String (connections) - Set the directed edges between graph nodes for ghost loops
- color :
- gluon :
Object -
- color :
String (paint | inherit) - Set the
strokeattribute for<g>into which gluon propagators are grouped - thickness :
Number (length | inherit) - Set the
stroke-widthattribute for<g>into which gluon propagators are grouped - tension :
Number (parameter | inherit) - Set the parameter of arc radius for gluon propagators
- clockwise :
Boolean (true | false) - Determine whether the first wiggle starts up or down for gluon propagators
- width :
Number (length | 15) - Set the coil width of gluon propagators
- height :
Number (length | 15) - Set the coil height of gluon propagators
- factor :
Number (parameter | 0.75) - Set the factor parameter for gluon propagators
- percent :
Number (parameter | 0.6) - Set the percent parameter for gluon propagators
- scale :
Number (parameter | 1.15) - Set the scale parameter for gluon arcs and loops
- line :
String (connections) - Set the directed edges between graph nodes for gluon lines
- arc :
String (connections) - Set the directed edges between graph nodes for gluon arcs
- loop :
String (connections) - Set the directed edges between graph nodes for gluon loops
- color :
- symbol :
Object -
- color :
String (paint | inherit) - Set the
strokeattribute for<g>into which symbols are grouped - thickness :
Number (length | inherit) - Set the
stroke-widthattribute for<g>into which symbols are grouped - s1, s2, s3,
... :
Array -
- sn[0] :
String (position) - Set the coordinates of graph nodes for symbol
- sn[1] :
Number (angle) - Set the x-axis-rotation angle for symbol
- sn[2] :
String ('arrow' | 'blob' | 'bubble' | 'condensate' | 'hadron' | 'zigzag') - Set the symbol type
- sn[3] :
Number (parameter | 20) - Set the distance parameter for the symbol
- sn[4] :
Number (parameter | 4) - Set the height parameter for the symbol
- sn[5] :
Boolean (true | false) - Enable or disable a variant for the symbol
- sn[0] :
- color :
- node :
Object -
- color :
String (paint | inherit) - Set the
strokeattribute for<g>into which nodes are grouped - thickness :
Number (length | 1) - Set the
stroke-widthattribute for<g>into which nodes are grouped - show :
Boolean | String (false | 'i' | 'o' | 'v' | 'a' | ... | 'iova') - Determine whether or not to show nodes
- type :
String ('box' | 'boxtimes' | 'cross' | 'dot' | 'otimes') - Set the node type
- radius :
Number (length | 3) - Set the radius parameter of nodes
- fill :
String (paint | 'white') - Set the
fillattribute for<g>into which nodes are grouped
- color :
- label :
Object -
- color :
String (paint | inherit) - Set the
strokeattribute for<g>into which labels are grouped - thickness :
Number (length | 0) - Set the
stroke-widthattribute for<g>into which labels are grouped - fill :
String (paint | inherit) - Set the
fillattribute for<g>into which labels are grouped - family :
String (family-name | 'Georgia') - Set the
font-familyattribute for<g>into which labels are grouped - size :
Number (length | 15) - Set the
font-sizeattribute for<g>into which labels are grouped - weight :
String ('normal' | 'bold' | 'bolder' | 'lighter') - Set the
font-weightattribute for<g>into which labels are grouped - face :
String ('normal' | 'italic' | 'oblique') - Set the
font-styleattribute for<g>into which labels are grouped - align :
String ('start' | 'middle' | 'end') - Set the
text-anchorattribute for<g>into which labels are grouped - t1, t2, t3,
... :
Array -
- tn[0] :
String (position) - Set the coordinates of graph nodes for label
- tn[1] :
String (text) - Set the text of label as the content of
<tspan>or<foreignObject> - tn[2] :
Number (length | 18) - Set the
widthattribute for<foreignObject> - tn[3] :
Number (length | 30) - Set the
heightattribute for<foreignObject>
- tn[0] :
- color :
- image :
Object -
- m1, m2, m3,
... :
Array -
- mn[0] :
String (position) - Set the coordinates of position for including external image
- mn[1] :
String (file) - Set the path for external image file
- mn[2] :
Number (length | 32) - Set the
widthattribute for image - mn[3] :
Number (length | 32) - Set the
heightattribute for image
- mn[0] :
- m1, m2, m3,
... :
- mathjax :
Boolean (true | false) - Determine whether or not to use MathJax to typeset mathematics in labels
- ajax :
Boolean (true | false) - Determine whether or not to merge the code of external SVG image directly