非常感谢您的帮助和合作,我很高兴在您的平台上找到我所有问题的答案 :) 我对 LaTex 非常陌生,有一个问题:我正在使用 tabularx 环境,不知道为什么任何表格前段落的最后一行会粘在表格上并跟随到下一页?这几乎发生在我所有的表格上:前一页仍然有空白,但页面的最后一行在表格之前转到下一页。正常情况下应该做的是完成文本,然后只将表格移动到下一页:有什么线索吗?
我希望下面的代码能更清楚地说明这一点。您可能会注意到,即使第一页有更多空间,文本的最后一行也会移动到下一页。
% here is my code: last paragraph from my text and the the table.
\documentclass[12pt,oneside]{scrbook} %[oneside,draft,openright,twocolumn]
\usepackage[utf8]{inputenc} %utf8 latin1
%\usepackage{nomencl}
%\makenomenclature
%\usepackage{hyperref}
\usepackage{makeidx}
%\usepackage[intoc]{nomencl}
%\makenomenclature
\usepackage{hyperref}
\usepackage{lscape}
\usepackage[T1]{fontenc}
\usepackage{longtable}
\usepackage{float}
\restylefloat{table} %to let tables go next page without text
\usepackage[stretch=10]{microtype} %only works with pdflatex, great
\usepackage[fleqn]{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
%added for ref appendix
\usepackage{lipsum}
\usepackage{hyperref}
\usepackage{cleveref}
%finito adde
\usepackage[utf8]{inputenc} %to read weird charachters
\renewcommand{\textfraction}{0.05}
\usepackage{setspace} %for double
\onehalfspacing
%debut diagrams
%fin
\usepackage{enumitem}
\usepackage{comment} %used for commenting out sections
%\usepackage[top=4cm, bottom=6cm, outer=5cm, inner=3cm, heightrounded, marginparwidth=2.5cm, marginparsep=0.7cm]{geometry}
%\marginpar{\footnotesize This is the text of the marginal note} %independent of usepackage
%\usepackage{microtype} %blabla fitting text
\usepackage[authoryear,round]{natbib} %default[authoryear, round], %authoryear,longnamesfirst,
\bibliographystyle{apalike} %apalike(=no vol.) ieeetr(=add vol. pages.) alphadin plainnat , apalike
%\usepackage{har2nat} % what does it do???
\setlength{\bibsep}{0.2pt} %single line spacing in references
\usepackage[usenames,dvipsnames]{color}
\usepackage{hyperref} %[hyperfootnotes=false]
\hypersetup{breaklinks,colorlinks=true,linkcolor=Black,citecolor=NavyBlue,
urlcolor=PineGreen}
\setcounter{tocdepth}{4}
\setcounter{secnumdepth}{4}
\usepackage{comment}
%\usepackage{emptypage} %deletes page number on empty pges
\usepackage[flushleft]{threeparttable} %for tables [para]
\usepackage{adjustbox} %added
\usepackage{array}
\usepackage{dcolumn} %alignment on the decimal point
\usepackage{tabularx}
\usepackage{booktabs} %\newcommand{\ra}[1]{\renewcommand{\arraystretch}{#1}}
\usepackage{blindtext} %added to fit the table wide
%\usepackage{fleqn} %formula alignment
%\mathindent=0pt
\usepackage{flafter}
\usepackage{rotating} %have figures and tables lanscapres
\graphicspath{{Graphics/}} %
\usepackage[font=footnotesize]{caption} %labelfont=bf
\captionsetup[table]{skip=0pt}
%\usepackage{floatrow}
\usepackage{geometry} %used later to adjust the margins
\usepackage[english]{babel}
\hyphenation{hy-phen-a-tion mar-vel-ous-ly}
\usepackage{siunitx}
%\mbox{} to force Latex to go back to the new row. retour a la ligne in paragraphs
\begin{document}
Introduction[edit]
An early market economy and an early form of mercantilism, called "Islamic capitalism", were developed between the eighth and twelfth centuries.[6] The monetary economy of the period was based on the widely circulated currency the gold dinar, and it tied together regions that were previously economically independent.
A number of economic concepts and techniques were applied in early Islamic banking, including bills of exchange, partnership (mufawada, including limited partnerships, or mudaraba), and forms of capital (al-mal), capital accumulation (nama al-mal),[7] cheques, promissory notes,[8] trusts (see Waqf),[9] transactional accounts, loaning, ledgers and assignments.[10] Organizational enterprises independent from the state also existed in the medieval Islamic world, while the agency institution was also introduced during that time.[11][12] Many of these early capitalist concepts were adopted and further advanced in medieval Europe from the 13th century onwards.[7]
The word "riba" means interest, usury, excess, increase or addition, which according to Shariah terminology, implies any excess compensation without due consideration (consideration does not include time value of money). The definition of riba in classical Islamic jurisprudence was "surplus value without counterpart", or "to ensure equivalency in real value", and that "numerical value was immaterial."
By 1995, 144 Islamic financial institutions had been established worldwide, including 33 government-run banks, 40 private banks, and 71 investment companies.[17] The involvement of institutions, governments, and various conferences and studies on Islamic banking (Conference of the Finance Ministers of the Islamic Countries held in Karachi in 1970, the Egyptian study in 1972, The First International Conference on Islamic Economics in Mecca in 1976, and the International Economic Conference in London in 1977) were the instrumental in applying the application of theory to practice for the first interest-free banks.[18][19]
There are several other approaches used in business transactions. Islamic banks lend their money to companies by issuing floating rate interest loans. The floating rate of interest is pegged to the company's individual rate of return.
\begin{threeparttable}
\caption{\footnotesize Difference in concept of interest and tax under Islamic finance}
\label{tab:diffriba}
\small
\singlespacing
\begin{tabularx}{\textwidth}{lXX}
\toprule
& \multicolumn{1}{c}{Islamic Banking} & \multicolumn{1}{c}{Conventional Banking}\\ \midrule
I- & Profit & Riba\\ \cmidrule{2-3}
& Determined a posteriori , pro rata of the profit. It is a percentage of the profit generated by the project outcome. & Defined a priori, and is guaranteed to the lender regardless of the outcome of the project financed. \\ \midrule
II- & Zakat & Tax \\ \cmidrule(l){2-2} \cmidrule(r){3-3}
& Means clean and growth & Mean Debt, burden.\\
& Paid to poor only & Finance the government spending.\\
& Yearly basis & Yearly basis\\
& The wealth exceeding certain threshold. & Net Income. \\
& Fixed to 2.5\% & Differs according to the tranche.\\
& Imposed based to productive Assets. & All assets \\
\bottomrule
\end{tabularx}
\end{threeparttable}
\end{document}
答案1
看起来你正在threeparttable
以一种不太寻常的方式使用环境。引用软件包的用户指南threeparttable
:
此包支持带有标题(说明)和注释的表格。标题和注释的宽度等于表格主体(a
tabular
环境)。a 本身threeparttable
不浮动,但您可以将其放在 atable
或 atable*
或其他浮动环境中。
我认为有两种方法可以解决您遇到的问题:
将环境封装
threeparttable
在table
环境中。一旦您在 前面加上前缀\begin{table}
并附\begin{threeparttable}
加到\end{table}
,\end{threeparttable}
您遇到的问题就不再存在。由于你实际上并没有使用环境
tablenotes
的设施threeparttable
,所以代替\begin{threeparttable}
与\begin{table}
,以及\end{threeparttable}
与\end{table}
。这种方法也摆脱了这个问题。
另外,我不得不评论一下,你的文档的序言有点混乱。例如,包hyperref
加载了不少于三次,包inputenc
加载了两次。虽然这个问题不会直接影响你发布的 MWE 的可编译性,但它可能会导致你真正的、可能更长的文档出现问题。特别是,一定要记得加载hyperref
和cleveref
包最后的,即在所有其他包都已加载之后。
答案2
在这里工作正常:
\documentclass{article}
\usepackage{threeparttable,tabularx,booktabs,kantlipsum}
\begin{document}
\kant[1-3]
\paragraph*{Real interest rate}is the lending rate adjusted for the price level. The inflation adjustment is made via the GDP deflator.
\begin{threeparttable}
\label{varmacro}
\caption{\footnotesize Variables sources}
\begin{tabularx}{\textwidth}{@{}l X X} \toprule
Variables & Transformation & Source\\ \midrule
\textbf{Dependent variable}\\
Efficiency & log(var +1)& Author DEA estimation\\
\textbf{Independent variables}\\
Real GDP growth & (xyz) log(var +1) & Bloomberg\\
Financial openness & log(var +1) & Kaufmansn index\\
Government spending & share of GDP in log form & World bank \\
Trade openness & share of GDP in log form & World bank \\
Foreign Direct Invtment & share of GDP in log form & World bank\\
Rule of law & log(var +1) & The Worldwide Governance Indicators, 2013 Update \\
High school enrollment & logarithm form & World bank and the UNESCO data base\\
\bottomrule
\end{tabularx}
\end{threeparttable}
\end{document}