鋳造、カスタムエスケープ処理

鋳造、カスタムエスケープ処理

ちょっとした質問ですminted に行を検査させてそれに反応させることは可能ですか?

使用事例:

# This will print "This is a comment"
echo "This is a comment"
#>This is a comment

echo "This is a shell command"
#>This is a shell command

ls -l
#>total 0
#>-rw-r--r-- 1 user user 0 Apr 18 00:00 file1
#>-rw-r--r-- 1 user user 0 Apr 18 00:00 file2

「実行されたコード」が表示される場所で使用されている「#>」プレフィックス付きのファイルを取得し、「実行されたコメント」なしでプレーンテキストとして表示します。「通常の」コマンドには「demo@pc / $」プレフィックスを付ける必要があります。

ポイントは、tcolorboxシェル実行として LaTeX で「ウィンドウ」にレンダリングできる実行可能なスクリプト ファイルを持つことです。

demo@pc / $ # This will print "This is a comment"
demo@pc / $ echo "This is a comment"
This is a comment

demo@pc / $ echo "This is a shell command"
This is a shell command

demo@pc / $ ls -l
total 0
rw-r--r-- 1 user user 0 Apr 18 00:00 file1
rw-r--r-- 1 user user 0 Apr 18 00:00 file2

ヒントがあればよろしくお願いします!

関連情報