Skip to content

foresight_texpicture ​

The LaTeX file of a cairolatex figure (issue #5 step 3.1): gnuplot 6.0's epslatex picture, its macros verbatim (so that a document written for gnuplot's figures takes foresight's: \ifGPcolor, \ifGPblacktext, \gplbacktext, \gplfronttext, gnuplot.cfg), the texts by \put in 0.05 bp, the graphics by \includegraphics; standalone a compilable document (gnuplot's preamble: the font size's size<N>.clo, the paper of the figure's size).

The templates write ~ for the backslash (nvfortran reads a backslash in a literal as an escape).

Source: src/lib/foresight_texpicture.F90

Dependencies

Contents ​

Variables ​

NameTypeAttributesDescription
BScharacter(len=1)parameterBackslash.
HEAD_SIZEcharacter(len=*)parameterStandalone: class, font size.
HEAD_PACKAGEScharacter(len=*)parameterStandalone: packages, paper.
MACROScharacter(len=*)parameterThe picture's macros.

Functions ​

tex_document ​

The LaTeX file of a figure of width x height bp whose graphics file is graphics (no extension), its back and front texts (\put lines): for \input, or with standalone a document of font size points; header LaTeX code (the preamble's end when standalone, else right after \begingroup), font gnuplot's LaTeX font name family,series,shape (each part optional); color and blacktext the defaults of \ifGPcolor and \ifGPblacktext (a document's own values win).

Attributes: pure

Returns: character(len=:)

fortran
function tex_document(back, front, width, height, graphics, standalone, header, font, points, color, blacktext) result(doc)

Arguments

NameTypeIntentAttributesDescription
backcharacter(len=*)inBack texts.
frontcharacter(len=*)inFront texts.
widthreal(kind=R8P)inWidth [bp].
heightreal(kind=R8P)inHeight [bp].
graphicscharacter(len=*)inGraphics file, without extension.
standalonelogicalinA whole document.
headercharacter(len=*)inLaTeX code, empty for none.
fontcharacter(len=*)inLaTeX font name, empty for the document's.
pointsreal(kind=R8P)inFont size [pt].
colorlogicalinColor (else gray) texts.
blacktextlogicalinBlack texts.

Call graph

tex_number ​

v as C's %.2f.

Attributes: pure

Returns: character(len=:)

fortran
function tex_number(v) result(text)

Arguments

NameTypeIntentAttributesDescription
vreal(kind=R8P)inValue.

Call graph

tex_visible ​

The characters of a LaTeX text that take room, as gnuplot counts them for the layout (term.c strlen_tex): a bracketed option skipped, a control word one character (an m), braces, $, _ and ^ none.

Attributes: pure

Returns: character(len=:)

fortran
function tex_visible(text) result(shown)

Arguments

NameTypeIntentAttributesDescription
textcharacter(len=*)inLaTeX text.

Call graph

f2 ​

v with two decimals, as C's %.2f.

Attributes: pure

Returns: character(len=:)

fortran
function f2(v) result(text)

Arguments

NameTypeIntentAttributesDescription
vreal(kind=R8P)inValue.

Call graph

Released under the GPL v3, BSD 2-Clause, BSD 3-Clause or MIT License.