Using LaTeX String Interpolation for Plotting in Julia
Overview
Julia does not allow using the dollar sign $를 사용하는데, 정작 레이텍 문자열을 사용하는 LaTeXStrings.jl에서는 $ inside strings for string interpolation1. Instead, prefix it with an ampersand, e.g. %$2.
Code

If you run the following code, you can verify that the sine in the title is rendered correctly.
using Plots, LaTeXStrings
t = 0:.01:2π
plt_ = []
for k = 1:4
push!(plt_, plot(t, sin.(k*t), title = L"\sin(%$k t)",
xticks = ([0, π, 2π], ["0", "π", "2π"])))
end
plot(plt_..., legend = :none)
