You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

292 lines
9.2 KiB

%!TEX program = latexmk
% arara: lualatex: { shell: yes, synctex: yes, options: ['--output-directory=output' ]}
% arara: lualatex: { shell: yes, synctex: yes, options: ['--output-directory=output' ]}
% arara: lualatex: { shell: yes, synctex: yes, options: ['--output-directory=output' ]}
% arara: remove: {
% arara: --> directory: output,
% arara: --> recursive: true,
% arara: --> patterns: [
% arara: --> '*.idx', '*.ver', '*.aux',
% arara: --> '*.log', '*.out', '*.hst',
% arara: --> '*.toc', '*.lot', '*.glo',
% arara: --> '*.glg', '*.gls', '*.ist',
% arara: --> '*.lof', '*.ind'
% arara: --> ]}
% arara: halt if name = getBasename(getOriginalReference().getName()) + '.pdf';
% arara: --> dst = toFile('pdf/' + name);
% arara: --> from = toFile('output/' + name);
% arara: --> java.nio.file.Files.move(from.toPath(), dst.toPath(),
% arara: --> java.nio.file.StandardCopyOption.REPLACE_EXISTING); true
%%%%%%%%------------------------------------------------------------------------
%%%% 导言区
%% 文档类型为article
\special{dvipdfmx:config z 9}
% PDF 压缩
% gswin64c -sDEVICE=pdfwrite -dCompatibilityLevel=1.5 -dPDFSETTINGS=/default -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
%
% -dPDFSETTINGS
% -dPDFSETTINGS=/screen质量较低,体积较小。
% -dPDFSETTINGS=/ebook更好的质量,但略大pdf。
% -dPDFSETTINGS=/prepress输出类似于Acrobat Distiller ``Prepress Optimized``设置
% -dPDFSETTINGS=/printer选择类似于Acrobat Distiller ``Print Optimized``设置的输出
% -dPDFSETTINGS=/default选择用于各种用途的输出,可能会牺牲较大的输出文件
\documentclass[a4paper,12pt,oneside]{book}
%1m = 39.4 inch
%大18开 (18.5cm * 23cm)
\usepackage{import}
%\usepackage[left=3.25cm, right=3.25cm, top=2.3cm,bottom=1.4cm]{geometry}
\usepackage[framemethod=tikz]{mdframed}
\usepackage[left=3.75cm,right=3.25cm,top=3cm,bottom=2.5cm]{geometry}
\usepackage[cachedir=output/cache, outputdir=output]{minted}
\usepackage{import}
%\usepackage{minted}
%% en_preamble包含基本的宏包配置
\import {style/}{en_preamble}
% \input{style/en_preamble}
%% 如果不写中文的话就不需要引用xecjk_preamble里面的配置
\import{style/}{xecjk_preamble}
\import{style/}{coding}
\usepackage{imakeidx}
\usepackage{tcolorbox}
\usepackage[shortlabels]{enumitem}
% xelatex
%\usepackage{navigator}
% lualatex
\usepackage{ulem}
\usepackage{embedfile}
\usepackage{pgfplots}
\usepackage{pifont}
\usepackage{adjustbox}
\usepackage{marginnote}
\usepackage{emoji}
\usepackage{circuitikz}
\usepackage{comment}
\usepackage{makecell}
\usepackage[owncaptions,tablegrid]{vhistory}
\pgfplotsset{compat=newest}
% \usepackage[
% placement=center,
% angle=45,
% scale=20,
% color=black!40,
% %hshift=60,
% %vshift=-5
% ]{background}
% \backgroundsetup{contents={样章}}
% \backgroundsetup{contents={\includegraphics[width=0.2\textwidth]{figures/cock.jpg}}}
\usetikzlibrary{calc,arrows, arrows.meta}
\newcommand{\myclearpage}{\clearpage{\pagestyle{empty}\cleardoublepage}}
%\newcommand{\mydedicate}{\clearpage{\pagestyle{empty}\cleardedicatepage}}
\renewcommand{\thefootnote}{\fnsymbol{footnote}}
% otfinfo -i TwemojiMozilla.ttfamily
% Full name: Twemoji Mozilla
\setemojifont{Twemoji Mozilla}
%%%% 导言区结束
%%%%%%%%------------------------------------------------------------------------
\graphicspath{{images/}{tex/}}
\setlength{\headheight}{14pt}
\renewcommand{\headrulewidth}{0.7pt}
\renewcommand{\footrulewidth}{0pt}
\setcounter{tocdepth}{4}
\setcounter{secnumdepth}{3}
\setlength{\floatsep}{4pt plus 2pt minus 2pt}
\setlength{\textfloatsep}{4pt plus 2pt minus 2pt}
\setlength{\intextsep}{4pt plus 2pt minus 2pt}
\DeclareRobustCommand{\shellcmd}[2]{\\ \mintinline[bgcolor=lightgray!30,fontsize=\scriptsize]{#1}{#2} \\}
%\xeCJKsetup{CJKmath=true}
\hypersetup{colorlinks=true,linkcolor=blue!80, urlcolor=orange!80, %
pdfstartview=FitH,%
pdfpagemode=UseNone,%
bookmarksopen=false,%
urlcolor=,%
pdffitwindow=true,%
pdfauthor=surenyi82@163.com,%
pdfsubject=RK3588 开发说明,%
pdftitle=RK3588 开发指导,%
pdfkeywords=RK3588 AARCH64 Linux U-Boot
}
% url style
\makeatletter
\def\url@leostyle{%
\@ifundefined{selectfont}{\def\UrlFont{\sf}}{\def\UrlFont{\small\rmfamily}} %
}
\makeatother
\urlstyle{leo}
\begin{comment}
\setCJKmainfont[
ItalicFont=AdobeKaitiStd-Regular,
BoldFont=Source Han Serif SC VF,
BoldItalicFont=AdobeKaitiStd-Regular,
ItalicFeatures={RawFeature={+axis={ital=1, wdth=400}}}, % slnt: -90,90
BoldFeatures={RawFeature={+axis={wght=800}}},
BoldItalicFeatures={RawFeature={+axis={wght=800, ital=1}}},
UprightFeatures={RawFeature={+axis={wght=400}}}
]{Source Han Serif SC VF}
\setCJKsansfont[
ItalicFont=AdobeKaitiStd-Regular,
BoldFont=Source Han Sans SC VF,
BoldItalicFont=AdobeKaitiStd-Regular,
ItalicFeatures={RawFeature={+axis={ital=1, wdth=400}}}, % slnt: -90,90
BoldFeatures={RawFeature={+axis={wght=800}}},
BoldItalicFeatures={RawFeature={+axis={wght=800, ital=1}}},
UprightFeatures={RawFeature={+axis={wght=400}}}
]{Source Han Sans SC VF}
\end{comment}
\setCJKfamilyfont{sourcehanserif}[
ItalicFont=AdobeKaitiStd-Regular,
BoldFont=Source Han Serif SC VF,
BoldItalicFont=AdobeKaitiStd-Regular,
ItalicFeatures={RawFeature={+axis={ital=1, wdth=400}}}, % slnt: -90,90
BoldFeatures={RawFeature={+axis={wght=800}}},
BoldItalicFeatures={RawFeature={+axis={wght=800, ital=1}}},
UprightFeatures={RawFeature={+axis={wght=400}}}
] {Source Han Serif SC VF}
\renewcommand{\songti}{\CJKfamily{sourcehanserif}}
\setCJKfamilyfont{sourcehansans}[
ItalicFont=AdobeKaitiStd-Regular,
BoldFont=Source Han Sans SC VF,
BoldItalicFont=AdobeKaitiStd-Regular,
ItalicFeatures={RawFeature={+axis={ital=1, wdth=400}}}, % slnt: -90,90
BoldFeatures={RawFeature={+axis={wght=800}}},
BoldItalicFeatures={RawFeature={+axis={wght=800, ital=1}}},
UprightFeatures={RawFeature={+axis={wght=400}}}
]{Source Han Sans SC VF}
\renewcommand{\heiti}{\CJKfamily{sourcehansans}}
\setCJKfamilyfont{milanvf}{MI Lan Pro VF}[
BoldFont=MI Lan Pro VF,
BoldFeatures={RawFeature={+axis={wght=800}}},
UprightFeatures={RawFeature={+axis={wght=400}}}
]
\newcommand{\milan}{\CJKfamily{milanvf}}
\setCJKfamilyfont{kxfull}{KangXiFontFullVersion}
\newcommand{\kx}{\CJKfamily{kxfull}}
\newcommand{\zhsquote}[1]{{\kx}#1{\kx}}
% vhistory
\renewcommand{\vhhistoryname}{修订记录}
\renewcommand{\vhversionname}{版本变更}
\renewcommand{\vhdatename}{日期}
\renewcommand{\vhauthorname}{作者}
\renewcommand{\vhchangename}{修改内容}
\renewcommand{\vhAuthorColWidth}{0.25\hsize}
\renewcommand{\vhChangeColWidth}{1.75\hsize}
% reset chapter number from 1 in very part
\makeatletter
\@addtoreset{chapter}{part}
\makeatother
%\pagecolor[rgb]{0.9, 0.99, 0.9}
%\renewcommand{\today}{\CJKnumber\year 年 \CJKnumber\month 月 \CJKnumber\day 日}
\renewcommand{\today}{\number\year{}\number\month{}\number\day{}}
%\setmonofont{Consolas}
\newcommand{\apientry}[1] {%
\tikz[baseline] \node[fill=gray!20, text=blue!85, anchor=text, align=right, font=\ttfamily\small]{ #1};
}
\newcommand{\coloredref}[3][blue]{\href{#2}{\color{#1}{#3}}}%
\renewcommand\vhAuthorColWidth{0.5\hsize}
\renewcommand\vhChangeColWidth{1.5\hsize}
\makeindex
%%%% 正文部分
%%%%%%%%------------------------------------------------------------------------
\begin{document}
\frontmatter
\pagestyle{empty}
% region: title page
%%自定义封面
\def\titlename{Rockchip RK3588 软件开发指导}
\def\subtitle{RK3588 平台移植参考}
\def\authors{苏仁义 \\ \vspace{0.9em} \coloredref[black]{mailto:surenyi82@163.com}{me@email.cn} }
\def\orgnization{版本: \vhCurrentVersion}
\def\titlescale{0.40}
\def\titlepic{title}
\input{style/title.tex}
\begin{versionhistory}
\renewcommand\arraystretch{1.5}
\vhEntry{1.0}{2024/3/11}{苏仁义}{开始编写本文档}
\end{versionhistory}
% endregion
% region: table of contents
{
\hypersetup{linkcolor=black}
\tableofcontents
}
% endregion
\def\thelstlisting{\thechapter-\arabic{lstlisting}}
%% 中文习惯是设定首行缩进为2em。
%% 注意此设置一定要在document环境之中,这可能与\setlength作用范围相关
\setlength{\parindent}{2em}
\setlength{\headheight}{14.8pt}
% region : main part
%%开始正文,页面计数从正文开始
\mainmatter{}
\setcounter{page}{1}
\pagestyle{fancy}
\begin{content}
\part {开发篇}
\import{tex/}{build}
\import{tex/}{resource}
\import{tex/}{upgrade}
\import{tex/}{issue}
\part {生产部署}
\import{tex/}{deploy}
\part{其他}
\import{tex/}{wsl2}
\import{tex/}{ubuntu}
\backmatter{}
%\input{tex/appendix}
%\myclearpage
\end{content}
%\bibliographystyle{alpha}
%\input{contents/biblio}
\clearpage
%\listoftables
%\listoffigures
%\printindex
% endregion
% xelatex
%\embeddedfile[Remove pdf postfix of fmsh\_qspips\_sw.c.pdf]{fmshqspi}[fmsh_qspips_sw.c.pdf]{scripts/fmsh_qspips_sw.c}
% lualtex
%\embedfile[filespec=fmsh_qspips_sw.c.pdf,%
% mimetype=application/pdf,%
% desc={将文件另存为 fmsh\_qspips\_sw.c} ] {scripts/fmsh_qspips_sw.c}
\end{document}
\embedfilefinish
%%%% 正文部分结束
% Local Variables:
% mode: latex
% TeX-engine: luatex
% TeX-master: t
% End: