Таблица вырезана с помощью Stargazer

Таблица вырезана с помощью Stargazer

Я знаю, что на TeX.SE есть похожие вопросы, но я недостаточно компетентен, чтобы сделать вывод о различиях между другими примерами и моим или выделить проблемную строку кода.

Я в замешательстве, потому что обрезание происходит не только из-за размера текста — если я изменю размер текста с 36 до 12, он все равно будет обрезан.

Кто-нибудь может подсказать?

Моя таблица и код приведены ниже.

Отрезанный стол

% Table created by stargazer v.5.2 by Marek Hlavac, Harvard University. E-mail: hlavac at fas.harvard.edu
% Date and time: Sun, Apr 30, 2017 - 16:53:55

\begin{table}[!htbp] \centering 
  \caption{} 
  \label{} 
\begin{tabular}{@{\extracolsep{5pt}} cccc} 
\\[-1.8ex]\hline 
\hline \\[-1.8ex] 
 & Variable & Party.With.High.Populism.Score & Party.With.Low.Populism.Score \\ 
\hline \\[-1.8ex] 
1 & Nationalism & Supports nationalistic conception of society & Supports cosmopolitan conception of society \\ 
2 & Multiculturalism & Supports assimilation & Supports multiculturalism \\ 
3 & Immigration & Supports a tough stance on immigration & Opposes tough stance on immigration \\ 
4 & Democratic Freedoms & Values tradition and authoritarian values & Values libertarian values \\ 
5 & Civil Liberties & Supports a tough stance on crime & Promotes civil liberties \\ 
6 & Social Lifestyle & Opposes liberal attitudes to lifestyle & Favours liberal attitudes to lifestyle \\ 
7 & Establishment & Critical of the establishment & Supportive of the establishment \\ 
8 & Religion & Supports religions inflluence on politics as 'moral authority' & Opposes religions influence on politics \\ 
9 & Urban/Rural & Supports rural rather than urban  interests & Supports urban rather than rural interests \\ 
10 & Environment & Prioritises economic growth over environment protection & Prioritises environmental protection over economic growth \\ 
\hline \\[-1.8ex] 
\end{tabular} 
\end{table} 

решение1

Сделайте себе большое одолжение и научитесь использовать tabularxсреду. Это освободит вас от искусственных (и, скорее всего, неудовлетворительных) ограничений, налагаемых программным обеспечением, которое претендует на «автоматизацию» генерации табличного материала. Вы все равно можете использовать такой инструмент для создания начального макета таблицы. Просто не относитесь к макету как к окончательному или почти окончательному состоянию производственного процесса.

В следующей таблице приведенысодержаниене изменились по сравнению с тем, что вы опубликовали. Что существенно изменилось, так это настройка заголовка. Например, материал в столбцах теперь выровнен по левому краю (с автоматическим переносом строк, чтобы убедиться, что таблица не слишком широкая), а не по центру.

введите описание изображения здесь

\documentclass{article}
\usepackage[english]{babel}
\usepackage{booktabs,tabularx,caption,ragged2e}
\captionsetup{skip=0.333\baselineskip}
\newcolumntype{L}{>{\RaggedRight\arraybackslash}X}
\newlength\mylength
\settowidth\mylength{Multiculturalism} % width of 2nd col.
\begin{document}
\begin{table}[!htbp]
\setlength\tabcolsep{4pt} % default: 6pt
\caption{}  \label{} 
\begin{tabularx}{\textwidth}{@{} l p{\mylength} LL @{}}  
\toprule 
 & Variable & Party with High Populism Score & Party with Low Populism Score \\ 
\midrule
1 & Nationalism & Supports nationalistic conception of society & Supports cosmopolitan conception of society \\ 
2 & Multiculturalism & Supports assimilation & Supports multiculturalism \\ 
3 & Immigration & Supports a tough stance on immigration & Opposes tough stance on immigration \\ 
4 & Democratic Freedoms & Values tradition and authoritarian values & Values libertarian values \\ 
5 & Civil Liberties & Supports a tough stance on crime & Promotes civil liberties \\ 
6 & Social Lifestyle & Opposes liberal attitudes to lifestyle & Favours liberal attitudes to lifestyle \\ 
7 & Establishment & Critical of the establishment & Supportive of the establishment \\ 
8 & Religion & Supports religion's influence on politics as `moral authority' & Opposes religion's influence on politics \\ 
9 & Urban/Rural & Supports rural rather than urban  interests & Supports urban rather than rural interests \\ 
10& Environment & Prioritises economic growth over environment protection & Prioritises environmental protection over economic growth \\ 
\bottomrule
\end{tabularx} 
\end{table}
\end{document}

Связанный контент