マクロ原因エラー内部ラテックス角括弧([)

デヴィッド・ジュリアンヒラリオ:

私は特定のウェブサイトからの多くの記事擦り傷が、私はifとよそのたくさんのラテックスにHTMLから記事を変換するというプログラムを持っていますが、今私は、私はすでに1555+問題をダウンロードし、TEXにそれらを変換してきたので、それらをrescrapeすることはできませんそしてそれが再びそれを引っ張るために多くの時間がかかりますし、私は、サーバー上でより多くの負担をかけたくありません。今、私の問題は、(、記事の一部は、テキストの面倒なフォームを生成していることである\tboxsup{\textbf{[Picture on page 16}, \textbf{17]}})、それはLaTeXのは、文句を言うようになります。要するに、どのように私は私の問題を解決するために括弧をエスケープするのですか?

ここではどのようにvimの通知に私のエラーです

私は本当に単純にラップすることはできません手動でそれらを{}、それがランダムな記事に発生するため。私が使用することを計画していますsedそれらを修正します。


MWE

\documentclass{article}

\usepackage[most]{tcolorbox}
\newcommand{\tboxsup}[1]{
\begin{center}
\begin{tcolorbox}[enhanced,
     breakable,
     width=0.75\textwidth,
     colback=white,
     colframe=darkgray,
     colupper=darkgray,
     boxrule=-1pt,
     arc=0pt,
     boxsep=3pt,
     colbacktitle=darkgray,
          title=#1]

}

\begin{document}
\tboxsup{\textbf{[Picture on page 12}, \textbf{13]}}

Egyptian model depicting the preparation of bread and beer
\vspace{.5em}

\textbf{[Credit Line]}
\vspace{.5em}

Su concessione del Ministero per i Beni e le Attività Culturali-Museo Egizio-Torino
\vspace{.5em}

\end{tcolorbox}
\end{center}
\end{document}

どうもありがとうございました!

samcarter_is_at_topanswers.xyz:

問題は、オプションの引数の内側に角括弧を使用しようということです。あなたはラッピングすることによって、それらを非表示にすることができます#1追加のグループに{}

\documentclass{article}

\usepackage[most]{tcolorbox}
\newcommand{\tboxsup}[1]{
\begin{center}
\begin{tcolorbox}[enhanced,
     breakable,
     width=0.75\textwidth,
     colback=white,
     colframe=darkgray,
     colupper=darkgray,
     boxrule=-1pt,
     arc=0pt,
     boxsep=3pt,
     colbacktitle=darkgray,
          title={#1}]

}

\begin{document}
\tboxsup{\textbf{[Picture on page 12}, \textbf{13]}}

Egyptian model depicting the preparation of bread and beer
\vspace{.5em}

\textbf{[Credit Line]}
\vspace{.5em}

Su concessione del Ministero per i Beni e le Attività Culturali-Museo Egizio-Torino
\vspace{.5em}

\end{tcolorbox}
\end{center}
\end{document}

ここでは、画像の説明を入力します。

おすすめ

転載: http://43.154.161.224:23101/article/api/json?id=15607&siteId=1