Howto:Build graduate dials with LaTeX: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 109: Line 109:


==Circular graduate dials==
==Circular graduate dials==
[[File:Test Graduate dials for PHI Wind.jpg|thumbnail|Finish work example of est Graduate dials for PHI Wind|right|480px|]]
This is an example much more complex as the original instrument has a double graduated dial. Therefore, the program's implementation time in LaTeX was about equivalent to that used for the corresponding object in Inkscape. But the advantage of this version is that you can now have a template that is useful to generate similar objects. The lower scale can simply be removed by deleting the corresponding rows. The advantage of this approach is in the ability to resume the old drawing and modify it as a function of any corrections that such a complex gauge may require. This tool has several problems, such as the numbering that needs to be radial, and therefore require a rotation. The secondary scale which has its own radial numbering that does not follow the position angle, but a different scale.


===Let's proceed with order===


Everything I wrote down to "\ begin {document}" is the same as the previous document, but there are 2 commands: "''\tikzset{font={\fontsize{18pt}{10}\selectfont}}''" as I used a different method of font size declarations by exploiting the fact that I do not have to change the scale. This also has the effect of removing the scale command as the gauge has a circular shape, so the X and Y axes have the same scale, This causes the "''\begin{tikzpicture}[xscale=0.05]''" command simply become "''\begin{tikzpicture}"''<BR>
The draw command change for polar coordinates:
<syntaxhighlight lang="latex">
\draw[ultra thick] (\a:5.6) -- (\a:6);
</syntaxhighlight>
The variable '''\a''' is the angle with respect to the axis of the X (horizontal line). Two tick orders are printed, and then the 4 cardinal points following the anti-clockwise reference system of the Cartesian coordinates.
<syntaxhighlight lang="latex">
\draw (90: 4.5) node[rotate=0] {\Huge{N}};
</syntaxhighlight>
Drawing with the polar coordinates means first inserting the angle, then the character ":" (instead of the "," character) and then an expressed distance of default in cm, or in millimeters if the numeric value or a variable is followed by the "mm" symbol.<BR>The attribute ''[rotate = ..]'' after ''node'' statement indicates the rotation of the box that contains a string of characters.
Because the cardinal points have a much bigger and thicker font, I used the attribute "Huge". LaTeX considers the font size choice (remember that OCR-B has standard size 10) by inserting a variable attribute in place of a value that changes depending on the font size. This means that the system behaves exactly respect the conventions of style, really important because it is the method used to print everything from Gutenberg, Bodoni etc on. This is one of the incredible aspects of LaTeX that seems to be limited in the font size, but in fact follows the strict and general rules. That's why when you make a project with this method you get an immediate result very close to reality! In this philosophy is the power of the method.


<syntaxhighlight lang="latex">
<syntaxhighlight lang="latex">
412

edits

Navigation menu