Tag Info

5

\documentclass{article} \usepackage{longtable,array,xcolor} \renewcommand*\arraystretch{10} \newcounter{counter} \newcolumntype\specifier{|% *2{ >{\centering\selectfont\stepcounter{counter}\thecounter}m{1cm} |>{\centering}m{\dimexpr.5\linewidth-1cm-4\tabcolsep-3\arrayrulewidth\relax} |} } \makeatletter \def\row[#1]#2{% & #1 \par ...

4

Here is a way of setting the table in landscape mode. I've also used booktabs to make things look a bit nicer, dispensing with the vertical rules. The only downside of combining booktabs and longtable is that you have to go through and comment out some rules in the middle of the table to avoid spurious double-rules. In this case, you also need to manage the ...

4

copied from the duplicate question: \documentclass[a4paper]{article} \usepackage{indentfirst} \usepackage{amsmath} \usepackage[english]{babel} \usepackage{graphicx} \usepackage{subfigure} \usepackage{multirow} \usepackage{longtable} \usepackage{tabularx} \begin{document} {\small \setlength\tabcolsep{1.4pt} ...

4

I can't help you much with Requirement #2, except to suggest that you provide more structure in the header which, hopefully, will make the dreaded vertical rule unnecessary. (If you must add the vertical rule, you may want to replace the \addlinespace instructions with [1ex] so as to avoid gaps in the body of the table.) Regarding objective #1, I would ...

4

You can use $\vcenter{...}$: \documentclass{article} \usepackage{graphicx} \usepackage{longtable,amsmath,tabularx} \begin{document} \begin{longtable}{m{0.2\linewidth} m{0.7\linewidth}} \hline $\vcenter{\includegraphics[keepaspectratio,width=\linewidth]{example-image-a.jpg}}$ & \!\begin{aligned} A &= b\cdot{}h\\ P &= 2(b+h)\\ ... 4 You can use adjustbox package with export option so that the keys are available inside the \includegraphics command. \usepackage[export]{adjustbox} and then use valign=c \includegraphics[keepaspectratio,width=\linewidth,valign=c]{example-image-a.jpg} Code: \documentclass{article} \usepackage{graphicx} \usepackage{longtable,amsmath,tabularx} ... 4 You need to make TeX think it is starting a new word after these breaks so that allows hyphenation of the following part. \hspace{0pt} will accomplish such a break. It is best to collect your code for this in to custom commands for the behaviour you wish to allow at the given punctuation mark: \documentclass[a4paper,leqno,twoside]{article} ... 4 It's not the case that the table is "shifted" to the right in the MWE. Instead, the MWE's table is wider than \textwidth, i..e, the width of the text block. This makes its material stick out to the right of the text block. Assuming the document's left-hand and right-hand margins are actually 1 inch (2.54 cm) wide each, you can get the longtable environment ... 3 A solution based on tabularx. I also use the array package, for its *{n}{} and >{…} constructs that saves typing, and booktabsto improve the look of the table. The siunitx package is used to align columns of numbers. Finally, I've automated row numbering and the GO: label. \documentclass[a4paper]{article} \usepackage[utf8]{inputenc} ... 3 Assuming you have one-inch wide horizontal margins, all you need to do to make the table fit into the width of the text block is to reduce the length parameter \tabcolsep to about 5pt (default is 6pt). I would suggest, actually, that you use the method described on page 5 of the user guide of the longtable package to make the table occupy automatically the ... 3 \documentclass{article} \usepackage{longtable} \usepackage{booktabs} \usepackage{siunitx,array} \begin{document} %\noindent no \begin{longtable}{ >{\raggedright\arraybackslash} p{.17\textwidth}S| *{3}{S@{\,}>\footnotesize c}}% don't use vertical rules with booktabs (see the documentation) \caption {Descriptive Statistics (\%): Commerce Faculty (N ...

2

Would this be what you were after!. After some studies, errors were found \multicolumn{2}{c}{} % 2 such cases: missing the last {} $>>$ % 3 such cases: need math environment Code \documentclass[a4paper,leqno,twoside]{article} \usepackage[utf8]{inputenc} \title{dd} \usepackage{amsmath} \usepackage{color} \usepackage{tabu} ...

2

The problem is that the table is wider than the textwidth. When you use \usepackage[showframe]{geometry} then you see the borders: \documentclass[a4paper]{article} \usepackage{longtable} \usepackage[showframe]{geometry} \begin{document} \begin{longtable}{cccccccp{5cm}} \hline Row & GO term & P-value & OR & Exp Count & Count & ...

1

As Manuel Kuehner mentioned, your table is wider than the \textwidth. You may either Enlarge \textwidth by simply \usepackage[cm]{fullpage} or, as mentioned, using geometry. Add a negative space manually on the left of the table, as following: \documentclass[a4paper]{article} \usepackage{longtable} \begin{document} \begin{longtable}{cccccccp{5cm}} ...

1

@ach I think this may get you going. \documentclass[11pt,letterpaper]{article} \usepackage{booktabs} %% IMPROVED TABULAR \usepackage{multirow} %% VERY IMPORTANT \usepackage{XCharter} %% YOU CAN CHANGE IT LATER \usepackage[table]{xcolor} %% YOU NEED THIS TO ADD COLOR \usepackage[letterpaper, bottom=25mm,top=25mm, left=20mm, right=25mm]{geometry} %% ADDED TO ...

1

A tabular alignment implies that the data is positioned into rectangular blocks, hence the space that you show. You have a list not a table: \documentclass{article} \usepackage{capt-of} \begin{document} \twocolumn[\captionof{table}{A caption}] \begin{enumerate} \item One one one \item One one one One one one One one one One one one One one one One one ...

1

Here is a way to use a simple tabular with the enhancements offered by booktabs. Trying to learn multiple packages to do similar things all at once before you understand the basics is, I think, a recipe for confusion and frustration. \documentclass[11pt]{book} \usepackage[utf8]{inputenc} \usepackage[spanish,mexico]{babel} \usepackage[T1]{fontenc} ...

Only top voted, non community-wiki answers of a minimum length are eligible