Chinese breaklines, % automatically fold extendedchars = false, % when the Code cross page is resolved, Chapter title, questions about non-display of headers and other Chinese characters xleftmargin = 2em, xrightmargin = 2em, aboveskip = 1em, % set margin tabsize = 4, % set the number of tab spaces showspaces = false % Do Not Display spaces}
You can use this when inserting code in the article:
\begin{lstlisting}[language=C]/* helloworld.c */#include
{language=c,tabsize=4, keepspaces =true,breakindent=22pt, Numbers=left,stepnumber=1,numberstyle=\tiny,basicstyle=\footnotesize, Showspaces=false, Flexiblecolumns=true,breaklines=true, breakautoindent=true,breakindent=4em,escapeinside={/*@}{@*/}} You can line up thousands of lines of code into the following effect. And you can insert tags in your code that you can reference in the article, such as you can insert a comment somewhere in the code.
I. Methods of UseSecond, HTML structureThird, initialize the plug-inData-typeit-whattotype= "A new string to type."data-typeit-speed= "100"Data-typeit-lifelike= "true"Data-typeit-showcursor= "true" >$ ('. Type-it '). Typeit ();The second way is to pass in the configuration parameters when initializing the plug-in.$ ('. Type-it '). Typeit ({Whattotype: ' Enter your string here! ',TYPESPEED:300,Lifelike:false,Showcursor:true});The typewriter plugin supports entering text for multiple sentences. By
% will be numbered15 numbersep=5pt, % how far the line-numbers are from the code16 backgroundcolor=\color{white}, % choose the background color. You must add \usepackage{color}17 showspaces=false, % show spaces adding particular underscores18 showstringspaces=false, % underline spaces within strings19 showtabs=false, % show tabs within strings adding particular underscores20 frame=single,
introducing their corresponding functions. Finally, the previous introduction 1 should be written like this:\usepackage{listings}\usepackage[usenames,dvipsnames]{xcolor}2 listings package corresponding parameter settingWe don't do any setup and we get the results, but the results are often monotonous, not the result we want. Before we can really use it, we have to make the appropriate settings to achieve the effect we need. This is where the real cost is. After several debugs, my settings are:\
Contact Us
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.