Question: How can I remove {} in latex?

I have this code. In the latex file, I get The vertical asymptote of the graph is $x = -{\dfrac{1}{4}}$. How can I get $x = -\dfrac{1}{4}$.

restart;
with(StringTools);
do_my_list := proc() 
    local toX, my_format; 
    toX := e -> latex(e, 'output' = 'string'); 
    my_format := proc(e)::string; 
        local s::string; 
        s := toX(e); 
        s := SubstituteAll(s, "*", " "); 
        s := StringTools:-SubstituteAll(s, "\\frac", "\\dfrac"); 
        s := StringTools:-SubstituteAll(s, "\\sqrt", "\\sqrt{\\,}"); 
        return s; 
    end proc; 
    return my_format; 
end proc;

L := [(x^2 + 3*x - 7)/(3*x - 2), (x^2 - 4*x + 1)/(4*x + 1)];
fmt := do_my_list();

RR := cat(
"\n\\documentclass[12pt,a4paper]{article}",
"\n\\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}",
"\n\\usepackage[utf8]{vietnam}",
"\n\\usepackage{amsmath}",
"\n\\usepackage{amsthm}",
"\n\\usepackage{enumitem}",
"\n\\theoremstyle{definition}",
"\n\\newtheorem{ex}{Example}",
"\n\\begin{document}\n\n"
);

for i to nops(L) do
    f := L[i];
    TV := solve(denom(f) = 0, x);
    q := simplify(quo(numer(f), denom(f), x));
    TX := q;
    f_ltx := fmt(f);
    TX_ltx := fmt(TX);
    TV_ltx := fmt(TV);
    RR := cat(
        RR,
        sprintf("\\begin{ex} Let be given a function $\\displaystyle y = %s$. We have:\n", f_ltx),
        "\\begin{enumerate}[label=\\arabic*)]\n",
        sprintf("\\item The vertical asymptote of the graph is $x = %s$.\n", TV_ltx),
        sprintf("\\item The oblique (or slant) asymptote of the graph is $y = %s$.\n", TX_ltx),
        "\\end{enumerate}\n\\end{ex}\n\n"
    );
end do;

RR := cat(RR, "\\end{document}");

fout := fopen("baitap_tiemcan.tex", WRITE);
fprintf(fout, "%s", RR);
fclose(fout);
print("Đã tạo file: baitap_tiemcan.tex");
 

Please Wait...