1

I am using dmath* to automatically cut expressions and correct formatting. For example I have the equation

7+\frac{1}{\epsilon ^2}+\frac{3-G(0,x)}{\epsilon }-3 G(0,x)+G(0,0,x)+\epsilon  \left(-7 G(0,x)+3 G(0,0,x)-G(0,0,0,x)+\frac{1}{3} (45-8
   \zeta (3))\right)+\epsilon ^2 \left(7 G(0,0,x)-3 G(0,0,0,x)+G(0,0,0,0,x)+\frac{1}{30} \left(930-\pi ^4-240 \zeta (3)\right)-\frac{1}{3}
   G(0,x) (45-8 \zeta (3))\right)+\epsilon ^3 \left(-7 G(0,0,0,x)+3 G(0,0,0,0,x)-G(0,0,0,0,0,x)-\frac{1}{30} G(0,x) \left(930-\pi ^4-240
   \zeta (3)\right)+\frac{1}{3} G(0,0,x) (45-8 \zeta (3))+\frac{1}{30} \left(1890-3 \pi ^4-560 \zeta (3)-192 \zeta
   (5)\right)\right)+\epsilon ^4 \left(7 G(0,0,0,0,x)-3 G(0,0,0,0,0,x)+G(0,0,0,0,0,0,x)+\frac{1}{30} G(0,0,x) \left(930-\pi ^4-240 \zeta
   (3)\right)-\frac{1}{3} G(0,0,0,x) (45-8 \zeta (3))+\text{S1890} \left(240030-441 \pi ^4-20 \pi ^6-75600 \zeta (3)+6720 \zeta
   (3)^2-36288 \zeta (5)\right)-\frac{1}{30} G(0,x) \left(1890-3 \pi ^4-560 \zeta (3)-192 \zeta (5)\right)\right)+\epsilon ^5 \left(-7
   G(0,0,0,0,0,x)+3 G(0,0,0,0,0,0,x)-G(0,0,0,0,0,0,0,x)-\frac{1}{30} G(0,0,0,x) \left(930-\pi ^4-240 \zeta (3)\right)+\frac{1}{3}
   G(0,0,0,0,x) (45-8 \zeta (3))-\text{S1890} \left(G(0,x) \left(240030-441 \pi ^4-20 \pi ^6-75600 \zeta (3)+6720 \zeta (3)^2-36288 \zeta
   (5)\right)\right)+\frac{1}{30} G(0,0,x) \left(1890-3 \pi ^4-560 \zeta (3)-192 \zeta (5)\right)+\frac{1}{630} \left(160650-315 \pi ^4-20
   \pi ^6-52080 \zeta (3)+56 \pi ^4 \zeta (3)+6720 \zeta (3)^2-28224 \zeta (5)-11520 \zeta (7)\right)\right)

Following

\documentclass[a4paper,11pt]{article}
\usepackage{jheppub} % for details on the use of the package, please see the JINST-author-manual
\usepackage{lineno}
\usepackage{tikz}
\usepackage[compat=1.0.0]{tikz-feynman}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric, arrows}
\tikzstyle{startstop} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, draw=black, fill=gray!30]
\tikzstyle{arrow} = [thick,->,>=stealth]
\usepackage{amsmath}
\usepackage{breqn}
%\linenumbers
\begin{document}
\centering
\begin{dmath*}
    7+\frac{1}{\epsilon ^2}+\frac{3-G(0,x)}{\epsilon }-3 G(0,x)+G(0,0,x)+\epsilon  \left(-7 G(0,x)+3 G(0,0,x)-G(0,0,0,x)+\frac{1}{3} (45-8
   \zeta (3))\right)+\epsilon ^2 \left(7 G(0,0,x)-3 G(0,0,0,x)+G(0,0,0,0,x)+\frac{1}{30} \left(930-\pi ^4-240 \zeta (3)\right)-\frac{1}{3}
   G(0,x) (45-8 \zeta (3))\right)+\epsilon ^3 \left(-7 G(0,0,0,x)+3 G(0,0,0,0,x)-G(0,0,0,0,0,x)-\frac{1}{30} G(0,x) \left(930-\pi ^4-240
   \zeta (3)\right)+\frac{1}{3} G(0,0,x) (45-8 \zeta (3))+\frac{1}{30} \left(1890-3 \pi ^4-560 \zeta (3)-192 \zeta
   (5)\right)\right)+\epsilon ^4 \left(7 G(0,0,0,0,x)-3 G(0,0,0,0,0,x)+G(0,0,0,0,0,0,x)+\frac{1}{30} G(0,0,x) \left(930-\pi ^4-240 \zeta
   (3)\right)-\frac{1}{3} G(0,0,0,x) (45-8 \zeta (3))+\text{S1890} \left(240030-441 \pi ^4-20 \pi ^6-75600 \zeta (3)+6720 \zeta
   (3)^2-36288 \zeta (5)\right)-\frac{1}{30} G(0,x) \left(1890-3 \pi ^4-560 \zeta (3)-192 \zeta (5)\right)\right)+\epsilon ^5 \left(-7
   G(0,0,0,0,0,x)+3 G(0,0,0,0,0,0,x)-G(0,0,0,0,0,0,0,x)-\frac{1}{30} G(0,0,0,x) \left(930-\pi ^4-240 \zeta (3)\right)+\frac{1}{3}
   G(0,0,0,0,x) (45-8 \zeta (3))-\text{S1890} \left(G(0,x) \left(240030-441 \pi ^4-20 \pi ^6-75600 \zeta (3)+6720 \zeta (3)^2-36288 \zeta
   (5)\right)\right)+\frac{1}{30} G(0,0,x) \left(1890-3 \pi ^4-560 \zeta (3)-192 \zeta (5)\right)+\frac{1}{630} \left(160650-315 \pi ^4-20
   \pi ^6-52080 \zeta (3)+56 \pi ^4 \zeta (3)+6720 \zeta (3)^2-28224 \zeta (5)-11520 \zeta (7)\right)\right)
\end{dmath*}
\end{document}

dmath* gives

enter image description here

where each line starts from one cornar. I want centering of each line, so it will look better. Specifically I want

enter image description here

But \begin{center} is not working. How to do this?

1
  • 4
    Please always show code as a complete document that shows the problem. dmath* is not a standard environment but you have not said how it is defined or even shown it in your code sections. I can guess which package you used, but shouldn't have to guess. Commented Oct 12, 2023 at 8:52

1 Answer 1

1

I would like to suggest that you switch from a dmath* to an align* environment and group the terms by \epsilon, \epsilon^2, etc thru \epsilon^5. The downside of making this change is that it's more work for you; specifically, you'll need to choose quite a few line break points. The upside is that the readers of your piece will find it much easier to parse the material.

enter image description here

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

%\usepackage{lineno}
%\usepackage{tikz}
%\usepackage[compat=1.0.0]{tikz-feynman}
%\usepackage{tikz}
%\usetikzlibrary{shapes.geometric, arrows}
%\tikzstyle{startstop} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, draw=black, fill=gray!30]
%\tikzstyle{arrow} = [thick,->,>=stealth]

\begin{document}

\begin{align*}
&7+\frac{1}{\epsilon ^2}+\frac{3-G(0,x)}{\epsilon }-3 G(0,x)+G(0,0,x) \\
&+\epsilon^{\phantom{1}}
   \Bigl[-7 G(0,x)+3 G(0,0,x)-G(0,0,0,x)+\frac{1}{3} (45-8\zeta (3)) \Bigr] \\[\jot]
&+\epsilon ^2 \Bigl[
   \begin{aligned}[t]
   &7 G(0,0,x)-3 G(0,0,0,x) +G(0,0,0,0,x) \\
   &+\frac{1}{30} \bigl(930-\pi ^4-240 \zeta (3)\bigr)
    -\frac{1}{3} G(0,x) (45-8 \zeta (3)) \Bigr]
   \end{aligned}\\
&+\epsilon ^3 \Bigl[
   \begin{aligned}[t]
   &-7 G(0,0,0,x)+3 G(0,0,0,0,x)-G(0,0,0,0,0,x)\\
   &-\frac{1}{30} G(0,x) \bigl(930-\pi ^4-240 \zeta (3)\bigr) +\frac{1}{3} G(0,0,x) (45-8 \zeta (3))\\
   &+\frac{1}{30}
    \bigl(1890-3 \pi ^4-560 \zeta (3)-192 \zeta (5)\bigr)\Bigr]
   \end{aligned}\\
&+\epsilon ^4 \Bigl[
   \begin{aligned}[t]
   &7 G(0,0,0,0,x)-3 G(0,0,0,0,0,x) +G(0,0,0,0,0,0,x) \\
   &+\frac{1}{30} G(0,0,x) \bigl(930-\pi ^4-240 \zeta(3)\bigr)
    -\frac{1}{3} G(0,0,0,x) (45-8 \zeta (3))\\
   &+\mathrm{S1890} \bigl[240030-441 \pi ^4-20 \pi ^6-75600 \zeta (3)+6720 \zeta (3)^2\\
   &-36288 \zeta (5)\bigr]
    -\frac{1}{30} G(0,x) \bigl(1890-3 \pi ^4-560 \zeta (3)-192 \zeta (5)\bigr)\Bigr]
   \end{aligned}\\
&+\epsilon ^5 \Bigl[
   \begin{aligned}[t]
   &-7 G(0,0,0,0,0,x) + 3 G(0,0,0,0,0,0,x) -G(0,0,0,0,0,0,0,x) \\
   &-\frac{1}{30} G(0,0,0,x) \bigl[930-\pi ^4-240 \zeta (3)\bigr]
    +\frac{1}{3}G(0,0,0,0,x) (45-8 \zeta (3))\\
   &-\mathrm{S1890} \bigl[ G(0,x)
    \bigl(240030-441 \pi ^4-20 \pi ^6-75600 \zeta (3)+6720 \zeta (3)^2\\
   &-36288 \zeta (5)\bigr) \bigr]
    +\frac{1}{30} G(0,0,x)
    \bigl[1890-3 \pi ^4-560 \zeta (3)-192 \zeta (5)\bigr] \\
   &+\frac{1}{630}
    \bigl[160650 -315 \pi ^4-20 \pi ^6-52080 \zeta (3) +56 \pi ^4 \zeta (3) \\
   &+6720 \zeta (3)^2-28224 \zeta (5)-11520 \zeta (7)\bigr]\Bigr]
   \end{aligned}
\end{align*}
\end{document} 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .