![如何重命名表格列表?(\renewcommand 不起作用)](https://linux22.com/image/460318/%E5%A6%82%E4%BD%95%E9%87%8D%E5%91%BD%E5%90%8D%E8%A1%A8%E6%A0%BC%E5%88%97%E8%A1%A8%EF%BC%9F%EF%BC%88%5Crenewcommand%20%E4%B8%8D%E8%B5%B7%E4%BD%9C%E7%94%A8%EF%BC%89.png)
我正在使用\renewcommand{\listtablename}{Elenco Tabelle, Mappe,Circuiti}
,但是它不起作用。
\documentclass[a4paper, 12pt, twoside ,titlepage]{article}
%%% packages
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage{titlesec}
\usepackage{geometry}
\usepackage{fancyhdr}
\usepackage{amsmath}
\usepackage{bm}
\usepackage{graphicx}
\usepackage{textpos}
\usepackage{caption}
\usepackage{tabularray}
\usepackage{karnaugh-map}
\usepackage{ulem}
\usepackage{tikz}
\usepackage{hyperref}
%%% settings
%titlesec
\titlespacing*{\section}{0pt}{0pt}{20pt}
%geometry
\geometry{a4paper,top=3.5cm,bottom=3.5cm,left=2.4cm,right=2.4cm,heightrounded}
%fancyhdr
\fancyhf{}
\fancyfoot[C]{\thepage}
\fancyhead[LE,RO]{\slshape \rightmark}
\fancyhead[LO,RE]{\slshape \leftmark}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.8pt}
\renewcommand{\sectionmark}[1]{\markboth{\thesection\ \ #1}{}}
%caption
\captionsetup{skip=20pt,format=plain,position=bottom,font=small,labelformat=parens,labelfont=bf}
%ulem
\normalem
%hyperref
\hypersetup{hidelinks}
%%%newcommand
\renewcommand{\baselinestretch}{1.05}
\newcommand{\overbar}[1]{\overline{#1}}
\newcommand{\HRULE}[1]{\rule{\linewidth}{#1}}
\newcommand{\Bigskip}{\qquad}
\renewcommand{\listtablename}{Elenco Tabelle, Mappe,Circuiti}
\title{
\vspace{1.5cm}
\HRULE{0.5pt}\\ [0.4cm]
\textbf{\Huge\textsc{Progetto\\ }}
\HRULE{1.2pt}\\ [0.8cm]}
\author{\textbf{Nome:} blabla \\ \textbf{Cognome:} blabla \\
\textbf{Matricola:} }
\date{\textbf{Anno Accademico:} }
\begin{document}
\setlength{\intextsep}{20pt plus 2pt minus 2pt}
\begin{figure}
\centering
\includegraphics[width=6cm]{logo.png}
\HRULE{0.5pt}\\ [0.2cm]
\Large \texttt{Dipartimento di Ingegneria e Architettura} \\
\Large\texttt{Ingegneria Eletronica - Informatica}
\end{figure}
\maketitle
\tableofcontents
\thispagestyle{empty}
\newpage
\listoftables
\thispagestyle{empty}
\newpage
blablabla
\end{document}
答案1
您需要使用babel
方法进行重新定义。
传统方法是
\addto\captionsitalian{\renewcommand{\listtablename}{Elenco di tabelle, mappe e circuiti}}
(您是用意大利语写的,不是吗?)
然而现在有了更好的方法。
\setlocalecaption{italian}{listtable}{Elenco di tabelle, mappe e circuiti}
最小的例子。
\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[italian]{babel}
\setlocalecaption{italian}{listtable}{Elenco di tabelle, mappe e circuiti}
\begin{document}
\listoftables
\end{document}
如果由于您的 TeX 发行版较旧而导致此方法无效,请使用传统方法。
\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[italian]{babel}
\addto\captionsitalian{\renewcommand{\listtablename}{Elenco di tabelle, mappe e circuiti}}
\begin{document}
\listoftables
\end{document}
答案2
将 移至\renewcommand
文档开始之后:
\documentclass[a4paper, 12pt, twoside ,titlepage]{article}
%%% packages
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage{titlesec}
\usepackage{geometry}
\usepackage{fancyhdr}
\usepackage{amsmath}
\usepackage{bm}
\usepackage{graphicx}
\usepackage{textpos}
\usepackage{caption}
\usepackage{tabularray}
\usepackage{karnaugh-map}
\usepackage{ulem}
\usepackage{tikz}
\usepackage{hyperref}
%%% settings
%titlesec
\titlespacing*{\section}{0pt}{0pt}{20pt}
%geometry
\geometry{a4paper,top=3.5cm,bottom=3.5cm,left=2.4cm,right=2.4cm,heightrounded}
%fancyhdr
\fancyhf{}
\fancyfoot[C]{\thepage}
\fancyhead[LE,RO]{\slshape \rightmark}
\fancyhead[LO,RE]{\slshape \leftmark}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.8pt}
\renewcommand{\sectionmark}[1]{\markboth{\thesection\ \ #1}{}}
%caption
\captionsetup{skip=20pt,format=plain,position=bottom,font=small,labelformat=parens,labelfont=bf}
%ulem
\normalem
%hyperref
\hypersetup{hidelinks}
%%%newcommand
\renewcommand{\baselinestretch}{1.05}
\newcommand{\overbar}[1]{\overline{#1}}
\newcommand{\HRULE}[1]{\rule{\linewidth}{#1}}
\newcommand{\Bigskip}{\qquad}
\title{
\vspace{1.5cm}
\HRULE{0.5pt}\\ [0.4cm]
\textbf{\Huge\textsc{Progetto\\ }}
\HRULE{1.2pt}\\ [0.8cm]}
\author{\textbf{Nome:} blabla \\ \textbf{Cognome:} blabla \\
\textbf{Matricola:} }
\date{\textbf{Anno Accademico:} }
\begin{document}
\renewcommand{\listtablename}{Elenco Tabelle, Mappe,Circuiti}
\setlength{\intextsep}{20pt plus 2pt minus 2pt}
\begin{figure}
\centering
% \includegraphics[width=6cm]{logo.png}
\HRULE{0.5pt}\\ [0.2cm]
\Large \texttt{Dipartimento di Ingegneria e Architettura} \\
\Large\texttt{Ingegneria Eletronica - Informatica}
\end{figure}
\maketitle
\tableofcontents
\thispagestyle{empty}
\newpage
\listoftables
\thispagestyle{empty}
\newpage
blablabla
\end{document}