This extension includes a variety of snippets for LaTeX including making environments and plotting images for functions, etc.
- Template Snippet
template
or\template
: Use the default template which includes a variety of packages and declared-commands. The template will also automatically generate the title and author, as well as date, and will formate the document.
- Formula Snippets:
sumlarge
or\sumlarge
: Insert a large summation notation.suminline
or\suminline
: Insert an inline summation notation, (only in the cases when the environment is inline math environment).integrallarge
or\integrallarge
: Insert large integral notation.integralinline
or\integralinline
: Insert inline integral notation, (only in the cases when the environment is inline math environment).fractionlarge
or\fractionlarge
: Insert large fraction notation.fractioninline
or\fractioninline
: Insert inline fraction notation, (only in the cases when the environment is inline math environment).to
or\to
: Superscript notation, as well as power notation.
- Environment Snippets
mathinline
or\mathinline
: Insert inline Math Environment:$ $
.mathcentered
ormathcentered
: Insert centered Math Environment:$$ $$
.section
or\section
: Insert a new section.subsection
or\subsection
: Insert a new subsection.header
or\header
: Insert a new section without index.headersmall
or\headersmall
: Insert a new subsection without index.theorem
or\theorem
: Insert a theorem, whose style is already defined in the template. The serial number is automatically generated according to the section.problem
or\problem
: Insert a problem, whose style is already defined in the template. The serial number is automatically generated according to the section.definition
or\definition
: Insert a definition, whose style is already defined in the template. The serial number is automatically generated according to the section.proof
or\proof
: Insert a proof, whose style is already defined in the template. The serial number is automatically generated according to the section.tab
or\tab
: The equivalent of "\t", also known as "Tab".aligntext
or\aligntext
: Create an align environment when the context is in the text environment. (The equivalence ofalign*
)problemindex
or\problemindex
: Insert problem solving index format.solution
or\solution
: Insert italic 'Sol.'
- Plotting Snippets
plotenvironment2d
or\plotenvironment2d
: Create a 2DPlot Environment of pgfplots. The style declarations are already included in the snippet. Thus, you can set up the position of theaxis lines
, thecolor
and thetitle
of the environment.plotgraph2d
or\plotgraph2d
: Plot a 2D Graph in the 2D graph environment, noted that this can also be used in the 3D environment.In this case, you have to specify the math expression of the function and the
LaTeX
form of the function since you may want it to shown as the label of the graph. Also, the domain and the color have to be given out.plotcircle2d
or\plotcircle2d
: Plot a 2D Circle in the 2D graph environment, noted that this can also be used in the 3D environment.This snippet is implemented by using another variable t, since the normal equation of the circle: (x-a)^2+(y-b)^2=r^2 can be transformed into x=a+rcost, y=b+rsint. Noted that even if the implicit function can be transformed into two explicit functions: y=bยฑโ(r^2-(x-a)^2),the process of adding legendentry will produce problem of colors.
plotline2d
or\plotline2d
: Plot a 2D Line in the 2D graph environment, noted that this can also be used in the 3D environment.Using this snippet, you have to specify the domain of the function, the color of the graph and the slope and the y-intersect of the function. (Linear function: y=ax+b)
plotellipse2d
or\plotellipse2d
: Plot a 2D Ellipse in the 2D graph environment, noted that this can also be used in the 3D environment.Since the standard equation for ellipse is x^2/a^2+y^2/b^2, the value of a and b have to be specified. Also after considering of the movement of the graph, the equation can be transformed into (x-x_0)^2/a^2+(y-y_0)^2/b^2=1. The value of x_0 and y_0 also have to be given out.
plotenvironment3d
or\plotenvironment3d
: Create a 3DPlot Environment of pgfplots. The style declarations are already included in the snippet.The
title
,colormap
andaxis lines
have to be specified.plotgraph3d
or\plotgraph3d
: Plot a 3D Graph in the 3D graph environment created.The math expression and LaTeX expression have to be specified.
Using the command LaTeX Plotting Tool
, you can quickly draw a custom regression graph for any degree according to the points you pointed out in the canvas.
You can customize the following:
- whether you want to include point in the graph
- the color of the curve
- the caption of the graph
- the domain
- the degree of the curve
- the coordinate position in the output environment
- the coordinate position of the points when edit
The command can be accessed by typing
shift + command + P
in Mac OS X andshift + ctrl + P
in Windows.
The tool will automatically copy the LaTeX code onto your pasteboard, and you can plot in the tex
file simply by pasting into the document.
With LaTeX in the path.
Dependency:
js-polynomial-regression
Github Link.
With VSCode Verson no lower than 1.41.0
Tip:
Auto-save
option is recommended to be enabled.LaTeX Workshop
extension is recommended to be installed, it's available in the market place.
The Github page of this project is https://github.com/JeffersonQin/VSCode-LaTeX-Snippets. If you have any suggestion or want to have some additional functions, please feel free to contact me (my personal e-mail: [email protected]) or write a review either here or at github. Thank you.
No known issues yet.
MIT License.
Initial release of latex-snippets-jeff.
Rename the project.
Add new functions. Now you can plot the regression graphs quickly by using the LaTeX Plotting Tool
command.
Add feature descriptions to README.md
and bug fix.
Adding Information.
Fix introduction page.
Add icon.
Bug Fix:
- Fix the misspelling of word 'theorem'
- Fix the snippets:
proof
anddefinition
Template Adjusting:
- Change the
linespread
back to 1.0 - Add a place of change for the author
- Included more packages:
bm
- Add a new snippet:
problemindex
Bug Fix:
problemindex
New Snippets:solution
New Feature:
- In tex files, whenever a character is typed (except the notations), the auto suggestion will be shown.
From now on, you have to enable the auto-suggestion
manually in the setting page.
- Update:
- Refined the environment for Definitions and Theorems.
- Reorganized the
template
- New Snippets:
header
headersmall
italic
bold
bolditalic
itemize
- Removal:
- The
auto-suggestion
function is removed due to many complains. In the later versions, better replacement for this function will be added.
- The
- Issues solved:
- Thanks of the issue raised by h7ml, from now on the
node_modules
will not be on GitHub again.
- Thanks of the issue raised by h7ml, from now on the
Security Update & Bug Fix.