表大小和多行问题

表大小和多行问题

我是初学者,在表格方面遇到了一些问题。表格太宽了,我尝试用多行来解决这个问题。但我不知道如何在第一列设置换行符,或者是否有更简单的方法让表格适合。

 \documentclass[11pt, english, doublespacing,nolistspacing, parskip,]{MastersDoctoralThesis} % The class file specifying the document structure
\usepackage{tabularx}
\begin{document}
\begin{tabularx}{\textwidth}{l|l}
\toprule
\textbf{Equipment } & \textbf{Manufacturer} \\
\midrule
Camera C-Mount Adapter U TV0 5XC-3 & Olympus, Hamburg, Germany \\
\hline
Control Box Model Olympus BX-UCB & Olympus, Hamburg, Germany \\
\hline
\multirow{2}[2]{*}{Digital Microscope Camera DFC420 C} & Leica Microsystems, Wetzlar,\\
& Germany \\
\hline
\multirow{2}[2]{*}{Fluorescent Stereo Microscope M165 FC} & Leica Microsystems, Wetzlar,\\
& Germany \\
\hline
Gel Imaging System ChemiDoc XRS & Bio-Rad, Munich, Germany \\
\hline
Heating and Drying Table 13501 & Medax, Neum\"unster, Germany \\
\hline
Heating and Drying Table 14501 & Medax, Neum\"unster, Germany \\
\hline
\multirow{2}[2]{*}{Heating Plate Magnetomix} & Colora Messtechnik, Lorch,\\
& Germany \\
\hline
\multirow{2}[2]{*}{Hybridization Oven Hybaid Shake'n'Stack} & Colora Messtechnik, Lorch,\\
& Germany \\
\hline
Ice Flaker Scotsman AF80 & Scotsman Ice Systems, Milan, Italy \\
\hline
Incubator Thermo de Luxe 150 & Hemel Brutger\"ate, Verl, Germany \\
\hline
Incubator Thermo de Luxe 600 & Hemel Brutger\"ate, Verl, Germany \\
\hline
\multirow{2}[2]{*}{Infrared Heater IRB 1}& Edmund B\"uhler, Hechingen,\\& Germany \\
\hline
Integral Ultrapure Water Purification System Milli-Q  & Merck Millipore, Darmstadt, Germany \\
\hline
Magnetic Stirrer C-MAG MS 10 & IKA Werke, Stauffen, Germany \\
\hline
Microbalance MC21OP & Sartorius, G\"ottingen, Germany \\
\hline
Micropipette Puller & Bachofer, Reutlingen, Germany \\
\hline
Mikrotom & Leitz, Wetzlar, Germany \\
\hline
Open Heating Bath Circulator U3 & JULABO, Seelbach, Germany \\
\hline
Orbital Shaker GFL 3015 & GFL, Burgwedel, Germany\\
\hline
pH Meter Five Easy & Mettler-Toledo, Gie\ss{}en, Germany \\
\hline
\multirow{2}[2]{*}{Pipetting Aid Pipetus}
& Hirschmann Laborger\"ate,\\&Eberstadt, Germany \\
\hline
Precision Balance SI-603 & Denver Instrument, G\"ottingen, Germany \\
\hline
Refrigerator & Liebherr, Ochsenhausen, Germany \\
\hline
\multirow{2}[2]{*}{Shaker REAX2000}
 & Heidolph Instruments, Schwabach,\\ & Germany \\
\hline
\multirow{2}[2]{*}{Steam Sterilizer Varioclav 2217}
 & HP Medizintechnik,\\& Oberschlei\ss{}heim, Germany \\
\hline
\multirow{2}[2]{*}{Stereo Microscope Lighting KL 1500 LED} & Olympus, Hamburg,\\
& Germany \\
\hline
Sterilization Oven TV30-B & Memmert, Schwabach, Germany \\
\hline
Sterilization Oven WTC & Binder, Tuttlingen, Germany \\
\hline
Tabletop Centrifuge Biofuge 15  & Heraeus-Christ, Osterode, Germany \\
\hline
Ultrasonic Cleaner Elmasonic S10H & Elma Schmidbauer, Singen, Germany \\
\hline
Virtual Slide Microscope BX61VS & Olympus, Hamburg, Germany \\
\hline
Vortexer Grant Bio PV-1 & Grant Instruments, Shepreth, UK \\
\hline
\multirow{2}[2]{*}{Waving Platform Shaker Polymax 1040} & Heidolph Instruments, Schwabach, \\
& Germany \\
\hline
Zoom Stereo Microscope Olympus SZX7 & Olympus, Hamburg, Germany \\
\bottomrule
\end{tabularx}

\end{document}

答案1

解决方案是ltablex。我减少了单元格内的行距,因为这似乎没有必要:

\documentclass[11pt, english, doublespacing,nolistspacing, parskip,]{report} % The class file specifying the document structure
\usepackage{setspace}
 \usepackage[a4paper,inner=3cm, outer=2.5cm, bindingoffset=2cm, top=1.5cm, bottom=1.5cm]{geometry}
\usepackage{babel}

\usepackage{ltablex, booktabs}

\begin{document}

\begin{tabularx}{\linewidth}{ *{2}{>{\raggedright\onehalfspacing\arraybackslash}X}}
\toprule
\textbf{Equipment } & \textbf{Manufacturer} \\
\midrule
\endfirsthead
(continued)\\
\toprule
\textbf{Equipment } & \textbf{Manufacturer} \\
\midrule
\endhead
%\\
\midrule
\multicolumn{2}{r}{ \raggedleft
 to be continued}
 \endfoot
\bottomrule
\endlastfoot
Camera C-Mount Adapter U TV0 5XC-3 & Olympus, Hamburg, Germany \\
Control Box Model Olympus BX-UCB & Olympus, Hamburg, Germany \\
Digital Microscope Camera DFC420 C& Leica Microsystems, Wetzlar, Germany \\
Fluorescent Stereo Microscope M165 FC & Leica Microsystems, Wetzlar, Germany \\
Gel Imaging System ChemiDoc XRS & Bio-Rad, Munich, Germany \\
Heating and Drying Table 13501 & Medax, Neum\"unster, Germany \\
Heating and Drying Table 14501 & Medax, Neum\"unster, Germany \\
Heating Plate Magnetomix & Colora Messtechnik, Lorch, Germany \\
Hybridization Oven Hybaid Shake'n'Stack & Colora Messtechnik, Lorch, Germany \\
Ice Flaker Scotsman AF80 & Scotsman Ice Systems, Milan, Italy \\
Incubator Thermo de Luxe 150 & Hemel Brutger\"ate, Verl, Germany \\
Incubator Thermo de Luxe 600 & Hemel Brutger\"ate, Verl, Germany \\
Infrared Heater IRB 1& Edmund B\"uhler, Hechingen, Germany \\
Integral Ultrapure Water Purification System Milli-Q & Merck Millipore, Darmstadt, Germany \\
Magnetic Stirrer C-MAG MS 10 & IKA Werke, Stauffen, Germany \\
Microbalance MC21OP & Sartorius, G\"ottingen, Germany \\
Micropipette Puller & Bachofer, Reutlingen, Germany \\
Mikrotom & Leitz, Wetzlar, Germany \\
Open Heating Bath Circulator U3 & JULABO, Seelbach, Germany \\
Orbital Shaker GFL 3015 & GFL, Burgwedel, Germany\\
pH Meter Five Easy & Mettler-Toledo, Gie\ss{}en, Germany \\
Pipetting Aid Pipetus & Hirschmann Laborger\"ate, Eberstadt, Germany \\ Precision Balance SI-603 & Denver Instrument, G\"ottingen, Germany \\ Refrigerator & Liebherr, Ochsenhausen, Germany \\ %
Shaker REAX2000 & Heidolph Instruments, Schwabach, Germany \\
Steam Sterilizer Varioclav 2217 & HP Medizintechnik, Oberschlei\ss{}heim, Germany \\
Stereo Microscope Lighting KL 1500 LED & Olympus, Hamburg, Germany \\
Sterilization Oven TV30-B & Memmert, Schwabach, Germany \\
Sterilization Oven WTC & Binder, Tuttlingen, Germany \\
Tabletop Centrifuge Biofuge 15 & Heraeus-Christ, Osterode, Germany \\
Ultrasonic Cleaner Elmasonic S10H & Elma Schmidbauer, Singen, Germany \\
Virtual Slide Microscope BX61VS & Olympus, Hamburg, Germany \\
Vortexer Grant Bio PV-1 & Grant Instruments, Shepreth, UK \\
Waving Platform Shaker Polymax 1040 & Heidolph Instruments, Schwabach, Germany \\
Zoom Stereo Microscope Olympus SZX7 & Olympus, Hamburg, Germany
 \end{tabularx}

\end{document} 

在此处输入图片描述 在此处输入图片描述

答案2

如果你使用tabularx环境,你确实也应该使用X列类型。我建议你不要使用任何 \multirow指令。并且,不要使用所有这些\hline指令,而要考虑在行之间提供更多空白。

那么类似以下内容:

在此处输入图片描述

\documentclass[a4paper,11pt]{article} % I don't have the file 'MastersDoctoralThesis.cls'
\usepackage{booktabs,tabularx}
\newcolumntype{Y}{>{\raggedright\arraybackslash}X} % raggedright version of 'X' column type
\usepackage[margin=2.5cm]{geometry} % set text block margins
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\begin{document}

\begin{table}[p]
\renewcommand\arraystretch{1.2}%
\begin{tabularx}{\textwidth}{@{} >{\hsize=1.15\hsize}Y >{\hsize=0.85\hsize}Y @{}}
\toprule
\textbf{Equipment } & \textbf{Manufacturer} \\
\midrule
Camera C-Mount Adapter U TV0 5XC-3 & Olympus, Hamburg, Germany \\
Control Box Model Olympus BX-UCB & Olympus, Hamburg, Germany \\
Digital Microscope Camera DFC420 C &  Leica Microsystems, Wetzlar, Germany \\
Fluorescent Stereo Microscope M165 FC &  Leica Microsystems, Wetzlar, Germany \\
Gel Imaging System ChemiDoc XRS & Bio-Rad, Munich, Germany \\
Heating and Drying Table 13501 & Medax, Neumünster, Germany \\
Heating and Drying Table 14501 & Medax, Neumünster, Germany \\
Heating Plate Magnetomix &  Colora Messtechnik, Lorch, Germany \\
Hybridization Oven Hybaid Shake'n'Stack &  Colora Messtechnik, Lorch, Germany \\
Ice Flaker Scotsman AF80 & Scotsman Ice Systems, Milan, Italy \\
Incubator Thermo de Luxe 150 & Hemel Brutgeräte, Verl, Germany \\
Incubator Thermo de Luxe 600 & Hemel Brutgeräte, Verl, Germany \\
Infrared Heater IRB 1 & Edmund Bühler, Hechingen, Germany \\
Integral Ultrapure Water Purification System Milli-Q & Merck Millipore, Darmstadt, Germany \\
Magnetic Stirrer C-MAG MS 10 & IKA Werke, Stauffen, Germany \\
Microbalance MC21OP & Sartorius, Göttingen, Germany \\
Micropipette Puller & Bachofer, Reutlingen, Germany \\
Mikrotom & Leitz, Wetzlar, Germany \\
Open Heating Bath Circulator U3 & JULABO, Seelbach, Germany \\
Orbital Shaker GFL 3015 & GFL, Burgwedel, Germany\\
pH Meter Five Easy & Mettler-Toledo, Gießen, Germany \\
Pipetting Aid Pipetus &  Hirschmann Laborgeräte, Eberstadt, Germany \\
Precision Balance SI-603 & Denver Instrument, Göttingen, Germany \\
Refrigerator & Liebherr, Ochsenhausen, Germany \\
Shaker REAX2000 & Heidolph Instruments, Schwabach, Germany \\
Steam Sterilizer Varioclav 2217 & HP Medizintechnik, Oberschleißheim, Germany \\
Stereo Microscope Lighting KL 1500 LED &  Olympus, Hamburg, Germany \\
Sterilization Oven TV30-B & Memmert, Schwabach, Germany \\
Sterilization Oven WTC & Binder, Tuttlingen, Germany \\
Tabletop Centrifuge Biofuge 15  & Heraeus-Christ, Osterode, Germany \\
Ultrasonic Cleaner Elmasonic S10H & Elma Schmidbauer, Singen, Germany \\
Virtual Slide Microscope BX61VS & Olympus, Hamburg, Germany \\
Vortexer Grant Bio PV-1 & Grant Instruments, Shepreth, UK \\
Waving Platform Shaker Polymax 1040 &  Heidolph Instruments, Schwabach,  Germany \\
Zoom Stereo Microscope Olympus SZX7 & Olympus, Hamburg, Germany \\
\bottomrule
\end{tabularx}
\end{table}
\end{document}

附录,在 OP 提到确切的文本块尺寸后,在后续评论中发布了此评论:考虑到文本块的宽度比最初假设的要小一些,为了让表格适合页面,我建议您直接删除“德国”标签,该标签出现在表格 34 行中的 32 行 [!] 中。其他两个国家(意大利、英国)的名称可能会用斜体显示,以使其稍微突出一些。

在此处输入图片描述

\documentclass[a4paper,11pt]{article} % I don't have the file 'MastersDoctoralThesis.cls'
\usepackage{booktabs,tabularx}
\newcolumntype{Y}{>{\raggedright\arraybackslash}X} % raggedright version of 'X' column type
\usepackage[a4paper,inner=3cm, outer=2.5cm, bindingoffset=2cm, vmargin=1.5cm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\begin{document}

\begin{table}[p]
\renewcommand\arraystretch{1.2}%
\begin{tabularx}{\textwidth}{@{} >{\hsize=1.15\hsize}Y >{\hsize=0.85\hsize}Y @{}}
\toprule
\textbf{Equipment } & \textbf{Manufacturer} \\
\midrule
Camera C-Mount Adapter U TV0 5XC-3 & Olympus, Hamburg \\
Control Box Model Olympus BX-UCB & Olympus, Hamburg \\
Digital Microscope Camera DFC420 C &  Leica Microsystems, Wetzlar \\
Fluorescent Stereo Microscope M165 FC &  Leica Microsystems, Wetzlar \\
Gel Imaging System ChemiDoc XRS & Bio-Rad, Munich \\
Heating and Drying Table 13501 & Medax, Neumünster \\
Heating and Drying Table 14501 & Medax, Neumünster \\
Heating Plate Magnetomix &  Colora Messtechnik, Lorch \\
Hybridization Oven Hybaid Shake'n'Stack &  Colora Messtechnik, Lorch \\
Ice Flaker Scotsman AF80 & Scotsman Ice Systems, Milan, \emph{Italy} \\
Incubator Thermo de Luxe 150 & Hemel Brutgeräte, Verl \\
Incubator Thermo de Luxe 600 & Hemel Brutgeräte, Verl \\
Infrared Heater IRB 1 & Edmund Bühler, Hechingen \\
Integral Ultrapure Water Purification System Milli-Q & Merck Millipore, Darmstadt \\
Magnetic Stirrer C-MAG MS 10 & IKA Werke, Stauffen \\
Microbalance MC21OP & Sartorius, Göttingen \\
Micropipette Puller & Bachofer, Reutlingen \\
Mikrotom & Leitz, Wetzlar \\
Open Heating Bath Circulator U3 & JULABO, Seelbach \\
Orbital Shaker GFL 3015 & GFL, Burgwedel\\
pH Meter Five Easy & Mettler-Toledo, Gießen \\
Pipetting Aid Pipetus &  Hirschmann Laborgeräte, Eberstadt \\
Precision Balance SI-603 & Denver Instrument, Göttingen \\
Refrigerator & Liebherr, Ochsenhausen \\
Shaker REAX2000 & Heidolph Instruments, Schwabach \\
Steam Sterilizer Varioclav 2217 & HP Medizintechnik, Oberschleißheim \\
Stereo Microscope Lighting KL 1500 LED &  Olympus, Hamburg \\
Sterilization Oven TV30-B & Memmert, Schwabach \\
Sterilization Oven WTC & Binder, Tuttlingen \\
Tabletop Centrifuge Biofuge 15  & Heraeus-Christ, Osterode \\
Ultrasonic Cleaner Elmasonic S10H & Elma Schmidbauer, Singen \\
Virtual Slide Microscope BX61VS & Olympus, Hamburg \\
Vortexer Grant Bio PV-1 & Grant Instruments, Shepreth, \emph{United Kingdom} \\
Waving Platform Shaker Polymax 1040 &  Heidolph Instruments, Schwabach \\
Zoom Stereo Microscope Olympus SZX7 & Olympus, Hamburg \\
\midrule[\heavyrulewidth]
\multicolumn{2}{@{}l@{}}{\textsc{Remark}: Country name mentioned in \emph{italics} if firm is not located in Germany.}
\end{tabularx}
\end{table}
\end{document}

相关内容