2017-08-14 22:19:54 +02:00
|
|
|
\PassOptionsToPackage{unicode=true}{hyperref} % options for packages loaded elsewhere
|
|
|
|
\PassOptionsToPackage{hyphens}{url}
|
|
|
|
%
|
2015-10-17 14:48:42 +02:00
|
|
|
\documentclass[english,]{article}
|
|
|
|
\usepackage{lmodern}
|
|
|
|
\usepackage{amssymb,amsmath}
|
|
|
|
\usepackage{ifxetex,ifluatex}
|
|
|
|
\usepackage{fixltx2e} % provides \textsubscript
|
|
|
|
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
|
|
|
|
\usepackage[T1]{fontenc}
|
|
|
|
\usepackage[utf8]{inputenc}
|
2017-09-08 23:17:31 +02:00
|
|
|
\usepackage{textcomp} % provides euro and other symbols
|
2015-10-17 14:48:42 +02:00
|
|
|
\else % if luatex or xelatex
|
2017-02-06 10:50:36 +01:00
|
|
|
\usepackage{unicode-math}
|
2015-10-20 08:06:33 +02:00
|
|
|
\defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}
|
2015-10-17 14:48:42 +02:00
|
|
|
\fi
|
|
|
|
% use upquote if available, for straight quotes in verbatim environments
|
|
|
|
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
|
|
|
|
% use microtype if available
|
|
|
|
\IfFileExists{microtype.sty}{%
|
2017-01-04 05:53:17 +01:00
|
|
|
\usepackage[]{microtype}
|
2015-10-17 14:48:42 +02:00
|
|
|
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
|
|
|
|
}{}
|
2018-12-11 19:22:31 +01:00
|
|
|
\@ifundefined{KOMAClassName}{%
|
|
|
|
\IfFileExists{parskip.sty}{%
|
|
|
|
\usepackage{parskip}
|
|
|
|
}{% else
|
|
|
|
\setlength{\parindent}{0pt}
|
|
|
|
\setlength{\parskip}{6pt plus 2pt minus 1pt}
|
|
|
|
}}{\KOMAoptions{parskip=half}}
|
2017-08-14 22:19:54 +02:00
|
|
|
\usepackage{hyperref}
|
2016-06-07 19:08:49 +02:00
|
|
|
\hypersetup{
|
2015-11-13 01:09:41 +01:00
|
|
|
pdfborder={0 0 0},
|
|
|
|
breaklinks=true}
|
2015-10-17 14:48:42 +02:00
|
|
|
\urlstyle{same} % don't use monospace font for urls
|
2017-05-18 22:46:58 +02:00
|
|
|
\setlength{\emergencystretch}{3em} % prevent overfull lines
|
|
|
|
\providecommand{\tightlist}{%
|
|
|
|
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
|
|
|
|
\setcounter{secnumdepth}{0}
|
|
|
|
% Redefines (sub)paragraphs to behave more like sections
|
|
|
|
\ifx\paragraph\undefined\else
|
|
|
|
\let\oldparagraph\paragraph
|
|
|
|
\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
|
|
|
|
\fi
|
|
|
|
\ifx\subparagraph\undefined\else
|
|
|
|
\let\oldsubparagraph\subparagraph
|
|
|
|
\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
|
|
|
|
\fi
|
2017-09-08 07:16:23 +02:00
|
|
|
|
|
|
|
% set default figure placement to htbp
|
|
|
|
\makeatletter
|
|
|
|
\def\fps@figure{htbp}
|
|
|
|
\makeatother
|
|
|
|
|
2015-10-17 14:48:42 +02:00
|
|
|
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
|
2016-03-31 03:51:23 +02:00
|
|
|
\usepackage[shorthands=off,ngerman,british,nswissgerman,spanish,french,main=english]{babel}
|
2015-10-17 14:48:42 +02:00
|
|
|
\newcommand{\textgerman}[2][]{\foreignlanguage{ngerman}{#2}}
|
2016-02-19 10:10:12 +01:00
|
|
|
\newenvironment{german}[2][]{\begin{otherlanguage}{ngerman}}{\end{otherlanguage}}
|
2015-10-17 14:48:42 +02:00
|
|
|
\newcommand{\textenglish}[2][]{\foreignlanguage{british}{#2}}
|
2016-02-19 10:10:12 +01:00
|
|
|
\newenvironment{english}[2][]{\begin{otherlanguage}{british}}{\end{otherlanguage}}
|
2015-10-17 14:48:42 +02:00
|
|
|
\let\oritextspanish\textspanish
|
|
|
|
\AddBabelHook{spanish}{beforeextras}{\renewcommand{\textspanish}{\oritextspanish}}
|
|
|
|
\AddBabelHook{spanish}{afterextras}{\renewcommand{\textspanish}[2][]{\foreignlanguage{spanish}{##2}}}
|
|
|
|
\newcommand{\textfrench}[2][]{\foreignlanguage{french}{#2}}
|
2016-02-19 10:10:12 +01:00
|
|
|
\newenvironment{french}[2][]{\begin{otherlanguage}{french}}{\end{otherlanguage}}
|
2015-10-17 14:48:42 +02:00
|
|
|
\else
|
2017-05-18 22:46:58 +02:00
|
|
|
% load polyglossia as late as possible as it *could* call bidi if RTL lang (e.g. Hebrew or Arabic)
|
2015-10-17 14:48:42 +02:00
|
|
|
\usepackage{polyglossia}
|
|
|
|
\setmainlanguage[]{english}
|
|
|
|
\setotherlanguage[]{german}
|
|
|
|
\setotherlanguage[variant=british]{english}
|
|
|
|
\setotherlanguage[variant=swiss]{german}
|
|
|
|
\setotherlanguage[]{spanish}
|
|
|
|
\setotherlanguage[]{french}
|
|
|
|
\fi
|
|
|
|
\ifxetex
|
|
|
|
% load bidi as late as possible as it modifies e.g. graphicx
|
2018-03-18 04:20:57 +01:00
|
|
|
\usepackage{bidi}
|
|
|
|
\fi
|
2015-10-17 14:48:42 +02:00
|
|
|
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
|
|
|
|
\TeXXeTstate=1
|
|
|
|
\newcommand{\RL}[1]{\beginR #1\endR}
|
|
|
|
\newcommand{\LR}[1]{\beginL #1\endL}
|
|
|
|
\newenvironment{RTL}{\beginR}{\endR}
|
|
|
|
\newenvironment{LTR}{\beginL}{\endL}
|
|
|
|
\fi
|
|
|
|
|
|
|
|
\date{}
|
|
|
|
|
|
|
|
\begin{document}
|
|
|
|
|
2017-03-01 21:38:28 +01:00
|
|
|
\hypertarget{empty-divs-and-spans}{%
|
|
|
|
\section{Empty Divs and Spans}\label{empty-divs-and-spans}}
|
2015-10-17 14:48:42 +02:00
|
|
|
|
|
|
|
Some text and
|
|
|
|
|
|
|
|
div contents
|
|
|
|
|
|
|
|
and more text.
|
|
|
|
|
2016-01-09 21:16:24 +01:00
|
|
|
Next paragraph with a {span} and a word-thatincludesa{span}right?
|
2015-10-17 14:48:42 +02:00
|
|
|
|
2017-03-01 21:38:28 +01:00
|
|
|
\hypertarget{directionality}{%
|
|
|
|
\section{Directionality}\label{directionality}}
|
2015-10-17 14:48:42 +02:00
|
|
|
|
|
|
|
Some text and
|
|
|
|
|
|
|
|
\begin{RTL}
|
|
|
|
rtl div contents
|
|
|
|
\end{RTL}
|
|
|
|
|
|
|
|
and more text.
|
|
|
|
|
|
|
|
\begin{LTR}
|
|
|
|
and a ltr div. with a \RL{rtl span}.
|
|
|
|
\end{LTR}
|
|
|
|
|
|
|
|
Next paragraph with a \RL{rtl span} and a
|
|
|
|
word-that-includesa\LR{ltrspan}right?
|
|
|
|
|
2017-03-01 21:38:28 +01:00
|
|
|
\hypertarget{languages}{%
|
|
|
|
\section{Languages}\label{languages}}
|
2015-10-17 14:48:42 +02:00
|
|
|
|
|
|
|
Some text and
|
|
|
|
|
|
|
|
\begin{german}
|
|
|
|
|
|
|
|
German div contents
|
|
|
|
|
|
|
|
\end{german}
|
|
|
|
|
|
|
|
and more text.
|
|
|
|
|
|
|
|
Next paragraph with a \textenglish[variant=british]{British span} and a
|
|
|
|
word-that-includesa\textgerman[variant=swiss]{Swiss German span}right?
|
|
|
|
|
|
|
|
Some \textspanish{Spanish text}.
|
|
|
|
|
2017-03-01 21:38:28 +01:00
|
|
|
\hypertarget{combined}{%
|
|
|
|
\section{Combined}\label{combined}}
|
2015-10-17 14:48:42 +02:00
|
|
|
|
|
|
|
Some text and
|
|
|
|
|
|
|
|
\begin{RTL}
|
|
|
|
\begin{french}
|
|
|
|
|
|
|
|
French rtl div contents
|
|
|
|
|
|
|
|
\end{french}
|
|
|
|
\end{RTL}
|
|
|
|
|
|
|
|
and more text.
|
|
|
|
|
|
|
|
Next paragraph with a \LR{\textenglish[variant=british]{British ltr
|
|
|
|
span}} and a word-that-includesa\LR{\textgerman[variant=swiss]{Swiss
|
|
|
|
German ltr span}}right?
|
|
|
|
|
|
|
|
\end{document}
|