8

I have to center '-' mark in each line and it should be in the same location of each line. How would I do that?

\begin{flushleft}        
    $I(b)$ - interrogating signal\\
    $h_n$ -forward ross     \\
    $h_f$ - reversequite      \\
    $h$ - product ofall and wox\\
    $F_h(t)$ - interrrr        \\
    $S_m(b)$ - $m^{th}$ reponse of x thererer       \\
    $b(t)$ - received signal\\        
    $\omega(x)$ - noise added omega read         
 \end{flushleft}

enter image description here

I have used \tab{} and \align{} but I don't get results what I want.

6

Taking some inspiration from Coding an equation with description, you can use a tabular to align the content. The output will not be breakable across the page boundary though:

enter image description here

\documentclass{article}
\usepackage{array}
\begin{document}

\noindent
\begin{tabular}{>{$}r<{$}@{\ --\ }l}
  I(b) & interrogating signal \\
  h_n & forward ross \\
  h_f & reversequite \\
  h & product of all and wox \\
  F_h(t) & interrrr \\
  S_m(b) & m\textsuperscript{th} reponse of $x$ thererer \\
  b(t) & received signal \\
  \omega(x) & noise added $\omega$ read
\end{tabular}

\end{document}

Alignment of the left column is right, but you can adjust that to suit your needs.

  • 1
    why not use tabbing? it isn't that much different from tabular, and it has the advantage that it can break across pages. – barbara beeton Dec 2 '14 at 13:17
4

Here's a solution that uses an array environment. It's not clear to me how you want the first column to the aligned: Flush-left or flush-right. If it's the latter, change the column type from l to r. (If the body of the array environment looks just like the body of the tabular environment does in Werner's answer, that's not a coincidence: the array and tabular environments have a great many things in common.)

enter image description here

\documentclass{article}
\usepackage{array}
\begin{document}
\noindent
$\begin{array}{l @{\ \mbox{--}\ } >{$}l<{$}}   % place third column in text mode    
I(b) & interrogating signal\\
h_n & forward ross \\
h_f & reversequite  \\
h & product ofall and wox\\
F_h(t) & interrrr\\
S_m(b) & m\textsuperscript{th} reponse of $x$ thererer \\
b(t) & received signal \\
\omega(x) & noise added omega read  \\     
\end{array}$
\end{document}
  • This does not look like a non-duplication of my tabular approach. :) – Werner Dec 2 '14 at 7:29
  • @Werner - I mostly posted this answer to illustrate how TeX and LaTeX frequently provide more than one method for solving a given typesetting issue. And, of course, I took care to mention your prior answer. :-) – Mico Dec 2 '14 at 8:09
  • 1
    Although it looks OK I'm not sure about abusing math mode - here: should be \hbox{--} between the columns – Joseph Wright Dec 2 '14 at 10:23
  • @JosephWright - I've changed the code to use \mbox{--}, i.e., an en-dash. :-) – Mico Dec 2 '14 at 14:51
3

still another possibility, using tabbing. this has the advantage that it can break across pages, anywhere in the list.

it's necessary to determine which left-hand entry is longest, to set the width of the left column for the \kill line, but that needs to be done only once, and is easy to change if a new, wider entry is added.

\documentclass{article}
\newcommand{\hyline}[2]{%
  $#1$\> --\kern.5em #2 \\}
\begin{document}

\begin{tabbing}
$S_m(b)$ \ \= \kill
\hyline{I(b)}{interrogating signal}
\hyline{h_n}{forward ross}
\hyline{h_f}{reversequite}
\hyline{h}{product of all and wox}
\hyline{F_h(t)}{interrrr}
\hyline{S_m(b)}{m\textsuperscript{th} reponse of $x$ thererer}
\hyline{b(t)}{received signal}
\hyline{\omega(x)}{noise added $\omega$ read}
\end{tabbing}

\end{document}

output of example code

if a right-hand-side entry appear that is longer than the page width will allow, the #2 in the definition of \hyline (a shorter command name could be used, of course), a \parbox of appropriate size could be applied, with its contents set ragged right. this would ensure that appropriate baselines are used within a single entry, a benefit if you decide that a little extra space should be applied between entries (presumably as an optional dimension inserted after the \\[...] in the definition).

3

Another possibility

Mathematica graphics

\documentclass[]{article}%

\usepackage{amsmath,mathtools}
\begin{document}

\begin{align*}
    I(b) &{}- \text{interrogating signal}\\
    h_n  &{}- \text{forward ross}     \\
    h_f  &{}- \text{reversequite}      \\
    h    &{}- \text{product ofall and wox}\\
    F_h(t) &{}- \text{interrrr}        \\
    S_m(b) &{}- m^{th} \text{reponse of x thererer} \\
    b(t)   &{}- \text{received signal}\\        
    \omega(x) &{}- \text{noise added omega read}
\end{align*}

\end{document}

Update Using suggestion in comment below, I changed it to use \text{--} in place of {}-. Here is the result

Mathematica graphics

\documentclass[]{article}%    
\usepackage{amsmath,mathtools}
\begin{document}    
\begin{align*}
    I(b)      &\text{--} \text{interrogating signal}         \\
    h_n       &\text{--} \text{forward ross}                 \\
    h_f       &\text{--} \text{reversequite}                 \\
    h         &\text{--} \text{product ofall and wox}        \\
    F_h(t)    &\text{--} \text{interrrr}                     \\
    S_m(b)    &\text{--} m^{th} \text{reponse of x thererer} \\
    b(t)      &\text{--} \text{received signal}              \\        
    \omega(x) &\text{--} \text{noise added omega read}
\end{align*}    
\end{document}
  • 1
    Same comment here as I've made on mico's answser: the math mode - isn't really correct here for separating the columns, and I'd use \mbox{--}/\text{--}. – Joseph Wright Dec 2 '14 at 10:24
2

Another possibility which is less flexible (you have to specify the width of the left column explicitely) but works without any align*, array or tabular environment (note that tabulars will not be broken across pages) and allows for additional lines of text or even paragraphs in between if needed.

\documentclass{article}
\begin{document}
\noindent
    \makebox[3em][l]{$I(b)$} -- interrogating signal\\
    \makebox[3em][l]{$h_n$} -- forward ross     \\
    \makebox[3em][l]{$h_f$} -- reversequite      \\
    \makebox[3em][l]{$h$} -- product of all and wox

\medskip
\noindent Further formulae use the more advanced\\
    \makebox[3em][l]{$F_h(t)$} -- interrrr        \\
    \makebox[3em][l]{$S_m(b)$} -- m\textsuperscript{th} reponse of $x$ thererer       \\
    \makebox[3em][l]{$b(t)$} -- received signal\\        
    \makebox[3em][l]{$\omega(x)$} -- noise added $\omega$ read   
\end{document}

The 3em denote the width of the area reserved for the formulae. l is the alignment of each formula within this box (left, right, centered).

enter image description here

2

Why not use the common labeled items of the ubiquitous itemize environment?.

enter image description here

\documentclass{article}
\usepackage{lipsum}
\def\mitem#1{\item[$#1$\quad---\quad]}
\begin{document}
\lipsum[2]
\begin{itemize}
\itemindent.4\linewidth
\mitem{I(b)}       interrogating signal
\mitem{h_n}        forward ross 
\mitem{h_f}        reversequite  
\mitem{h}          product ofall and wox
\mitem{F_h(t)}     interrrr   
\mitem{S_m(b)}     $m^{th}$ reponse of x thererer 
\mitem{b(t)}       received signal        
\mitem{\omega(x)}  noise added omega read         
\end{itemize}

\lipsum[3]
\end{document}

The right alignment of the label can be obtained using a \makebox as in David's answer, but enclosed by brackets:

\def\mitem#1{\item[{\makebox[1cm][l]{$#1$}}\quad---\quad]}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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