
\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[a4paper]{geometry}
\geometry{top=10mm, bottom=10mm, left=10mm, right=10mm}
\geometry{showframe}
\usepackage{courier}
\usepackage[T1]{fontenc}
\usepackage{cals}
\makeatletter
\begin{document}
%\renewcommand*\familydefault{\sfdefault}
\renewcommand*\familydefault{\ttdefault}
\normalfont
\begin{calstable}
\colwidths{
{15pt}
{10pt}
{515.60239pt}
}
\cals@paddingL=1pt
\cals@paddingR=1pt
\def\cals@borderT{0.2pt}
\def\cals@borderB{0.2pt}
\def\cals@borderL{0.2pt}
\def\cals@borderR{0.2pt}
\brow
\alignR \cell{\strut E}
\alignC \cell{\strut =}
\alignL \cell{\strut this is the english text, this is the english text, this is the english text, this is the english text, this is the english text, this is the english text, this is the english text}
\erow
\end{calstable}
Why doesn't the text break in the rigth place? In case of using sfdeault, it's good.
\end{document}
답변1
이는 다음과 유사합니다.긴 \texttt 섹션을 나누는 방법. 기본적으로 tt
글꼴에는 확장 가능한 단어 간 공백이 없으므로 줄 바꿈을 선택할 때 TeX가 조작할 공간이 많지 않습니다. 약간의 신축성을 추가하면 줄 바꿈이 향상됩니다.
\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[a4paper]{geometry}
\geometry{top=10mm, bottom=10mm, left=10mm, right=10mm}
\geometry{showframe}
\usepackage{courier}
\usepackage[T1]{fontenc}
\usepackage{cals}
\makeatletter
\newcommand*\flextt{%
\ttfamily
\fontdimen2\font=0.4em% interword space
\fontdimen3\font=0.2em% interword stretch
\fontdimen4\font=0.1em% interword shrink
\fontdimen7\font=0.1em% extra space
}
\begin{document}
\flextt
\begin{calstable}
\colwidths{
{15pt}
{10pt}
{515.60239pt}
}
\cals@paddingL=1pt
\cals@paddingR=1pt
\def\cals@borderT{0.2pt}
\def\cals@borderB{0.2pt}
\def\cals@borderL{0.2pt}
\def\cals@borderR{0.2pt}
\brow
\alignR \cell{\strut E}
\alignC \cell{\strut =}
\alignL \cell{\strut this is the english text, this is the english text, this is the english text, this is the english text, this is the english text, this is the english text, this is the english text}
\erow
\end{calstable}
Why doesn't the text break in the rigth place? In case of using sfdeault, it's good.
\end{document}
답변2
글꼴 의 단어를 분리하는 것은 항상 큰 일입니다 tt
.
다음 환경을 사용해 볼 수 있습니다 sloppypar
.
\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[a4paper]{geometry}
\geometry{top=10mm, bottom=10mm, left=10mm, right=10mm}
\geometry{showframe}
\usepackage{courier}
\usepackage[T1]{fontenc}
\usepackage{cals}
\makeatletter
\begin{document}
%\renewcommand*\familydefault{\sfdefault}
\renewcommand*\familydefault{\ttdefault}
\normalfont
\begin{calstable}
\colwidths{
{15pt}
{10pt}
{515.50239pt}
}
\cals@paddingL=1pt
\cals@paddingR=1pt
\def\cals@borderT{0.2pt}
\def\cals@borderB{0.2pt}
\def\cals@borderL{0.2pt}
\def\cals@borderR{0.2pt}
\brow
\alignR \cell{\strut E}
\alignC \cell{\strut =}
\alignL \cell{\begin{sloppypar}\strut this is the english text, this is the english text,
this is the english text, this is the english text, this is the english text,
this is the english text, this is the english text\end{sloppypar}}
\erow
\end{calstable}
Why doesn't the text break in the rigth place? In case of using sfdeault, it's good.
\end{document}
산출: