从 pdf 复制并粘贴到 txt 中,以便保留换行符

从 pdf 复制并粘贴到 txt 中,以便保留换行符

有没有办法制作 pdf,以便当我复制代码并粘贴到文本文件中时,它会以相同的格式复制,即保留每一行新内容

\documentclass[%
corpo=12pt,
oneside,
stile=classica,
tipotesi=triennale,
evenboxes,
]{toptesi}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{textcomp}
\usepackage[a-1b]{pdfx}

\hypersetup{%
pdfpagemode={UseOutlines},
bookmarksopen,
pdfstartview={FitH},
colorlinks,
linkcolor={blue},
citecolor={black},
urlcolor={black}
}

\usepackage{listings}

\lstset{language = Octave %just for an example
basicstyle=\scriptsize\ttfamily,
showspaces=false,
breaklines=true,
columns=flexible,
frame=lines
}

\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{subcaption} %divide in sottofigure
\usepackage{sidecap} 
\usepackage{booktabs,siunitx,multirow} %per le tabelle
\sisetup{output-decimal-marker={,}}
\begin{document}
\begin{lstlisting}
FINISH

/CLEAR

!Parametri-statica
E   = 2.1e5
Eg  = 3.3
Nug = 0.45
Nu  = 0.3
el  = 3
el_m = 101
el_bar = 102
lumped = 'ON'

!Parametri-dinamica
M=100e-3
rhog=1e-9
rho=7.83e-9
h_massa=25+135
numero_di_frequenze=20

*dim,ntemp,array,9
ntemp(1) = 2,4,6,8,10,12,14,16,18
contatore = 1

!Ciclo FOR
*DO,LL,1,9

!Importo iges
/AUX15  
IOPTN,IGES,SMOOTH   
IOPTN,MERGE,YES 
IOPTN,SOLID,YES 
IOPTN,SMALL,YES 
IOPTN,GTOLER, DEFA  
IGESIN,'Tassello',''
/VIEW,1,,,1 
\end{lstlisting}
\end{document}

我想获得什么 我想要的是 我得到了什么 发生了什么

相关内容