我正在处理 Overleaf 上的 LaTeX 文档中一个棘手的连字符问题。我尝试使用 \usepackage{hyphenat} 包来修复它,但没有成功。由于我的文档很长,手动修改连字符不是一个可行的选择。
是否有任何有效的解决方案或方法来解决 Overleaf 上 LaTeX 中整个文档的连字问题?我非常感谢任何提示或建议。
我的主要包裹:
\documentclass[dscexam]{coppe}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amsmath,amssymb}
\usepackage[dvipsnames]{xcolor}
\usepackage{bm} % parenteses do modo equação
\usepackage[unicode=true, bookmarks=true, breaklinks=false, pdfborder={0 0 0}, backref=false, colorlinks=true, hyphens]{hyperref}
\hypersetup{
linkcolor=black, % Cor dos links internos (seções, figuras, tabelas, etc.)
citecolor=black, % Cor das citações (usada com \cite{})
urlcolor=blue, % Cor dos URLs
filecolor=blue % Cor dos links para arquivos
}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage[flushleft]{threeparttable}
\usepackage{subcaption}
\usepackage{textcomp} % R com bolinha
\usepackage{verbatim} % Inclua o pacote verbatim para comentar trechos inteiros
% GRAPHICS
\usepackage{tikz}
\newenvironment{aasa}{$\displaystyle\aligned}{\endaligned$}
\usepackage{csvsimple}
\usepackage{pgfplots}
\pgfplotsset{compat=1.15}
\usepackage{float} %holding figures
\usepackage{indentfirst} %tira a identação do primeiro paragrafo
\usepackage[figurename=Figure]{caption}
\usepackage{chemfig} % figurinhas químicas
\usetikzlibrary{calc}
\usepackage{textgreek,stackengine}
\newcommand\textdot[1]{\stackon[1pt]{\csname text#1\endcsname}{.}}
\newcommand\textdots[1]{\stackon[1pt]{\csname text#1\endcsname}{..}}
\usepackage[version=3]{mhchem}
%%%%%%%%%%%%%%%%% TIKZ DOTS
\makeatletter % from: https://tex.stackexchange.com/a/101263/134144
\tikzset{
dot diameter/.store in=\dot@diameter,
dot diameter=1pt,
dot spacing/.store in=\dot@spacing,
dot spacing=5.5pt,
dots/.style={
line width=\dot@diameter,
line cap=round,
dash pattern=on 0pt off \dot@spacing
}
}
\makeatother
%%%%%%%%% TIKZ RED collor
\def\RED{\gdef\printatom##1{\color{red}\ensuremath{\mathrm{##1}}}}
\def\BLACK{\gdef\printatom##1{\color{black}\ensuremath{\mathrm{##1}}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{epstopdf}
\usepackage[]{natbib}
%\usepackage{breakurl}
\makelosymbols
\makeloabbreviations
\usepackage{scalerel,amssymb}
\def\mcirc{\mathbin{\scalerel*{\bigcirc}{t}}}
\def\msquare{\mathord{\scalerel*{\Box}{gX}}}
%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{fancyhdr}
% Define o estilo de página "mainmatterstyle"
\fancypagestyle{mainmatterstyle}{
\fancyhf{} % Limpa os cabeçalhos e rodapés anteriores
\fancyhead[RO]{\nouppercase{\rightmark}} % Capítulos e seções à direita
\fancyfoot[C]{\thepage} % Número da página no rodapé
\renewcommand{\headrulewidth}{0.4pt} % Espessura da linha do cabeçalho
\renewcommand{\footrulewidth}{0pt} % Sem linha no rodapé
}
\fancypagestyle{encerrado}{
\fancyhf{} % Limpa os cabeçalhos e rodapés
\fancyfoot[C]{\thepage} % Número da página no rodapé
\renewcommand{\headrulewidth}{0pt} % Sem linha no cabeçalho
\renewcommand{\footrulewidth}{0pt} % Sem linha no rodapé
}
答案1
使用英国英语的模式
\documentclass{article}
\usepackage[british]{babel}
\showhyphens{differences characteristics}
\begin{document}
\end{document}
节目
dif-fer-ences char-ac-ter-ist-ics
使用(默认)美国英语
\documentclass{article}
\usepackage[american]{babel}
\showhyphens{differences characteristics}
\begin{document}
\end{document}
你得到
dif-fer-ences char-ac-ter-is-tics
因此断点略有不同,但您所展示的断点在两种变体中都是有效的。