我使用这个acronym
包。请帮我更改缩写词和全名之间的空格,并在它们之间添加一个破折号,如下所示:
PG - some text HRoT - some text some text some text some text some text some text some text some text some text some text
我还想让缩写以罗马文本样式显示(默认情况下为粗体)
\documentclass[12pt]{report}
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage[no-sscript]{xltxtra}
\usepackage[babel=false]{csquotes}
\usepackage{polyglossia}
\setdefaultlanguage{french}
\setotherlanguages{german,english,greek,polish,russian}
\setmainfont[Mapping=tex-text]{Linux Libertine}
\usepackage{acronym}
\makeatletter
\def\uplabel#1{{\normalfont{\textsf{#1}}\hfill}-}
\renewenvironment{AC@deflist}[1]%
{\ifAC@nolist%
\else%
\raggedright\begin{list}{}%
{\settowidth{\labelwidth}{\normalfont{\textsf{#1}}\hspace*{3em}}% change 2em to the desired value
\setlength{\leftmargin}{\labelwidth}%
\addtolength{\leftmargin}{\labelsep}%
\renewcommand{\makelabel}{\uplabel}}%
\fi}%
{\ifAC@nolist%
\else%
\end{list}%
\fi}%
\makeatother
\begin{document}
\begin{acronym}
\acro{Esj}{some text some text some text some text some text some text some text some text some textsome text some text some text}
\acro{At}{some text some text some text some text some text some text some text some text some text some text some textsome textsome text some text some text}
\end{acronym}
\end{document}
编辑:额外的冲刺
答案1
该文件acronym.sty
使用\bflabel
粗体和小写字母排版标签;我定义了一个新的宏\uplabel
,它使用\normalfont
而不是粗体系列,并包含一个连字符来分隔首字母缩略词及其定义;此命令将在AC@deflist
格式化首字母缩略词列表的环境中使用,并且必须重新定义以增加首字母缩略词与其定义之间的分离。环境acronym
也必须重新定义。
在前言中添加以下几行(在acronym
包加载之后)并根据需要更改使用的值:
\documentclass[12pt]{report}
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage[no-sscript]{xltxtra}
\usepackage[babel=false]{csquotes}
\usepackage{polyglossia}
\setdefaultlanguage{french}
\setotherlanguages{german,english,greek,polish,russian}
\setmainfont[Mapping=tex-text]{Linux Libertine}
\usepackage{acronym}
\usepackage{enumitem}
\renewcommand\acsfont{\normalfont}
\makeatletter
\def\uplabel#1{{\normalfont{\textsf{#1}}\hfill}-}
\renewenvironment{acronym}[1][1]{%
\providecommand*{\acro}{\AC@acro}%
\providecommand*{\acroplural}{\AC@acroplural}%
\long\def\acroextra##1{##1}%
\def\@tempa{1}\def\@tempb{#1}%
\ifx\@tempa\@tempb%
\global\expandafter\let\csname ac@des@mark\endcsname\AC@used%
\ifAC@nolist%
\else%
\begin{list}{}%
{\settowidth{\labelwidth}{\normalfont{\textsf{#1}}\hspace*{3em}}% change according to your needs
\setlength{\leftmargin}{\labelwidth}%
\addtolength{\leftmargin}{\labelsep}%
\renewcommand{\makelabel}{\uplabel}}
\fi%
\else%
\begin{AC@deflist}{#1}%
\fi%
}%
{%
\ifx\AC@populated\AC@used\else%
\ifAC@nolist%
\else%
\item[]\relax%
\fi%
\fi%
\expandafter\ifx\csname ac@des@mark\endcsname\AC@used%
\ifAC@nolist%
\else%
\end{list}%
\fi%
\else%
\end{AC@deflist}%
\fi}%
\renewenvironment{AC@deflist}[1]%
{\ifAC@nolist%
\else%
\raggedright\begin{list}{}%
{\settowidth{\labelwidth}{\normalfont{\textsf{#1}}\hspace*{3em}}% change according to your needs
\setlength{\leftmargin}{\labelwidth}%
\addtolength{\leftmargin}{\labelsep}%
\renewcommand{\makelabel}{\uplabel}}%
\fi}%
{\ifAC@nolist%
\else%
\end{list}%
\fi}%
\makeatother
\begin{document}
\begin{acronym}
\acro{Esj}{some text some text some text some text some text some text some text some text some textsome text some text some text}
\acro{At}{some text some text some text some text some text some text some text some text some text some text some textsome textsome text some text some text}
\end{acronym}
\end{document}
编辑:acronym
重新定义环境。