LyX ⇒ move symbol to the left
-
- Posts: 8
- Joined: Sun May 19, 2019 5:31 pm
move symbol to the left
I am writing a formular in Lyx' display math mode (png attached). I would like to have the 'dt' closer to the bracket, above the 'scatter'. Is there a way to do this? I suppose one can directly use Latex code for this. Can I enter Latex code inside of Lyx' math mode or how would I do this?
Best,
SL
- Attachments
-
- cap1.PNG (7.27 KiB) Viewed 12886 times
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
move symbol to the left
Have you tried using negative space before 'dt' to push it closer?
Code: Select all
\documentclass{article}%\usepackage{mathtools}\usepackage[arrowdel]{physics}\begin{document}\[ \pqty{\pdv{g}{t}}_{\!\!\text{scatter}} \!\!\! \dd{t} \]\end{document}
OS: Debian/GNU Linux; LaTeX System : TeXLive; Editor : Vim
-
- Posts: 8
- Joined: Sun May 19, 2019 5:31 pm
move symbol to the left
No, I have not tried anything like this, beacause a) I am pretty new to Latex, which is why I started with Lyx, and b) I need to know how to enter Latex code there. I don't know where to write these /usepackage or if I even have to write it down somewhere (Lyx includes this automatically, if I select them, right?)
edit: So I found the field where one could alter the preamble, and I included your two "usepackages".
But If enter your code (in or outside of the math environment), I can't compile and get an error:
"...\backslash!\backslash dd\{t\}\backslash]}
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)"
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
move symbol to the left
You are now trying to use one tool without knowing it, needing to know the basics of another which you don't know as well.
I guess you are using LaTeX directly inside LyX, and LyX translates the backslashes ... but i don't know how to use LyX. I cannot really help here.
-
- Posts: 8
- Joined: Sun May 19, 2019 5:31 pm
move symbol to the left
HOWEVER: It seems to work now. Lyx compiles the code given by mas, I found the preamble section.
It does not work inside the math environment though, so I have to write the entire equation myself. Can you help me with this? The equation is attached and should be centralized in my document.
I can understand mas' code except for two parts:
What do the \[ \] do? And what about the \pqty ? How do I write the fat symbols for my vectors?
- Attachments
-
- cap2.PNG (20.34 KiB) Viewed 12864 times
move symbol to the left
The `\[' and '\]' is the shorthand for the environment [env]equation*[/env]. Theschroedingers_lion wrote: What do the \[ \] do? And what about the \pqty ? How do I write the fat symbols for my vectors?
\pqty
is for typesetting quantities within parentheses. As pointed out to you by Johannes, you should *really* read up basic LaTeX stuff before attempting to use LyX. The solutions suggested might not make sense at all.
OS: Debian/GNU Linux; LaTeX System : TeXLive; Editor : Vim
-
- Posts: 8
- Joined: Sun May 19, 2019 5:31 pm
move symbol to the left
Code: Select all
\[ g_n \left(\bm r, \bm{k}, t \right)=g_n \left( \bm r-\bm{v}_n\left(\bm k \right)dt, \bm k-\bm F \frac {dt}{\hbar}, t-dt \right)+\left( \pdv{g}{t}\right)_{scatter}\!\!\!\!\!\!\!\!dt \]
Now, how can I number the equation? Do I have to fix the number manually or will Lyx consider this new equation in its automatic numbering system?
Also, how can I label it? Do I have to write \label{NAME} inside the equation environment?
- Attachments
-
- cap2.PNG (10.77 KiB) Viewed 12833 times
-
- Posts: 8
- Joined: Sun May 19, 2019 5:31 pm
move symbol to the left
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
move symbol to the left
Perhaps take a close look at the code by mas. A very common way is to write math operators upright, while variables are in italic. That helps to distinguish a product of 2 variables ln from the operator ln(x) and the operator d from the variable d. Also, text remarks or indices are written upright. Perhaps compare with a good book if you like, just to be sure.
Stefan
move symbol to the left
- Attachments
-
- Сдвиг.JPG (50.81 KiB) Viewed 12695 times