Latex中表格中固定表格宽度时出现错误“LaTeX Error: Illegal character in array arg.”

在LaTeX中创建表格时,遇到'LaTeXError: Illegal character in array arg.'错误。问题出在使用了'm'列类型,解决办法是在文档开头引入'array'包。此外,注意到用'p'代替'm'也可避免此错误。了解这些细节对于优化LaTeX表格的布局和格式至关重要。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Latex中表格中固定表格宽度时出现错误“LaTeX Error: Illegal character in array arg.”,如下:

\documentclass{article}
\begin{document}
\begin{center}
\begin{tabular}{ | m{5em} | m{1cm}| m{1cm} | } 
  \hline
  cell1 dummy text dummy text dummy text& cell2 & cell3 \\ 
  \hline
  cell1 dummy text dummy text dummy text & cell5 & cell6 \\ 
  \hline
  cell7 & cell8 & cell9 \\ 
  \hline
\end{tabular}
\end{center}
\end{document}

在这里插入图片描述
解决这个错误很简单,就是在开头加上array包就行:\usepackage{array}
其实这里要注意的是,如果把m换成p,那么不加这个array包也是可以的。
在这里插入图片描述

2025-07-20 12:45:25.740787 BMC ERROR: ntp_config_utils.c(2061): generate_ntp_conf_noauth: __check_ntp_property_value_is_changed, ret=0, update_flag=0. 2025-07-20 12:45:26.763862 BMC ERROR: ntp_config.c(332): start_ntp_process: Succeed to call start_ntp_process. 2025-07-20 12:47:13.097854 CpuMem ERROR: npu_dump.c(98): Get the NPU object list failed. 2025-07-20 12:47:14.768990 PcieSwitch ERROR: pcie_switch.c(208): Dump pcie switch action info failed! 2025-07-20 12:47:14.770238 PcieSwitch ERROR: pcie_switch.c(214): Dump pcie switch key regs info failed! 2025-07-20 12:47:14.771392 PcieSwitch ERROR: pcie_switch.c(220): Dump pcie switch eeprom info failed! 2025-07-20 12:47:14.772762 PcieSwitch ERROR: pcie_switch.c(226): Dump retimer regs info failed! 2025-07-20 12:47:14.773919 PcieSwitch ERROR: dal_file.c(128): dal_check_real_path:file real path is illegal! 2025-07-20 12:47:14.774286 PcieSwitch ERROR: pcie_switch.c(107): [dump_switch_obj_info]dal_check_real_path fail, ret = 131087. 2025-07-20 12:47:15.820451 diagnose ERROR: blackbox.c(1873): prt_sol_arg:begin solread,filename is /dev/shm/systemcom.dat.cur is 0,index is 0,len is 8388608 2025-07-20 12:47:16.085659 PowerMgnt ERROR: power_black_box.c(561): [get_psu_black_box_data]:get ps0 blackbox information end 2025-07-20 12:47:16.118529 ipmi_app ERROR: ipmbeth_chan_check.c(225): ipmi_app_dump_info end. 2025-07-20 12:47:16.464029 card_manage ERROR: card_collect_log.c(1127): sl200_card_dump_reg_info: sl200 card is not present 2025-07-20 12:47:16.464274 card_manage ERROR: card_manage_module.c(704): Dump PcieCard info failed. 2025-07-20 12:47:16.467206 card_manage ERROR: card_manage_module.c(704): Dump PassThroughCard info failed. 2025-07-20 12:47:16.479401 card_manage ERROR: card_manage_module.c(763): Dump repeater reg info failed, ret is -1. 2025-07-20 12:47:16.481331 card_manage ERROR: card_manage_module.c(769): Dump SAS reg info failed, ret is -1. 2025-07-20 12:47:16.483979 card_manage ERROR: asset_locator.c(1863): nfc_chip_dump_info: Get AssetLocateBoard failed. ret=-2009 2025-07-20 12:47:17.154057 PowerMgnt ERROR: power_black_box.c(561): [get_psu_black_box_data]:get ps1 blackbox information end 2025-07-20 12:47:17.444262 redfish : ERROR: redfish_provider_chassis_pciedevices.c(468): redfish_check_chassis_pciedevice_uri_effective get pciedevice info failed result:1 (repeated 2 times) 2025-07-20 12:47:17.444515 redfish ERROR: redfish_provider.c(7031): get memory object failed,ret = -2009, device num = 255 2025-07-20 12:47:17.448957 redfish ERROR: redfish_provider_chassis_pciedevices.c(468): redfish_check_chassis_pciedevice_uri_effective get pciedevice info failed result:1 2025-07-20 12:47:17.636804 PowerMgnt ERROR: power_monitor_schedule.c(125): [init_psu_input_channel]:ps0 channel_tag:0--input_channel_num:1 2025-07-20 12:47:17.662260 PowerMgnt ERROR: power_info.c(2348): onepower-4 protery Protocol module :1 2025-07-20 12:47:17.662149 PowerMgnt ERROR: power_bbu_module.c(2286): dump_power_export_data_query get BBUModule object list error:-2009 2025-07-20 12:47:17.662551 PowerMgnt ERROR: power_info.c(2348): onepower-5 protery Protocol module :1 2025-07-20 12:47:17.999581 NetConfig ERROR: net_config_dump.c(1046): net_dump_info: net_dump_info start 2025-07-20 12:47:18.002097 NetConfig ERROR: net_lsw.c(904): dump_all_net_lsw_reg: Get LSWConfig failed 2025-07-20 12:47:18.002380 NetConfig ERROR: net_config_dump.c(1061): Dump lsw reg info failed 2025-07-20 12:47:18.187235 NetConfig ERROR: net_config_dump.c(445): __print_ipv4_info: __print_ipv4_backup_ipaddr_info fail, ret = -1 2025-07-20 12:47:18.217747 NetConfig ERROR: net_config_dump.c(642): cp /dev/shm/log/dhcp/* /dev/shm/dump_info_tmp/dump_info/AppDump/NetConfig/. , vos_system_s fail, ret = 1 2025-07-20 12:47:18.218237 NetConfig ERROR: net_config_dump.c(1076): Dump Dhcp info failed 2025-07-20 12:47:18.252735 NetConfig ERROR: net_config_dump.c(722): __get_ncsi_packets_info: bma not present 2025-07-20 12:47:18.372808 PowerMgnt ERROR: power_monitor_schedule.c(125): [init_psu_input_channel]:ps1 channel_tag:0--input_channel_num:1 2025-07-20 12:47:18.912481 BMC : ERROR: bmc_ncsi_intf.c(112): method_set_vmd_state: dfl get IOBoard handle failed, ret = -1 (repeated 9 times) 2025-07-20 12:47:18.912795 BMC ERROR: nand_flash.c(1588): dump_get_nandflash_info START ! 2025-07-20 12:47:18.914900 BMC ERROR: nand_flash.c(1613): dump_get_nandflash_info END, result:0!
最新发布
07-22
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值