German Module for datetime2 Package



Similar documents
Norwegian Module for datetime2 Package

Polish Module for datetime2 Package

Wie ist das Wetter? (What s the weather like?)

TeamViewer MSI - Installation instructions to deploy. TeamViewer to your network. Revision TeamViewer b

Context sensitive markup for inline quotations

Right-to-Left Language Support in EMu

introduction to emarketing

HP Service Manager. Software Version: 9.40 For the supported Windows and Linux operating systems. Application Setup help topics for printing

University of Victoria Department of Germanic and Slavic Studies Spring 2016: "Beginning German I (GMST 101 A01-A02)

Package tikzdevice. February 20, 2015

Integrating Secure FTP into Data Services

1 The Italian language

JasperServer Localization Guide Version 3.5

Deutsch 1020 Alexander

Internationalizing the Domain Name System. Šimon Hochla, Anisa Azis, Fara Nabilla

1 P age. Outlook Set Up Options

A Babel language definition file for Icelandic

SPELL Tabs Evaluation Version

Getting Started with the Aloha Community Template for Salesforce Identity

vtiger CRM Database UTF-8 Configuration (For MySQL)

Configuring an External Domain

An Introduction to the WEB Style of Literate Programming

Configuring Password Encryption

1 The Italian language

Configuration Guide Copyright 2013 HiPay wallet All Rights Reserved Last updated in July 2013

Knowledge Base POS/C31A Troubleshooting

Resco Mobile CRM Woodford (Rules Guide) Document version

2010 Ing. Punzenberger COPA-DATA GmbH. All rights reserved.

Quectel Cellular Engine

AVOIDING THE GIT OF DESPAIR

Translating QueueMetrics into a new language

Microsoft Dynamics GP. Bank Reconciliation

Web Apps: Using web apps to build amazing functionality without programming. I Love Web Apps. They re Awesome.

Level 17: Creating a Puzzle Part 2

MEETINGONE ONLINE ACCOUNT MANAGEMENT PORTAL ACCOUNT ADMIN USER GUIDE

Parallax Serial LCD 2 rows x 16 characters Non-backlit (#27976) 2 rows x 16 characters Backlit (#27977) 4 rows x 20 characters Backlit (#27979)

Module developer s tutorial

CONCEPT1 RS232 COMMUNICATION

TeamViewer 9 Manual MSI

DigiCert User Guide. Version 4.1

Version Control with. Ben Morgan

Managing policies. Chapter 7

CEFNS Web Hosting a Guide for CS212

The Smart Forms Web Part allows you to quickly add new forms to SharePoint pages, here s how:

Microsoft Dynamics CRM Security Provider Module

APA BibL A TEX style

Using the User Options Web Pages

Raptor K30 Gaming Software

Section 4.1 Rules of Exponents

GroupWise to Outlook: How Do I?

BackupAgent LabTech Integration Installation and Usage

QAD Business Intelligence Release Notes

How to Enable the Audit of Active Directory Objects in Windows 2008 R2 Lepide Software

Getting Started Guide

OmniTouch 8440 Messaging Software Quick Reference Guide. Messaging Services Telephone User Interface

Language considerations for developing VoiceXML in German

aims sql server installation guide

GUIDANCE ON ACCESSING THE HOUSTON METRO SECURE FTP SITE FOR DOCUMENT MANAGEMENT

Using the JNIOR with the GDC Digital Cinema Server. Last Updated November 30, 2012

Configuring Password Encryption

The gensymb package for L A TEX 2ε

Intel Entry Storage System SS4200-E Active Directory Implementation and Troubleshooting

Chapter 1: The Cochrane Library Search Tour

Using CertAgent to Obtain Domain Controller and Smart Card Logon Certificates for Active Directory Authentication

Sample- for evaluation purposes only. Advanced Crystal Reports. TeachUcomp, Inc.

Table of Contents User Guide... 1 Welcome... 4 Front End Life Blue... 5 General Navigation... 5 Menu Bar... 5 Continuous Scroll... 5 Hyperlinks...

Form And List. SuperUsers. Configuring Moderation & Feedback Management Setti. Troubleshooting: Feedback Doesn't Send

One Report, Many Languages: Using SAS Visual Analytics to Localize Your Reports

Changing the MAC address on a Guardium Appliance

ShoreTel 13 Conferencing User Guide. Part Number

Facebook Twitter YouTube Google Plus Website

Configuring Your Network s Security

Event Management Do-It-Yourself User Guide

Version of this tutorial: 1.06a (this tutorial will going to evolve with versions of NWNX4)

Lingotek + Salesforce

Using Microsoft Lync for Web Conferencing, Training & Support

Creating a Simple Macro

Parameterizing options Parameterization options based on the communication protocols used

HelpAndManual_unregistered_evaluation_copy

Contents. Introduction

Microsoft Access Glossary of Terms

Taleo Reporting And Analytics

Gephi Tutorial Visualization

Add Approval Workflow

The continuing story of Vim

DIRECTORY PASSWORD V1.2 Quick Start Guide

ChamberMaster - QuickBooks Guide

Version USER GUIDE

Reseller Panel Step-by-Step Guide

Creating Accessible Word Forms. Contents. Introduction

Transcription:

German Module for datetime2 Package Nicola L. C. Talbot (inactive) 2015-03-27 (v1.0) This module is currently unmaintained and may be subject to change. If you want to volunteer to take over maintanance, contact me at http://www. dickimaw-books.com/contact.html Abstract This is the German language module for the datetime2 package. If you want to use the settings in this module you must install it in addition to installing datetime2. If you use babel or polyglossia, you will need this module to prevent them from redefining \today. The datetime2 useregional setting must be set to text or numeric for the language styles to be set. Alternatively, you can set the style in the document using \DTMsetstyle, but this may be changed by \date language depending on the value of the useregional setting. I ve copied the date style from babel-german s \today. I don t know if these settings are correct as I can t speak German. In particular, I don t know if the german time style is correct. Currently this just uses the default time style. Please be aware that this may change. Whoever takes over maintanance of this module may can change it as appropriate. The new maintainer should add the line: The Current Maintainer of this work is Name. to the preamble part in datetime2-german.ins where Name is the name of the maintainer(s) and replace the inactive status to maintained. Currently there is only a regionless style. New maintainers may want to add regional variants such as de-de/de-de-numeric and de-at/de-at-numeric. This style currently doesn t check the showdow setting. 1 The Code 1.1 UTF-8 This file contains the settings that use UTF-8 characters. This file is loaded if XeLaTeX or LuaLaTeX are used. Please make sure your text editor is set to UTF-8 if you want to view this code. Identify module 1 \ProvidesDateTimeModule{german-utf8}[2015/03/27 v1.0] 1

\DTMgermanordinal \DTMgermanmonthname 2 \newcommand*{\dtmgermanordinal}[1]{% 3 \number#1 4 } German month names. 5 \newcommand*{\dtmgermanmonthname}[1]{% 6 \ifcase#1 7 \or 8 Januar% 9 \or 10 Februar% 11 \or 12 März% 13 \or 14 April% 15 \or 16 Mai% 17 \or 18 Juni% 19 \or 20 Juli% 21 \or 22 August% 23 \or 24 September% 25 \or 26 Oktober% 27 \or 28 November% 29 \or 30 Dezember% 31 \fi 32 } If abbreviated dates are supported, short month names should be likewise provided. \DTMgermanweekdayname These are provided here but not currently used in the date format. 33 \newcommand*{\dtmgermanweekdayname}[1]{% 34 \ifcase#1 35 Montag% 36 \or 37 Dienstag% 38 \or 39 Mittwoch% 40 \or 41 Donnerstag% 42 \or 2

43 Freitag% 44 \or 45 Samstag% 46 \or 47 Sonntag% 48 \fi 49 } 1.2 ASCII This file contains the settings that use L A TEX commands for non-ascii characters. This should be input if neither XeLaTeX nor LuaLaTeX are used. Even if the user has loaded inputenc with utf8, this file should still be used not the datetime2-german-utf8.ldf file as the non-ascii characters are made active in that situation and would need protecting against expansion. Identify module 50 \ProvidesDateTimeModule{german-ascii}[2015/03/27 v1.0] If abbreviated dates are supported, short month names should be likewise provided. \DTMgermanordinal \DTMgermanmonthname 51 \newcommand*{\dtmgermanordinal}[1]{% 52 \number#1 53 } German month names. 54 \newcommand*{\dtmgermanmonthname}[1]{% 55 \ifcase#1 56 \or 57 Januar% 58 \or 59 Februar% 60 \or 61 M\protect\"arz% 62 \or 63 April% 64 \or 65 Mai% 66 \or 67 Juni% 68 \or 69 Juli% 70 \or 71 August% 72 \or 73 September% 74 \or 75 Oktober% 76 \or 3

77 November% 78 \or 79 Dezember% 80 \fi 81 } \DTMgermanweekdayname These are provided here but not currently used in the date format. 82 \newcommand*{\dtmgermanweekdayname}[1]{% 83 \ifcase#1 84 Montag% 85 \or 86 Dienstag% 87 \or 88 Mittwoch% 89 \or 90 Donnerstag% 91 \or 92 Freitag% 93 \or 94 Samstag% 95 \or 96 Sonntag% 97 \fi 98 } 1.3 Main German Module (datetime2-german.ldf) Identify Module 99 \ProvidesDateTimeModule{german}[2015/03/27 v1.0] Need to find out if XeTeX or LuaTeX are being used. 100 \RequirePackage{ifxetex,ifluatex} XeTeX and LuaTeX natively support UTF-8, so load german-utf8 if either of those engines are used otherwise load german-ascii. 101 \ifxetex 102 \RequireDateTimeModule{german-utf8} 103 \else 104 \ifluatex 105 \RequireDateTimeModule{german-utf8} 106 \else 107 \RequireDateTimeModule{german-ascii} 108 \fi 109 \fi Define the german style. The time style is the same as the default style provided by datetime2. This may need correcting. Allow the user a way of configuring the german and german-numeric styles. This doesn t use the package wide separators such as \dtm@datetimesep in case other date formats are also required. 4

\DTMgermandaymonthsep The separator between the day and month for the text format. 110 \newcommand*{\dtmgermandaymonthsep}{.\dtmtexorpdfstring{\protect~}{\space}} \DTMgermanmonthyearsep \DTMgermandatetimesep \DTMgermantimezonesep \DTMgermandatesep \DTMgermantimesep The separator between the month and year for the text format. 111 \newcommand*{\dtmgermanmonthyearsep}{\space} The separator between the date and time blocks in the full format (either text or numeric). 112 \newcommand*{\dtmgermandatetimesep}{\space} The separator between the time and zone blocks in the full format (either text or numeric). 113 \newcommand*{\dtmgermantimezonesep}{\space} The separator for the numeric date format. 114 \newcommand*{\dtmgermandatesep}{/} The separator for the numeric time format. 115 \newcommand*{\dtmgermantimesep}{:} Provide keys that can be used in \DTMlangsetup to set these separators. 116 \DTMdefkey{german}{daymonthsep}{\renewcommand*{\DTMgermandaymonthsep}{#1}} 117 \DTMdefkey{german}{monthyearsep}{\renewcommand*{\DTMgermanmonthyearsep}{#1}} 118 \DTMdefkey{german}{datetimesep}{\renewcommand*{\DTMgermandatetimesep}{#1}} 119 \DTMdefkey{german}{timezonesep}{\renewcommand*{\DTMgermantimezonesep}{#1}} 120 \DTMdefkey{german}{datesep}{\renewcommand*{\DTMgermandatesep}{#1}} 121 \DTMdefkey{german}{timesep}{\renewcommand*{\DTMgermantimesep}{#1}} TODO: provide a boolean key to switch between full and abbreviated formats if appropriate. (I don t know how the date should be abbreviated.) Define a boolean key that determines if the time zone mappings should be used. 122 \DTMdefboolkey{german}{mapzone}[true]{} The default is to use mappings. 123 \DTMsetbool{german}{mapzone}{true} Define a boolean key that determines if the day of month should be displayed. 124 \DTMdefboolkey{german}{showdayofmonth}[true]{} The default is to show the day of month. 125 \DTMsetbool{german}{showdayofmonth}{true} Define a boolean key that determines if the year should be displayed. 126 \DTMdefboolkey{german}{showyear}[true]{} The default is to show the year. 127 \DTMsetbool{german}{showyear}{true} 5

Define the german style. (TODO: implement day of week?) 128 \DTMnewstyle 129 {german}% label 130 {% date style 131 \renewcommand*\dtmdisplaydate[4]{% 132 \DTMifbool{german}{showdayofmonth} 133 {\DTMgermanordinal{##3}\DTMgermandaymonthsep}% 134 {}% 135 \DTMgermanmonthname{##2}% 136 \DTMifbool{german}{showyear}% 137 {% 138 \DTMgermanmonthyearsep 139 \number##1 % space intended 140 }% 141 {}% 142 }% 143 \renewcommand*\dtmdisplaydate[4]{% 144 \DTMifbool{german}{showdayofmonth} 145 {% 146 \DTMgermanordinal{##3}\DTMgermandaymonthsep 147 \DTMgermanMonthname{##2}% 148 }% 149 {\DTMgermanMonthname{##2}}% 150 \DTMifbool{german}{showyear}% 151 {% 152 \DTMgermanmonthyearsep 153 \number##1 % space intended 154 }% 155 {}% 156 }% 157 }% 158 {% time style (use default) 159 \DTMsettimestyle{default}% 160 }% 161 {% zone style 162 \DTMresetzones 163 \DTMgermanzonemaps 164 \renewcommand*{\dtmdisplayzone}[2]{% 165 \DTMifbool{german}{mapzone}% 166 {\DTMusezonemapordefault{##1}{##2}}% 167 {% 168 \ifnum##1<0\else+\fi\dtmtwodigits{##1}% 169 \ifdtmshowzoneminutes\dtmgermantimesep\dtmtwodigits{##2}\fi 170 }% 171 }% 172 }% 173 {% full style 174 \renewcommand*{\dtmdisplay}[9]{% 175 \ifdtmshowdate 6

176 \DTMdisplaydate{##1}{##2}{##3}{##4}% 177 \DTMgermandatetimesep 178 \fi 179 \DTMdisplaytime{##5}{##6}{##7}% 180 \ifdtmshowzone 181 \DTMgermantimezonesep 182 \DTMdisplayzone{##8}{##9}% 183 \fi 184 }% 185 \renewcommand*{\dtmdisplay}[9]{% 186 \ifdtmshowdate 187 \DTMDisplaydate{##1}{##2}{##3}{##4}% 188 \DTMgermandatetimesep 189 \fi 190 \DTMdisplaytime{##5}{##6}{##7}% 191 \ifdtmshowzone 192 \DTMgermantimezonesep 193 \DTMdisplayzone{##8}{##9}% 194 \fi 195 }% 196 }% Define numeric style. 197 \DTMnewstyle 198 {german-numeric}% label 199 {% date style 200 \renewcommand*\dtmdisplaydate[4]{% 201 \DTMifbool{german}{showdayofmonth}% 202 {% 203 \number##3 % space intended 204 \DTMgermandatesep 205 }% 206 {}% 207 \number##2 % space intended 208 \DTMifbool{german}{showyear}% 209 {% 210 \DTMgermandatesep 211 \number##1 % space intended 212 }% 213 {}% 214 }% 215 \renewcommand*{\dtmdisplaydate}[4]{\dtmdisplaydate{##1}{##2}{##3}{##4}}% 216 }% 217 {% time style 218 \renewcommand*\dtmdisplaytime[3]{% 219 \number##1 220 \DTMgermantimesep\DTMtwodigits{##2}% 221 \ifdtmshowseconds\dtmgermantimesep\dtmtwodigits{##3}\fi 222 }% 223 }% 7

\DTMgermanzonemaps 224 {% zone style 225 \DTMresetzones 226 \DTMgermanzonemaps 227 \renewcommand*{\dtmdisplayzone}[2]{% 228 \DTMifbool{german}{mapzone}% 229 {\DTMusezonemapordefault{##1}{##2}}% 230 {% 231 \ifnum##1<0\else+\fi\dtmtwodigits{##1}% 232 \ifdtmshowzoneminutes\dtmgermantimesep\dtmtwodigits{##2}\fi 233 }% 234 }% 235 }% 236 {% full style 237 \renewcommand*{\dtmdisplay}[9]{% 238 \ifdtmshowdate 239 \DTMdisplaydate{##1}{##2}{##3}{##4}% 240 \DTMgermandatetimesep 241 \fi 242 \DTMdisplaytime{##5}{##6}{##7}% 243 \ifdtmshowzone 244 \DTMgermantimezonesep 245 \DTMdisplayzone{##8}{##9}% 246 \fi 247 }% 248 \renewcommand*{\dtmdisplay}{\dtmdisplay}% 249 } The time zone mappings are set through this command, which can be redefined if extra mappings are required or mappings need to be removed. 250 \newcommand*{\dtmgermanzonemaps}{% 251 \DTMdefzonemap{01}{00}{CET}% 252 \DTMdefzonemap{02}{00}{CEST}% 253 } Switch style according to the useregional setting. 254 \DTMifcaseregional 255 {}% do nothing 256 {\DTMsetstyle{german}} 257 {\DTMsetstyle{german-numeric}} Redefine \dategerman (or \date dialect ) to prevent babel from resetting \today. (For this to work, babel must already have been loaded if it s required.) 258 \ifcsundef{date\currenttrackeddialect} 259 {% 260 \ifundef\dategerman 261 {% do nothing 262 }% 263 {% 264 \def\dategerman{% 265 \DTMifcaseregional 8

266 {}% do nothing 267 {\DTMsetstyle{german}}% 268 {\DTMsetstyle{german-numeric}}% 269 }% 270 }% 271 }% 272 {% 273 \csdef{date\currenttrackeddialect}{% 274 \DTMifcaseregional 275 {}% do nothing 276 {\DTMsetstyle{german}}% 277 {\DTMsetstyle{german-numeric}} 278 }% 279 }% 9

Change History 1.0 General: Initial release..... 1, 3, 4 Index D \DTMgermandatesep............. 5 \DTMgermandatetimesep.......... 5 \DTMgermandaymonthsep.......... 5 \DTMgermanmonthname.......... 2, 3 \DTMgermanmonthyearsep......... 5 \DTMgermanordinal........... 2, 3 \DTMgermantimesep............. 5 \DTMgermantimezonesep.......... 5 \DTMgermanweekdayname........ 2, 4 \DTMgermanzonemaps............. 8 S showdow...................... 1 U useregional................. 1, 8 10