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\putin 0.05 bp, the graphics by\includegraphics;standalonea compilable document (gnuplot's preamble: the font size'ssize<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
| Name | Type | Attributes | Description |
|---|---|---|---|
BS | character(len=1) | parameter | Backslash. |
HEAD_SIZE | character(len=*) | parameter | Standalone: class, font size. |
HEAD_PACKAGES | character(len=*) | parameter | Standalone: packages, paper. |
MACROS | character(len=*) | parameter | The 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=:)
function tex_document(back, front, width, height, graphics, standalone, header, font, points, color, blacktext) result(doc)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
back | character(len=*) | in | Back texts. | |
front | character(len=*) | in | Front texts. | |
width | real(kind=R8P) | in | Width [bp]. | |
height | real(kind=R8P) | in | Height [bp]. | |
graphics | character(len=*) | in | Graphics file, without extension. | |
standalone | logical | in | A whole document. | |
header | character(len=*) | in | LaTeX code, empty for none. | |
font | character(len=*) | in | LaTeX font name, empty for the document's. | |
points | real(kind=R8P) | in | Font size [pt]. | |
color | logical | in | Color (else gray) texts. | |
blacktext | logical | in | Black texts. |
Call graph
tex_number
v as C's %.2f.
Attributes: pure
Returns: character(len=:)
function tex_number(v) result(text)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
v | real(kind=R8P) | in | Value. |
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=:)
function tex_visible(text) result(shown)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
text | character(len=*) | in | LaTeX text. |
Call graph
f2
v with two decimals, as C's %.2f.
Attributes: pure
Returns: character(len=:)
function f2(v) result(text)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
v | real(kind=R8P) | in | Value. |
Call graph