2

In the attached MWE:

\documentclass[11pt,fleqn]{book} % Default font size and left-justified equations

\usepackage{etex}
\reserveinserts{28}

\usepackage[svgnames]{xcolor} % Required for specifying colors by name
\definecolor{ocre}{RGB}{243,102,25} % Define the orange color used for highlighting throughout the
\definecolor{mygray}{RGB}{243,243,244}

%========================================================================================
%   Font Settings
%========================================================================================

\usepackage{avant} % Use the Avantgarde font for headings
\usepackage{mathptmx} % Use the Adobe Times Roman as the default text font together with math symbols
\usepackage{microtype} % Slightly tweak font spacing for aesthetics
\usepackage[utf8]{inputenc} % Required for including letters with accents
\usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs
\usepackage{calc} % For simpler calculation - used for spacing the index letter headings correctly
\usepackage{textcomp} % Text Companion fonts which provide many text symbols in the TS1 encoding.

%========================================================================================
%   Math Formulas
%========================================================================================

\usepackage{empheq}
\usepackage[font={color=ocre,bf},figurename=Fig.,labelfont={it}]{caption}
\usepackage[framemethod=default]{mdframed}
\usepackage{mathtools}
\usepackage[most]{tcolorbox}
\tcbset{myformula/.style={
  arc=0pt,
  outer arc=0pt,
  %colback=ocre!10,
  colback=mygray,
  colframe=ocre,
  boxrule=0.8pt,
  left=2pt,
  right=2pt,
  highlight math style={
    arc=0pt,
    outer arc=0pt,
    colback=mygray,
    colframe=red.
    }
  }
}

\newenvironment{spread}[1]{%
  \advance\jot#1% indeed
  }{%
\ignorespacesafterend
}

\usepackage{graphicx}

\begin{document}
\noindent
This is just some text to show the text lines before the align environment.
\begin{flalign*}
  &T1~&-~& \mbox{This is an explanation of equaion 1} \\
  &T2~&-~& \mbox{This is the explanation of another equ} \\
  &T2T3~&-~& \dfrac{Test}{Test2}
\end{flalign*}

\begin{tabular}{lll}
  T1 & - & This is an explanation of equaion 1 \\
  T2 & - & This is the explanation of another equ \\
  T2T3 & - & $\dfrac{Test}{Test2}$ \\
\end{tabular}

\end{document} 

How do I go about getting alignments to the three points as shown but without all that white space:

enter image description here

Added the tabular environment, but how now to flush the table against the left margin?

3
  • one way to force the text at (3) farther to the left is to add space to the longest line at the right. for example, &T2~&-~& \mbox{This is the explanation of another equ} \kern1.5in \`. this is definitely a hack, but since the meaning of the fl` in flalign is "full line" (not "flush left", as is commonly supposed), the default formatting pushes the right-hand side as far right as possible, so that's what you're trying to counteract. Commented Jul 13, 2015 at 20:49
  • @Joe, do you like that between (blue) line 2 and 3 is not white space, i.e. that they are on the same position (overlap)? Why then don't use tabular environment instead of flalign?
    – Zarko
    Commented Jul 13, 2015 at 21:24
  • @Zarko, good idea! I have edited my original code to include the tabular environment, however, how do I now flush the table to the left margin?
    – Joe
    Commented Jul 13, 2015 at 21:30

1 Answer 1

1

If I understand correctly, you like to obtain something like this:

enter image description here

This I got above picture with:

\documentclass[11pt,fleqn,border=2mm,preview]{standalone} 
    \usepackage{mathptmx}
    \usepackage{microtype}
    \usepackage[utf8]{inputenc}
    \usepackage[T1]{fontenc}

    \usepackage{empheq,tabularx}
\begin{document}
\noindent
This is just some text to show the text lines before the align environment.
    \begin{center}
\begin{tabularx}{\hsize}{@{}>{$}l<{$} >{$-$\ }X @{}}
T1      &   This is an explanation of equation 1        \\
T       &   This is the explanation of another equation \\
T2T3    &   $\dfrac{Test}{Test2}$
\end{tabularx}
    \end{center}
\end{document} 

You must log in to answer this question.

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