Fonts & Character Sets ⇒ \L in math mode?
-
- Posts: 4
- Joined: Sat Nov 20, 2010 9:45 pm
\L in math mode?
Hi everyone,
Is there any way to get an L with stroke (\L) in math mode? I've been using \mbox to date, but this causes botched formatting in some contexts (superscripts and subscripts are my particular pain points).
Thanks!
Is there any way to get an L with stroke (\L) in math mode? I've been using \mbox to date, but this causes botched formatting in some contexts (superscripts and subscripts are my particular pain points).
Thanks!
Last edited by rvandegrift on Tue Nov 23, 2010 3:38 pm, edited 1 time in total.
\L in math mode?
I can use \L in math mode without the need for \mbox{...}, or \text{...} or anything similar.
Depending on your encoding you might also be able to use the character Ł directly. (E.g., with unicode/utf encoding and loading \usepackage[utf8]{inputenc}, I can use it.)
If you're having trouble getting it work right in a particular context, it would be helpful to see a minimal working example showing the problem.
Depending on your encoding you might also be able to use the character Ł directly. (E.g., with unicode/utf encoding and loading \usepackage[utf8]{inputenc}, I can use it.)
If you're having trouble getting it work right in a particular context, it would be helpful to see a minimal working example showing the problem.
- localghost
- Site Moderator
- Posts: 9201
- Joined: Fri Feb 02, 2007 12:06 pm
\L in math mode?
This is very strange. I can confirm the problem. In fact with MiKTeX 2.8 and TeX Live 2010. Input encoding and file encoding correspond. The log file (from TeX Live) is attached. Haven't yet tested with other fonts.
The curious thing about the log is that it contains characters which don't belong to the encoding. I will check the MiKTeX log as soon as possible.
Thorsten
Code: Select all
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\begin{document}
\L
\[
\L
\]
Ł
\[
Ł
\]
\end{document}
Thorsten
- Attachments
-
- mathmodeL.log
- (13.12 KiB) Downloaded 261 times
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
-
- Posts: 4
- Joined: Sat Nov 20, 2010 9:45 pm
\L in math mode?
A simple minimal example. This fails on Tex Live 2009
I get the same error: "LaTeX Warning: Command \L invalid in math mode on input line 3." Log file is attached.
Ross
Code: Select all
\documentclass{article}
\begin{document}
$\L$
\end{document}
Ross
- Attachments
-
- luk-test.log
- (2.15 KiB) Downloaded 288 times
Re: \L in math mode?
Works just fine for me on TeXlive 2010.
I'm attaching my log and the output. (I added \listfiles to the beginning of the code to get a file list, but it's so minimal I doubt it will be useful.)
I'm attaching my log and the output. (I added \listfiles to the beginning of the code to get a file list, but it's so minimal I doubt it will be useful.)
- Attachments
-
- scratch.log
- (3.49 KiB) Downloaded 268 times
-
- scratch.pdf
- (8.32 KiB) Downloaded 400 times
-
- Posts: 4
- Joined: Sat Nov 20, 2010 9:45 pm
\L in math mode?
No - it's not working for you either
Check your log: "LaTeX Warning: Command \L invalid in math mode on input line 4."
Looks LaTeX kicks out the L with stroke as a non-math mode character. To see the difference, check out this:
The two subscripts should come out the same size.
Ross

Looks LaTeX kicks out the L with stroke as a non-math mode character. To see the difference, check out this:
Code: Select all
$x_L x_\L
Ross
\L in math mode?
Ah, thanks, that's a good example.
This makes them the same size:
Change \text to \textit if you want it in italics.
This makes them the same size:
Code: Select all
\documentclass{article}
\usepackage{amsmath}
\begin{document}
$x_{L} x_{\text{\L}}$
\end{document}
-
- Posts: 4
- Joined: Sat Nov 20, 2010 9:45 pm
Re: \L in math mode?
Aha, that seems to do the trick - sizing is correct for the few variations I just checked. Definite improvement on what I was doing before. Thanks!
- localghost
- Site Moderator
- Posts: 9201
- Joined: Fri Feb 02, 2007 12:06 pm
\L in math mode?
Now that the problem is obviously solved, please be so kind and mark the topic (not the last post) accordingly as clearly written in the Board Rules (to be read before posting). Please keep that in mind for the future so that further reminders will not be necessary.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1