找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 187|回复: 1

latex与计量经济学英文排版

[复制链接]

8

主题

11

回帖

49

积分

新手上路

积分
49
发表于 2023-1-7 21:47:54 | 显示全部楼层 |阅读模式
来历:知乎
在写计量经济学论文时,排版碰到了一些困难,所幸最初谷歌处理,
知乎上似乎临时没有人提出过这些题目,所以在此记录。
一、计量表格输出与横排

计量经济常常需要输出大量表格
利用stata的话,
我保举利用outreg2号令和reg2docx号令
在导出latex后借助工具网站实现快速三线表输出——工具网站
记得加工具网站里的包:合并单元格留白占位用的
  1. \usepackage{multirow}
复制代码
但关键题目在于偶然表格太长,需要横排,
我就在利用偏向婚配时获得了个巨长的表格,
还幸亏 GitHub 聊天区[1]发现有人在会商,简而言之,我间接上代码
(不外会商区的代码在页码设备时多打了一个页码,我已鄙人面点窜)
  1. ia\RequirePackage{fancyhdr}% fancy headers and footers
  2. \RequirePackage{pdflscape}% landscape environment
  3. \RequirePackage[absolute]{textpos}% rotated page number
  4. \makeatletter
  5. \fancypagestyle{lscape}{% landscape layout style
  6.         \fancyhf{}% clear fields
  7.         \fancyhead[C]{%
  8.                 \begin{textblock}{1.0}[0.5,0.5](0.08,0.5)%
  9.                         \rotatebox{90}{%表格正文设备
  10.                                 \footnotesize \ifnumodd{\value{page}}{\leftmark}{\@title}%
  11.                         }%
  12.                 \end{textblock}%
  13.                 \begin{textblock}{1.0}[0.5,0.5](0.08,0.5)%
  14.                         \rotatebox{90}{%
  15.                                 \rule[-14pt]{\textwidth}{0.8pt}%
  16.                         }%
  17.                 \end{textblock}%
  18.         }%
  19.         \fancyfoot[C]{%页码——页脚
  20.                 \begin{textblock}{1.0}[0.5,0.5](0.92,0.5)
  21.                         \rotatebox{90}{%
  22.                                 \footnotesize \ifnumodd{\value{page}}{\hspace*{\fill}\thepage}%
  23.                         }%
  24.                 \end{textblock}%
  25.         }%
  26.         \setlength{\TPHorizModule}{\paperwidth}%
  27.         \setlength{\TPVertModule}{\paperheight}%
  28.         \renewcommand{\headrulewidth}{0pt}%
  29.         \renewcommand{\footrulewidth}{0pt}%
  30. }
  31. \makeatothe
  32. %前面是导言区,前面是正文区***********************
  33. \begin{landscape}
  34.                 \pagestyle{lscape}% 横排页眉页脚款式
  35.                
  36. \begin{table}[h]
  37.         \caption{Year-by-year balance test:before matching}
  38. \begin{center}
  39.                 \begin{tabular}{ccccccccccc}
  40.                 \hline
  41.                 & (1)       & (2)       & (3)       & (4)       & (5)       & (6)       & (7)       & (8)        & (9)       & (10)      \\
  42.                 & 2011b     & 2012b     & 2013b     & 20014b    & 2015b     & 2016b     & 2017b     & 2018b      & 2019b     & 2020b     \\ \hline
  43.                 GDP\_per              & 0.5171    & 0.6320    & 0.6656    & 1.0579**  & 1.5552**  & 1.9305*** & 2.0723*** & 2.1738***  & 2.5656*** & 2.5321*** \\
  44.                 & (1.2947)  & (1.4995)  & (1.5777)  & (2.2603)  & (2.5505)  & (2.7090)  & (2.9722)  & (3.6972)   & (4.1506)  & (4.4166)  \\
  45.                 industrial\_structure & 0.0698*** & 0.0650*** & 0.0655*** & 0.0606*** & 0.0578*** & 0.0517**  & 0.0672*** & 0.0746***  & 0.0848*** & 0.0870*** \\
  46.                 & (3.5715)  & (3.5152)  & (3.2637)  & (2.9975)  & (2.7505)  & (2.4469)  & (3.0497)  & (3.2592)   & (4.0277)  & (4.1908)  \\
  47.                 Internet              & -0.2416   & -0.2796   & -2.6498   & -2.5063   & -3.9715** & -3.3674*  & -3.5890** & -3.4732*** & -3.4743** & -2.2663*  \\
  48.                 & (-0.1466) & (-0.1116) & (-1.1093) & (-1.4113) & (-2.0310) & (-1.8378) & (-2.4618) & (-2.7343)  & (-2.4591) & (-1.8117) \\
  49.                 RD\_capital           & 0.0000*** & 0.0000*** & 0.0000*** & 0.0000*** & 0.0000*** & 0.0000*** & 0.0000**  & 0.0000**   & 0.0000**  & 0.0000**  \\
  50.                 & (2.7165)  & (2.8676)  & (3.0197)  & (2.9761)  & (2.7980)  & (2.5818)  & (2.3379)  & (2.3631)   & (2.1241)  & (2.5179)  \\ \hline
  51.                 PseudoR2              & 0.3499    & 0.3564    & 0.3588    & 0.3686    & 0.3831    & 0.3942    & 0.3995    & 0.4082     & 0.4092    & 0.3889   \\ \hline
  52.                 \end{tabular}
  53. \end{center}
  54.                
  55.                 \caption{ Year-by-year balance test:after matching}
  56. \begin{center}
  57.                                 \begin{tabular}{ccccccccccc}
  58.                         \hline
  59.                         & (1)       & (2)       & (3)       & (4)       & (5)       & (6)       & (7)       & (8)       & (9)       & (10)      \\
  60.                         & 2011a     & 2012a     & 2013a     & 20014a    & 2015a     & 2016a     & 2017a     & 2018a     & 2019a     & 2020a     \\ \hline
  61.                         GDP\_per              & -0.6172   & 0.3591    & -0.0210   & 0.1253    & 0.2232    & 0.3054    & 0.0717    & 0.5250    & 1.0246    & 1.0272    \\
  62.                         & (-1.1482) & (0.5590)  & (-0.0445) & (0.2133)  & (0.3147)  & (0.4081)  & (0.0969)  & (0.7459)  & (1.3362)  & (1.4657)  \\
  63.                         industrial\_structure & 0.0141    & -0.0141   & -0.0024   & 0.0069    & 0.0061    & 0.0162    & 0.0189    & -0.0057   & 0.0128    & 0.0084    \\
  64.                         & (0.5793)  & (-0.5337) & (-0.1049) & (0.3040)  & (0.2444)  & (0.7093)  & (0.7401)  & (-0.2022) & (0.4852)  & (0.3397)  \\
  65.                         Internet              & 1.5242    & 1.0392    & 1.1346    & -0.4182   & -1.0846   & -1.6706   & -1.2913   & -0.4505   & -1.6107   & -0.1980   \\
  66.                         & (0.8988)  & (0.4380)  & (0.4452)  & (-0.2096) & (-0.5337) & (-0.7773) & (-0.8232) & (-0.2629) & (-1.1819) & (-0.1409) \\
  67.                         RD\_capital           & 0.0000    & 0.0000    & 0.0000    & 0.0000    & 0.0000    & 0.0000    & 0.0000    & 0.0000    & 0.0000    & 0.0000    \\
  68.                         & (1.0624)  & (1.4164)  & (1.2552)  & (1.0469)  & (1.0134)  & (0.9960)  & (1.2411)  & (1.0864)  & (0.5834)  & (0.4697)  \\
  69.                         PseudoR2              & 0.0312    & 0.0529    & 0.0283    & 0.0179    & 0.0166    & 0.0253    & 0.0371    & 0.0325    & 0.0322    & 0.0341    \\ \hline
  70.                 \end{tabular}
  71. \end{center}
  72.                 \end{table}
  73. \end{landscape}
复制代码
latex与计量经济学英文排版-1.jpg

结果如图

二、多张图片并排

两张时
  1. \begin{center}
  2.         \begin{figure}[h]
  3.                 \begin{minipage}{.5\textwidth}
  4.                         \includegraphics[width=1\linewidth]{test.pdf}
  5.                         \caption{PSM balance check: cross section}
  6.                 \end{minipage}%
  7.                 \begin{minipage}{.5\textwidth}
  8.                         \includegraphics[width=1\linewidth]{support.pdf}
  9.                         \caption{ Sample Layout:support the hypothesis }
  10.                 \end{minipage}
  11.         \end{figure}
  12.        
  13. \end{center}
复制代码
四张时[2]
  1.         \begin{figure*}[h]
  2.         \begin{minipage}[t]{0.45\textwidth}
  3.                 \includegraphics[width=1\linewidth]{1.pdf}
  4.                 \caption{ before cross-sectional PSM matching}
  5.         \end{minipage}%
  6.         \begin{minipage}[t]{0.45\textwidth}
  7.                 \includegraphics[width=1\linewidth]{2.pdf}
  8.                 \caption{  after cross-sectional PSM matching}
  9.         \end{minipage}
  10.         \begin{minipage}[t]{0.45\textwidth}
  11.                 \includegraphics[width=1\linewidth]{3.pdf}
  12.                 \caption{ before year-by-year PSM matching}
  13.         \end{minipage}%
  14.         \begin{minipage}[t]{0.45\textwidth}
  15.                 \includegraphics[width=1\linewidth]{4.pdf}
  16.                 \caption{ after year-by-year PSM matching}
  17.         \end{minipage}
  18. \end{figure*}
复制代码
latex与计量经济学英文排版-2.jpg

结果图

三、英文APA格式援用

1、在英文文献中援用中文文献

需要把中文题目翻译成英文,详情请看之前写的
这也是为什么国内很多论文最初还有个英文题目和英文摘要。
2、ztero+latex+word

我都是先用 Word+zotero 写草稿,最初 LATEX 排版,
当 Word 里面整理完参考文献后,用工具网站识别出 Word 的参考文献导出 bibtex
固然,假如仔细的话, zotero 的bibtex插件专门整理来导出是最好的。
3、APA格式援用号令
  1. \usepackage{apacite}
  2. \usepackage{natbib}
  3. %上面加入导言区
  4. &正文区*****************************
  5. \bibliographystyle{apacite}
  6. \bibliography{bib参考文献的名字}
复制代码
援用有多种格式
LATEX 衬着顺序
xelatex\rightarrow bibtex \rightarrow xelatex \rightarrow xelatex
  1. \citep{bibid}
  2. \citeauthor{bibid}   \citeyear{bibid}
  3. \citet{bibid}
复制代码
他们演示结果以下:

latex与计量经济学英文排版-3.jpg

HuaXiangshan就是鄙人滑翔闪

为啥援用超链接会变蓝捏?
由于我在latex导言区加了魔法——
  1. \usepackage[colorlinks, citecolor=blue]{hyperref}
复制代码
没错,色彩甚至可以自己改。
四、其他

国内各类期刊zotero的cls援用格式
假如想要让表格题目居左,可以用这个,
归正国内《经济研讨》期刊是这样要求的
  1. \usepackage{booktabs}
  2. \usepackage{array, caption, threeparttable}
  3. \usepackage[font=small,labelfont=bf,labelsep=none]{caption}
  4. %表格编号Table 1 可以加粗显现
  5. \captionsetup[table]{
  6.         singlelinecheck=false,%居左
  7. }
复制代码
latex与计量经济学英文排版-4.jpg

结果如图

五、一个简单的封面

有次教员让自己弄个课程作业封面,就随意弄了下。
由于又要交Word又要交pdf,所以弄个Word也好模仿的
cover.tex
2.6K
· 百度网盘



latex与计量经济学英文排版-6.jpg

私货max

参考


  • ^列位可以间接点击翻开看
  • ^有些人喜幸亏图片宽途设备几多英尺,不外我小我觉很多图排列,还是设备文本占比宽度最合适

原文地址:https://zhuanlan.zhihu.com/p/596338827
免责声明:本帖内容由机械人自动收集于互联网,如加害了您的权益,请联系我们【E-Mail:cb@yoyodoc.com】 我们会实时删除侵权内容,给您带来未便,深感歉意!

3

主题

13

回帖

34

积分

新手上路

积分
34
发表于 2023-1-7 21:48:23 | 显示全部楼层
太好了,啪的一下就点赞收藏了
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|小悠文档创作分享社区 ( 粤ICP备11072215号 )|网站地图

GMT+8, 2024-10-22 19:42 , Processed in 0.274899 second(s), 26 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表