Norwegian Module for datetime2 Package



Similar documents
German Module for datetime2 Package

Polish Module for datetime2 Package

A style option to adapt the standard L A TEX document styles to A4 paper

Context sensitive markup for inline quotations

Teachers Team Work. At a comprehensive school in Denmark

quotmark.sty v1.0: quotation marks

Right-to-Left Language Support in EMu

12-ugers Y-Age Protokol

introduction to emarketing

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

Package tikzdevice. February 20, 2015

1 The Italian language

Integrating Secure FTP into Data Services

JasperServer Localization Guide Version 3.5

A Babel language definition file for Icelandic

1 P age. Outlook Set Up Options

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

SPELL Tabs Evaluation Version

Splitting Long Sequences of Letters (DNA, RNA, Proteins, Etc.)

vtiger CRM Database UTF-8 Configuration (For MySQL)

Configuring an External Domain

Getting Started with the Aloha Community Template for Salesforce Identity

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.

11:00 12:00 13:00 14:00 15:00 16:00

AVOIDING THE GIT OF DESPAIR

Quectel Cellular Engine

Microsoft Dynamics GP. Bank Reconciliation

Work with the Mobile Web App. Schoolwires Centricity2

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

Arbiter Frequently Asked Questions

Level 17: Creating a Puzzle Part 2

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)

ANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL I)

Module developer s tutorial

CONCEPT1 RS232 COMMUNICATION

url.sty version 3.4 Donald Arseneau

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:

Raptor K30 Gaming Software

Using the User Options Web Pages

Microsoft Dynamics CRM Security Provider Module

BackupAgent LabTech Integration Installation and Usage

Getting Started Guide

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

GroupWise to Outlook: How Do I?

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

Section 4.1 Rules of Exponents

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ε

AT&T Connect Global Reservationless Service User Guide. Version: S. March 8, 2011

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

Tax Scheme Definition and Microsoft Word

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

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

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

Changing the MAC address on a Guardium Appliance

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

ShoreTel 13 Conferencing User Guide. Part Number

Facebook Twitter YouTube Google Plus Website

Event Management Do-It-Yourself User Guide

Configuring Your Network s Security

Lingotek + Salesforce

Using Microsoft Lync for Web Conferencing, Training & Support

Parameterizing options Parameterization options based on the communication protocols used

Creating a Simple Macro

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

HelpAndManual_unregistered_evaluation_copy

Contents. Introduction

Microsoft Access Glossary of Terms

Viewing Accounts Receivable For Vendor (External Orgs) in PeopleSoft

Gephi Tutorial Visualization

Translating QueueMetrics into a new language

DIRECTORY PASSWORD V1.2 Quick Start Guide

Version USER GUIDE

Cloud Computing and Swiss government

Creating Accessible Word Forms. Contents. Introduction

ChamberMaster - QuickBooks Guide

SQL Server An Overview

IriScene Remote Manager. Version 4.8 FRACTALIA Software

Add Approval Workflow

PROJECT ON MICROSOFT ACCESS (HOME TAB AND EXTERNAL DATA TAB) SUBMITTED BY: SUBMITTED TO: NAME: ROLL NO: REGN NO: BATCH:

ProtoSphere 2.0 Administration Guide

Table of Contents. 1 Access to Awards Website 2. 2 Wine Registration Home Page 3. 3 Login 4. 4 Creating New User Account 4

OUTLOOK TIPS FOR BEGINNERS

I.S. 1 remote I/O system Redundant coupling via PROFIBUS DP

How to make the s you Send with Outlook and Exchange Appear to Originate from Different Addresses

Microsoft Outlook 2007 Calendar Features

APA BibL A TEX style

Transcription:

Norwegian Module for datetime2 Package Nicola L. C. Talbot (inactive) 2015-03-31 (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 Norwegian 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-norsk s \today. I don t know if these settings are correct as I can t speak Norwegian. In particular, I don t know if the norsk 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-norsk.ins where Name is the name of the maintainer(s) and replace the inactive status to maintained. Currently there is only a regionless style. 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{norsk-utf8}[2015/03/31 v1.0] 1

\DTMnorskordinal \DTMnorskmonthname \DTMnorskMonthname 2 \newcommand*{\dtmnorskordinal}[1]{% 3 \number#1.% 4 } Norwegian month names. 5 \newcommand*{\dtmnorskmonthname}[1]{% 6 \ifcase#1 7 \or 8 januar% 9 \or 10 februar% 11 \or 12 mars% 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 desember% 31 \fi 32 } As above but capitalize. 33 \newcommand*{\dtmnorskmonthname}[1]{% 34 \ifcase#1 35 \or 36 Januar% 37 \or 38 Februar% 39 \or 40 Mars% 41 \or 42 April% 43 \or 44 Mai% 45 \or 2

46 Juni% 47 \or 48 Juli% 49 \or 50 August% 51 \or 52 September% 53 \or 54 Oktober% 55 \or 56 November% 57 \or 58 Desember% 59 \fi 60 } If abbreviated dates are supported, short month names should be likewise provided. \DTMnorskweekdayname \DTMnorskWeekdayname Day of week names. 61 \newcommand*{\dtmnorskweekdayname}[1]{% 62 \ifcase#1 63 mandag% 64 \or 65 tirsdag% 66 \or 67 onsdag% 68 \or 69 torsdag% 70 \or 71 fredag% 72 \or 73 lørdag% 74 \or 75 søndag% 76 \fi 77 } As above but start with a capital. 78 \newcommand*{\dtmnorskweekdayname}[1]{% 79 \ifcase#1 80 Mandag% 81 \or 82 Tirsdag% 83 \or 84 Onsdag% 85 \or 86 Torsdag% 87 \or 88 Fredag% 89 \or 3

90 Lørdag% 91 \or 92 Søndag% 93 \fi 94 } 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-norskutf8.ldf file as the non-ascii characters are made active in that situation and would need protecting against expansion. Identify module 95 \ProvidesDateTimeModule{norsk-ascii}[2015/03/31 v1.0] If abbreviated dates are supported, short month names should be likewise provided. \DTMnorskordinal \DTMnorskmonthname 96 \newcommand*{\dtmnorskordinal}[1]{% 97 \number#1.% 98 } Norwegian month names. 99 \newcommand*{\dtmnorskmonthname}[1]{% 100 \ifcase#1 101 \or 102 januar% 103 \or 104 februar% 105 \or 106 mars% 107 \or 108 april% 109 \or 110 mai% 111 \or 112 juni% 113 \or 114 juli% 115 \or 116 august% 117 \or 118 september% 119 \or 120 oktober% 121 \or 122 november% 123 \or 124 desember% 4

125 \fi 126 } \DTMnorskMonthname \DTMnorskweekdayname As above but capitalize. 127 \newcommand*{\dtmnorskmonthname}[1]{% 128 \ifcase#1 129 \or 130 Januar% 131 \or 132 Februar% 133 \or 134 Mars% 135 \or 136 April% 137 \or 138 Mai% 139 \or 140 Juni% 141 \or 142 Juli% 143 \or 144 August% 145 \or 146 September% 147 \or 148 Oktober% 149 \or 150 November% 151 \or 152 Desember% 153 \fi 154 } Day of week names. 155 \newcommand*{\dtmnorskweekdayname}[1]{% 156 \ifcase#1 157 mandag% 158 \or 159 tirsdag% 160 \or 161 onsdag% 162 \or 163 torsdag% 164 \or 165 fredag% 166 \or 167 l\o rdag% 168 \or 169 s\o ndag% 170 \fi 5

171 } \DTMnorskWeekdayname As above but start with a capital. 172 \newcommand*{\dtmnorskweekdayname}[1]{% 173 \ifcase#1 174 Mandag% 175 \or 176 Tirsdag% 177 \or 178 Onsdag% 179 \or 180 Torsdag% 181 \or 182 Fredag% 183 \or 184 L\o rdag% 185 \or 186 S\o ndag% 187 \fi 188 } 1.3 Main Norwegian Module (datetime2-norsk.ldf) Identify Module 189 \ProvidesDateTimeModule{norsk}[2015/03/31 v1.0] Need to find out if XeTeX or LuaTeX are being used. 190 \RequirePackage{ifxetex,ifluatex} XeTeX and LuaTeX natively support UTF-8, so load norsk-utf8 if either of those engines are used otherwise load norsk-ascii. 191 \ifxetex 192 \RequireDateTimeModule{norsk-utf8} 193 \else 194 \ifluatex 195 \RequireDateTimeModule{norsk-utf8} 196 \else 197 \RequireDateTimeModule{norsk-ascii} 198 \fi 199 \fi Define the norsk style. The time style is the same as the default style provided by datetime2. This may need correcting. For example, if a 12 hour style similar to the englishampm (from the english-base module) is required. Allow the user a way of configuring the norsk and norsk-numeric styles. This doesn t use the package wide separators such as \dtm@datetimesep in case other date formats are also required. \DTMnorskdaymonthsep The separator between the day and month for the text format. 200 \newcommand*{\dtmnorskdaymonthsep}{% 6

201 \DTMtexorpdfstring{\protect~}{\space}% 202 } \DTMnorskmonthyearsep \DTMnorskdatetimesep \DTMnorsktimezonesep \DTMnorskdatesep \DTMnorsktimesep The separator between the month and year for the text format. 203 \newcommand*{\dtmnorskmonthyearsep}{\space} The separator between the date and time blocks in the full format (either text or numeric). 204 \newcommand*{\dtmnorskdatetimesep}{\space} The separator between the time and zone blocks in the full format (either text or numeric). 205 \newcommand*{\dtmnorsktimezonesep}{\space} The separator for the numeric date format. 206 \newcommand*{\dtmnorskdatesep}{.} The separator for the numeric time format. 207 \newcommand*{\dtmnorsktimesep}{:} Provide keys that can be used in \DTMlangsetup to set these separators. 208 \DTMdefkey{norsk}{daymonthsep}{\renewcommand*{\DTMnorskdaymonthsep}{#1}} 209 \DTMdefkey{norsk}{monthyearsep}{\renewcommand*{\DTMnorskmonthyearsep}{#1}} 210 \DTMdefkey{norsk}{datetimesep}{\renewcommand*{\DTMnorskdatetimesep}{#1}} 211 \DTMdefkey{norsk}{timezonesep}{\renewcommand*{\DTMnorsktimezonesep}{#1}} 212 \DTMdefkey{norsk}{datesep}{\renewcommand*{\DTMnorskdatesep}{#1}} 213 \DTMdefkey{norsk}{timesep}{\renewcommand*{\DTMnorsktimesep}{#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. 214 \DTMdefboolkey{norsk}{mapzone}[true]{} The default is to use mappings. 215 \DTMsetbool{norsk}{mapzone}{true} Define a boolean key that determines if the day of month should be displayed. 216 \DTMdefboolkey{norsk}{showdayofmonth}[true]{} The default is to show the day of month. 217 \DTMsetbool{norsk}{showdayofmonth}{true} Define a boolean key that determines if the year should be displayed. 218 \DTMdefboolkey{norsk}{showyear}[true]{} The default is to show the year. 219 \DTMsetbool{norsk}{showyear}{true} Define the norsk style. (TODO: implement day of week?) 220 \DTMnewstyle 221 {norsk}% label 222 {% date style 223 \renewcommand*\dtmdisplaydate[4]{% 7

224 \DTMifbool{norsk}{showdayofmonth} 225 {\DTMnorskordinal{##3}\DTMnorskdaymonthsep}% 226 {}% 227 \DTMnorskmonthname{##2}% 228 \DTMifbool{norsk}{showyear}% 229 {% 230 \DTMnorskmonthyearsep 231 \number##1 232 }% 233 {}% 234 }% 235 \renewcommand*\dtmdisplaydate[4]{% 236 \DTMifbool{norsk}{showdayofmonth} 237 {% 238 \DTMnorskordinal{##3}\DTMnorskdaymonthsep 239 \DTMnorskmonthname{##2}% 240 }% 241 {% 242 \DTMnorskMonthname{##2}% 243 }% 244 \DTMifbool{norsk}{showyear}% 245 {% 246 \DTMnorskmonthyearsep 247 \number##1 248 }% 249 {}% 250 }% 251 }% 252 {% time style (use default) 253 \DTMsettimestyle{default}% 254 }% 255 {% zone style 256 \DTMresetzones 257 \DTMnorskzonemaps 258 \renewcommand*{\dtmdisplayzone}[2]{% 259 \DTMifbool{norsk}{mapzone}% 260 {\DTMusezonemapordefault{##1}{##2}}% 261 {% 262 \ifnum##1<0\else+\fi\dtmtwodigits{##1}% 263 \ifdtmshowzoneminutes\dtmnorsktimesep\dtmtwodigits{##2}\fi 264 }% 265 }% 266 }% 267 {% full style 268 \renewcommand*{\dtmdisplay}[9]{% 269 \ifdtmshowdate 270 \DTMdisplaydate{##1}{##2}{##3}{##4}% 271 \DTMnorskdatetimesep 272 \fi 273 \DTMdisplaytime{##5}{##6}{##7}% 8

274 \ifdtmshowzone 275 \DTMnorsktimezonesep 276 \DTMdisplayzone{##8}{##9}% 277 \fi 278 }% 279 \renewcommand*{\dtmdisplay}[9]{% 280 \ifdtmshowdate 281 \DTMDisplaydate{##1}{##2}{##3}{##4}% 282 \DTMnorskdatetimesep 283 \fi 284 \DTMdisplaytime{##5}{##6}{##7}% 285 \ifdtmshowzone 286 \DTMnorsktimezonesep 287 \DTMdisplayzone{##8}{##9}% 288 \fi 289 }% 290 }% Define numeric style. 291 \DTMnewstyle 292 {norsk-numeric}% label 293 {% date style 294 \renewcommand*\dtmdisplaydate[4]{% 295 \DTMifbool{norsk}{showdayofmonth}% 296 {% 297 \number##3 % space intended 298 \DTMnorskdatesep 299 }% 300 {}% 301 \number##2 % space intended 302 \DTMifbool{norsk}{showyear}% 303 {% 304 \DTMnorskdatesep 305 \number##1 % space intended 306 }% 307 {}% 308 }% 309 \renewcommand*{\dtmdisplaydate}{\dtmdisplaydate}% 310 }% 311 {% time style 312 \renewcommand*\dtmdisplaytime[3]{% 313 \number##1 314 \DTMnorsktimesep\DTMtwodigits{##2}% 315 \ifdtmshowseconds\dtmnorsktimesep\dtmtwodigits{##3}\fi 316 }% 317 }% 318 {% zone style 319 \DTMresetzones 320 \DTMnorskzonemaps 321 \renewcommand*{\dtmdisplayzone}[2]{% 9

322 \DTMifbool{norsk}{mapzone}% 323 {\DTMusezonemapordefault{##1}{##2}}% 324 {% 325 \ifnum##1<0\else+\fi\dtmtwodigits{##1}% 326 \ifdtmshowzoneminutes\dtmnorsktimesep\dtmtwodigits{##2}\fi 327 }% 328 }% 329 }% 330 {% full style 331 \renewcommand*{\dtmdisplay}[9]{% 332 \ifdtmshowdate 333 \DTMdisplaydate{##1}{##2}{##3}{##4}% 334 \DTMnorskdatetimesep 335 \fi 336 \DTMdisplaytime{##5}{##6}{##7}% 337 \ifdtmshowzone 338 \DTMnorsktimezonesep 339 \DTMdisplayzone{##8}{##9}% 340 \fi 341 }% 342 \renewcommand*{\dtmdisplay}{\dtmdisplay}% 343 } \DTMnorskzonemaps The time zone mappings are set through this command, which can be redefined if extra mappings are required or mappings need to be removed. 344 \newcommand*{\dtmnorskzonemaps}{% 345 \DTMdefzonemap{01}{00}{CET}% 346 \DTMdefzonemap{02}{00}{CEST}% 347 } Switch style according to the useregional setting. 348 \DTMifcaseregional 349 {}% do nothing 350 {\DTMsetstyle{norsk}} 351 {\DTMsetstyle{norsk-numeric}} Redefine \datenorsk (or \date dialect ) to prevent babel from resetting \today. (For this to work, babel must already have been loaded if it s required.) 352 \ifcsundef{date\currenttrackeddialect} 353 {% 354 \ifundef\datenorsk 355 {% do nothing 356 }% 357 {% 358 \def\datenorsk{% 359 \DTMifcaseregional 360 {}% do nothing 361 {\DTMsetstyle{norsk}}% 362 {\DTMsetstyle{norsk-numeric}}% 363 }% 10

364 }% 365 }% 366 {% 367 \csdef{date\currenttrackeddialect}{% 368 \DTMifcaseregional 369 {}% do nothing 370 {\DTMsetstyle{norsk}}% 371 {\DTMsetstyle{norsk-numeric}} 372 }% 373 }% 11

Change History 1.0 General: Initial release........ 1, 4, 6 Index D \DTMnorskdatesep............. 7 \DTMnorskdatetimesep......... 7 \DTMnorskdaymonthsep......... 6 \DTMnorskMonthname.......... 2, 5 \DTMnorskmonthname.......... 2, 4 \DTMnorskmonthyearsep........ 7 \DTMnorskordinal............ 2, 4 \DTMnorsktimesep............. 7 \DTMnorsktimezonesep......... 7 \DTMnorskWeekdayname........ 3, 6 \DTMnorskweekdayname........ 3, 5 \DTMnorskzonemaps........... 10 U useregional................ 1, 10 12