![调整表格列的宽度](https://linux22.com/image/468992/%E8%B0%83%E6%95%B4%E8%A1%A8%E6%A0%BC%E5%88%97%E7%9A%84%E5%AE%BD%E5%BA%A6.png)
我正在尝试使该表的第三列更宽,因此有什么建议可以调整第三列以获得更好的外观?
\documentclass{article}
\usepackage[margin=2cm,a4paper]{geometry} % set page parameters suitably
\usepackage{tabularx}
\usepackage{booktabs,xltabular}
\newcommand{\SPESGindex}{\mathop{\textnormal{\slshape SP 500 ESG index}}\nolimits}
\newcommand{\POL}{\mathop{\textnormal{\slshape Pollution }}\nolimits}
\newcommand{\INF}{\mathop{\textnormal{\slshape Inflation}}\nolimits}
\newcommand{\REC}{\mathop{\textnormal{\slshape Recession }}\nolimits}
\newcommand{\GPR}{\mathop{\textnormal{\slshape Geopolitical risk}}\nolimits}
\newcommand{\EPU}{\mathop{\textnormal{\slshape Economic policy uncertainty (USA)}}\nolimits}
\newcommand{\NSI}{\mathop{\textnormal{\slshape New-based sentiment index}}\nolimits}
\newcommand{\PRI}{\mathop{\textnormal{\slshape Physical risk index}}\nolimits}
\newcommand{\TRI}{\mathop{\textnormal{\slshape Transition risk index}}\nolimits}
\newcommand{\MCCC}{\mathop{\textnormal{\slshape Media and Climate Change Concerns}}\nolimits}
\begin{document}
%------------------------------------------------
\begin{table}
\caption{Variables and measurement\label{appendix}}
\renewcommand{\arraystretch}{1.0}
\begin{tabularx}{\textwidth}{@{}lXXS@{}}
\toprule
\multicolumn{1}{l}{Symbol}&\multicolumn{1}{l}{Variable Description}&\multicolumn{1}{p{0.5cm}}
{Measure}\\
\midrule
\SPESGindex & SP 500 ESG index & The S\&P 500 ESG Index is intended to be a market
capitalization-weighted index with a wide base that measures the performance of securities fulfilling sustainability standards while keeping comparable sector weights overall to the underlying index. Source. Bloomberg. \\
\POL & POL & Average number of daily searches on Google Trends for the phrase "pollution" in the Unites States. Source: Google trends.\\
\INF & INF & Average number of daily searches on Google Trends for the phrase "inflation" in the United States. Source: Google trends..\\
\REC & REC & Average number of times the phrase "recession" is searched for each day on Google Trends in the United States. Source: Google trends.\\
\GPR & GPR & The GPR index reflects the occurrence of words related to geopolitical tensions in leading international newspapers. Source: Caldara and Iacoviello (2022).\\
\EPU & EPU &T his index measures the frequency of certain phrases that represent uncertainty about the economic policy environment in newspaper stories to quantify the uncertainty of economic policy. Source: Backer et al (2016).\\
\NSI & NSI & The Daily News Sentiment Index is a quantitative indicator that gauges economic sentiment by using lexical analysis techniques on news stories specifically relevant to economics. Source: Shapiro et al. (2020)..\\
\PRI & PRI & Physical risks refer to the potential financial implications that can arise due to changes in the climate. These risks can be event-driven (acute)Source. Bua et al. (2022) .\\
\TRI & TRI & Transition risks are associated with the financial implications that arise from the process of transitioning to a lower-carbon economy.\\
\MCCC & MCCC & This index captures news articles related to climate change from U.S. newspapers and newswires between January 1, 2003, and June 30, 2018. Source: Bua et al (2022). .\\
\bottomrule
\end{tabularx}
\end{table}
\end{document}
答案1
我不确定\mathop
发生了什么:您遇到了大量错误,您不应忽略它们。而且没有S
列。
通过将标题分成两行来减少第二列的宽度。
\documentclass{article}
\usepackage[margin=2cm,a4paper]{geometry} % set page parameters suitably
\usepackage{amsmath}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{caption}
\newcommand{\SPESGindex}{\textnormal{\slshape SP 500 ESG index}}
\newcommand{\POL}{\textnormal{\slshape Pollution }}
\newcommand{\INF}{\textnormal{\slshape Inflation}}
\newcommand{\REC}{\textnormal{\slshape Recession }}
\newcommand{\GPR}{\textnormal{\slshape Geopolitical risk}}
\newcommand{\EPU}{\textnormal{\slshape Economic policy uncertainty (USA)}}
\newcommand{\NSI}{\textnormal{\slshape New-based sentiment index}}
\newcommand{\PRI}{\textnormal{\slshape Physical risk index}}
\newcommand{\TRI}{\textnormal{\slshape Transition risk index}}
\newcommand{\MCCC}{\textnormal{\slshape Media and Climate Change Concerns}}
\newcommand{\splitcell}[2][t]{\begin{tabular}[#1]{@{}c@{}}#2\end{tabular}}
\begin{document}
\begin{table}
\caption{Variables and measurement}\label{appendix}
\begin{tabularx}{\textwidth}{@{}lcX@{}}
\toprule
Symbol & \splitcell{Variable \\ Description} & Measure \\
\midrule
\SPESGindex & \splitcell{SP 500 ESG \\ index} &
The S\&P 500 ESG Index is intended to be a market capitalization-weighted
index with a wide base that measures the performance of securities fulfilling
sustainability standards while keeping comparable sector weights overall to
the underlying index.
Source. Bloomberg. \\
\POL & POL &
Average number of daily searches on Google Trends for the phrase ``pollution''
in the Unites States.
Source: Google trends. \\
\INF & INF &
Average number of daily searches on Google Trends for the phrase ``inflation''
in the United States.
Source: Google trends. \\
\REC & REC &
Average number of times the phrase ``recession'' is searched for each day on
Google Trends in the United States.
Source: Google trends. \\
\GPR & GPR &
The GPR index reflects the occurrence of words related to geopolitical
tensions in leading international newspapers.
Source: Caldara and Iacoviello (2022). \\
\EPU & EPU &
This index measures the frequency of certain phrases that represent
uncertainty about the economic policy environment in newspaper stories
to quantify the uncertainty of economic policy.
Source: Backer et al.\ (2016). \\
\NSI & NSI &
The Daily News Sentiment Index is a quantitative indicator that gauges
economic sentiment by using lexical analysis techniques on news stories
specifically relevant to economics.
Source: Shapiro et al.\ (2020). \\
\PRI & PRI &
Physical risks refer to the potential financial implications that can
arise due to changes in the climate. These risks can be event-driven
(acute).
Source. Bua et al.\ (2022). \\
\TRI & TRI &
Transition risks are associated with the financial implications that
arise from the process of transitioning to a lower-carbon economy.
\\
\MCCC & MCCC &
This index captures news articles related to climate change from U.S.
newspapers and newswires between January 1, 2003, and June 30, 2018.
Source: Bua et al.\ (2022). \\
\bottomrule
\end{tabularx}
\end{table}
\end{document}
您确定没有将“变量描述”与“符号”混淆吗?
提示:切勿使用"
引号,请参阅编辑后的代码:您需要``
打开引号和''
关闭引号。
我还修复了一些不一致之处:双重或缺失的句号以及非句子结尾句号后的“反斜杠空格”(在“et al.”中)。