源码如下: ```tex %!TeX encoding = UTF-8 %!TeX program = xelatex \documentclass{article} \usepackage{listings} \usepackage[UTF8]{ctex} \usepackage{color} \usepackage{geometry} \usepackage{fontspec} \newfontfamily\monaco{Monaco} \usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue,citecolor=black]{hyperref} \geometry{a4paper,left=1cm,right=1cm,top=1cm,bottom=1.2cm} \definecolor{codegreen}{rgb}{0,0.6,0} \definecolor{codegray}{rgb}{0.5,0.5,0.5} \definecolor{codepurple}{rgb}{0.58,0,0.82} \definecolor{backcolour}{rgb}{0.95,0.95,0.92} \lstdefinestyle{mystyle}{ backgroundcolor=\color{backcolour}, commentstyle=\color{codegreen}, keywordstyle=\color{magenta}, % numberstyle=\tiny\color{codegray}, stringstyle=\color{codepurple}, % basicstyle=\large\ttfamily, basicstyle=\large\fontfamily{monaco}\selectfont, breakatwhitespace=false, breaklines=true, captionpos=b, keepspaces=true, % numbers=left, % numbersep=5pt, numbers=none, showspaces=false, showstringspaces=false, showtabs=false, tabsize=4 } \lstset{style=mystyle} \begin{document} \begin{lstlisting} / ├── bin -> usr/bin ├── boot ├── dev ├── etc ├── home ├── lib -> usr/lib ├── lib64 -> usr/lib64 ├── media ├── mnt ├── opt ├── proc ├── root ├── run ├── sbin -> usr/sbin ├── srv ├── sys ├── tmp ├── usr └── var \end{lstlisting} \end{document} ``` 希望得到效果为: ![](https://pics.latexstudio.net/data/images/202002/905fb965a26cee7.png) 但是转换为pdf后的效果为:![](https://pics.latexstudio.net/data/images/202002/86205827ab6b271.png) 大家有什么办法能让在lstlisting环境下把左边的表格字符显示出来么?

2 回答2

0
推荐你看看 https://www.latexstudio.net/archives/3086.html
  • 非常感谢! – llxwj 2020-02-10 18:33 回复
  • 感谢! – llxwj 2020-02-10 18:33 回复
0
后面的源码缺了,你再补上吧
  • 补上了,提交的时候不知道怎么丢了 – llxwj 2020-02-10 17:28 回复

你的回答

请登录后回答

你的回答将会帮助更多人,请务必认真回答问题。