Skip to content

Commit

Permalink
First shot for using selnolig and autotype
Browse files Browse the repository at this point in the history
  • Loading branch information
koppor committed Jan 7, 2025
1 parent 70526a1 commit f690fe8
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Use `autotype` For Ligature Correction for German Documents

## Context and Problem Statement

Ligatures can be typeset wrongly.

## Considered Options

* [`autotype`](https://ctan.org/pkg/autotype)
* [`ligtype`](https://ctan.org/pkg/ligtype)
* [`selnolig`](https://ctan.org/pkg/selnolig)

## Decision Outcome

Chosen option: "`autotype`", because has more features and seems to be more maintained.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Use `autotype` For Ligature Correction for German Documents

## Context and Problem Statement

Ligatures can be typeset wrongly.

## Considered Options

* [`autotype`](https://ctan.org/pkg/autotype)
* [`ligtype`](https://ctan.org/pkg/ligtype)
* [`selnolig`](https://ctan.org/pkg/selnolig)

## Decision Outcome

Chosen option: "`selnolig`", because only package supporting ligature correction for English texts (without advanced package configuration).
4 changes: 4 additions & 0 deletions generators/app/templates/README.de.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ Kompiliere es mittels
<%
}
%>

## Features

- Gute Worttrennung und Mikrotypographie für deutsche Texte.
1 change: 1 addition & 0 deletions generators/app/templates/README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ Following features are enabled in this template:
- <% if (githubpublish) { -%>(Optional) <% } %>LaTeX compilation using the modern lualatex compiler.
<% } -%>
- Ready-to-go configuration for [latexindent].
- Proper hyphenation and microtype for English texts.
<% if (howtotext) { -%>
- Hints on writing an abstract and thesis by Dirk Fahland.
<% } -%>
Expand Down
24 changes: 24 additions & 0 deletions generators/app/templates/main.de.tex
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,19 @@
\newcommand{\hydash}{\penalty\@M-\hskip\z@skip}
% Definition of "= taken from http://mirror.ctan.org/macros/latex/contrib/babel-contrib/german/ngermanb.dtx
\makeatother
<% if ((latexcompiler == "lualatex") || (latexcompiler == "both")) { -%>

<% if (latexcompiler == "both") { -%>
\ifluatex
<% } -%>
% Enable correct rendering of ligatures - provided by https://ctan.org/pkg/autotype
% See ADR-0008 for alternatives
\usepackage{autotype}
<% if (latexcompiler == "both") { -%>
\fi
<% } -%>

<% } -%>
% correct bad hyphenation here
\hyphenation{op-tical net-works semi-conduc-tor}
<% switch (documentclass) { case "acmart": -%>
Expand Down Expand Up @@ -246,6 +258,18 @@
<% } -%>

\begin{document}
<% if ((latexcompiler == "lualatex") || (latexcompiler == "both")) { -%>
<% if (latexcompiler == "both") { -%>
\ifluatex
<% } -%>
% Enable correct rendering of ligatures - provided by https://ctan.org/pkg/autotype
% See ADR-0008 for alternatives
\autotypelangoptions{ngerman}{ligbreak}
<% if (latexcompiler == "both") { -%>
\fi
<% } -%>

<% } -%>
<% switch (documentclass) { case "lncs": -%>

\title{Paper Title}
Expand Down
15 changes: 13 additions & 2 deletions generators/app/templates/main.en.tex
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,20 @@

% Add manual adapted hyphenation of English words
% See https://ctan.org/pkg/hyphenex and https://tex.stackexchange.com/a/22892/9075 for details
% Does not work on MiKTeX, therefore disabled - issue reported at https://github.com/MiKTeX/miktex-packaging/issues/271
% \input{ushyphex}
\input{ushyphex}
<% if ((latexcompiler == "lualatex") || (latexcompiler == "both")) { -%>

<% if (latexcompiler == "both") { -%>
\ifluatex
<% } -%>
% Enable correct rendering of ligatures - provided by https://ctan.org/pkg/selnolig
% See ADR-0009 for alternatives
\usepackage{selnolig}
<% if (latexcompiler == "both") { -%>
\fi
<% } -%>

<% } -%>
% correct bad hyphenation here
\hyphenation{op-tical net-works semi-conduc-tor}
<% switch (documentclass) { case "acmart": -%>
Expand Down

0 comments on commit f690fe8

Please sign in to comment.