TransWikia.com

How to do the 'curvy L' for Lagrangian or Laplace Transforms?

TeX - LaTeX Asked by Arkapravo on July 7, 2021

I am new to TeX, working on it for about 2 months. Have not yet figured out how to script the ‘curvy L’ for Lagrangian and/or for Laplace Transforms.

As of now I am using the ‘L’ – which is not good! 🙁

Any help?

UPDATE The 2 best solutions are;

usepackage{ amssymb }
mathcal{L}

and

usepackage{ mathrsfs }
mathscr{L}

I got my answers at, http://detexify.kirelabs.org/classify.html

5 Answers

You have been told how to get a curved L. But here's some more general advice, which also applies in this situation: In cases such as this, always create your own shortcut macro, say

newcommand{Lagr}{mathcal{L}}

This way, if you ever decide that that curly L is not quite the one you like, it is easy to switch. Also, even before you knew the answer to this question, you could have written

newcommand{Lagr}{L}

in your preamble. Then you could start/continue writing the document, use ordinary capital Ls where you want, and Lagr wherever you actually mean a Lagrangian, and then later changing the definition of Lagr to something appropriate. This way, you wouldn't have to manually search for each occurence of a capital L and decide if it's a Lagrangian or not. Clearly Lagr (or whatever you want to call this macro) is also easier to type than mathcal{L}, and it makes the source code much more readable.

Another advantage, which is probably more subtle, since you're new to LaTeX, is that we can make the curvy L exactly the type of math we want. TeX distinguishes between ordinary letters, binary operators, binary relations, opening and closing parenthesis and so on; the spacing between two ordinary letters is not the same as the spacing between the a, +, and b in $a+b$. So since the Lagrangian is a kind of operator, we could say

newcommand{Lagr}{mathop{mathcal{L}}}

But in the case of operators, the package amsmath (which you are most likely using; if not, you should) provides a somewhat better mechanism:

DeclareMathOperator{Lagr}{mathcal{L}}

Added: Another (related) tip: Even if you are using the same notation for two different things, it is best to make a separate macro for each. In this case you might have

DeclareMathOperator{Lagr}{mathcal{L}}
DeclareMathOperator{Lapl}{mathcal{L}}

The reason is the same as in the L vs. Lagr case above: If you at some point decide that using mathcal{L} for both is a bad idea, you would have to find each occurence of Lagr and figure out if it is really a Laplacian. Using macro names carrying semantic meaning is one of the great powers of TeX.

Correct answer by Villemoes on July 7, 2021

$mathcal{L}$

Have a look at “How to look up a math symbol?” for ideas how you can easily find a particular symbol.

Answered by Caramdir on July 7, 2021

You can also use the mathrsfs package (put usepackage{mathrsfs} in your preamble), and its command mathscr (e.g. $mathscr{L}$ should give you what you want) to get more script-like, curvy letters.

Answered by Benoît Kloeckner on July 7, 2021

As others mentioned:

$mathcal{L}$

Per the Calligraphic section in this (excellent) Latex cheatsheet.

A section from the cheatsheet showing calligraphic letter

Answered by Izhaki on July 7, 2021

Also note that you can select from many different mathcal alphabets in LaTeX, if you don’t like the default ℒ.

In unicode-math, you can change the mathcal alphabet with setmathfont[range={cal,bfcal}]{Some font}. Here are some specimens of several fonts.

In PDFTeX, the most robust way to change these math alphabets is mathalpha with the [cal=...] option. The documentation has font specimens of every available calligraphic alphabet.

Answered by Davislor on July 7, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP