5

I would like to ask you to share your idea with me regarding to align the following text inside the box. Thank you in advance

\pagenumbering{gobble}
\noindent\fbox{%
    \parbox{\textwidth}{%
    \small
    \begin{multicols}{2}
    \textbf{Nomenclature}\\
    \textbf{List of variables:}\\
   $u$,$\upsilon$ \quad Velocity components along x-y axes $(m/s)$\\
   $U_{w}$        \;\;\;\; Velocity of the wall along the x-axis $(m/s)$\\
   $x,y$          \;\;\; Cartesian coordinates measured along the stretching sheet $(m)$\\
   $B(x)$         \;     Magnetic field strength $(A m^{-1})$\\
   $C$            \qquad Nanoparticle concentration $(mol\; m^{-3})$\\
   $C_{fx}$       \;\;\;  Skin-friction coefficient $(Pascal)$\\
   $Nu_{x}$       \;\; Nusselt number\\
   $Sh_{x}$       \;\;\; Sherwood number\\
   $C_{w}$        \;\;\;\; Nanoparticles concentration at the \\ stretching surface $(mol \;m^{-3})$\\
   $C_{\infty}$   \quad Nanoparticle concentration far from the sheet $(mol\; m^{-3})$\\
   $C_{p}$        \;\;\;\; Specific heat capacity at constant pressure $(J \;Kg^{-1}\; K)$\\
   $D_{T}$        \;\;\; Brownian diffusion coefficient\\
   $D_{b}$        \quad\, Thermophoresis diffusion coefficient\\
   Ec             \quad\; Eckert number\\
   $a$            \quad\;\;\; Constant parameter\\
   $n$            \quad\;\;\; Nonlinear stretching parameter\\
   $f$            \quad\;\;\; Dimensionless stream function\\
   $k$            \quad\;\;\; Thermal conductivity $(W m^{-1} K^{-1})$\\
   $S$            \quad\;\;\; Suction/injection  parameter\\
   $Le$           \quad\;\, Lewis number\\
   $M$            \quad\;\, Magnetic parameter\\
   $Q_{0}$        \quad\; Dimensional heat generation parameter\\
   $Nb$           \quad\; Brownian motion parameter\\
   $Nt$           \quad\; Thermophoresis parameter\\
   $Pr$           \quad\; Prandtl number\\
   $Q$            \quad\;\;\, Heat generation/absorption parameter\\
   $K_{1}$        \quad\; Velocity slip factor\\
   $K_{2}$        \quad\; Thermal slip factor\\
   $K_{3}$        \, Concentration slip factor\\
   $T$            \;\;\, Fluid temperature $(K)$\\
   $q_{w}$        \; Surface heat flux $(W/m^{2})$\\
   $q_{m}$        \; Surface mass flux\\
   $T_{W}$        \,Temperature at the surface $(K)$\\
   $T_{\infty}$   \, Temperature of the fluid far away from the stretching sheet $(K)$\\\\
   \textbf{Greek Symbols:}\\
   $\alpha$       \quad Thermal diffusivity ($m^{2}/s$)\\
   $\eta$         \quad Dimensionless similarity variable\\
   $\gamma$       \quad concentration parameter\\
   $\mu$          \,\,\,\,\,\, Dynamic viscosity of the base fluid $(kg/m.s)$\\
   $\upsilon$     \;\;\; Kinematic viscosity $(m^{2} \;s^{-1})$\\
   $\rho_{f}$     \;\, Density of the fluid $(Kg \;m^{-3})$\\
   $\rho_{p}$     \;\; Density of the nanoparticle $(Kg\; m^{-3})$\\
   $\tau$         \; The ratio of the nanoparticle heat capacity  the base fluid heat Capacity\\
   $(\rho c)_{f}$ \; Heat capacity of the base fluid $(kg/m.s^{2})$\\
   $(\rho c)_{p}$ \; Heat capacity of the nanoparticle $(kg/m.s^{2})$\\
   $\theta$       \quad Dimensionless temperature $(K)$\\
   p pressure     \quad $(N/ m^{2})$\\
   $\phi$         \quad Nanoparticle volume fraction\\
   $\phi_{W}$     \;\;\; Nanoparticle volume fraction at wall temperature\\
   $\phi_{\infty}$\;\;\; Ambient nanoparticle volume fraction\\
   $\lambda$      \quad Velocity slip parameter\\
   $\delta$       \quad Thermal slip parameter\\\\
   \textbf{Sub Scripts:}\\
   $f$            \quad Fluid\\
   $\emph{W}$     \quad Condition on the sheet\\
   $\infty$       \quad Ambient Conditions
   \end{multicols}
    }%
    }
  • Without any more information about your problem I can just suggest using a tabular. If you explain what are you doing, what do you want to obtain, and give us a complete but minimal code (from \documentclass to \end{document}) to work with. Our answers will be better. – Ignasi Jun 17 '16 at 9:16
  • There're definitely easier (better?) ways to typeset a nomenclature than this! – user31729 Jun 17 '16 at 9:33
6

The standard way to do this would be to use tabular, but that will involve breaking the columns by hand.

If you wish to have the automatic column break, then one possibility is to use a tabbing environment. (Unfortunately longtable will not work in two column mode.) The general syntax of tabbing is

\begin{tabbing}
line with \= tab marks set\\
next \> line with tab stops\\
another \> line with tab stops\\
\end{tabbing}

In your case you will want to wrap the text in the second column using a \parbox, so a helper command is useful:

\newcommand{\entry}[3][\>]{#2 #1 \parbox[t]{.4\textwidth}{#3\strut\par}\\}

so ordinary rows are just

\entry{symbol}{explanation}

and the first row is

\entry[...\=]{symbol}{explanation}

with ... some extra whitespace to allow for the widest label.

Sample output

\documentclass{article}

\usepackage{multicol,ragged2e,siunitx}

\sisetup{per-mode=symbol}

\setlength{\fboxsep}{5pt}

\begin{document}

\noindent\fbox{%
\hfill\parbox{\dimexpr\textwidth-15pt}{%
\vspace{-\topskip}\small
\newcommand{\entry}[3][\>]{#2 #1 \parbox[t]{.4\textwidth}{\RaggedRight
#3\strut\par}\\}%
\begin{multicols}{2}
  \begin{tabbing}
    \textbf{\large Nomenclature}\\[2ex]
    \textbf{List of variables:}\\
    \entry[\quad\=]{$u$,$\upsilon$}{Velocity components along $x$-$y$
    axes (\si{m\per s})}
    \entry{$U_{w}$}{Velocity of the wall along the $x$-axis (\si{m\per
    s})}
    \entry{$x,y$}{Cartesian coordinates measured along the stretching sheet (\si{m})}
    \entry{$B(x)$}{Magnetic field strength (\si{A.m^{-1}})}
    \entry{$C$}{Nanoparticle concentration (\si{mol.m^{-3}})}
    \entry{$C_{fx}$}{Skin-friction coefficient (\si{Pascal})}
    \entry{$Nu_{x}$}{Nusselt number}
    \entry{$Sh_{x}$}{Sherwood number}
    \entry{$C_{w}$}{Nanoparticles concentration at the stretching surface (\si{mol.m^{-3}})}
    \entry{$C_{\infty}$}{Nanoparticle concentration far from the sheet (\si{mol.m^{-3}})}
    \entry{$C_{p}$}{Specific heat capacity at constant pressure (\si{J.kg^{-1}.K})}
    \entry{$D_{T}$}{Brownian diffusion coefficient}
    \entry{$D_{b}$}{Thermophoresis diffusion coefficient}
    \entry{Ec}{Eckert number}
    \entry{$a$}{Constant parameter}
    \entry{$n$}{Nonlinear stretching parameter}
    \entry{$f$}{Dimensionless stream function}
    \entry{$k$}{Thermal conductivity (\si{W.m^{-1}.K^{-1}})}
    \entry{$S$}{Suction/injection parameter}
    \entry{$Le$}{Lewis number}
    \entry{$M$}{Magnetic parameter}
    \entry{$Q_{0}$}{Dimensional heat generation parameter}
    \entry{$Nb$}{Brownian motion parameter}
    \entry{$Nt$}{Thermophoresis parameter}
    \entry{$Pr$}{Prandtl number}
    \entry{$Q$}{Heat generation/absorption parameter}
    \entry{$K_{1}$}{Velocity slip factor}
    \entry{$K_{2}$}{Thermal slip factor}
    \entry{$K_{3}$}{Concentration slip factor}
    \entry{$T$}{Fluid temperature (\si{K})}
    \entry{$q_{w}$}{Surface heat flux (\si{W\per m^{2}})}
    \entry{$q_{m}$}{Surface mass flux}
    \entry{$T_{W}$}{Temperature at the surface (\si{K})}
    \entry{$T_{\infty}$}{Temperature of the fluid far away from the stretching sheet (\si{K})}
    \textbf{Greek Symbols:}\\
    \entry{$\alpha$}{Thermal diffusivity (\si{m^{2}\per s})}
    \entry{$\eta$}{Dimensionless similarity variable}
    \entry{$\gamma$}{concentration parameter}
    \entry{$\mu$}{Dynamic viscosity of the base fluid (\si{kg\per m.s})}
    \entry{$\upsilon$}{Kinematic viscosity (\si{m^{2}.s^{-1}})}
    \entry{$\rho_{f}$}{Density of the fluid (\si{kg.m^{-3}})}
    \entry{$\rho_{p}$}{Density of the nanoparticle (\si{kg.m^{-3}})}
    \entry{$\tau$}{The ratio of the nanoparticle heat capacity the base fluid heat Capacity}
    \entry{$(\rho c)_{f}$}{Heat capacity of the base fluid (\si{kg\per
    m.s^{2}})}
    \entry{$(\rho c)_{p}$}{Heat capacity of the nanoparticle
    (\si{kg\per m.s^{2}})}
    \entry{$\theta$}{Dimensionless temperature (\si{K})}
    \entry{p}{pressure (\si{N\per m^{2}})}
    \entry{$\phi$}{Nanoparticle volume fraction}
    \entry{$\phi_{W}$}{Nanoparticle volume fraction at wall temperature}
    \entry{$\phi_{\infty}$}{Ambient nanoparticle volume fraction}
    \entry{$\lambda$}{Velocity slip parameter}
    \entry{$\delta$}{Thermal slip parameter}
    \textbf{Sub Scripts:}\\
    \entry{$f$}{Fluid}
    \entry{$\emph{W}$}{Condition on the sheet}
    \entry{$\infty$}{Ambient Conditions}
  \end{tabbing}
\end{multicols}
}%
\hfill}
\end{document}

I have chose to set the explanations \RaggedRight, as the column is narrow. Also I have used the siunitx package for typesetting the units. Finally, I have set the main title a little larger, removed some excess space at the top of the box and used \hfill's to center the text horizontally in the box.

|improve this answer|||||

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.