下载https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/Images/
图片alt
sudo apt-get install texlive-full sudo apt-get install texstudio
sudo apt-get install texlive-xetex latex-cjk-all
安装中文字体包安装中文支持包,使用的是xeCjK,中文处理技术也有很多,xeCJK是成熟且稳定的一种
sudo apt install latex-cjk-all sudo apt-get install texlive-lang-chinese
\resizebox{\linewidth}{!}{ #此处!表示根据根据宽高比进行自适应缩放 \begin{tabular}... .... .... \end{tabular} } # 注意加的位置在\begin{tabular}和\end{tabular}前后
print(xtable(matrix(rnorm(200), ncol = 10)), scalebox = 0.7)
tlmgr option repository https://mirrors.ustc.edu.cn/CTAN/systems/texlive/tlnet --usermode tlmgr init-usertree tlmgr list --only-installed sudo apt-get install perl-tk tlmgr info collections /usr/local/texlive/2021/bin/x86_64-linux/tlmgr --usermode install biblatex-caspervector --repo https://mirrors.ustc.edu.cn/CTAN/systems/texlive/tlnet
https://www.tug.org/texlive/doc/tlmgr.html#USER-MODE
texdoc ctex texdoc lshort-zh texdoc graphicx
latex --interaction=nonstopmode --output-directory aa svg.tex dvisvgm --no-fonts --no-styles -c2,2 -o a.svg svg.dvi
\documentclass{article} \usepackage{CJKutf8} \begin{document} \begin{CJK}{UTF8}{gkai} Hello latex!\\ 这是一个楷体中文测试,处理简体字。\\ \end{CJK} \end{document}
\documentclass{article} \usepackage{xeCJK} \begin{document} hello,你好 \end{document}
\RequirePackage{fontspec} \setmainfont{Times New Roman} \setsansfont{Myriad Pro} \setmonofont{Courier Std} \setCJKmainfont[BoldFont={方正小标宋_GBK}, ItalicFont={方正楷体_GBK}, BoldItalicFont={方正仿宋_GBK}]{方正书宋_GBK} \setCJKsansfont{方正黑体_GBK} \setCJKmonofont{方正中等线_GBK}
% 导言区全局设置 \documentclass{ctexart} % article book report letter %\usepackage{ctex} \usepackage{chemformula} \title{My First Article} \author{WANG YANG} \date{\today} %\usepackage{chemfig}% 化学环境 \usepackage[version=4]{mhchem} % 引入宏包,版本请参考文档说明。 %正文区 \begin{document} \maketitle Hello Word $$你好$$ $$ P\{\mbox{拒绝} \mid H_{0} \mbox{为真}\} = \alpha $$ formula : $f(x)$ $$f(x)=3x^2$$ \ce{\mbox{蔗糖} + UDPG <=>T[蔗糖合成酶] UDPG + \mbox{果糖}} % 一个简单的公式 \end{document}
\documentclass{article} %\newcommand{cmd}[args][default]{def} \newcommand*{\CMD}[2][arg1]{#1 ----- #2} %\renewcommand{\CMD}{test} %\newenvironment{envname}[args][default]{begdef}{enddef} \newenvironment{myabstract}[1][abstract] {\begin{center} #1 \end{center} \begin{quotation} ----------------------- } {\end{quotation}} \begin{document} \CMD{arg2} \begin{myabstract}[test] ssss \end{myabstract} \end{document}
\usepackage{graphicx} \usepackage{subfigure} \begin{figure}[htbp] \centering \subfigure[pic1.]{ \includegraphics[width=5.5cm]{miRNA_4023_vs_2558_RWP1_deg_volcano} %\caption{fig1} } \quad \subfigure[pic2.]{ \includegraphics[width=5.5cm]{miRNA_4023_vs_2558_RWP1_deg_volcano} } \quad \subfigure[pic3.]{ \includegraphics[width=5.5cm]{miRNA_4023_vs_2558_RWP1_deg_volcano} } \quad \subfigure[pic4.]{ \includegraphics[width=5.5cm]{miRNA_4023_vs_2558_RWP1_deg_volcano} } \caption{ pics} \end{figure}
\begin{figure}[H] \begin{minipage}[t]{0.45\linewidth} \centering \includegraphics[width=0.45\textwidth]{miRNA_4023_vs_2558_RWP1_deg_volcano} \caption{fig111111} \end{minipage}% \begin{minipage}[t]{0.45\linewidth} \centering \includegraphics[width=0.45\textwidth]{miRNA_4023_vs_2558_RWP1_deg_volcano} \caption{fig222222} \end{minipage} \end{figure}
%dddddddddddddd\cite{atticle1} %\begin{thebibliography}{88} % \bibitem{atticle1}sssssssssssss %\end{thebibliography}
"xelatex", "bibtex", "xelatex", "xelatex"
\documentclass{ctexart} \usepackage{ctex} \usepackage{natbib} \bibliographystyle{plain} % plain unsrt alpha abbrv \begin{document} \cite{Dorrity2020} \cite{Kulkarni2019} \cite{Tran2020} \nocite{*} \bibliography{test} \end{document}
https://www.ctan.org/pkg/biblatex-caspervector
\documentclass{ctexart} \usepackage[style=caspervector,backend=biber,utf8]{biblatex} \addbibresource{/home/wangyang/Documents/bib/library.bib} \begin{document} \cite{Dorrity2020} \parencite{Kulkarni2019} \supercite{Tran2020} % \nocite{*} \printbibliography[title=参考文献] \end{document}
library(xtable) options(xtable.table.placement="H") # latex表格 options(xtable.caption.placement="top") mcor<-round(cor(mtcars),2) mcor xtable(mcor,label = "lable",caption = "caption") |> print(file="/home/wangyang/workspace/tex/mcor.tex")
rmarkdownTable <- function(df){ cat("|",paste(names(df), collapse = "|"),"|") cat("\n") cat("|",paste(rep("---", ncol(df)), collapse = "|"),"|") cat("\n") for(i in 1:nrow(df)){ cat("|",paste(df[i,], collapse = "|"),"|") cat("\n") } invisible(NULL) }
"latex-workshop.view.pdf.viewer": "tab", "latex-workshop.latex.tools": [ { // 编译工具和命令 "name": "xelatex", "command": "xelatex", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "-pdf", "%DOCFILE%" ] }, { "name": "pdflatex", "command": "pdflatex", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "%DOCFILE%" ] }, { "name": "bibtex", "command": "bibtex", "args": [ "%DOCFILE%" ] },{ "name": "biber", "command": "biber", "args": [ "%DOCFILE%" ] } ],"latex-workshop.latex.recipes": [ { "name": "xelatex", "tools": [ "xelatex" ], }, { "name": "pdflatex", "tools": [ "pdflatex" ] }, { "name": "xe->bib->xe->xe", "tools": [ "xelatex", "biber", "xelatex", "xelatex" ] }, { "name": "pdf->biber->pdf->pdf", "tools": [ "xelatex", "biber", "xelatex", // "pdflatex" ] }, { "name": "pdf->bib->pdf->pdf", "tools": [ "pdflatex", "bibtex", "pdflatex", "pdflatex" ] } ],
https://www.jianshu.com/p/bae90bf9e5d8
\alpha表示字母α;\theta表示字母θ;\beta表示字母β;\gamma表示字母γ等Latex 化学公式有机化学公式
\begin[H] \centering \includegraphics[width=0.5\textwidth]{{imageSyntaxPrefix}$} \caption{} \label{} \end