Requires MaTeX, which can be found here.
<< MaTeX`
myplot[k_: 5, n_: 10] := Plot[k*Sin[n*x], {x, -2 Pi, 2 Pi} , PlotLabel -> MaTeX["k=" <> ToString[k] <> ", n=" <> ToString[n], Magnification -> 1.5]];
myplot[]
But if I export the PDFs using ParallelTable,
ParallelTable[ Export[ToString[n] <> ".pdf", myplot[RandomReal[{-3, 3}], RandomInteger[{1, 5}]]], {n, 1, 30}] // AbsoluteTiming
The labels fail to work.
Anyone had similar problems ? Solutions?


ParallelTable: The default value isDistributedContexts:>$DistributedContextswith$DistributedContexts:=$Context, which distributes definitions of all symbols in the current context, but does not distribute definitions of symbols from packages. SoDistributedContexts->Allshould work. – xzczd Jul 17 '18 at 17:15Helpand didDistributedContexts->All, didn't work. – Chen Stats Yu Jul 17 '18 at 17:54LaTeXrather thanMaTeX. – Chen Stats Yu Jul 17 '18 at 17:57PlotLabel -> showTeX@TeXForm["k=" <> ToString[k] <> ", n=" <> ToString[n]], withshowTeXdiscussed here https://mathematica.stackexchange.com/questions/178440/texform-as-plotlabels-configuring-ghostscript/178467#178467 – Fortsaint Jul 17 '18 at 20:17