First Question in this forum, so go easy on me :) I made a few meeting minutes documents for my business and I wanted a custom command for adding a note in a document. I wanted the color of the text and the text box width to be optional. Also, want this to be a package I can call instead of putting this command code in every document I want to use it. Below is my attempt at a solution.
Here is my .sty file
\ProvidesPackage{pnutscommands}
\usepackage{color}
\usepackage{seqsplit}
\usepackage{xargs}
\usepackage{xstring}
\newcommandx{\colornote}[3][1=red, 2=3in]{%
\begin{minipage}{#2}
\textcolor{#1}{\seqsplit{\StrSubstitute{#3}{ }{~}}}
\end{minipage}
}
Here is my .txt
\documentclass{article}
\usepackage{pnutscommands}
\begin{document}
\colornote[blue][5in]
{17823941dsfdsfdsf 23471239047123 9407123408917234890123748912034712985712389012351}
\colornote
{17823941237490812347123904712389 dsdsfdsfdsfdfs 23748912034712985712389012351}
\end{document}
This code works if you replace \StrSubstitute{#3}{ }{~}} with #3. The issue was that \seqsplit removes spaces in the string. So I tried \StrSubstitute but it returns an error that I'm unfamiliar with.
% Console output:
! Use of \@xs@StrSubstitute@@ doesn't match its definition.
\kernel@ifnextchar ...rved@d =#1\def \reserved@a {
#2}\def \reserved@b {#3}\f...
l.7 ...408917234890123748912034712985712389012351}
Can someone help me either fix this error or point me to a better solution?
