Skip to content
Plys edited this page Apr 21, 2024 · 10 revisions

DeGeŠ currently only supports single centered pictures with captions and labels. If you need to have two or more pictures side-by-side, you need to merge them manually. This seems to be enough for most purposes. Supported formats are:

  • SVG for schemas, illustrations and sketches. Ideally it should be provided by the official painter. Always use plain SVG.
  • JPG is primarily meant for photographs. Please trim them to sensible size (longer side about 1000 px, and the file should be no bigger than 1 MB).
  • PNG is suitable for screenshots, graphical output of other programs and so on.
  • PDF can be used if nothing else is available -- SVG is typically preferable.
  • GP Gnuplot plots are supported as well.

Including pictures

Since 2021 DeGeŠ finally supports regular Markdown pictures

![Caption](picture.svg){#fig:label height=40mm}

DeGeŠ will convert and include pictures automatically based on the input extension and target document:

file type PDF HTML
PNG PNG PNG
JPG JPG JPG
SVG PDF SVG
PDF PDF PDF
GP PDF PNG

When writing a fragment, do not worry too much about the height, just set it to something sensible, like 50mm. The caption can be very long if needed. When referencing the picture, use [-@fig:label]. The prefix fig is important so that it is known that this is a figure, the - sign means that we do not want the word "Figure" in the text (in particular, pandoc-crossref does not know about declension in languages other than English, so it is done manually).

Naming the pictures

While the system itself can handle most picture names, it is highly recommended to name picture with sense and consideration. Filenames should not include underscores -- it works most of the time but it can introduce some really nasty bugs in LaTeX if you forget a $ somewhere else. Please avoid them if you can. Do not use spaces under any circumstances.

  • Use English names if possible, especially in Náboj.
  • The name should be descriptive (pic1.svg is NOT descriptive, circular-orbit.svg is).
  • Be reasonably verbose (b.svg is too little, spilling-bowl.svg is great, bowl-spilling-over-to-the-right.svg is too much).

Inkscape for seminar and Náboj

After successful installation of the Inkscape app, open it and start working :). For beginners, there are a few useful shortcuts:

  • Ctrl = shifting the view in vertical direction,
  • Shift + scrolling = shifting the view in vertical direction,
  • Ctrl + scrolling = zooming in and out,
  • Ctrl + Shift + scrolling = rotating the view
  • Ctrl + d = duplicate the selected line / object / couple of objects.

Other handy shortcuts will be introduced later... For most cases, you will need to draw graphs, curves, circuits, spheres... These subjects are quite simple and very good for a beginners "getting to know" Inkscape. First of all, it is very useful to display the page grid, which can be done in the View -> Gridelines. Moreover, "snapping to gridlines" should be enabled in the right panel.

inks01

Graphs

For starting a straight line, clicking the "bezier curve" in the left panel or tapping "b". Then click anywhere on the blank page (if snapping is enabled, the beginning point might be moved to one of the gridline nodes) to start a line (the line is red). To draw, just drag mouse anywhere in the page and click. After this, your line has a green colour, and you have several options what to do next:

  • tap "Enter" to draw the line,
  • click somewhere else to make a new node,
  • tap "Delete" to remove the last drawn node,
  • tap "Esc" to remove the line completely.

inks02 inks04

When starting a new node (even the first one), if you hold the mouse after clicking, you can make a curved line. If you hold Ctrl while drawing a line, you can draw a line under a fixed angle in 15° increments.

Each line (or object) can be further edited in the "Fill and stroke window" or using Shift + Ctrl + f. In this window, you can edit the line (or object) thickness, style, colour, fill colour, and line endings. You can choose to add an arrow at the ends, or on each node as well.

inks05

With this set of tools, you should be able to draw a graph.

inks06

There are a few things to beware - the major gridlines should always be on top of the minor gridlines. This is done via the page up and page down buttons, or managing the object stacking in the Object. Moreover, the line intersections should be clear - it is best to choose full lines to avoid this problem.

inks09

Parabolas, hyperboles

The safest approach to drawing (considering precision) is to always draw straight lines, and only after drawing a straight line, adding the curving via nodes. To view all nodes on the drawn lines, "editing lines" in the left panel or tap "n".

image

After accessing this mode, you can add or remove nodes to the selected lines, join or disconnect the selected nodes, or change node styles. Selected nodes are blue, inactive modes are white. After selecting a node and making it symmetrical, blue lines appear. Through these, the curving of the node can be adjusted.

inks11 inks12 inks15

Circuits

Quite often, there is a need to draw an electric circuit. Considering the variability of used components - resistors, bobbins, generators, ... - it is very useful to prepare a template inkscape file, where the are already drawn, and just copy them when needed. Connection between the copied items is made using the node mode described in the previous file.

For drawing a bobbin, again, everything was already said in the previous section. Here, several steps of a bobbin drawing are shown.

inks16

For drawing a resistor, it is even simpler. However, there are a few options with different pros and cons. The simplest way is to draw a rectangle with white filling an draw a line behind it. Another one is to keep the rectangle empty and disconnect the line at the edges of the rectangle. For both cases, it is best to group the objects and lines with Ctrl + g, just to make it easier with handling these objects. Ungrouping them is done holding Ctrl + Shift + g. Moreover, if you are not using the gridlines, centering the objects is done in the "Transformation" window (accessible with Shift + Ctrl + m). Pay attention to which object you are centering the objects (the list on top of this window).

inks18 inks17

Another thing to prepare beforehand is the voltage source. You will need to draw a few lines and add the + and - signs. Drawing text, you should have the Minion Pro font installed (you might need to start the installation through "Install for all users" and restart Inkscape). When trying to type the + sign, you will clash with the innate shortcut settings of Inkscape. Therefore, you need to paste the plus signs as a symbol copied somewhere else... The same with the minus sign. In the text mode, you can select your font, font size, alignment, and other. A useful button is the "select all text with the same font", which comes in handy, when you have a lot of text in your drawing, so you can type it beforehand and then select and adjust it all at once.

inks19