SchemaLib is a library of SVG symbols for drawing schematics of analog and mixed-signal (AMS) integrated circuits with Inkscape.
You can find the comprenhensive list of all 819 symbols here.
Each symbol candidate must meet the following requirements:
- SVG version 1.1
- UTF-8 encoding
- Dimensions in mm
- Single group of elements
- Path elements only
- No transforms
- Absolute coordinates
- 0.25-mm line width
- Grid of 1mm × 1mm for terminals (when possible)
- Grid of 0.1mm × 0.1mm for shapes (except for text glyphs)
- Large (
*-l), medium (*-m) and small (*-s) sizes - Text labels typed in Latin Modern sans-serif bold font through LaTeX with preamble including:
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\renewcommand{\familydefault}{\sfdefault}
- Line style:
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.25;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;shape-rendering:geometricPrecision"
- Closed shape style (white or black filling):
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.25;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;shape-rendering:geometricPrecision"
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.25;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;shape-rendering:geometricPrecision"
- Text label style:
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0;shape-rendering:geometricPrecision"
Methodology to build a SchemaLib symbol candidate using the open-source Inkscape vector editor:
- Edit → Preferences → Input/Output → SVG output → Path data:
Absolute - File → Document Properties → Display → Set custom page
WidthandHeightto multiples of 1mm according to the size of large/medium/small existing symbols - File → Document Properties → Display → Set
Scaleto 1 mm per user unit - File → Document Properties → Grids: rectangular grid 1mm × 1mm
- Edit your symbol terminals with snapping to grid
- File → Document Properties → Grids: rectangular grid 0.1mm × 0.1mm
- Edit your symbol shape with snapping to grid
- If required, insert text labels through Extensions → Text → TexText with
preamble.tex - Select all (
Ctrl+A) and apply ungroup (Ctrl+U) as times as required to flatten hierarchy - Layer → Layers and Objects (
Shift+Ctrl+L): select symbol layer, Layer to Group (right click) and ungroup (Ctrl+U) - Select all (
Ctrl+A) and Path → Object to Path - Select all (
Ctrl+A) and Extensions → Modify Paths → Apply Transform - Select all (
Ctrl+A) and group (Ctrl+G) elements - File → Clean Up Document
- File → Save as: Plain SVG
Finally, edit your SVG code following the style guide of exisiting symbols, i.e.:
- Name root
idas file basename - Remove unnecessary sections in root (e.g.
defs) - Name group
idas symbol name - Name paths
idsequentially aspath1,path2... - Replace paths
styleas above - Correct any rounding error caused by Inkscape internal px units so all element coordinates are multiples of 0.1 user units (except for text glyphs)
Some examples of AMS IC schematics based on SchemaLib symbols are available here. Contributions are welcome!
