MathJax basic tutorial and quick reference

MathJax basic tutorial and quick reference
  1. To see how any formula was written in any question or answer, including this one, right-click on the expression it and choose "Show Math As > TeX Commands". (When you do this, the '$' will not display. Make sure you add these. See the next point.)

  2. For inline formulas, enclose the formula in $...$. For displayed formulas, use $$...$$.
    These render differently. For example, type
    $\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$
    to show ni=0i2=(n2+n)(2n+1)6 (which is inline mode) or type
    $$\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$$
    to showni=0i2=(n2+n)(2n+1)6(which is display mode).

  3. For Greek letters, use \alpha\beta, …, \omegaα,β,ω. For uppercase, use \Gamma\Delta, …, \OmegaΓ,Δ,,Ω.

  4. For superscripts and subscripts, use ^ and _. For example, x_i^2x2i.

  5. Groups. Superscripts, subscripts, and other operations apply only to the next “group”. A “group” is either a single symbol, or any formula surrounded by curly braces {}. If you do 10^10, you will get a surprise: 1010. But 10^{10} gives what you probably wanted: 1010. Use curly braces to delimit a formula to which a superscript or subscript applies: x^5^6 is an error; {x^y}^z is xyz, and x^{y^z} is xyz. Observe the difference between x_i^2 x2i and x_{i^2} xi2.

  6. Parentheses Ordinary symbols ()[] make parentheses and brackets (2+3)[4+4]. Use \{ and \} for curly braces {}.

    These do not scale with the formula in between, so if you write (\frac{\sqrt x}{y^3}) the parentheses will be too small: (xy3). Using \left(\right) will make the sizes adjust automatically to the formula they enclose: \left(\frac{\sqrt x}{y^3}\right) is (xy3).

    \left and\right apply to all the following sorts of parentheses: ( and ) (x)[ and ] [x]\{ and \} {x}| |x|\langle and \rangle x\lceil and \rceil x, and \lfloor and \rfloor x. There are also invisible parentheses, denoted by .\left.\frac12\right\rbrace is 12}.

  7. Sums and integrals \sum and \int; the subscript is the lower limit and the superscript is the upper limit, so for example \sum_1^n n1. Don't forget {}if the limits are more than a single symbol. For example, \sum_{i=0}^\infty i^2 is i=0i2. Similarly, \prod \int \bigcup \bigcap \iint .

  8. Fractions There are two ways to make these. \frac ab applies to the next two groups, and produces ab; for more complicated numerators and denominators use {}\frac{a+1}{b+1} is a+1b+1. If the numerator and denominator are complicated, you may prefer \over, which splits up the group that it is in: {a+1\over b+1} is a+1b+1.

  9. Fonts

    • Use \mathbb or \Bbb for "blackboard bold": CHNQRZ.
    • Use \mathbf for boldface: ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz.
    • Use \mathtt for "typewriter" font: ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz.
    • Use \mathrm for roman font: ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz.
    • Use \mathsf for sans-serif font: ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz.
    • Use \mathcal for "calligraphic" letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ
    • Use \mathscr for script letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ
    • Use \mathfrak for "Fraktur" (old German style) letters: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.
  10. Radical signs Use sqrt, which adjusts to the size of its argument: \sqrt{x^3} x3\sqrt[3]{\frac xy} 3xy. For complicated expressions, consider using{...}^{1/2} instead.

  11. Some special functions such as "lim", "sin", "max", "ln", and so on are normally set in roman font instead of italic font. Use \lim\sin, etc. to make these: \sin x sinx, not sin x sinx. Use subscripts to attach a notation to \lim\lim_{x\to 0}limx0

  12. There are a very large number of special symbols and notations, too many to list here; see , or . Some of the most common include:

    • \lt \gt \le \ge \neq <>. You can use \not to put a slash through almost anything: \not\lt  but it often looks bad.
    • \times \div \pm \mp ×÷±\cdot is a centered dot: xy
    • \cup \cap \setminus \subset \subseteq \subsetneq \supset \in \notin \emptyset \varnothing 
    • {n+1 \choose 2k} or \binom{n+1}{2k} (n+12k)
    • \to \rightarrow \leftarrow \Rightarrow \Leftarrow \mapsto 
    • \land \lor \lnot \forall \exists \top \bot \vdash \vDash ¬
    • \star \ast \oplus \circ \bullet 
    • \approx \sim \simeq \cong \equiv \prec .
    • \infty \aleph_0 0\nabla \partial \Im \Re 
    • For modular equivalence, use \pmod like this: a\equiv b\pmod n ab(modn).
    • \ldots is the dots in a1,a2,,an\cdots is the dots in a1+a2++an
    • Some Greek letters have variant forms: \epsilon \varepsilon ϵε\phi \varphi ϕφ, and others. Script lowercase l is \ell .

     lets you draw a symbol on a web page and then lists the TEX symbols that seem to resemble it. These are not guaranteed to work in MathJax but are a good place to start. To check that a command is supported, note that MathJax.org maintains a , and one can also check Dr. Carol JVF Burns's page of .

  13. Spaces MathJax usually decides for itself how to space formulas, using a complex set of rules. Putting extra literal spaces into formulas will not change the amount of space MathJax puts in: a␣b and a␣␣␣␣b are both ab. To add more space, use \, for a thin space ab\; for a wider space ab\quad and\qquad are large spaces: abab.

    To set plain text, use \text{…}{xsx is extra large}. You can nest $…$ inside of \text{…}.

  14. Accents and diacritical marks Use \hat for a single symbol ˆx\widehat for a larger formula ^xy. If you make it too wide, it will look silly. Similarly, there are \bar ˉx and \overline ¯xyz, and \vec x and \overrightarrow xy and \overleftrightarrow xy. For dots, as in ddxx˙x=˙x2+x¨x, use \dot and \ddot.

  15. Special characters used for MathJax interpreting can be escaped using the \ character: \$ $\{ {\_ _, etc. If you want \ itself, you should use\backslash , because \\ is for a new line.

(Tutorial ends here.)


It is important that this note be reasonably short and not suffer from too much bloat. To include more topics, please create short addenda and post them as answers instead of inserting them into this post.

 
12 
Some capital Greek letters are the same as the Roman equivalents, so they are not separated in LATEX. For a capital beta, one must use something like \mathrm{B}B –    Aug 28 '12 at 2:06
36 
for a beginner I find this  very helpful –    Aug 28 '12 at 4:35
110 
Thanks for putting this all together! –    Aug 28 '12 at 11:03
3 
Two related questions:  and  –    Aug 28 '12 at 13:26
2 
@Henning When I ranked features in my mind to decide whether to include them, \varphi and \varepsilon were very close to the threshhold for inclusion. Martin Sleziak has since added them, which I agree is a good idea. –    Aug 28 '12 at 16:33
11 
A quick addition to point 11: If you want to use a sin-like symbol that is not already defined, the command is \operatorname: e.g., \operatorname{Spec} Agives SpecA. –    Aug 28 '12 at 16:45
6 
It might be useful to mention hanging subscripts for things like _5C_3 5C3. You could also mention \frac vs \dfrac. –    Aug 29 '12 at 18:09
3 
My basic idea is that if a beginner can express a formula clearly, then someone else can come in and clean up the typesetting afterwards. I am considering getting rid of the section about \big\left, and \right for this reason, and trimming the section on spacing. –    Aug 30 '12 at 2:06
5 
Most of the references to TeX or LaTeX in this and the answers ought to be to MathJaX (the exception that I can see being the output of Detexify). I know this is a bit pedantic, but would it be alright to correct this? –    Sep 11 '12 at 14:13
2 
@AndrewStacey Thanks for pointing this out. Let's by all means be as correct as possible, particularly when there's no extra cost. –    Sep 11 '12 at 14:15
4 
@MJD Except that this is meant as a tutorial for those who aren't familiar with the distinction (and there really is a distinction: "slightly incompatible implementations" doesn't really fit the bill here). One thing tutorials often include is a "Where to find out more" section. This doesn't. Someone who doesn't know the distinction might be tempted to search for help on TeX or LaTeX instead and wonder why it doesn't work. –    Sep 11 '12 at 14:40
3 
@axblount But that's precisely the wrong way around to think about it! The likelihood is that someone will look at this tutorial to figure out how to write something on the Maths-SX site: i.e., to use MathJaX. If they can't find help here, where do they go? If they have the idea that MathJaX is "just a javascript implementation of TeX" then they might think to look for help with TeX, but that is quite possibly not going to be helpful. –    Sep 11 '12 at 15:08
4 
@axblount For a start, you've changed the goalposts: "LaTeX math expressions". LaTeX is so much more than just a way of typesetting maths! Second, I don't really know but it wouldn't take me long to cook one up. I don't use MathJaX so I haven't explored it. But I know, for example, that it can't handle catcode changes. Which means that I can't make ( and ) automatically resizeable. I can in LaTeX. –    Sep 11 '12 at 16:04
25 
I wish I saw this post when I first joined. This post should be a main link on the home page. There should be a button under each box: NEW TO LATEX, CLICK HERE FOR EXAMPLES. This is extremely useful, concise. –    May 31 '13 at 18:09
4 
@MJD: I use \mathrm in many places; e.g. dx in integrals and derivatives and for operator names that don't need the full force of \operatorname\mathrmwas intended for roman symbols in math mode; \text was intended for text because of the way it spaces things. See . Since I don't believe we can use preambles in MathJax, we can't use \DeclareMathOperator, though we can use \newcommand, but that is orthogonal to the use of \mathrm vs\text for math symbols. –    Jun 10 '13 at 16:23

25 Answers

  183

Matrices

  1. Use $$\begin{matrix}…\end{matrix}$$ In between the \begin and \end, put the matrix elements. End each matrix row with \\, and separate matrix elements with&. For example,

    $$
            \begin{matrix}
            1 & x & x^2 \\
            1 & y & y^2 \\
            1 & z & z^2 \\
            \end{matrix}
    $$
    

    produces:

    1xx21yy21zz2

    MathJax will adjust the sizes of the rows and columns so that everything fits.

  2. To add brackets, either use \left…\right as in section 6 of the tutorial, or replace matrix with pmatrix (1234)bmatrix [1234]Bmatrix {1234},vmatrix |1234|Vmatrix 1234.

  3. Use \cdots \ddots vdots  when you want to omit some of the entries:

    (1a1a21an11a2a22an21ama2manm)

  4. For "augmented" matrices, put parentheses or brackets around a suitably-formatted table; see  below for details. Here is an example:

    [123456]

    is produced by:

    $$ \left[
        \begin{array}{cc|c}
          1&2&3\\
          4&5&6
        \end{array}
    \right] $$
    

    The cc|c is the crucial part here; it says that there are three centered columns with a vertical bar between the second and third.

  5. For small inline matrices use \bigl(\begin{smallmatrix} ... \end{smallmatrix}\bigr), e.g. (abcd) is produced by:

     $\bigl( \begin{smallmatrix} a & b \\ c & d \end{smallmatrix} \bigr)$
    
 
8 
This says "End each matrix row with \\". But there is no reason to end the LAST row of the matrix that way. The double backslash means: now go on to the next row. But there isn't any next row after the last one. –    Aug 28 '14 at 5:15
133 

Aligned equations

Often people want a series of equations where the equals signs are aligned. To get this, use \begin{align}…\end{align}. Each line should end with \\, and should contain an ampersand at the point to align at, typically immediately before the equals sign.

For example,

37=7321122=7321227321732=7321227321732=7312117327312(112732)

is produced by

\begin{align}
\sqrt{37} & = \sqrt{\frac{73^2-1}{12^2}} \\
 & = \sqrt{\frac{73^2}{12^2}\cdot\frac{73^2-1}{73^2}} \\ 
 & = \sqrt{\frac{73^2}{12^2}}\sqrt{\frac{73^2-1}{73^2}} \\
 & = \frac{73}{12}\sqrt{1 - \frac{1}{73^2}} \\ 
 & \approx \frac{73}{12}\left(1 - \frac{1}{2\cdot73^2}\right)
\end{align}

The usual $$ marks that delimit the display may be omitted here.

 
2 
The AMS's  recommends the align environment over eqnarray in LaTeX. In MathJax the spacing seems to be the same , but align requires one less ampersand per line. –    Aug 28 '12 at 4:41
2 
Thanks. I was not sure whether to discuss that. . –    Aug 28 '12 at 4:51
 
Would you mind if I changed your example to use align then? –    Aug 28 '12 at 5:34
 
@Rahul: Please go ahead and change anything that seems good to change. This is all CW. –    Aug 28 '12 at 5:44
 
Also, if you think you have a better example, please use it; I used the first one I found. –    Aug 28 '12 at 5:49
2 
Correct me if I'm wrong, but I don't believe the $$ is necessary before and after the \begin{align}. I've certainly never used it. From experience, the \begin{align} puts you into math-display mode by itself. –    Apr 21 '15 at 12:24
 
Thanks, I did not know that. –    Apr 22 '15 at 7:37
 
I sometimes find that one line of this environment is too close to another, making them uncomfortable to read. The interline spacing can be adjusted by using input such as \\[1ex] instead of \\ . (And of course the 1 can be changed to another value such as 1.5 or .7 in order to get enough space but not too much.) –    Jan 30 at 16:29
  109

Definitions by cases (piecewise functions)

Use \begin{cases}…\end{cases}. End each case with a \\, and use & before parts that should be aligned.

For example, you get this:

f(n)={n/2,if n is even3n+1,if n is odd

by writing this:

  f(n) =
\begin{cases}
n/2,  & \text{if $n$ is even} \\
3n+1, & \text{if $n$ is odd}
\end{cases}

The brace can be moved to the right:if n is even:n/2if n is odd:3n+1}=f(n)

by writing this:

\left.
\begin{array}{l}
\text{if $n$ is even:}&n/2\\
\text{if $n$ is odd:}&3n+1
\end{array}
\right\}
=f(n)

To get a larger vertical space between cases we can use \\[2ex] instead of \\. For example, you get this:

f(n)={n2,if n is even3n+1,if n is odd

by writing this:

f(n) =
\begin{cases}
\frac{n}{2},  & \text{if $n$ is even} \\[2ex]
3n+1, & \text{if $n$ is odd}
\end{cases}

(An ‘ex’ is a length equal to the height of the letter x2ex here means the space should be two exes high.)

 
 
@MJD Do we have to use the additional instruction \displaystyle when the formulas displayed are more complex ? –    Jul 1 '14 at 14:43
 
@jibs \displaystyle is enabled automatically in displays, for example between $$…$$. You should not ever have to use it. –    Jul 1 '14 at 14:50
 
@jibe In general, the separate cases in this notation should be in text style unless they are very very complex (and then, the { notation is just wrong anyways). –    Aug 25 '14 at 9:53
105 

Symbols

In general, you have to search in long tables about a specific symbol you're looking for, things like Ψδζ ... And it turns out that this operation can be frustrating and time consuming, which can cause the buddy to abandon writing the complete LATEX sentence in his answer, or in some cases, the complete answer itself.

That's why the tool that I will present you in this post was conceived. Basically, it is a LATEX handwritten symbol recognition. Example in image:

www.zeeklog.com  - MathJax basic tutorial and quick reference

Here is the website:  No more frustration.

 
7 
Amazing site!!! –    Oct 16 '13 at 3:30
2 
Wow. Thanks! This really helped –    May 5 '14 at 20:59
91

Arrays

It is often easier to read tables formatted in MathJax rather than plain text or a fixed width font. Arrays and tables are created with the array environment. Just after \begin{array} the format of each column should be listed, use c for a center aligned column, r for right aligned, l for left aligned and a | for a vertical line. Just as with matrices, cells are separated with & and rows are broken using \\. A horizontal line spanning the array can be placed before the current line with \hline.

For example,nLeftCenterRight10.24112521189832020001+10i

$$
\begin{array}{c|lcr}
n & \text{Left} & \text{Center} & \text{Right} \\
\hline
1 & 0.24 & 1 & 125 \\
2 & -1 & 189 & -8 \\
3 & -20 & 2000 & 1+10i
\end{array}
$$

Arrays can be nested to make an array of tables.

For example,min012300000101112012230123max012300123111232222333333Δ012300123110122210133210

As the source for the preceding array is long, please right-click on one of the tables and choose Show Math As  TeX Commands.

 
3 
You'll have to wrap the contents of each cell in \text if you don't want allitalics,weirdlookingspacing,anoddapostrophes. –    Aug 29 '12 at 21:30
 
@RahulNarain: True. I used words just for illustration, but I guess the example was slightly misleading. If you'd like to modify it please go ahead.–    Aug 29 '12 at 22:00
1 
Thanks! I like your numeric example better, since the widths of the entries are different enough that the alignment differences are visually clear. –    Aug 30 '12 at 1:37
 
@robjohn how do you use | while typing , i don't find it in my keyboard...... –    Mar 28 '13 at 12:05
 
@exploringnet: on my keyboard, it is the shifted backslash. It may be in different places (or absent) depending on your keyboard. On my mobile device (iPhone), it is in the shifted numerics, to the right of the backslash. In mathmode, \vert gives | and \mid gives , but neither works in the column spec for an array. If you cannot type it on your keyboard, you can alwaays copy and paste it from another document. –    Mar 28 '13 at 17:39
 
It should perhaps be mentioned, that in nested arrays there seems to be no option to synchronize column-widths and/or row-heights over the top-level. I didn't find a solution such that if two arrays are stacked vertically one could make their column-widths matching/fit. –    Aug 26 '13 at 9:16
1 
 could also be convenient for some people, althought it destroys the joy of writing tables in LATEX by hand! –    Jun 3 '14 at 14:18
 
@Rahul: why did regulars not press developers to enhance HTML formatting instead of doing inconvenient and resource-devouring detours through MathJax? When a table contains (mostly) formulæ, the use of a formula-formatting engine looks determined. But when one wants just a table, why should it run software with completely different purpose? I once tried to speak about it at meta.SE, but was gagged. –    Dec 3 '14 at 12:11
 
@IncnisMrsi What kind of pressure could we apply: bribery, threats, kidnapping? A  was made, supported by SE communities, and declined by SE (on technical grounds, as they say). At least we have the MathJax workaround, with all of its flaws: SO and others have nothing. –    Dec 3 '14 at 15:55
68 

Fussy spacing issues

These are issues that won't affect the correctness of formulas, but might make them look significantly better or worse. Beginners should feel free to ignore this advice; someone else will correct it for them, or more likely nobody will care.

Don't use \frac in exponents or limits of integrals; it looks bad and can be confusing, which is why it is rarely done in professional mathematical typesetting. Write the fraction horizontally, with a slash:

BadBettereiπ2eiπ2eiπ/2π2π2sinxdxπ/2π/2sinxdx

The | symbol has the wrong spacing when it is used as a divider, for example in set comprehensions. Use \mid instead:

BadBetter{x|x2Z}{xx2Z}

For double and triple integrals, don't use \int\int or \int\int\int. Instead use the special forms \iint and \iiint:BadBetterSf(x)dydxSf(x)dydxVf(x)dzdydxVf(x)dzdydx

Use \, to insert a thin space before differentials; without this TEX will mash them together:

BadBetterVf(x)dzdydxVf(x)dzdydx

 
2 
I think the first adjusted fraction looks better than the original, but I don't like the second. In any case, this minor spacing imbalance is too peripheral to belong in a basic MathJax tutorial IMO. Too likely to scare people away rather than make them feel helped. –    Aug 31 '12 at 21:05
1 
@Henning Do you mean that the fraction example is too unimportant even to appear in an addendum on fussy spacing, or that the fussy spacing article is too unimportant to appear as an addendum to the tutorial? –    Aug 31 '12 at 23:57
1 
I was talking specifically about the fraction example. Mostly I'm concerned that somebody will come away thinking, Eeek! Do I have to worry about THAT to use the site? But it's also arguable that the disclaimer at the top of the answer ought to take care of that. –    Sep 1 '12 at 21:13
1 
@MJD I like the less space, but what if we want to list the bounds for multiple integrals? Like if we have say 3 integrals and we have 3 separate bounds for each how would we list each one? Or do we have to do \int_bound1^bound2\int_bound3^bound4\int_bound5^bound6?? –    Nov 19 '12 at 19:45
 
@Kyle I think that's exactly what you do in that case. –    Nov 19 '12 at 20:09
16 
Worth nothing you can use \middle with | to get it to work with \left and \right, like \left\{x\middle | \frac{x^2}{2} \in \mathbb{z}\right\}{x|x22z} –    Jun 9 '13 at 22:49
 
Thanks very much! I wanted to do that, but didn't know how. –    Jun 10 '13 at 15:47
  52

Colors

Named colors are browser-dependent; if a browser doesn't know a particular color name, it may render the text as black. The following colors are standard in HTML4 and CSS2 and should be interpreted the same by most browsers:\color{black}{text}text\color{gray}{text}text\color{silver}{text}text\color{white}{text}text\color{maroon}{text}text\color{red}{text}text\color{yellow}{text}text\color{lime}{text}text\color{olive}{text}text\color{green}{text}text\color{teal}{text}text\color{aqua}{text}text\color{blue}{text}text\color{navy}{text}text\color{purple}{text}text\color{fuchsia}{text}text

HTML5 and  define .

Math Stack Exchange's default style uses a light-colored page background, so avoid using light colors for text. Stick to darker colors like maroon, green, blue, and purple, and remember also that 7–10% of men are color-blind and have difficulty distinguishing red and green.

The color may also have the form #rgb where r,g,b are in the range or 09af and represent the intensity of red, green, and blue on a scale of 015, with a=10, b=11, … f=15. For example:

#000text#00Ftext#0F0text#0FFtext#F00text#F0Ftext#FF0text#FFFtext

#000text#005text#00Atext#00Ftext#500text#505text#50Atext#50Ftext#A00text#A05text#A0Atext#A0Ftext#F00text#F05text#F0Atext#F0Ftext#080text#085text#08Atext#08Ftext#580text#585text#58Atext#58Ftext#A80text#A85text#A8Atext#A8Ftext#F80text#F85text#F8Atext#F8Ftext#0F0text#0F5text#0FAtext#0FFtext#5F0text#5F5text#5FAtext#5FFtext#AF0text#AF5text#AFAtext#AFFtext#FF0text#FF5text#FFAtext#FFFtext

You can have a look .

 
2 
We should add that colors can be used on items other than text, such as variables and operators. The '\color' command applies to the next item: surround anything longer with braces. –    Feb 21 '15 at 20:30
  52

System of equations

  • Use \begin{array}…\end{array} and \left\{…\right.. For example, you get this:

{a1x+b1y+c1z=d1a2x+b2y+c2z=d2a3x+b3y+c3z=d3

by writing this:

$$
\left\{ 
\begin{array}{c}
a_1x+b_1y+c_1z=d_1 \\ 
a_2x+b_2y+c_2z=d_2 \\ 
a_3x+b_3y+c_3z=d_3
\end{array}
\right. 
$$
  • Alternatively we can use \begin{cases}…\end{cases}. The same system

{a1x+b1y+c1z=d1a2x+b2y+c2z=d2a3x+b3y+c3z=d3

is produced by the following code

$$\begin{cases}
a_1x+b_1y+c_1z=d_1 \\ 
a_2x+b_2y+c_2z=d_2 \\ 
a_3x+b_3y+c_3z=d_3
\end{cases}
$$
  • To align the = signs use \begin{aligned}...\end{aligned} and \left\{…\right. (see asmeurer's comment){a1x+b1y+c1z=d1+e1a2x+b2y=d2a3x+b3y+c3z=d3

whose code is

$$
\left\{
\begin{aligned} 
a_1x+b_1y+c_1z &=d_1+e_1 \\ 
a_2x+b_2y&=d_2 \\ 
a_3x+b_3y+c_3z &=d_3 
\end{aligned} 
\right. 
$$
  • To align the = signs and the terms as in{a1x+b1y+c1z=d1+e1a2x+b2y=d2a3x+b3y+c3z=d3

use array with l (for "align left"; there are also c and r) parameters

$$
\left\{
\begin{array}{ll}
a_1x+b_1y+c_1z &=d_1+e_1 \\ 
a_2x+b_2y &=d_2 \\ 
a_3x+b_3y+c_3z &=d_3 
\end{array} 
\right.
$$
  • Vertical space between equations. As explained in  to get a larger vertical space between equations we can use \\[2ex] instead of\\. The system

{a1x+b1y+c1z=p1q1a2x+b2y+c2z=p2q2a3x+b3y+c3z=p3q3

is generated by the following code

$$\begin{cases} a_1x+b_1y+c_1z=d_1 \\[2ex] a_2x+b_2y+c_2z=d_2 \\[2ex] a_3x+b_3y+c_3z=d_3 \end{cases} $$

in comparison with

{a1x+b1y+c1z=p1q1a2x+b2y+c2z=p2q2a3x+b3y+c3z=p3q3

whose code is

$$\begin{cases} a_1x+b_1y+c_1z=\frac{p_1}{q_1} \\ a_2x+b_2y+c_2z=\frac{p_2}{q_2} \\ a_3x+b_3y+c_3z=\frac{p_3}{q_3} \end{cases} $$

  • In response to . The following code

    $$ \left\{ \begin{array}{l} 0 = c_x-a_{x0}-d_{x0}\dfrac{(c_x-a_{x0})\cdot d_{x0}}{\|d_{x0}\|^2} + c_x-a_{x1}-d_{x1}\dfrac{(c_x-a_{x1})\cdot d_{x1}}{\|d_{x1}\|^2} \\[2ex] 0 = c_y-a_{y0}-d_{y0}\dfrac{(c_y-a_{y0})\cdot d_{y0}}{\|d_{y0}\|^2} + c_y-a_{y1}-d_{y1}\dfrac{(c_y-a_{y1})\cdot d_{y1}}{\|d_{y1}\|^2} \end{array} \right. $$

produces

{0=cxax0dx0(cxax0)dx0dx02+cxax1dx1(cxax1)dx1dx120=cyay0dy0(cyay0)dy0dy02+cyay1dy1(cyay1)dy1dy12

 
 
51 

Continued fractions

To make a continued fraction, use \cfrac, which works just like \frac but typesets the results differently:

x=a0+12a1+22a2+32a3+44a4+

Don't use regular \frac or \over, or it will look awful:

x=a0+12a1+22a2+32a3+44a4+

You can of course use \frac for the compact notation:

x=a0+12a1+22a2+32a3+44a4+

Continued fractions are too big to put inline. Display them with $$$$ or use a notation like [a0;a1,a2,a3,].

 
 
The RHS of the following continued fractiona1b1+a2b2+a3b3+=a1b1+a2b2+a3b3+ can be typeset with the \genfrac command '{\genfrac{}{}{}{}{a_1}{b_1}} {\genfrac{}{}{0pt}{}{}{+}} {\genfrac{}{}{}{}{a_2}{b_2}} {\genfrac{}{}{0pt}{}{}{+}} {\genfrac{}{}{}{}{a_3}{b_3}} {\genfrac{}{}{0pt}{}{}{+\dots}}' –    Sep 17 '12 at 20:39
 
I wonder if something like 12+34 would be good enough? It is much simpler. (\frac12{\vphantom{1}\atop+}\frac34) –    Sep 17 '12 at 22:30
 
Yes, it is. I didn't mention it because in User’s Guide for the amsmath Package it is written the following: "Note. For technical reasons, using the primitive fraction commands \over, \atop, \above in a LATEX document is not recommended (see, e.g., amsmath.faq)." –    Sep 17 '12 at 22:44
1 
Happily, we are not writing LATEX documents here. –    Sep 17 '12 at 22:44
4 
Or write \underset{j=1}{\overset{\infty}{\LARGE\mathrm K}}\frac{a_j}{b_j}=\cfrac{a_1}{b_1+\cfrac{a_2}{b_2+\cfrac{a_3}{b_3+\ddots}}} to getKj=1ajbj=a1b1+a2b2+a3b3+. –    Jan 24 '13 at 9:15
1 
@AméricoTavares Or use \mathop instead of \overset and \underset\mathop{\LARGE\mathrm K}_{i=1}^\infty \frac{a_i}{b_i}Ki=1aibi –    Feb 21 '15 at 20:48
 
@AlexR It's easier, thanks! –    May 17 '15 at 13:24
 
@AméricoTavares, Why don't you edit the answer and put this extremely helpful command into there, I think that would be more helpful. –    Jan 24 at 15:44
  49 

Crossing things out

Use \require{cancel} in the first formula in your post that requires cancelling; you need it only once per page. Then use:

y+\cancel{x}y+x\cancel{y+x}y+xy+\bcancel{x}y+xy+\xcancel{x}y+xy+\cancelto{0}{x}y+x0\frac{1\cancel9}{\cancel95} = \frac151995=15

Use \require{enclose} for the following:

\enclose{horizontalstrike}{x+y}x+y\enclose{verticalstrike}{\frac xy}xy\enclose{updiagonalstrike}{x+y}x+y\enclose{downdiagonalstrike}{x+y}x+y\enclose{horizontalstrike,updiagonalstrike}{x+y}x+y

\enclose can also produce enclosing boxes, circles, and other notations; see  for a complete list.

 
2 
Can I use \enclose{counterstrike}? :P –    Jul 27 '15 at 19:19
1 
That sneaky 19/95=1/5. Nice one! –    Dec 8 '15 at 23:57
  38 

Additional decorations

\overline¯A ¯AA ¯AAA

\underlineB_ BB_ BBB_

\widetilde˜C ~CC ~CCC

\widehatˆD ^DD ^DDD

\fboxE EE EEE

\underleftarrowF FF FFF

\underrightarrowG GG GGG

\underleftrightarrowH HH HHH

\overbrace(n2)+(n1)+n+(n+1)+(n+2)

\underbrace(n2)+(n1)+n+(n+1)+(n+2)

\overbrace and \underbrace accept a superscript or a subscript, respectively, to annotate the brace. For example, \underbrace{a\cdot a\cdots a}_{b\text{ times}} isaaab times

Additional accents

\checkˇI

\acuteˊJ

\graveˊK

 
 
  38

\implies () is a  alternative to \Rightarrow () for implication.

There's also \iff  and \impliedby .

\to () is preferable to \rightarrow or \longrightarrow for things like f:AB. The reverse is \gets ().

 
1 
Why is it preferable? –    Jul 9 '13 at 20:00
9 
implies looks nicer as the arrow is longer and \to is quicker to right (and it's also what you say in your head while typing it). at least that's what I think. –    Jul 29 '13 at 13:21
1 
Remember the difference between \to and \mapsto as in T:RR,xx+1 produced by T:\mathbb R\to \mathbb R,\; x\mapsto x+1 –    Aug 25 '14 at 9:57
2 
I prefer using \to when it appears as part of a larger propositional formula, rather than at the top level, i.e. p((qr)s), because the spacing is similar to that of other binary operators. \implies is better for sentence- or clause-level implications, or in displays, i.e.x+2=4xx=1. –    Feb 2 '15 at 14:22
37 

Tags & References

For longer calculations (or referring to other post's results) it is convenient to use the tagging/labelling/referencing system. To tag an equation use\tag{yourtag}, and if you want to refer to that tag later on, add \label{somelabel} right after the \tag. It is not necessary that yourtag and somelabel are the same, but it usually is more convenient to do so:

$$ a := x^2-y^3 \tag{*}\label{*} $$

a:=x2y3

In order to refer to an equation, just use \eqref{somelabel}

$$ a+y^3 \stackrel{\eqref{*}}= x^2 $$

a+y3(*)=x2

or \ref{somelabel}

Equations are usually referred to as $\eqref{*}$, but you can also use $\ref{*}$.

Equations are usually referred to as (*), but you can also use *.

As you can see, references are even turned into hyperlinks, which you can use externally as well, e.g. . Note that you can also reference labels in other posts as long as they appear on the same site, which is especially useful when referring to a question with multiple equations, or when commenting on a post.


Due to a , as  - unfortunately this means you won't spot misspelled references before submitting... Just don't forget to remove that \def again

 
3 
Also works in comments: \eqref{*} yields a clickable (*) –    Oct 31 '13 at 10:22
 
To enable automatically tagging your queations with incremental numbers, add <script type="text/x-mathjax-config"> MathJax.Hub.Config({TeX: { equationNumbers: {autoNumber: "all"} }}); </script> to your header. –    Jan 20 at 20:56
 
@GeraldSenarclensdeGrancy That would however yield a global numbering on all answers to one question, not per-answer. And it would break the current expectation of by default not having tags despite using unstarred \begin{align} etc.... Though personally I'd agree with this –    Jan 21 at 7:19
  36 

Using \newcommand

I would like to remark that it is possible to define LaTeX commands as you do in your TeX files. I felt so happy when I first discovered it! It's enough to insert something like

$ \newcommand{\SES}[3]{ 0 \to #1 \to #2 \to #3 \to 0 } $

 at the top of your post (remember the dollars!). Then you can just use your commands as you are used to do: in my example typing $$ \SES{A}{B}{C} $$will produce the following:

0ABC0

It's also possible to use plain \def:

\def\ses#1#2#3{0 \to #1 \to #2 \to #3 \to 0}

and then $\ses{A}{B}{C}$ will produce the same output.

 
2 
Be aware that this affects the entire post, possibly even the frontpage, so it should be used . –    Feb 21 '15 at 20:55
  34

Commutative diagrams

AMScd diagrams must start with a "require":

$\require{AMScd}$
\begin{CD}
    A @>a>> B\\
    @V b V V= @VV c V\\
    C @>>d> D
\end{CD}

to get this diagram: AaBb=cCdD

@>>> is used for arrow right

@<<< is used for arrow left

@VVV is used for arrow down

@AAA is used for arrow up

@= is used for horizontal double line

@| is used for vertical double line

@. is used for no arrow

Another example:

    \begin{CD}
        A @>>> B @>{\text{very long label}}>> C \\
        @. @AAA @| \\
        D @= E @<<< F
    \end{CD}

ABvery long labelCD=EF

Long labels increase the length of the arrow and in this version also automatically increase corresponding arrows.

$\require{AMScd}$
\begin{CD}
      RCOHR'SO_3Na @>{\text{Hydrolysis,$\Delta, Dil.HCl$}}>> (RCOR')+NaCl+SO_2+ H_2O 
\end{CD}

RCOHRSO3NaHydrolysis,Δ,Dil.HCl(RCOR)+NaCl+SO2+H2O

 
 
\begin{CD}  RCOHR'SO_3Na @>{\text{Hydrolysis,\Delta, Dil.HCl}>> (RCOR')+NaCl+SO_2+ H_2O \end{CD} Why does this code not give the correct output? –    Feb 4 at 10:04
 
@Quark: The main error was a missing bracket after HCl. –    Feb 4 at 11:38
 
@Lehs Thanks. That was a silly mistake :| What if I wanted to write something below the arrow? Also, could you suggest some online website to learn MathJax? –    Feb 4 at 11:58
 
@Quark: then you move a > sign: @>>{\text{very long label}}> I learn MathJax from the examples i.e. in this tread. –    Feb 4 at 15:06
 
@Lehs Why did you rollback my edit...? You removed the formatting from the list, broke again (in Chrome) the example diagram, and reinserted your duplicate example. Why? –    Feb 4 at 15:25
 
@NajibIdrissi: because your edit appeared as a mess in IE. The diagram wasn't even written out. Maybe there is something wrong in your or in my web-program. Now it looks good in IE. –    Feb 4 at 15:44
 
@NajibIdrissi: Now it also looks good in Chrome for Windows and for Android, plus Safari for Androids. I don't know what the problem is with the current version. –    Feb 4 at 15:56
  33

Big braces

Use \left and \right to make braces - (round), [square] and {curly} - scale up to be the size of their arguments. Thus

$$
f\left(
   \left[ 
     \frac{
       1+\left\{x,y\right\}
     }{
       \left(
          \frac{x}{y}+\frac{y}{x}
       \right)
       \left(u+1\right)
     }+a
   \right]^{3/2}
\right)
$$

renders asf([1+{x,y}(xy+yx)(u+1)+a]3/2).

Note that curly braces need to be escaped as \{ \}.

If you start a big brace with \left and then need to match that to a \right brace that's on a different line, use the forms \right. and \left. to make "shadow" braces. Thus,

$$
\begin{aligned}
a=&\left(1+2+3+  \cdots \right. \\
& \cdots+ \left. \infty-2+\infty-1+\infty\right)
\end{aligned}
$$

renders asa=(1+2+3++2+1+).

There is also a \middle construct which is useful when one has a mid-expression brace which must also scale up:

$$
\left\langle  
  q
\middle\|
  \frac{\frac{x}{y}}{\frac{u}{v}}
\middle| 
   p 
\right\rangle
$$

renders asqxyuv|p.

Note that constructs like \left\langle\left| and \left\| are also possible.

 
 
Note: \Big( ... \Big) produces () but this bracket size is fixed in all situations unlike \left( ... \right) which varies in size with its contents. \Big can be useful in various situations. –    Dec 19 '14 at 6:34
28

Arbitrary operators

If an operator is not available as a built-in command, use \operatorname{…}. So for things likearsinh(x)

write  \operatorname{arsinh}(x) since  \arsinh(x) will give an error and  arsinh(x) has wrong font and spacing:  arsinh(x) .

This was already mentioned in  by . You might consider this an addition to the FAQ section on \lim\sin and so on.

For operators which need limits above and below the operator, use \operatorname*{…}, as inResz=1(1z2z)=1

 
 
We can also use {\rm ...}. For example, {\rm arsinh} yields arsinh. –    Aug 12 '14 at 0:27
8 
@Felix: \rm will change the font but not the spacing. \operatorname{arsinh}x renders as “arsinhx” while {\rm arsinh}x renders as “arsinhx”. Notice the added space between operator and operand in the first example, which is missing in the second. On the whole, I'd say that operatorname is a lot more in the spirit of semantic markup, declaring what you want to write instead of how you want to write it, so I'd strongly suggest using this. –    Aug 13 '14 at 11:27
3 
Thanks. I didn't know there was a difference between them. I always avoided operatorname because it was too long. –    Aug 13 '14 at 14:41
1 
Thanks for this. I thought carefully about whether to put \operatorname in the main post, and decided to leave it out. The reason is simple: If a beginner omits \operatorname, the resulting formula will still be perfectly clear, and a more experienced user will have no trouble inserting the\operatorname where it is needed. So including it in the main post would not be a good use of space. –    Aug 16 '14 at 6:28
1 
... I always use "\text{operator }". Hmmm, arsinh x vs arsinhx. –    Feb 10 '15 at 16:48
 
If you use the same operator many times, I think you can do \DeclareMathOperator{\arsinh}{arsinh} at the post's top. Never tried it though… –    Aug 15 '15 at 17:28
26

Limits

To make a limit (like limx1x21x1), use this syntax: 

First, start off with $\lim. This renders as lim. The backslash is there to prevent things like lim, where the letters are slanted. 

Second, add \limits_{x \to 1} inside. The code now looks like $\lim \limits_{x \to 1}$, and renders as limx1. The \to inside makes the right arrow, rendered as . The_ makes the x1 go underneath the lim. Finally, the pair of curly braces { } makes sure that x1 is treated as a whole object, and not two separate things.

Lastly, add the function you want to apply the limit to. To make the limit mentioned above, limx1x21x1, simply use $\lim\limits_{x \to 1} \frac{x^2-1}{x-1}$

And that is how you make a limit using MathJax.

 
9 
Why not just \lim_{x\to 1}limx1? As I understand it  \limits is only needed for operations that don't already understand limits, for example if you want to use  + and get k+i=1 instead of +ki=1 When used inline, your suggestion will produce  limx1  instead of the more compact form  limx1  that mathjax normally chooses. Are you sure this is good advice? –    Feb 26 '14 at 14:10
 
@MJD $\lim_{x\to 1} renders to limx1, and $\lim\limits_{x\to 1 renders as lim\limits_{x\to 1}. Note how the x1 is separated from the first limit, and not directly underneath. We do not write limits like that in real life, so we use \limits. –    Feb 26 '14 at 16:19
 
I meant that the second limit renders to limx1 –    Feb 26 '14 at 16:28
6 
Limits are usually written that way in typeset materials like papers and books when the limit is inline, rather than a displayed formula, and that's why MathJax typesets it that way. –    Feb 26 '14 at 16:41
4 
The issue with this answer is that it is trying to "force" display mode on inline code. Doing so makes the text look less pretty. For example, see how the spacing between the lines change when I force display mode using \lim\limits_{x\mapsto 1}\dfrac1xlimx11x. On the other hand, when I let TEX do what it wants to do, using \lim_{x\mapsto 1}\frac1x, the spacing between the lines stays the same, which is much neater: limx11x. This is much easier on the eyes. If you want to make your math mode more prominent then take a new line using $$-$$ –    Jul 17 '14 at 12:30
2 
The moral is: TEX was written by a . Let it do what it wants, because it does it for a reason! –    Jul 17 '14 at 12:35
 
Part 11 of the "question" shows how to write limits in the way they were meant to be written in LaTeX and MathJax. –    Nov 14 '15 at 23:17
18 

Absolute values and norms

The absolute value of some expression can be denoted as \lvert x\rvert or, more generally, as \left\lvert … \right\rvert. It renders as x.

The norm of a vector (or similar) can be denoted as \lVert v\rVert or, more generally, as \left\lVert … \right\rVert. It renders as v. (You may also write\left\|…\right\| instead.)

In both cases, the rendering is better than what you'd get from |x| or ||v||, which render with bars that don't descend low enough and sub-optimal spacing. At least on some browsers, so here is a screenshot how it looks for me, using Firefox 31 on OS X:

www.zeeklog.com  - MathJax basic tutorial and quick reference

And here is the same formula rendered by your browser:

|x|,||v||x,v

It was typeset as

$$|x|, ||v|| \quad\longrightarrow\quad \lvert x\rvert, \lVert v\rVert$$
 
4 
You can use \|x\| instead of \lVert x \rVertx and x. (I don't think that there is a difference between them. I've tried [asking on SE](tex.stackexchange.com/questions/77767/whats-the-correct-way-to-write-norm).) –    Jun 24 '14 at 8:48
 
On my browser |x| and \lvert x\rvert (|x| and x) look identical, contrary to your claim. Perhaps you need to show an example more complicated than just 'x'? –    Jun 24 '14 at 12:39
 
@MJD: What's your browser? I included a screenshot to support my claim. –    Aug 13 '14 at 11:24
 
Usually various versions of Firefox on either Linux or Windows. I happen to have Windows 8 booted now, so here's a screenshot from there: The bar height looks good on both pairs of symbols; the spacing is a little off for the || version. On Linux they looked the same. –    Aug 13 '14 at 17:02
 
Here's a screenshot with FF 31.0 under Linux:  –    Aug 16 '14 at 6:23
  16 

Left and Right Implication Arrows

Another way to display the arrows for right and left implication instead of using

$\Rightarrow$$\Leftarrow$ and $\Leftrightarrow$

which produces  and  respectively, you can use

$\implies$ for $\impliedby$ for  and $\iff$ for 

The latter of which produces longer arrows which may be more desirable to some.

 
 
  9 

Long division

$$
\require{enclose}
\begin{array}{r}
                    13  \\[-3pt]
4 \enclose{longdiv}{52} \\[-3pt]
         \underline{4}\phantom{2} \\[-3pt]
                    12  \\[-3pt]
         \underline{12}
\end{array}
$$

134524_1212_

One important trick shown here is the use of \phantom{2} to make a blank space that is the same size and shape as the digit 2 just above it.

This is adapted from  (which uses slightly different but not less valid formatting).

 
 
8

The degree symbol for angles is not ^\circ. Although many people use this notation, the result looks quite different from the canonical  shipped with the font:

90° renders as 90° while 90^\circ renders as 90.

If your keyboard doesn't have a ° key, feel free to copy from this post here, or follow .

Note that comments below indicate that on some configurations at least, ° renders inferior to ^\circ. And I recently had  just for the sake of turning ° into ^\circ, indicating that someone felt rather strongly about this. So the suggestion above does seem somewhat controversial at the moment. I maintain that from a semantic point of view, ° is superior to ^\circ, and if the rendering suffers from this, then it's a bug in MathJax. After all, LaTeX offers a proper degree symbol in the tex companion fonts, indicating that someone there, too, decided that ^\circ is not perfect. But if things are broken now, I can't fault people from pragmatically sticking with the rendering they prefer. Personally I prefer semantics, also for the sake of screen readers.

 
 
If mathjax loads siunitx or gensymb, there is then \degree in latex which is the degree symbol. –    Feb 17 '15 at 22:29
 
@dustin: I couldn't find siunitx or gensymb mentioned anywhere in the MatJax source repository. Are they available as some kind of third-party extension? If so, where? Since MathJax is not LaTeX, packages can't be loaded unless they have been migrated. By the way, all occurrences of “degree” in the MathJax sources refer to something else, as far as I can tell, so there really doesn't seem to be a \degree macro. There should be one, imho. –    Feb 17 '15 at 23:39
 
I am not a mathjax expert. I just know latex. I just gave that suggestion in case they were available.  would be a great package to have. If you aren't familiar, you will see the advantage by scanning the documentation on ctan. –    Feb 17 '15 at 23:43
7 
On my display, ° looks bad and ^\circ looks good:  –    Mar 24 '15 at 21:10
  8 

To highlight an equation, \bbox can be used. E.g,

$$ \bbox[yellow]
{
e^x=\lim_{n\to\infty} \left( 1+\frac{x}{n} \right)^n
\qquad (1)
}
$$

produces

ex=limn(1+xn)n(1)

or

$$ \bbox[border:2px solid red]
{
e^x=\lim_{n\to\infty} \left( 1+\frac{x}{n} \right)^n
\qquad (2) 
}
$$

produces

ex=limn(1+xn)n(2)

 
 
  8 

Giving reasons on each line of a sequence of equations

To produce this:v+w=0Givenw=w+0additive identityw+0=w+(v+w)equations (1) and (2)

write this:

\begin{align}
   v + w & = 0  &&\text{Given} \tag 1\\
   -w & = -w + 0 && \text{additive identity} \tag 2\\
   -w + 0 & = -w + (v + w) && \text{equations $(1)$ and $(2)$}
\end{align}
 
 
  4 

Pack of cards

If you are asking (or answering) a combinatorics question involving packs of cards you can make it look more elegant by using \spadesuit\heartsuit,\diamondsuit\clubsuit in math mode:

Or if you're really fussy:
\color{red}{\heartsuit} and  \color{red}{\diamondsuit}

Read more

安装 启动 使用 Neo4j的超详细教程

安装 启动 使用 Neo4j的超详细教程

最近在做一个基于知识图谱的智能生成项目。需要用到Neo4j图数据库。写这篇文章记录一下Neo4j的安装及其使用。 一.Neo4j的安装 1.首先安装JDK,配环境变量。(参照网上教程,很多) Neo4j是基于Java的图形数据库,运行Neo4j需要启动JVM进程,因此必须安装JAVA SE的JDK。从Oracle官方网站下载 Java SE JDK。我使用的版本是JDK1.8 2.官网上安装neo4j。 官方网址:https://neo4j.com/deployment-center/  在官网上下载对应版本。Neo4j应用程序有如下主要的目录结构: bin目录:用于存储Neo4j的可执行程序; conf目录:用于控制Neo4j启动的配置文件; data目录:用于存储核心数据库文件; plugins目录:用于存储Neo4j的插件; 3.配置环境变量 创建主目录环境变量NEO4J_HOME,并把主目录设置为变量值。复制具体的neo4j文件地址作为变量值。 配置文档存储在conf目录下,Neo4j通过配置文件neo4j.conf控制服务器的工作。默认情况下,不需

企业微信群机器人Webhook配置全攻略:从创建到发送消息的完整流程

企业微信群机器人Webhook配置全攻略:从创建到发送消息的完整流程 在数字化办公日益普及的今天,企业微信作为国内领先的企业级通讯工具,其群机器人功能为团队协作带来了极大的便利。本文将手把手教你如何从零开始配置企业微信群机器人Webhook,实现自动化消息推送,提升团队沟通效率。 1. 准备工作与环境配置 在开始创建机器人之前,需要确保满足以下基本条件: * 企业微信账号:拥有有效的企业微信管理员或成员账号 * 群聊条件:至少包含3名成员的群聊(这是创建机器人的最低人数要求) * 网络环境:能够正常访问企业微信服务器 提示:如果是企业管理员,建议先在"企业微信管理后台"确认机器人功能是否已对企业开放。某些企业可能出于安全考虑会限制此功能。 2. 创建群机器人 2.1 添加机器人到群聊 1. 打开企业微信客户端,进入目标群聊 2. 点击右上角的群菜单按钮(通常显示为"..."或"⋮") 3. 选择"添加群机器人"选项 4.

Flowise物联网融合:与智能家居设备联动的应用设想

Flowise物联网融合:与智能家居设备联动的应用设想 1. Flowise:让AI工作流变得像搭积木一样简单 Flowise 是一个真正把“AI平民化”落地的工具。它不像传统开发那样需要写几十行 LangChain 代码、配置向量库、调试提示词模板,而是把所有这些能力打包成一个个可拖拽的节点——就像小时候玩乐高,你不需要懂塑料怎么合成,只要知道哪块该拼在哪,就能搭出一座城堡。 它诞生于2023年,短短一年就收获了45.6k GitHub Stars,MIT协议开源,意味着你可以放心把它用在公司内部系统里,甚至嵌入到客户交付的产品中,完全不用担心授权问题。最打动人的不是它的技术多炫酷,而是它真的“不挑人”:产品经理能搭出知识库问答机器人,运营同学能配出自动抓取竞品文案的Agent,连刚学Python两周的实习生,也能在5分钟内跑通一个本地大模型的RAG流程。 它的核心逻辑很朴素:把LangChain里那些抽象概念——比如LLM调用、文档切分、向量检索、工具调用——变成画布上看得见、摸得着的方块。你拖一个“Ollama LLM”节点,再拖一个“Chroma Vector

OpenClaw配置Bot接入飞书机器人+Kimi2.5

OpenClaw配置Bot接入飞书机器人+Kimi2.5

上一篇文章写了Ubuntu_24.04下安装OpenClaw的过程,这篇文档记录一下接入飞书机器+Kimi2.5。 准备工作 飞书 创建飞书机器人 访问飞书开放平台:https://open.feishu.cn/app,点击创建应用: 填写应用名称和描述后就直接创建: 复制App ID 和 App Secret 创建成功后,在“凭证与基础信息”中找到 App ID 和 App Secret,把这2个信息复制记录下来,后面需要配置到openclaw中 配置权限 点击【权限管理】→【开通权限】 或使用【批量导入/导出权限】,选择导入,输入以下内容,如下图 点击【下一步,确认新增权限】即可开通所需要的权限。 配置事件与回调 说明:这一步的配置需要先讲AppId和AppSecret配置到openclaw成功之后再设置订阅方式,