Assume we have a source code in C++ like so:
void dfs(int p){
if(o[p]) return;
o[p]=1;
c[p] = t++;
for(int i=0; i<s[p].size(); ++i){
dfs(s[p][i]);
}
}
How do we properly display this source code in plain TeX?
The solution should keep all spaces, have all symbols, and use fixed width font.
eplain
. It has support for a bunch of things you might want, including a\verbatim
.