diff --git a/PRO-seq/PRO-seq.snakefile b/PRO-seq/PRO-seq.snakefile
index c1d503002d387fd3edd79e481a493a6aa7e402fc..da3d2f76942358a8c231ea9fe350b695e12106bd 100644
--- a/PRO-seq/PRO-seq.snakefile
+++ b/PRO-seq/PRO-seq.snakefile
@@ -1312,16 +1312,16 @@ rule make_MA_plot:
             else:
                 grouping = params.id_list
                 group2colour = (wildcards.id_list, sns.xkcd_rgb["orange"])
+            title = f"MA-plot for {wildcards.contrast}, {wildcards.orientation}_{wildcards.biotype}"
+            if mpl.rcParams.get("text.usetex", False):
+                title = texscape(title)
             save_plot(
                 output.MA_plot, plot_MA, res,
                 grouping=grouping,
                 group2colour=group2colour,
-                lfc_range = params.lfc_range,
-                fold_type = "log2FoldChange",
-                title="MA-plot for %s, %s_%s" % (
-                    wildcards.contrast,
-                    wildcards.orientation,
-                    wildcards.biotype))
+                lfc_range=params.lfc_range,
+                fold_type="log2FoldChange",
+                title=title)
 
 
 ##################
diff --git a/small_RNA-seq/small_RNA-seq.snakefile b/small_RNA-seq/small_RNA-seq.snakefile
index e532bf48ce3f3a9a57f89686048298b277ab1cb6..067ca56ae6d27b93d1d621f54a4c4dc96333d3d4 100644
--- a/small_RNA-seq/small_RNA-seq.snakefile
+++ b/small_RNA-seq/small_RNA-seq.snakefile
@@ -4164,7 +4164,7 @@ def plot_logo(data, ylabel):
     letter2legend = dict(zip("ACGTN", "ACGTN"))
     usetex = mpl.rcParams.get("text.usetex", False)
     if usetex:
-        ylabel = sub("_", r"\_", ylabel)
+        ylabel = texscape(ylabel)
     for (read_len, rel_heights) in data.mul(information, axis=0).iterrows():
         y_base = 0
         for (letter, rel_height) in rel_heights.sort_values().iteritems():