Skip to content

Commit 92bd945

Browse files
committed
latex: Better avoid chktex warning24 (followup to #359)
Use a `%` at the end of the line instead of not taking a new line.
1 parent efff286 commit 92bd945

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

snippets/latex.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,12 +192,12 @@
192192
},
193193
"figure": {
194194
"prefix": "BFI",
195-
"body": "\\begin{figure}[${1:htbp}]\n\t\\centering\n\t${0:${TM_SELECTED_TEXT}}\n\t\\caption{${2:<caption>}}\\label{${3:<label>}}\n\\end{figure}",
195+
"body": "\\begin{figure}[${1:htbp}]\n\t\\centering\n\t${0:${TM_SELECTED_TEXT}}\n\t\\caption{${2:<caption>}}%\n\t\\label{${3:<label>}}\n\\end{figure}",
196196
"description": "figure"
197197
},
198198
"table": {
199199
"prefix": "BTA",
200-
"body": "\\begin{table}[${1:htbp}]\n\t\\centering\\begin{tabular}{${4:<columns>}}\n\t\t${0:${TM_SELECTED_TEXT}}\n\t\\end{tabular}\n\t\\caption{${2:<caption>}}\\label{${3:<label>}}\n\\end{table}",
200+
"body": "\\begin{table}[${1:htbp}]\n\t\\centering\\begin{tabular}{${4:<columns>}}\n\t\t${0:${TM_SELECTED_TEXT}}\n\t\\end{tabular}\n\t\\caption{${2:<caption>}}%\n\t\\label{${3:<label>}}\n\\end{table}",
201201
"description": "table"
202202
},
203203
"tikzpicture": {

snippets/latex/latex-snippets.json

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@
107107
"\t\\floatname{algorithm}{${1:Algorithm}}",
108108
"\t\\algrenewcommand\\algorithmicrequire{\\textbf{${2:Input: }}}",
109109
"\t\\algrenewcommand\\algorithmicensure{\\textbf{${3:Output: }}}",
110-
"\t\\caption{$4}\\label{alg:$5}",
110+
"\t\\caption{$4}%",
111+
"\t\\label{alg:$5}",
111112
"\t\\begin{algorithmic}[1]",
112113
"\t\t\\Require \\$input\\$",
113114
"\t\t\\Ensure \\$output\\$",
@@ -282,7 +283,8 @@
282283
"\t\\begin{center}",
283284
"\t\t\\includegraphics[width=0.95\\textwidth]{figures/$1}",
284285
"\t\\end{center}",
285-
"\t\\caption{$3}\\label{fig:$4}",
286+
"\t\\caption{$3}%",
287+
"\t\\label{fig:$4}",
286288
"\\end{figure}",
287289
"$0"
288290
],
@@ -293,7 +295,8 @@
293295
"body": [
294296
"\\begin{figure}",
295297
"\t\\includegraphics[width=0.45\\textwidth]{figures/$1}",
296-
"\t\\caption{$2}\\label{fig:$3}",
298+
"\t\\caption{$2}%",
299+
"\t\\label{fig:$3}",
297300
"\\end{figure}",
298301
"$0"
299302
],
@@ -304,7 +307,8 @@
304307
"body": [
305308
"\\begin{figure*}",
306309
"\t\\includegraphics[width=0.45\\textwidth]{figures/$1}",
307-
"\t\\caption{$2}\\label{fig:$3}",
310+
"\t\\caption{$2}%",
311+
"\t\\label{fig:$3}",
308312
"\\end{figure*}",
309313
"$0"
310314
],
@@ -314,7 +318,8 @@
314318
"prefix": "table",
315319
"body": [
316320
"\\begin{table}",
317-
"\t\\caption{$1}\\label{tab:$2}",
321+
"\t\\caption{$1}%",
322+
"\t\\label{tab:$2}",
318323
"\t\\begin{center}",
319324
"\t\t\\begin{tabular}[c]{l|l}",
320325
"\t\t\t\\hline",
@@ -336,7 +341,8 @@
336341
"prefix": "table:acm",
337342
"body": [
338343
"\\begin{table}",
339-
"\t\\caption{$1}\\label{tab:$2}",
344+
"\t\\caption{$1}%",
345+
"\t\\label{tab:$2}",
340346
"\t\\begin{tabular}{${3:ccl}}",
341347
"\t\t\\toprule",
342348
"\t\t$4",
@@ -354,7 +360,8 @@
354360
"prefix": "table:acm:*",
355361
"body": [
356362
"\\begin{table*}",
357-
"\t\\caption{$1}\\label{tab:$2}",
363+
"\t\\caption{$1}%",
364+
"\t\\label{tab:$2}",
358365
"\t\\begin{tabular}{${3:ccl}}",
359366
"\t\t\\toprule",
360367
"\t\t$4",

0 commit comments

Comments
 (0)