Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am having a problem with writing equations using dmath and dgroup in my article. the packages I am using are

\documentclass[a4paper 12pt] {article}
\usepackage{breqn}

The codes I am writing are -

\begin{dgroup}
\begin{dmath}
v_f = k_f C_O(0,t) = \frac{i_c}{nFA}
\end{dmath}
\begin{dmath}
v_b = k_b C_R(0,t) = \frac{i_a}{nFA}
\end{dmath}
\label{eq14}
\end{dgroup}

The problem is that it has two equal signs in the same line of equation. with this settings I am getting the results okay but after the two lines of equations, LaTeX puts a big gap before I start my text again. When I use equation in place of dmath, the big space after the two lines of equations are gone but the equations are not at two lines any more. It puts the = \frac{i_c}{nFA} part into the next line, which I don't want. Can anyone please help me with a solution?

share|improve this question
1  
Welcome to TeX.SE. It would be helpful if you composed a fully compilable MWE illustrates the problem as I can't seem to reproduce the behavior your describe. I thought the problem was that you were leaving a blank line after the display math, but even that does not seem to result in additional vertical space. Usually showing the problem is better than describing it. –  Peter Grill Oct 10 '12 at 22:56
    
Write \hiderel{=} for the equal signs that shouldn't mark an alignment point. I contend that \begin{align}A&=B=C\\D&=E=F\end{align} is easier to write, read and maintain. –  egreg Oct 10 '12 at 23:07
    
Hi egreg, Thanks that actually works with the \dmath. –  Sazzad Hossain Oct 10 '12 at 23:15
add comment

2 Answers

A relation symbol that shouldn't be considered an alignment point in dmath should be marked with \hiderel:

\documentclass[a4paper,12pt] {article}
\usepackage{breqn}

\begin{document}

\begin{dgroup}
\begin{dmath}
v_f = k_f C_O(0,t) \hiderel{=} \frac{i_c}{nFA}
\end{dmath}
\begin{dmath}
v_b = k_b C_R(0,t) \hiderel{=} \frac{i_a}{nFA}
\end{dmath}
\label{eq14}
\end{dgroup}
\end{document}

enter image description here

I really can't see much advantage than writing

\documentclass[a4paper,12pt] {article}
\usepackage{amsmath}

\begin{document}

\begin{subequations}\label{eq14}
\begin{align}
v_f &= k_f C_O(0,t) = \frac{i_c}{nFA}
\\
v_b &= k_b C_R(0,t) \hiderel{=} \frac{i_a}{nFA}
\end{align}
\end{subequations}

\end{document}
share|improve this answer
    
Thats even better. Thats very much –  Sazzad Hossain Oct 12 '12 at 5:29
add comment

It's always worth posting complete documents. The space after a display depends on lots of things in the example below it is slightly larger gap to line 2 after the breqn layout than to line 7 after the equation layout., but not really noticeably so, but perhaps you were comparing to the gap before line 4 with two consecutive equations, that is noticeably less as the \belowdisplayshortskip is used in that case (which is 6pt rather than 10pt here).

enter image description here

\documentclass{article}
\usepackage{breqn}
\showoutput
\begin{document}

1Abc def ghi jkl mno pqr stu vwx yz
\begin{dgroup}
\begin{dmath}
v_f = k_f C_O(0,t) = \frac{i_c}{nFA}
\end{dmath}
\begin{dmath}
v_b = k_b C_R(0,t) = \frac{i_a}{nFA}
\end{dmath}
\label{eq14}
\end{dgroup}
2Abc def ghi jkl mno pqr stu vwx yz

3Abc def ghi jkl mno pqr stu vwx yz
\begin{equation}
v_f = k_f C_O(0,t) = \frac{i_c}{nFA}
\end{equation}
\begin{equation}
v_b = k_b C_R(0,t) = \frac{i_a}{nFA}
\label{eq14b}
\end{equation}
4Abc def ghi jkl mno pqr stu vwx yz


5Abc def ghi jkl mno pqr stu vwx yz
\begin{equation}
v_f = k_f C_O(0,t) = \frac{i_c}{nFA}
\end{equation}
6Abc def ghi jkl mno pqr stu vwx yz
\begin{equation}
v_b = k_b C_R(0,t) = \frac{i_a}{nFA}
\label{eq14c}
\end{equation}
7Abc def ghi jkl mno pqr stu vwx yz

\end{document}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.