Math & Science2 equation questions

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
latexhelp1
Posts: 141
Joined: Sun Jun 12, 2011 6:30 am

2 equation questions

Post by latexhelp1 »

1. I want to write d ln(y)/dx equals some expression as an equation with begin{align} and end{align}. However, it comes out as dlny all italicized so there is no semblance of d ln(y). Is it possible that ln(y) wouldn't need to be aligned? Also, should I add some space? This is my current version:

Code: Select all

\begin{align}\label{eq:deriv}
\frac{d \hspace{0.1cm}ln(y)}{dx} = 
\end{align}
2. I want to hyperreference this equation in the text as equation (1) with parentheses and not equation 1. I cannot do this when I do:

\usepackage{amsmath}

Code: Select all

\eqref{eq:deriv} 
I would very much appreciate any help you can provide!
Last edited by latexhelp1 on Fri Dec 16, 2011 12:53 am, edited 3 times in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

2 equation questions

Post by Stefan Kottwitz »

I suggest using math operators such as \ln and upright roman font the the d:

Code: Select all

\frac{\mathrm{d}\ln(y)}{\mathrm{d}x}
Stefan
LaTeX.org admin
latexhelp1
Posts: 141
Joined: Sun Jun 12, 2011 6:30 am

2 equation questions

Post by latexhelp1 »

Thanks! Would you recommend the space between the d and ln(y)?

Also, how can I hyperreference the equation such that it appears in the text with parentheses? As I mentioned in my earlier note, I am not able to do that.
Stefan_K wrote:I suggest using math operators such as \ln and upright roman font the the d:

Code: Select all

\frac{\mathrm{d}\ln(y)}{\mathrm{d}x}
Stefan
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

2 equation questions

Post by Stefan Kottwitz »

latexhelp1 wrote:Would you recommend the space between the d and ln(y)?
The one in my example, yes. This space is intended by LaTeX for math operators, we get it automatically.
latexhelp1 wrote:Also, how can I hyperreference the equation such that it appears in the text with parentheses? As I mentioned in my earlier note, I am not able to do that.
It works for me. What's your problem with that? Do you have code to show that it doesn't work?

Stefan
LaTeX.org admin
latexhelp1
Posts: 141
Joined: Sun Jun 12, 2011 6:30 am

2 equation questions

Post by latexhelp1 »

Thank you Stefan! You are truly wonderful. I figured everything out.
Stefan_K wrote:
latexhelp1 wrote:Would you recommend the space between the d and ln(y)?
The one in my example, yes. This space is intended by LaTeX for math operators, we get it automatically.
latexhelp1 wrote:Also, how can I hyperreference the equation such that it appears in the text with parentheses? As I mentioned in my earlier note, I am not able to do that.
It works for me. What's your problem with that? Do you have code to show that it doesn't work?

Stefan
latexhelp1
Posts: 141
Joined: Sun Jun 12, 2011 6:30 am

2 equation questions

Post by latexhelp1 »

Can I please ask one more q?

I have an equation embedded within a paragraph using a begin{align}. That is, there is a sentence or two, the equation, and then another sentence or two. How would I reduce the space between the corresponding paragraph of the text and the equation, both before it and after it?

I'm using the following code, but I'm not sure what to do with it:

Code: Select all

\abovedisplayskip=4pt plus .01pt minus2pt
\belowdisplayskip\abovedisplayskip
\abovedisplayshortskip=-2pt plus .01pt
\belowdisplayshortskip=2pt plus .01pt
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

2 equation questions

Post by Stefan Kottwitz »

Firstly, don't use empty lines before and after displayed math equation, to avoid undesired space. There's no need for an empty line or paragraph break.

Then, you could use those lines right before that math environment to change those lengths, just use a small value.

Or look here for consistent changes:
Stefan
LaTeX.org admin
Post Reply