我正在尝试将 Github 教程制作成 PDF 书https://github.com/redguardtoo/mastering-emacs-in-one-year-guide/blob/master/guide-en.org(以便在我的 iPad 上舒适地阅读)为此,我将 Emacs org 文件导出为 tex 文件,然后通过以下方式将其转换为 pdf:
$ pandoc -s emacs-in-one-year.tex -o emacs-in-one-year.pdf
转换后,PDF 看起来比例不合适,字体太小,文本四边留有空白。屏幕截图如下:https://i.hizliresim.com/kXdlp9.png
我在 Stackoverflow 上搜索了这个问题,并应用了建议的解决方案,但都没有奏效,边距仍然很大,字体很小。修改后的 tex 文件现在如下所示。我怎样才能使字体更大、边距更小?谢谢。
% Created 2017-12-04 Mon 18:08
\documentclass[13pt, a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fixltx2e}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{marvosym}
\usepackage{wasysym}
\usepackage{amssymb}
\usepackage{hyperref}
\usepackage{fullpage}
\setlrmarginsandblock{1cm}{1cm}{*} % Left and right margin
\setulmarginsandblock{2cm}{2cm}{*} % Upper and lower margin
\checkandfixthelayout
\usepackage{geometry}
\geometry{
paper=a4paper,
margin=10pt,
includeheadfoot
}
\tolerance=1000
\setcounter{secnumdepth}{0}
\author{REPL & The Code Maker}
\date{\today}
\title{Emacs in one year}
\hypersetup{
pdfkeywords={},
pdfsubject={},
pdfcreator={Emacs 25.2.1 (Org mode 8.2.10)}}
\begin{document}
\maketitle
\section*{Master Emacs in one year \hfill{}\textsc{emacs:en}}
\label{sec-1}
Author: Chen Bin (redguardtoo)
Version: 20150424
Updated: \textit{<2015-04-24 Fri>}
Created: \textit{[2012-01-31 Tue 15:08]}
Copyright: This work is licensed under the
\href{http://creativecommons.org/licenses/by-nc-nd/3.0/}{Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License}.
\subsection*{Introduction}
\label{sec-1-1}
I was a Microsoft fan because I was born in China. There was no Unix culture when I was young.
当我转换时
答案1
我已经编辑了您的示例,以便运行时不会出现错误,并且我认为您想要的边距(但这些边距是很多太小)。
% Created 2017-12-04 Mon 18:08
\documentclass[
% there is no 13pt option so 13pt wouldgive 10pt
12pt,
a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
% do not use\usepackage{fixltx2e}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{marvosym}
\usepackage{wasysym}
\usepackage{amssymb}
\usepackage{hyperref}
% use geometry instead \usepackage{fullpage}
% memoir only \setlrmarginsandblock{1cm}{1cm}{*} % Left and right margin
% memoir only \setulmarginsandblock{2cm}{2cm}{*} % Upper and lower margin
% memoir only \checkandfixthelayout
\usepackage{geometry}
\geometry{
paper=a4paper,
margin=10pt, % are you sure you want margins that small?????
% that will not print on may home printers and will make a text block
% too wide to read with comfort
includeheadfoot
}
\tolerance=1000
\setcounter{secnumdepth}{0}
%\author{REPL & The Code Maker}
% \and not &
\author{REPL \and The Code Maker}
\date{\today}
\title{Emacs in one year}
\hypersetup{
pdfkeywords={},
pdfsubject={},
pdfcreator={Emacs 25.2.1 (Org mode 8.2.10)}}
\begin{document}
\maketitle
\section*{Master Emacs in one year \hfill{}\textsc{emacs:en}}
\label{sec-1}
Author: Chen Bin (redguardtoo)
Version: 20150424
Updated: \textit{<2015-04-24 Fri>}
Created: \textit{[2012-01-31 Tue 15:08]}
Copyright: This work is licensed under the
\href{http://creativecommons.org/licenses/by-nc-nd/3.0/}
{Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License}.
\subsection*{Introduction}
\label{sec-1-1}
I was a Microsoft fan because I was born in China. There was no Unix culture when I was young.
\end{document}