Skip to main content
added 53 characters in body; edited body
Source Link
Marco Daniel
  • 97.7k
  • 19
  • 277
  • 441

you can use the following modifcation

\newlength{\lstcolumnwidth} \settowidth{\lstcolumnwidth}{\ttfamily M} \lstset{basicstyle=\ttfamily,basewidth=\lstcolumnwidth,columns=fixed, fontadjust=true} 

The indention at the beginning of line isn't a problem by LaTeX. This is a problem of the reader. There are no settings for such case. You can get an odd solution with the following code:

\lstset{showspaces=true} \makeatletter \def\lst@visiblespace{\textcolor{codebg}{-}} \makeatother 

With packages like attachefile2attachefile2 you can attach the original c-file.

you can use the following modifcation

\newlength{\lstcolumnwidth} \settowidth{\lstcolumnwidth}{\ttfamily M} \lstset{basicstyle=\ttfamily,basewidth=\lstcolumnwidth,columns=fixed, fontadjust=true} 

The indention at the beginning of line isn't a problem by LaTeX. This is a problem of the reader. There are no settings for such case. You can get an odd solution with the following code:

\lstset{showspaces=true} \makeatletter \def\lst@visiblespace{\textcolor{codebg}{-}} \makeatother 

With packages like attachefile2 you can attach the original c-file.

you can use the following modifcation

\newlength{\lstcolumnwidth} \settowidth{\lstcolumnwidth}{\ttfamily M} \lstset{basicstyle=\ttfamily,basewidth=\lstcolumnwidth,columns=fixed, fontadjust=true} 

The indention at the beginning of line isn't a problem by LaTeX. This is a problem of the reader. There are no settings for such case. You can get an odd solution with the following code:

\lstset{showspaces=true} \makeatletter \def\lst@visiblespace{\textcolor{codebg}{-}} \makeatother 

With packages like attachefile2 you can attach the original c-file.

added 247 characters in body
Source Link
Marco Daniel
  • 97.7k
  • 19
  • 277
  • 441

you can use the following modifcation

\newlength{\lstcolumnwidth} \settowidth{\lstcolumnwidth}{\ttfamily M} \lstset{basicstyle=\ttfamily,basewidth=\lstcolumnwidth,columns=fixed, fontadjust=true} 

theThe indention at the beginning of line isn't able to influencea problem by LaTeX. This is a problem of the reader not LaTeX. InThere are no settings for such cases I prefer a packagecase. You can get an odd solution with the following code:

\lstset{showspaces=true} \makeatletter \def\lst@visiblespace{\textcolor{codebg}{-}} \makeatother 

With packages like attachefile2attachefile2 you can attach the original c-file.

you can use the following modifcation

\newlength{\lstcolumnwidth} \settowidth{\lstcolumnwidth}{\ttfamily M} \lstset{basicstyle=\ttfamily,basewidth=\lstcolumnwidth,columns=fixed, fontadjust=true} 

the indention isn't able to influence. This is a problem of the reader not LaTeX. In such cases I prefer a package like attachefile2.

you can use the following modifcation

\newlength{\lstcolumnwidth} \settowidth{\lstcolumnwidth}{\ttfamily M} \lstset{basicstyle=\ttfamily,basewidth=\lstcolumnwidth,columns=fixed, fontadjust=true} 

The indention at the beginning of line isn't a problem by LaTeX. This is a problem of the reader. There are no settings for such case. You can get an odd solution with the following code:

\lstset{showspaces=true} \makeatletter \def\lst@visiblespace{\textcolor{codebg}{-}} \makeatother 

With packages like attachefile2 you can attach the original c-file.

Source Link
Marco Daniel
  • 97.7k
  • 19
  • 277
  • 441

you can use the following modifcation

\newlength{\lstcolumnwidth} \settowidth{\lstcolumnwidth}{\ttfamily M} \lstset{basicstyle=\ttfamily,basewidth=\lstcolumnwidth,columns=fixed, fontadjust=true} 

the indention isn't able to influence. This is a problem of the reader not LaTeX. In such cases I prefer a package like attachefile2.