Latex 在LST中使用英语字符而不是非英语字符输出代码?

Latex 在LST中使用英语字符而不是非英语字符输出代码?,latex,non-english,lstlisting,Latex,Non English,Lstlisting,我想在我的论文中插入一个ansys apdl代码文本。 自从我有了tha软件包后,我已经为我的代码(英语)尝试了\begin{lstlisting}。 我的论文模板的默认语言是希腊语,所以当我用latex编译lstlisting时,我会得到这个输出 (希腊字符)。 我曾尝试在\begin{lstlisting}的内部或外部使用\eng{},但我得到的是希腊字符。 这是代码: \begin{lstlisting} /AUX15 /UNITS,SI IOPTN,IGES,SMOOTH I

我想在我的论文中插入一个ansys apdl代码文本。 自从我有了tha软件包后,我已经为我的代码(英语)尝试了\begin{lstlisting}。 我的论文模板的默认语言是希腊语,所以当我用latex编译lstlisting时,我会得到这个输出 (希腊字符)。 我曾尝试在\begin{lstlisting}的内部或外部使用\eng{},但我得到的是希腊字符。 这是代码:

\begin{lstlisting}
/AUX15  
/UNITS,SI 
IOPTN,IGES,SMOOTH   
IOPTN,MERGE,YES 
IOPTN,SOLID,YES 
IOPTN,SMALL,YES 
IOPTN,GTOLER, DEFA  
IGESIN,'.arc_nosup_2','igs',' '  
! APLOT   
!*  
FINISH 
\end{lstlisting}
有人知道我怎样才能得到一个用英文字符而不是希腊文字符的代码输出吗

最简单的例子如下:

\documentclass[11pt,a4paper,fleqn]{article}
\usepackage{multicol}
\usepackage{xspace}
\usepackage[unicode,linktocpage,breaklinks]{hyperref}
\usepackage{textcomp}
\usepackage{breakurl}

% >> Math package:
\usepackage{amsmath}
\usepackage{amsbsy}
\usepackage{amstext}
\usepackage{amssymb}
\usepackage{nicefrac}

\usepackage[english,greek]{babel}
\usepackage[utf8x]{inputenc}
%\usepackage[iso-8859-7]{inputenc}
%\usepackage{kerkis}
\usepackage{parskip}

% improved layout of figure captions with extra margin, smaller font than text
\usepackage[margin=10pt,font=small,labelfont=bf,textfont = it]{caption}
%\usepackage{xltxtra}

\usepackage{graphicx}
\usepackage{latexsym}
\usepackage{babel,varioref}
\usepackage{setspace}
\usepackage{subcaption}
\usepackage{fixltx2e}
\usepackage{pstricks}
\usepackage{latexsym} 
\usepackage{multirow}
\usepackage{array}
\usepackage{color}
\usepackage{algorithm}
\usepackage{algorithmicx}
\usepackage{algpseudocode}
\usepackage{listings}
\usepackage{enumerate}

\usepackage{babelbib}
\usepackage{url}
% \usepackage{multibib}

\usepackage{caption}

% TABLE OF CONTENTS PACKAGES
\usepackage[subfigure]{tocloft}
\usepackage{tocbibind}

% Line Spacing
\usepackage{setspace}

% fancy header
\usepackage{fancyhdr} 
%\usepackage[unicode]{hyperref}

% footnotes: waring in case of splitted footnote
\usepackage{fnbreak}

% extra controlabity for enumerators
\usepackage{enumitem}

% Section headings format
\usepackage{titlesec}
%\usepackage{sectsty}

% appendix
\usepackage{appendix}


\begin{lstlisting}
/AUX15  
/UNITS,SI 
IOPTN,IGES,SMOOTH   
IOPTN,MERGE,YES 
IOPTN,SOLID,YES 
IOPTN,SMALL,YES 
IOPTN,GTOLER, DEFA  
IGESIN,'.arc_nosup_2','igs',' '  
! APLOT   
!*  
FINISH
\end{lstlisting}

您可以使用
\selectlanguage{english}
临时切换到英语:

\documentclass[11pt,a4paper,fleqn]{article}
\usepackage{multicol}
\usepackage{xspace}
\usepackage[unicode,linktocpage,breaklinks]{hyperref}
\usepackage{textcomp}
\usepackage{breakurl}

% >> Math package:
\usepackage{amsmath}
\usepackage{amsbsy}
\usepackage{amstext}
\usepackage{amssymb}
\usepackage{nicefrac}

\usepackage[english,greek]{babel}
\usepackage[utf8x]{inputenc}
%\usepackage[iso-8859-7]{inputenc}
%\usepackage{kerkis}
\usepackage{parskip}

% improved layout of figure captions with extra margin, smaller font than text
\usepackage[margin=10pt,font=small,labelfont=bf,textfont = it]{caption}
%\usepackage{xltxtra}

\usepackage{graphicx}
\usepackage{latexsym}
\usepackage{babel,varioref}
\usepackage{setspace}
\usepackage{subcaption}
\usepackage{fixltx2e}
\usepackage{pstricks}
\usepackage{latexsym} 
\usepackage{multirow}
\usepackage{array}
\usepackage{color}
\usepackage{algorithm}
\usepackage{algorithmicx}
\usepackage{algpseudocode}
\usepackage{listings}
\usepackage{enumerate}

\usepackage{babelbib}
\usepackage{url}
% \usepackage{multibib}

\usepackage{caption}

% TABLE OF CONTENTS PACKAGES
\usepackage[subfigure]{tocloft}
\usepackage{tocbibind}

% Line Spacing
\usepackage{setspace}

% fancy header
\usepackage{fancyhdr} 
%\usepackage[unicode]{hyperref}

% footnotes: waring in case of splitted footnote
\usepackage{fnbreak}

% extra controlabity for enumerators
\usepackage{enumitem}

% Section headings format
\usepackage{titlesec}
%\usepackage{sectsty}

% appendix
\usepackage{appendix}
\begin{document}

Greek

{
\selectlanguage{english}
\begin{lstlisting}
/AUX15  
/UNITS,SI 
IOPTN,IGES,SMOOTH   
IOPTN,MERGE,YES 
IOPTN,SOLID,YES 
IOPTN,SMALL,YES 
IOPTN,GTOLER, DEFA  
IGESIN,'.arc_nosup_2','igs',' '  
! APLOT   
!*  
FINISH
\end{lstlisting}
}

Greek

\end{document}

请做一个可编译的我做了你要求的最小的例子