6 module function tex_get_term_string(this) result(x)
7 class(latex_terminal),
intent(in) :: this
8 character(len = :),
allocatable :: x
10 n = len_trim(this%m_id)
11 allocate(
character(len = n) :: x)
16 module function tex_get_filename(this) result(txt)
17 class(latex_terminal),
intent(in) :: this
18 character(len = :),
allocatable :: txt
20 n = len_trim(this%m_fname)
21 allocate(
character(len = n) :: txt)
22 txt = trim(this%m_fname)
26 module subroutine tex_set_filename(this, txt)
27 class(latex_terminal),
intent(inout) :: this
28 character(len = *),
intent(in) :: txt
30 n = min(len_trim(txt), gnuplot_max_path_length)
33 this%m_fname(1:n) = txt(1:n)
35 this%m_fname =
"default.tex"
40 module function tex_get_command_string(this) result(x)
42 class(latex_terminal),
intent(in) :: this
43 character(len = :),
allocatable :: x
46 type(string_builder) :: str
50 call str%append(
"set term epslatex color ")
51 call str%append(
" font ")
53 call str%append(this%get_font_name())
55 call str%append(to_string(this%get_font_size()))
57 call str%append(
" size ")
58 call str%append(to_string(this%get_window_width()))
60 call str%append(to_string(this%get_window_height()))
61 call str%append(new_line(
'a'))
62 call str%append(
"set output ")
64 call str%append(this%get_filename())
66 x = char(str%to_string())