
以下にコピーした 13 行目を除き、表内のすべてのテキストが折り返されます。Web サイトがページの端まで表示されています。Web アドレスを折り返したいのですが、どなたか助けていただけませんか?
\documentclass[12pt]{article}
\usepackage[english]{babel}
\usepackage{longtable}
\begin{document}
\maketitle
\begin{center}
\begin{longtable}{|l|p{13cm}|}
\caption[]{Disqus IT} \label{DisqusIT} \\
\hline \multicolumn{1}{|c|}{\textbf{ Sample }} & \multicolumn{1}{p{13cm}|}{\textbf{Text}} \\ \hline
\endfirsthead
\multicolumn{2}{c}%
{{\bfseries \tablename\ \thetable{} -- Disqus IT continued from previous page}} \\
\hline \multicolumn{1}{|c|}{\textbf{ Sample }} &
\multicolumn{1}{c|}{\textbf{Text}} \\ \hline
\endhead
\hline \multicolumn{2}{|r|}{{Continued on next page}} \\ \hline
\endfoot
\hline \hline
\endlastfoot
13 I really really really really like to think about this stuff: http://www.senate.gov/legislative/LIS/roll\_call\_lists/roll\_call\_vote\_cfm.cfm?congress=113\&session=1\&vote=00032 \\
\end{longtable}
\end{center}
\end{document}
答え1
改行が許されない表形式の列にこのような長い URL を置くのは意味がありません。 USe パッケージを使用すると、のように動作するltablex
環境を使用できます。パッケージは以下から入手できます。
tabularx
longtable
http://www.ctan.org/tex-archive/macros/latex/contrib/ltablex より
正しいライセンスステートメントがありません。TeXLive やおそらく MikTeX にも載っていない理由です。
\documentclass{article}
\usepackage{ltablex}
\usepackage{url}
\begin{document}
\noindent
\begin{tabularx}{\linewidth}{|X|p{13cm}|}
\caption{Disqus IT \label{DisqusIT}} \\\hline
\multicolumn{1}{|c|}{\textbf{ Sample }} & \multicolumn{1}{p{13cm}|}{\textbf{Text}} \\ \hline
\endfirsthead
\multicolumn{2}{c}{{\bfseries \tablename\ \thetable{} -- Disqus IT continued from previous page}} \\\hline
\multicolumn{1}{|c|}{\textbf{ Sample }} & \multicolumn{1}{c|}{\textbf{Text}} \\ \hline
\endhead
\hline \multicolumn{2}{|r|}{{Continued on next page}} \\ \hline
\endfoot
\hline \hline
\endlastfoot
13 I really like to think about this stuff: \url{http://www.senate.gov/legislative/LIS/roll_call_lists/roll_call_vote_cfm.cfm?congress=113&session=1&vote=00032} &
\end{tabularx}
\end{document}