Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

w-gc/acm-cheat-sheet

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

手写代码必备手册(注释版)

原版来自手写代码必备手册

显示注释:

\usepackage{color}
\newcommand{\Note}[1]{\textcolor{blue}{【注:#1】}} %% 笔记
\newcommand{\Hl}[1]{\textcolor{red}{#1}} %% Highlight
\newcommand{\Dl}{---------------------------------------------------------------------分割线-------------------------------------------------------------------} %% Dividingline
\usepackage{listings}
\lstnewenvironment{NoteCode}{
\lstset{ %
backgroundcolor=\color{white},   % choose the background color
basicstyle=\small,        % size of fonts used for the code
columns=fullflexible,
breaklines=true,                 % automatic line breaking only at whitespace
captionpos=b,                    % sets the caption-position to bottom
tabsize=4,
commentstyle=\color{magenta},    % comment style
escapeinside={\%*}{*)},          % if you want to add LaTeX within your code
keywordstyle=\color{blue},       % keyword style
stringstyle=\color{green}\ttfamily,     % string literal style
frame=single, % none
% rulesepcolor=\color{red!20!green!20!blue!20},
% identifierstyle=\color{red},
language=C++
}}{}

关闭注释:

\newcommand{\Note}[1]{} %% 笔记 (注释掉)
\newcommand{\Hl}[1]{#1} %% Highlight (注释掉)
\newcommand{\Dl}[1]{} %% Dividingline (注释掉)
\usepackage{comment}
\newenvironment{NoteCode}{}{}
\excludecomment{NoteCode}

About

Acm Cheat Sheet

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TeX 100.0%