0

I am using the dcolumn package for unit alignment in tables. The dcolumn fonts should be changed to helvetica 7pt. But I don't know how to change the fonts and size.

I needs to be align the plus or minus symbol. How to control the plus or minus symbol alignment through the dcolumn.

MWE:

\documentclass{article}

\RequirePackage{fixltx2e}%
\usepackage{booktabs}
\usepackage{amsmath,amssymb}
\usepackage{dcolumn}
\usepackage{rotating}

\newcolumntype{d}[1]{D{.}{.}{#1}}

\begin{document}

\begin{sidewaystable*}[!t]
\caption{\textbf{\boldmath Memory effect and mechanical properties (E, elastic modulus, UTS, ultimate tensile strength, YS, yield stress) for various membranes in acid form}.\label{tab:1}}
{\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}ld{2,0}ccccccd{2,2}@{}}\toprule
\textbf{SPEEK} & \multicolumn{1}{c}{\textbf{DXL\%}} & \textbf{\boldmath$\lambda$} & \textbf{\boldmath$\lambda$ (memory effect)} & \textbf{E/MPa} & \textbf{UTS/MPa} & \textbf{YS/MPa} & \textbf{Tg/} & \multicolumn{1}{c}{\textbf{DMSO/wt\%\protect\textsuperscript{b}}} \\ \midrule
First treatment & 0 & 33 (25); $\infty$ (100) &~--~& 850\,$\pm$\,60 & 132\,$\pm$\,1 & 20\,$\pm$\,2 & 180 & 55.5 \\
180, 3\,h & 8 & 12 (25); 37 (100) & 37 (25) & 1160\,$\pm$\,50 & 4441\,$\pm$\,23 & 30\,$\pm$\,2 & 193 & 5.00 \\
180, 10\,h & 22 & 5 (25); 24 (100) & 24 (25) & 1300\,$\pm$\,100 & 43\,$\pm$\,802 & 35\,$\pm$\,5 & 239 & 21.5 \\
180, 24\,h & 35 & 3 (25); 16 (100) & 16 (25) & 1450\,$\pm$\,50 & 159\,$\pm$\,2 & 45\,$\pm$\,2 & $>$250 & 1.30 \\
\textbf{SPEEK GF} \\
180, 8\,h & 26 & 73 (110) & -- & 690\,$\pm$\,10 & 140\,$\pm$\,244 & 20\,$\pm$\,2 & \textsuperscript{a} & \textsuperscript{a} \\ \bottomrule
\end{tabular*}}{\par\textsuperscript{a}Not measured. \textsuperscript{b}Determined by thermogravimetric analysis.}
\end{sidewaystable*}

\end{document}

My Required output below mentioned here:

enter image description here

1
  • You really want helvetica just in your D columns when it is not used anywhere else in the document? D uses whatever fonts are currently defined for math mode. Mar 8, 2015 at 17:47

1 Answer 1

3

Alignment on \pm may be easily specified in the D arguments. The current math fonts are used, so if you are using a package setting math digits in helvetica(really?) that should be automatic.

enter image description here

\documentclass{article}

\RequirePackage{fixltx2e}%
\usepackage{booktabs}
\usepackage{amsmath,amssymb}
\usepackage{dcolumn}
\usepackage{rotating}

\newcolumntype{d}[1]{D{.}{.}{#1}}
\newcolumntype{P}[1]{D{-}{\pm}{-1}}
\newcommand\hd[1]{\multicolumn{1}{c}{\bfseries\boldmath
\begin{tabular}{@{}c@{}}#1\end{tabular}}}

\begin{document}

\begin{sidewaystable*}[!t]
\caption{\textbf{\boldmath Memory effect and mechanical properties (E, elastic modulus, UTS, ultimate tensile strength, YS, yield stress) for various membranes in acid form}.\label{tab:1}}
{\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}ld{2,0}
>{\bfseries}cc
PPP
cc
cd{2,2}@{}}\toprule
\textbf{SPEEK} &
\hd{DXL\%} & 
\hd{$\lambda$} &
\hd{$\lambda$\\(memory effect)} &
\hd{E/MPa} &
\hd{UTS/\\MPa} &
\hd{YS/\\MPa} & 
\hd{Tg/} &
\hd{DMSO/\\wt\%\protect\textsuperscript{b}} \\
\midrule
First treatment & 0 & 33 (25); $\infty$ (100) &~--~& 850-60 & 132-1 & 20-2 & 180 & 55.5 \\
180, 3\,h & 8 & 12 (25); 37 (100) & 37 (25) & 1160-50 & 4441-23 & 30-2 & 193 & 5.00 \\
180, 10\,h & 22 & 5 (25); 24 (100) & 24 (25) & 1300-100 & 43-802 & 35-5 & 239 & 21.5 \\
180, 24\,h & 35 & 3 (25); 16 (100) & 16 (25) & 1450-50 & 159-2 & 45-2 & $>$250 & 1.30 \\
\textbf{SPEEK GF} \\
180, 8\,h & 26 & 73 (110) & -- & 690-10 & 140-244 & 20-2 & \textsuperscript{a} & \textsuperscript{a} \\ \bottomrule
\end{tabular*}}{\par\textsuperscript{a}Not measured. \textsuperscript{b}Determined by thermogravimetric analysis.}
\end{sidewaystable*}

\end{document}
1
  • @carlisle If i declared the particular column in "P" mode the numbers should be followed helvetica font. For ex: Fifth column "850\,$\pm$\,60 The number font 850 and 60 should be changed helvetica. $\pm$ should be followed symbol font. The second thing is the column head text "SPEEK, DXL%" should be align top. But currently the text align center. Please advice the two doubts. Otherwise the solution is good.
    – CS Kumar
    Mar 9, 2015 at 8:18

You must log in to answer this question.

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