From 8561ad35065fb81d1c5f3ad19c3738c303173dc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Tue, 12 May 2020 03:10:32 +0200 Subject: [PATCH] migrate work to latex --- .drone.yml | 23 + .gitignore | 98 + .project | 17 + .settings/org.eclipse.core.resources.prefs | 2 + .texlipse | 14 + .travis.yml | 24 + README.md | 8 + pdf/.gitignore | 2 + src/.kile/thesis.kilepr.gui | 240 + src/Makefile | 68 + src/bib/mybib.bib | 402 ++ src/content/beggining.tex | 67 + src/content/work.tex | 132 + src/figures/architecture-simple.png | Bin 0 -> 32455 bytes src/figures/bme_logo.pdf | Bin 0 -> 20185 bytes src/figures/convert.cmd | 7 + src/huplain.bst | 1910 +++++++ src/include/declaration.tex | 32 + src/include/guideline.tex | 54 + src/include/onlab-variables.tex | 77 + src/include/packages.tex | 73 + src/include/preamble.tex | 125 + src/include/project.tex | 10 + src/include/tdk-variables.tex | 11 + src/include/thesis-en.tex | 57 + src/include/thesis-hu.tex | 46 + src/include/titlepage-otdk.tex | 58 + src/include/titlepage-tdk.tex | 32 + src/include/titlepage-tmit.tex | 47 + src/include/titlepage.tex | 33 + src/lua/language.dat.lua | 731 +++ src/magyar.ldf | 5801 ++++++++++++++++++++ src/thesis.kilepr | 85 + src/thesis.tex | 110 + 34 files changed, 10396 insertions(+) create mode 100644 .drone.yml create mode 100644 .gitignore create mode 100644 .project create mode 100644 .settings/org.eclipse.core.resources.prefs create mode 100644 .texlipse create mode 100644 .travis.yml create mode 100644 README.md create mode 100644 pdf/.gitignore create mode 100644 src/.kile/thesis.kilepr.gui create mode 100755 src/Makefile create mode 100644 src/bib/mybib.bib create mode 100644 src/content/beggining.tex create mode 100644 src/content/work.tex create mode 100644 src/figures/architecture-simple.png create mode 100644 src/figures/bme_logo.pdf create mode 100644 src/figures/convert.cmd create mode 100644 src/huplain.bst create mode 100644 src/include/declaration.tex create mode 100644 src/include/guideline.tex create mode 100644 src/include/onlab-variables.tex create mode 100644 src/include/packages.tex create mode 100644 src/include/preamble.tex create mode 100644 src/include/project.tex create mode 100644 src/include/tdk-variables.tex create mode 100644 src/include/thesis-en.tex create mode 100644 src/include/thesis-hu.tex create mode 100644 src/include/titlepage-otdk.tex create mode 100644 src/include/titlepage-tdk.tex create mode 100644 src/include/titlepage-tmit.tex create mode 100644 src/include/titlepage.tex create mode 100644 src/lua/language.dat.lua create mode 100644 src/magyar.ldf create mode 100644 src/thesis.kilepr create mode 100644 src/thesis.tex diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..975261f --- /dev/null +++ b/.drone.yml @@ -0,0 +1,23 @@ +kind: pipeline +type: docker +name: default + +steps: +- name: build + image: moss/xelatex + commands: + - cd src + - make + - cd .. + +- name: gitea_release + image: plugins/gitea-release + settings: + api_key: + from_secret: GITEA_APIKEY + base_url: https://git.kmlabz.com + files: pdf/* + when: + event: tag + checksum: + - sha512 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..13d7e50 --- /dev/null +++ b/.gitignore @@ -0,0 +1,98 @@ +thesis.pdf +thesis-pdflatex*.pdf +thesis-xelatex*.pdf +thesis-lualatex*.pdf + +## Core latex/pdflatex auxiliary files: +*.aux +*.lof +*.log +*.lot +*.fls +*.out +*.toc + +## Intermediate documents: +*.dvi +# these rules might exclude image files for figures etc. +*.ps +*.eps +#*.pdf + +## Bibliography auxiliary files (bibtex/biblatex/biber): +*.bbl +*.bcf +*.blg +*-blx.aux +*-blx.bib +*.run.xml + +## Build tool auxiliary files: +*.fdb_latexmk +*.synctex.gz +*.synctex.gz(busy) +*.pdfsync + +## Auxiliary and intermediate files from other packages: + +# algorithms +*.alg +*.loa + +# amsthm +*.thm + +# beamer +*.nav +*.snm +*.vrb + +# glossaries +*.acn +*.acr +*.glg +*.glo +*.gls + +# hyperref +*.brf + +# listings +*.lol + +# makeidx +*.idx +*.ilg +*.ind +*.ist + +# minitoc +*.maf +*.mtc +*.mtc0 + +# minted +*.pyg + +# nomencl +*.nlo + +# sagetex +*.sagetex.sage +*.sagetex.py +*.sagetex.scmd + +# sympy +*.sout +*.sympy +sympy-plots-for-*.tex/ + +# todonotes +*.tdo + +# xindy +*.xdy +/tmp +/out + +*.bib~* diff --git a/.project b/.project new file mode 100644 index 0000000..4a197ff --- /dev/null +++ b/.project @@ -0,0 +1,17 @@ + + + diploma + + + + + + net.sourceforge.texlipse.builder.TexlipseBuilder + + + + + + net.sourceforge.texlipse.builder.TexlipseNature + + diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..6d65655 --- /dev/null +++ b/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=utf-8 diff --git a/.texlipse b/.texlipse new file mode 100644 index 0000000..8542bd0 --- /dev/null +++ b/.texlipse @@ -0,0 +1,14 @@ +#TeXlipse project settings +#Thu Aug 14 18:19:20 CEST 2014 +markTmpDer=true +builderNum=2 +outputDir=pdf +makeIndSty= +bibrefDir= +outputFormat=pdf +tempDir=tmp +mainTexFile=diploma.tex +outputFile=diploma.pdf +langSpell=hu +markDer=true +srcDir=src diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..9b0a1af --- /dev/null +++ b/.travis.yml @@ -0,0 +1,24 @@ +os: linux +dist: bionic +language: shell +addons: + apt: + packages: + - texlive-fonts-recommended + - texlive-latex-extra + - texlive-fonts-extra + - dvipng + - texlive-latex-recommended + - texlive-xetex +before_script: +- cd src +script: +- make +before_deploy: +- cd .. +deploy: + provider: releases + token: $GITHUB_KEY + file: + - pdf/thesis.pdf + skip_cleanup: true diff --git a/README.md b/README.md new file mode 100644 index 0000000..a4baa30 --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +# knative-report-latex +2019 Szakdolgozat Latex + +[![Build Status](https://travis-ci.com/tormachris/knative-report-latex.svg?branch=master)](https://travis-ci.com/tormachris/knative-report-latex) + +Drone: + +[![Build Status](https://drone.kmlabz.com/api/badges/tormakris/knative-report-latex/status.svg)](https://drone.kmlabz.com/tormakris/knative-report-latex) diff --git a/pdf/.gitignore b/pdf/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/pdf/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/src/.kile/thesis.kilepr.gui b/src/.kile/thesis.kilepr.gui new file mode 100644 index 0000000..f62c6c9 --- /dev/null +++ b/src/.kile/thesis.kilepr.gui @@ -0,0 +1,240 @@ +[General] +kile_livePreviewEnabled=true +kile_livePreviewStatusUserSpecified=true +kile_livePreviewTool=LivePreview-XeLaTeX +lastDocument=content/results.tex + +[document-settings,item:../../thesis-template-latex/src/thesis.tex] +Bookmarks= +Encoding=UTF-8 +Highlighting=LaTeX +Highlighting Set By User=false +Indentation Mode=normal +Mode=LaTeX +Mode Set By User=false + +[document-settings,item:content/abstract.tex] +Bookmarks= +Encoding=UTF-8 +Highlighting=LaTeX +Highlighting Set By User=false +Indentation Mode=normal +Mode=LaTeX +Mode Set By User=false + +[document-settings,item:content/acknowledgement.tex] +Bookmarks= +Encoding=UTF-8 +Highlighting=LaTeX +Highlighting Set By User=false +Indentation Mode=normal +Mode=LaTeX +Mode Set By User=false + +[document-settings,item:content/appendices.tex] +Bookmarks= +Encoding=UTF-8 +Highlighting=LaTeX +Highlighting Set By User=false +Indentation Mode=normal +Mode=LaTeX +Mode Set By User=false + +[document-settings,item:content/closing.tex] +Bookmarks= +Encoding=UTF-8 +Highlighting=LaTeX +Highlighting Set By User=false +Indentation Mode=normal +Mode=LaTeX +Mode Set By User=false + +[document-settings,item:content/create-functions.tex] +Bookmarks= +Encoding=UTF-8 +Highlighting=LaTeX +Highlighting Set By User=false +Indentation Mode=normal +Mode=LaTeX +Mode Set By User=false + +[document-settings,item:content/introduction.tex] +Bookmarks= +Encoding=UTF-8 +Highlighting=LaTeX +Highlighting Set By User=false +Indentation Mode=normal +Mode=LaTeX +Mode Set By User=false + +[document-settings,item:content/preparation.tex] +Bookmarks= +Encoding=UTF-8 +Highlighting=LaTeX +Highlighting Set By User=false +Indentation Mode=normal +Mode=LaTeX +Mode Set By User=false + +[document-settings,item:content/results.tex] +Bookmarks= +Encoding=UTF-8 +Highlighting=LaTeX +Highlighting Set By User=false +Indentation Mode=normal +Mode=LaTeX +Mode Set By User=false + +[document-settings,item:content/theory.tex] +Bookmarks= +Encoding=UTF-8 +Highlighting=LaTeX +Highlighting Set By User=false +Indentation Mode=normal +Mode=LaTeX +Mode Set By User=false + +[document-settings,item:thesis.tex] +Bookmarks= +Encoding=UTF-8 +Highlighting=LaTeX +Highlighting Set By User=false +Indentation Mode=normal +Mode=LaTeX +Mode Set By User=false + +[item:../../thesis-template-latex/src/thesis.tex] +open=true +order=0 + +[item:content/abstract.tex] +open=false +order=0 + +[item:content/acknowledgement.tex] +open=true +order=3 + +[item:content/appendices.tex] +open=true +order=2 + +[item:content/closing.tex] +open=false +order=6 + +[item:content/create-functions.tex] +open=false +order=4 + +[item:content/introduction.tex] +open=false +order=1 + +[item:content/preparation.tex] +open=false +order=3 + +[item:content/results.tex] +open=true +order=1 + +[item:content/theory.tex] +open=true +order=0 + +[item:thesis.kilepr] +open=false +order=-1 + +[item:thesis.tex] +open=false +order=8 + +[view-settings,view=0,item:../../thesis-template-latex/src/thesis.tex] +CursorColumn=32 +CursorLine=37 +Dynamic Word Wrap=false +JumpList= +TextFolding=[] +ViMarks= + +[view-settings,view=0,item:content/abstract.tex] +CursorColumn=141 +CursorLine=10 +Dynamic Word Wrap=true +JumpList= +TextFolding=[] +ViMarks=.,1,0,[,1,0,],1,0 + +[view-settings,view=0,item:content/acknowledgement.tex] +CursorColumn=0 +CursorLine=7 +Dynamic Word Wrap=false +JumpList= +TextFolding=[] +ViMarks=.,8,233,[,8,233,],8,233 + +[view-settings,view=0,item:content/appendices.tex] +CursorColumn=37 +CursorLine=6 +Dynamic Word Wrap=false +JumpList= +TextFolding=[] +ViMarks=.,181,0,[,181,0,],181,9 + +[view-settings,view=0,item:content/closing.tex] +CursorColumn=29 +CursorLine=4 +Dynamic Word Wrap=true +JumpList= +TextFolding=[] +ViMarks=.,4,28,[,4,19,],4,28 + +[view-settings,view=0,item:content/create-functions.tex] +CursorColumn=121 +CursorLine=1 +Dynamic Word Wrap=true +JumpList= +TextFolding=[] +ViMarks=.,34,55,[,34,38,],34,57 + +[view-settings,view=0,item:content/introduction.tex] +CursorColumn=24 +CursorLine=5 +Dynamic Word Wrap=true +JumpList= +TextFolding=[] +ViMarks=.,1,0,[,1,0,],1,0 + +[view-settings,view=0,item:content/preparation.tex] +CursorColumn=866 +CursorLine=125 +Dynamic Word Wrap=true +JumpList= +TextFolding=[] +ViMarks=.,123,241,[,123,232,],123,241 + +[view-settings,view=0,item:content/results.tex] +CursorColumn=0 +CursorLine=195 +Dynamic Word Wrap=true +JumpList= +TextFolding=[] +ViMarks=.,131,180,[,131,177,],131,180 + +[view-settings,view=0,item:content/theory.tex] +CursorColumn=404 +CursorLine=125 +Dynamic Word Wrap=true +JumpList= +TextFolding=[] +ViMarks=.,66,39,[,66,39,],66,39 + +[view-settings,view=0,item:thesis.tex] +CursorColumn=22 +CursorLine=46 +Dynamic Word Wrap=false +JumpList= +TextFolding=[] +ViMarks=.,12,39,[,12,39,],12,39 diff --git a/src/Makefile b/src/Makefile new file mode 100755 index 0000000..28b5e34 --- /dev/null +++ b/src/Makefile @@ -0,0 +1,68 @@ +DOCUMENT=thesis +#MODE=-interaction=batchmode + +all: clean xelatex + echo + +xelatex: compile_xelatex + mv $(DOCUMENT)-xelatex.pdf ../pdf/$(DOCUMENT).pdf + +compile_xelatex: + xelatex $(MODE) $(DOCUMENT) + bibtex $(DOCUMENT) + xelatex $(MODE) $(DOCUMENT) + xelatex $(MODE) $(DOCUMENT) + mv $(DOCUMENT).pdf $(DOCUMENT)-xelatex.pdf + +pdflatex: compile_pdflatex + mv $(DOCUMENT)-pdflatex.pdf ../pdf/$(DOCUMENT).pdf + +compile_pdflatex: + pdflatex $(MODE) $(DOCUMENT) + bibtex $(DOCUMENT) + pdflatex $(MODE) $(DOCUMENT) + pdflatex $(MODE) $(DOCUMENT) + mv $(DOCUMENT).pdf $(DOCUMENT)-pdflatex.pdf + +lualatex: compile_lualatex + mv $(DOCUMENT)-lualatex.pdf ../pdf/$(DOCUMENT).pdf + +compile_lualatex: + lualatex $(MODE) $(DOCUMENT) + bibtex $(DOCUMENT) + lualatex $(MODE) $(DOCUMENT) + lualatex $(MODE) $(DOCUMENT) + mv $(DOCUMENT).pdf $(DOCUMENT)-lualatex.pdf + +switch_to_hungarian: + sed -i "s|^\\\input{include/thesis-en}|%\\\input{include/thesis-en}|" $(DOCUMENT).tex + sed -i "s|^%\\\input{include/thesis-hu}|\\\input{include/thesis-hu}|" $(DOCUMENT).tex + +test_hu: + ${MAKE} clean compile_xelatex + ${MAKE} clean compile_pdflatex + ${MAKE} clean compile_lualatex + mv $(DOCUMENT)-xelatex.pdf ../pdf/$(DOCUMENT)-xelatex-hu.pdf + mv $(DOCUMENT)-pdflatex.pdf ../pdf/$(DOCUMENT)-pdflatex-hu.pdf + mv $(DOCUMENT)-lualatex.pdf ../pdf/$(DOCUMENT)-lualatex-hu.pdf + +switch_to_english: + sed -i "s|^\\\input{include/thesis-hu}|%\\\input{include/thesis-hu}|" $(DOCUMENT).tex + sed -i "s|^%\\\input{include/thesis-en}|\\\input{include/thesis-en}|" $(DOCUMENT).tex + +test_en: + ${MAKE} switch_to_english + ${MAKE} clean compile_xelatex + ${MAKE} clean compile_pdflatex + ${MAKE} clean compile_lualatex + mv $(DOCUMENT)-xelatex.pdf ../pdf/$(DOCUMENT)-xelatex-en.pdf + mv $(DOCUMENT)-pdflatex.pdf ../pdf/$(DOCUMENT)-pdflatex-en.pdf + mv $(DOCUMENT)-lualatex.pdf ../pdf/$(DOCUMENT)-lualatex-en.pdf + ${MAKE} switch_to_hungarian + +test: test_hu test_en + echo + +clean: + echo Cleaning temporary files... + rm -f *.aux *.dvi *.thm *.lof *.log *.lot *.fls *.out *.toc *.bbl *.blg diff --git a/src/bib/mybib.bib b/src/bib/mybib.bib new file mode 100644 index 0000000..4f9f2f2 --- /dev/null +++ b/src/bib/mybib.bib @@ -0,0 +1,402 @@ +@misc{dockervirt, + author = {Nick Janetakis}, + howpublished = {\url{https://nickjanetakis.com/blog/comparing-virtual-machines-vs-docker-containers}}, + note = {Megtekintve 2019-11-20}, + title = {Comparing Virtual Machines vs Docker Containers} +} + +@misc{docker-overview, + howpublished = {\url{https://docs.docker.com/engine/docker-overview/}}, + note = {Megtekintve 2019-11-22}, + title = {Docker overview} +} + +@misc{linux-namespaces, + howpublished = {\url{http://man7.org/linux/man-pages/man7/namespaces.7.html}}, + note = {Megtekintve 2019-11-20}, + title = {namespaces - overview of Linux namespaces} +} + +@misc{cgroups, + howpublished = {\url{https://access.redhat.com/documentation/en-us/red\_hat\_enterprise\_linux/6/html/resource\_management\_guide/ch01}}, + note = {Megtekintve 2019-11-20}, + title = {Introduction to Control Groups (Cgroups)} +} + +@misc{mikroszeviz, + author = {Farkas G{\'a}bor}, + howpublished = {\url{https://ithub.hu/blog/post/A\_microservice\_architekturarol\_diohejban/}}, + note = {Megtekintve 2019-11-23}, + title = {A microservice architekt{\'u}r{\'a}r{\'o}l di{\'o}h{\'e}jban} +} + +@misc{kubernetes-pods, + howpublished = {\url{https://kubernetes.io/docs/concepts/workloads/pods/pod/}}, + note = {Megtekintve 2019-11-21}, + title = {Pods} +} + +@misc{kubernetes-replicaset, + howpublished = {\url{https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/}}, + note = {Megtekintve 2019-11-20}, + title = {ReplicaSet} +} + +@misc{kubernetes-deployment, + howpublished = {\url{https://kubernetes.io/docs/concepts/workloads/controllers/deployment/}}, + note = {Megtekintve 2019-11-20}, + title = {Deployments} +} + +@misc{kubernetes-crd, + howpublished = {\url{https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/}}, + note = {Megtekintve 2019-11-20}, + title = {Extend the Kubernetes API with CustomResourceDefinitions} +} + +@misc{kubernetes-hpa, + howpublished = {\url{https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/}}, + note = {Megtekintve 2019-11-23}, + title = {Horizontal Pod Autoscaler} +} + +@misc{kubeless-http, + howpublished = {\url{https://kubeless.io/docs/http-triggers/}}, + note = {Megtekintve 2019-11-23}, + title = {Expose and secure Kubeless functions} +} + +@misc{kubeless-pubsub, + howpublished = {\url{https://kubeless.io/docs/pubsub-functions/}}, + note = {Megtekintve 2019-11-23}, + title = {PubSub events} +} + +@misc{kubernetes-ingress, + howpublished = {\url{https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/}}, + note = {Megtekintve 2019-11-24}, + title = {Ingress Controllers} +} + +@misc{kubernetes-nginx, + howpublished = {\url{https://kubernetes.github.io/ingress-nginx/}}, + note = {Megtekintve 2019-11-24}, + title = {NGINX Ingress Controller} +} + +@misc{github-issue-1, + howpublished = {\url{https://github.com/kubernetes-incubator/metrics-server/issues/131}}, + note = {Megtekintve 2019-11-24}, + title = {Metrics server issue with hostname resolution of kubelet and apiserver unable to communicate with metric-server clusterIP} +} + +@misc{kubeless-quickstart, + howpublished = {\url{https://kubeless.io/docs/quick-start/}}, + note = {Megtekintve 2019-11-22}, + title = {Installation} +} + +@misc{github-hey, + howpublished = {\url{https://github.com/rakyll/hey}}, + note = {Megtekintve 2019-11-21}, + title = {HTTP load generator, ApacheBench (ab) replacement, formerly known as rakyll/boom} +} + +@misc{github-wrk, + howpublished = {\url{https://github.com/wg/wrk}}, + note = {Megtekintve 2019-11-21}, + title = {Modern HTTP benchmarking tool} +} + +@misc{docker-logging, + howpublished = {\url{https://docs.docker.com/config/containers/logging/configure/}}, + note = {Megtekintve 2019-11-25}, + title = {Configure logging drivers} +} + +@misc{kubernetes-ephemeral-storage, + howpublished = {\url{https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/\#local-ephemeral-storage}}, + note = {Megtekintve 2019-11-24}, + title = {Managing Compute Resources for Containers - Local ephemeral storage} +} + +@misc{kubernetes-eviction, + howpublished = {\url{https://kubernetes.io/docs/tasks/administer-cluster/out-of-resource/\#eviction-policy}}, + note = {Megtekintve 2019-11-27}, + title = {Configure Out of Resource Handling - Eviction Policy} +} + +@misc{kubernetes-nodes, + howpublished = {\url{https://kubernetes.io/docs/concepts/architecture/nodes/}}, + note = {Megtekintve 2019-11-27}, + title = {Nodes} +} + +@misc{kubernetes-kubelet, + howpublished = {\url{https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/}}, + note = {Megtekintve 2019-11-27}, + title = {kubelet} +} + +@misc{cloud, + howpublished = {\url{https://www.ibm.com/cloud/learn/cloud-computing}}, + note = {Megtekintve 2019-11-27}, + title = {Cloud computing: A complete guide} +} + +@misc{faas, + howpublished = {\url{https://www.cloudflare.com/learning/serverless/glossary/function-as-a-service-faas/}}, + note = {Megtekintve 2019-11-23}, + title = {What Is Function as a Service (FaaS)?} +} + +@misc{saas, + howpublished = {\url{https://www.infoworld.com/article/3226386/what-is-saas-software-as-a-service-defined.html}}, + note = {Megtekintve 2019-11-21}, + title = {What is SaaS? Software-as-a-service defined} +} + +@misc{paas, + howpublished = {\url{https://www.bmc.com/blogs/saas-vs-paas-vs-iaas-whats-the-difference-and-how-to-choose/}}, + note = {Megtekintve 2019-11-21}, + title = {SaaS vs PaaS vs IaaS: What{\rq}s The Difference and How To Choose} +} + +@misc{iaas, + howpublished = {\url{https://www.techradar.com/news/what-is-infrastructure-as-a-service}}, + note = {Megtekintve 2019-11-21}, + title = {What is Infrastructure-as-a-Service? Everything you need to know} +} + +@misc{os-virt, + howpublished = {\url{https://www.w3schools.in/cloud-virtualization/os-virtualization/}}, + note = {Megtekintve 2019-11-22}, + title = {Operating System (OS) Virtualization} +} + +@misc{docker-layers, + howpublished = {\url{https://medium.com/@jessgreb01/digging-into-docker-layers-c22f948ed612}}, + note = {Megtekintve 2019-11-21}, + title = {Digging into Docker layers} +} + +@misc{kubernetes-runtimes, + howpublished = {\url{https://kubernetes.io/docs/setup/production-environment/container-runtimes/}}, + note = {Megtekintve 2019-11-21}, + title = {Container runtimes} +} + +@misc{kubernetes-concepts, + howpublished = {\url{https://kubernetes.io/docs/concepts/}}, + note = {Megtekintve 2019-11-20}, + title = {Concepts} +} + +@misc{kube-apiserver, + howpublished = {\url{https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/}}, + note = {Megtekintve 2019-11-20}, + title = {kube-apiserver} +} + +@misc{etcd, + howpublished = {\url{https://etcd.io/docs/v3.4.0/learning/data\_model/}}, + note = {Megtekintve 2019-11-20}, + title = {Data model} +} + +@misc{kubernetes-api, + howpublished = {\url{https://kubernetes.io/docs/concepts/overview/kubernetes-api/}}, + note = {Megtekintve 2019-11-20}, + title = {The Kubernetes API} +} + +@misc{kuebrnetes-controller, + howpublished = {\url{https://kubernetes.io/docs/concepts/architecture/controller/}}, + note = {Megtekintve 2019-11-20}, + title = {Controllers} +} + +@misc{kubernetes-node-controller, + howpublished = {\url{https://unofficial-kubernetes.readthedocs.io/en/latest/concepts/nodes/node/\#node-controller}}, + note = {Megtekintve 2019-11-20}, + title = {Node - Node Controller} +} + +@misc{kuebrnetes-components, + howpublished = {\url{https://kubernetes.io/docs/concepts/overview/components/}}, + note = {Megtekintve 2019-11-20}, + title = {Kubernetes Components} +} + +@misc{kubernetes-scheduler, + howpublished = {\url{https://kubernetes.io/docs/concepts/scheduling/kube-scheduler/}}, + note = {Megtekintve 2019-11-20}, + title = {Kubernetes Scheduler} +} + +@misc{kubernetes-kube-proxy, + howpublished = {\url{https://kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/}}, + note = {Megtekintve 2019-11-20}, + title = {kube-proxy} +} + +@misc{kubernetes-service, + howpublished = {\url{https://kubernetes.io/docs/concepts/services-networking/service/}}, + note = {Megtekintve 2019-11-21}, + title = {Service} +} + +@misc{kubernetes-volume, + howpublished = {\url{https://kubernetes.io/docs/concepts/storage/volumes/}}, + note = {Megtekintve 2019-11-21}, + title = {Volumes} +} + +@misc{kubernetes-ingress-resource, + howpublished = {\url{https://kubernetes.io/docs/concepts/services-networking/ingress/}}, + note = {Megtekintve 2019-11-25}, + title = {Ingress} +} + +@misc{kubeless, + howpublished = {\url{https://itnext.io/kubeless-kubernetes-native-serverless-framework-3d0f96e03add}}, + note = {Megtekintve 2019-11-25}, + title = {Kubeless --- Kubernetes Native Serverless Framework} +} + +@misc{kubeless-api-deploy, + howpublished = {\url{https://kubeless.io/docs/advanced-function-deployment/}}, + note = {Megtekintve 2019-11-25}, + title = {Deploying Kubeless Functions using Kubernetes API} +} + +@misc{kubeless-build, + howpublished = {\url{https://kubeless.io/docs/building-functions/}}, + note = {Megtekintve 2019-11-25}, + title = {Build process for functions} +} + +@misc{istio-service-mesh, + howpublished = {\url{https://istio.io/docs/concepts/what-is-istio/}}, + note = {Megtekintve 2019-11-26}, + title = {What is Istio?} +} + +@misc{istio-observer, + howpublished = {\url{https://istio.io/docs/concepts/observability/}}, + note = {Megtekintve 2019-11-26}, + title = {Observability} +} + +@misc{istio-mgmt, + howpublished = {\url{https://istio.io/docs/concepts/traffic-management/}}, + note = {Megtekintve 2019-11-26}, + title = {Traffic Management} +} + +@misc{knative, + howpublished = {\url{https://containerjournal.com/topics/container-management/what-is-knative-and-what-can-it-do-for-you/}}, + note = {Megtekintve 2019-11-26}, + title = {What is Knative, and What Can It Do for You?} +} + +@misc{knative-serving, + howpublished = {\url{https://knative.dev/docs/serving/}}, + note = {Megtekintve 2019-11-27}, + title = {Knative Serving} +} + +@misc{knative-eventing, + howpublished = {\url{https://knative.dev/docs/eventing/}}, + note = {Megtekintve 2019-11-27}, + title = {Knative Eventing} +} + +@misc{knative-thoughts, + howpublished = {\url{https://searchitoperations.techtarget.com/news/252469607/Knative-serverless-Kubernetes-bypasses-FaaS-to-revive-PaaS}}, + note = {Megtekintve 2019-11-27}, + title = {Knative serverless Kubernetes bypasses FaaS to revive PaaS} +} + +@misc{knative-gateweay, + howpublished = {\url{https://knative.dev/v0.9-docs/serving/samples/knative-routing-go/}}, + note = {Megtekintve 2019-11-27}, + title = {Routing across multiple Knative services - Go} +} + +@misc{knative-autoscaler, + howpublished = {\url{https://knative.dev/docs/serving/configuring-the-autoscaler/}}, + note = {Megtekintve 2019-11-27}, + title = {Configuring the Autoscaler} +} + +@misc{knative-autoscaler-component, + howpublished = {\url{https://github.com/knative/serving/blob/master/docs/scaling/DEVELOPMENT.md}}, + note = {Megtekintve 2019-11-24}, + title = {Autoscaling} +} + +@misc{knative-gloo, + howpublished = {\url{https://medium.com/solo-io/gloo-by-solo-io-is-the-first-alternative-to-istio-on-knative-324753586f3a}}, + note = {Megtekintve 2019-11-25}, + title = {Gloo, by Solo.io, is the first alternative to Istio on Knative} +} + +@misc{knative-monitoring, + howpublished = {\url{https://github.com/knative/docs/blob/master/docs/serving/accessing-metrics.md}}, + note = {Megtekintve 2019-11-22}, + title = {Accessing Metrics} +} + +@misc{knative-crd, + howpublished = {\url{https://github.com/knative/serving/blob/master/docs/spec/overview.md}}, + note = {Megtekintve 2019-11-22}, + title = {Resource Types} +} + +@misc{cloudlab, + howpublished = {https://cloudlab.us/technology.php}, + note = {Megtekintve 2019-10-29}, + title = {Cloudlab - Software Technology} +} + +@misc{influxdb-performance, + author = {Syeda Noor Zehra Naqvi and Sofia Yfantidou}, + howpublished = {https://cs.ulb.ac.be/public/\_media/teaching/influxdb\_2017.pdf}, + note = {Megtekintve 2020-03-29}, + title = {Time Series Databases and InfluxDB} +} + +@misc{microservices-apply, + howpublished = {https://microservices.io/articles/applying.html}, + note = {Megtekintve 2020-02-29}, + title = {Applying the microservice architecture pattern language} +} + +@misc{microservices-intro, + author = {Chris Richardson}, + howpublished = {https://www.nginx.com/blog/introduction-to-microservices/}, + note = {Megtekintve 2020-02-10}, + title = {Introduction to Microservices} +} + +@misc{microservices-apigateway, + author = {Chris Richardson}, + howpublished = {https://www.nginx.com/blog/building-microservices-using-an-api-gateway/}, + note = {Megtekintve 2020-03-20}, + title = {Building Microservices: Using an API Gateway} +} + +@misc{microservices-messagequeue, + author = {Alexander Nnakwue}, + howpublished = {https://blog.logrocket.com/understanding-message-queuing-systems-using-rabbitmq/}, + note = {Megtekintve 2020-03-10}, + title = {Understanding message queuing systems using RabbitMQ} +} + +@misc{microservices-timeseriesdb, + howpublished = {https://www.influxdata.com/time-series-database/}, + note = {Megtekintve 2020-02-28}, + title = {Time series database (TSDB) explained} +} + diff --git a/src/content/beggining.tex b/src/content/beggining.tex new file mode 100644 index 0000000..320055b --- /dev/null +++ b/src/content/beggining.tex @@ -0,0 +1,67 @@ +% !TeX root = ../thesis.tex +\chapter{A laboratóriumi munka környezetének ismertetése, a munka előzményei és kiindulási állapota} +\label{sec:first} + +\section{Bevezető} +Szőlőtulajdonosoknak éves szinten jelentős kárt okoznak a seregélyek, akik előszeretettel választják táplálékul a megtermelt szőlőt. Az ilyen kártevő madarakat hangjuk alapján detektáló rendszert dolgozott ki diplomamunkája során Nagy Kristóf, amely a mesters\'eges intelligencia eszköztárát hívja segítségül. Féléves munkánk az Ő kutatására alapul. + +A Kristóf által megalkotott detekciós algoritmus gyakorlati felhasználását egy olyan rendszerben látjuk, ahol költséghatékony módon kis számítási kapacitású Internet of Things eszközök gyűjtik a hangmintákat a termőföldekről, és továbbítják egy nagyobb számítási kapacitású központi feldolgozó egység felé, amely kiértékeli őket, és figyelmeztet a veszélyre, akár képes valamilyen formában automatizáltan beavatkozni. + +Féléves munkánk során a központi feldolgozó egységen dolgoztunk. Célunk olyan rendszer megalkotása volt, amely kihasználja a manapság nagy népszerűségnek örvendő felhő alapú szolgáltatások előnyeit. + +A projekten ketten dolgoztunk Pünkösd Marcell-lel, aki az MI komponens mikroszolgáltatásokra darabolásával, valamint a modellek és bemeneti hangfájlok tárolásával, valamint ezzel kapcsolatos felhő-natív technológiákkal foglalkozott. Én a félév során a rendszer bemeneti és az MI által adott eredményt feldolgozó mikroszolgáltatásokkal, valamint ezek felhő-natív megoldásával foglalkoztam. + +\section{Elm\'eleti \"osszefoglal\'o} + +\subsection{Felhő} +A felhőalapú számítástechnikában a felhasználó elől elrejtve, a szolgáltató erőforrás halmazán elosztva megvalósított szolgáltatásokat értjük, amit jellemzően virtualizációs technológiára építenek. Három szolgáltatási modellt különböztetünk meg: SaaS (Software as a Service \cite{saas}, Szoftver, mint Szolgáltatás, például: Office 365), PaaS (Platform as a Service, Platform, mint Szolgáltatás \cite{paas}, például: Oracle Cloud Platform) és IaaS (Infrastructure as a Service \cite{iaas}, Infrastruktúra, mint Szolgáltatás, például: Microsoft Azure). + +\subsection{Kubernetes} +A Kubernetes egy Go nyelven írt, nyílt forráskódú konténer orkesztrációs platform, amely képes konténerek automatikus konfigurációjára, skálázására, valamint bizonyos hibák automatikus elhárítására is. Több konténer technológiát \cite{kubernetes-runtimes} támogat, köztük a Dockert is. Nagyon népszerű, gyors fejlesztés alatt álló projekt. Emiatt felhasználói és programozói interfésze gyakran változik, megkövetelve a ráépülő megoldásoktól a hasonló sebességű fejlesztést. Jól definiált interfésze miatt sok ráépülő, azt kiegészítő projekt létezik. A Kubernetes kiváló keretet nyújt mikroszolgáltatás alapú alkalmazások fejlesztésére. + +Egy Kubernetes klaszterben két típusú hosztgép lehet. Mindkettőből lehet több darab, de legalább egy-egy példány kötelező. A \ref{fig:k8s-chart} \'abr\'an l\'athat\'o, hogy egy Kubernetes klaszter \cite{kubernetes-nodes} legal\'abb egy Masterből \'es Workerből \'ep\"ul fel, ezek több komponensből állnak. + +A Kubernetes Master felelős a klaszterben lezajló folyamatok \cite{kubernetes-concepts} irányításáért, a Slave-ek vagy más néven Worker-ek, valamint az alkalmazások állapotának nyilvántartásáért. A klaszterben történő eseményekre válaszul klaszterszintű választ ad - például egy pod elindítása. Egy Master node számos komponensből áll, ezek a Master egy-egy feladatáért felelnek. Több Master node futtatása esetén - úgynevezett multimaster mode - csak az API Server \cite{kubernetes-api} és az etcd \cite{etcd} komponensekből jön létre több példány, a többiből egyszerre csak egy példány lehet aktív.A Pod \cite{kubernetes-pods} egy vagy több konténert összefogó logikai hoszt. Egy podon belül lévő konténerek osztoznak a hálózaton és a háttértáron, valamint azonos a futtatási specifikációjuk. Ez azt jelenti, hogy az egy podon belüli konténerek localhost-on keresztül elérik egymást, valamint van lehetőség, hogy a konténerekben futó alkalmazások lássák a másik konténerben futó folyamatokat. Egy Kubernetes rendszerben a Pod a legkisebb egység, amit futásra lehet ütemezni. + +A Deployment \cite{kubernetes-deployment} segítségével deklaratívan leírható egy alkalmazást felépítő podok és azok kívánt állapota. Lehetőség van megadni, hány replikát hozzon létre a rendszer. Hasonló módon lehet a podok állapotát frissíteni vagy egy korábbi állapotra visszatérni. Egy Deploymentben lehetőség van több pod definiálására, ami az alkalmazás komponensek lazább csatolását teszi lehetővé. + +A podok bármikor törlődhetnek, valamint új példány jöhet belőlük létre \cite{kubernetes-service}. Minden pod saját IP címmel rendelkezik, viszont szükség van valamilyen módszerre, aminek segítségével nyomon lehet követni, hogy egy pod által nyújtott szolgáltatás milyen címen érhető el. Erre a problémára nyújt megoldást a Service, ami absztrakciót jelent a podok felett. + +Néhány fontosabb szolgáltatás, melyet a Kubernetes nyújt: +\begin{itemize} + \item Horizontális skálázás, + \item Konfiguráció és szenzitív adatok menedzsmentje, + \item Háttértár orkesztráció + \item Szolgáltatások név alapján történő felderítése +\end{itemize} + +\subsection{Mikroszolg\'altat\'asok} +A mikroszolgáltatás vagy mikroszolgáltatás szoftverarchitektúra egy alkalmazás architektúra \cite{microservices-intro}, amelynek segítségével a komplex, skálázható alkalmazások fejlesztése egyszerűbb, valamint a kódbázis növekedésével átlátható marad. Ezt úgy éri el, hogy az alkalmazást kisebb, önálló komponensekre bontja, ezeket lazán, tipikusan REST API-val, vagy üzenet sorok (message queue) segítségével illeszti egymáshoz. Az architektúra alkalmazása esetén felmerülnek bizonyos problémák, mint például az egyes szolgáltatásoknak meg kell egymást találniuk, vagy több példány futtatása esetén megoldandó a terheléselosztás is. Az így fejlesztett alkalmazások kiválóan illeszkednek a felhő alapú rendszerekhez, például a Kuberneteshez. + +Mikroszolgáltatás architektúra esetében figyelni kell az úgynevezett hidden monolitra, amikor a fejlesztett alkalmazás viselkedéséből adódóan igazából nem mikroszolgáltatás alapú. Például, ha minden mikroszolgáltatás függ egytől, akkor az adott architektúra rejtett monolit jellegű. + +Pozitív tulajdonsága a mikroszolgáltatásoknak, hogy jól definiált API-k \cite{microservices-apply} mellett az egyes szolgáltatások a saját adatszerkezetüket a nekik legmegfelelőbb módon képesek kezelni, nincs szükség kompromisszumokra az egész alkalmazást figyelembe véve. + +\subsection{Message Queue} +A message queue, vagy üzenetsor \cite{microservices-messagequeue} egy olyan szoftver vagy szoftverkomponens, amely az egyes önálló folyamatok közötti kommunikációt teszi lehetővé aszinkron üzenetek küldésével és fogadásával. Az ilyen rendszerek aszinkron jellegének hála nem szükséges a küldőnek és a fogadónak egyszerre kapcsolatban lennie az üzenetsorral, ugyanis egy-egy üzenet addig tárolódik az üzenetsorban, amíg a fogadó fél nem fogadja azokat. Ilyen módon nem csak egy-egy kommunikáció megvalósítása lehetséges, hanem egy-több is a küldő és fogadó felek minimális módosításával, mert az üzenetek sokszorosítását az üzenetsor rendszer végzi. Egy ilyen szoftver a RabbitMQ. + +A message queue elősegíti a mikroszolgáltatás alapú rendszerek fejlesztését az aszinkronitás, valamint az egy a többhöz kommunikáció megvalósításával. Ezek gyakran előforduló problémák, melyeket üzenetsor nélkül bonyolult lenne megoldani. Tegyük fel például, hogy egy küldő fél által produkált adatokat egyszerre több módon szeretnénk feldolgozni. Ennél bonyolultabb eset lehet, ha a feldolgozó nagy erőforrásigényű műveleteket végez, ami miatt szeretnénk a példányszámát skálázni. Message queue nélkül a fejlesztőknek kéne a küldő komponensben nyilván tartani, hogy kinek kell elküldeni az adatokat, valamint a fogadók példányszámának növekedésével a küldés is egyre hosszadalmasabb lenne. Ezen problémákat hivatott megoldani a message queue. + +\subsection{Timeseries Adatb\'azis} +Egy timeseries adatbázis olyan adatbázis, amely idő függvényében változó adatokat vagy adatsorokat képes hatékonyan tárolni és lekérdezni. Ilyen adatbázisban tipikusan valamilyen metrika jellegű adatot tárolnak. Általában az ilyen rendszerek elválasztják a konstans, diszkrét és a folyamatos adatokat pontok halmazába. Egy timeseries adatbáziskezelő \cite{microservices-timeseriesdb} rendszer az InfluxDB, amelynek sajátossága, hogy SQL-szerű lekérdezőnyelvvel rendelkezik. Van lehetőség ún. retention policy megadására, amik segítségével megadható, milyen pontossággal lehet lekérdezni az egyes múltbéli adatokat. Minél régebbi adatokat szeretnénk kinyerni, annál kisebb pontossággal lehet azt megtenni. + +Feltételezve, hogy a régebbi adatokra nincs szükségünk túl nagy részletességgel, például tized másodperces felbontással, azokat elég órás vagy még régebbi adatok esetén akár napos felbontásban összegezve is letárolni. Ilyen lehetőségeket úgynevezett retention policy-k segítségével tudunk definiálni, ami ezt a viselkedést valósítja meg, ez által csökkentve az adatbázis tárhelyigényét. + +Timeseries adatbázis használata nagyban megkönnyíti különböző kimutatások, grafikonok létrehozását, hiszen az adatok tárolási módjából adódóan készen állnak a grafikon kirajzolására. Az InfluxDB aszinkron REST API-jának köszönhetően kifejezetten nagy mennyiségű adatot képes befogadni adott idő alatt. + +\subsection{Api Gateway} +Mikroszolgáltatás alapú rendszerekben fontos, a felhasználók számára egységes API kiszolgálása, viszont a belső rendszerek API-jait az egyes szolgáltatások saját és egymás működését segítő módon érdemes definiálni. Így minden belső API és rendszer jól definiált lehet. Emellett lehetséges, hogy egy kliens olyan információkra kíváncsi, amelyhez több szolgáltatáshoz kell fordulnia, hogy összeszedje mindet. Ugyanígy a rendszer növekedésével az egyes klienseknek szükséges lenne ismerni az általuk használni kívánt szolgáltatások elérhetőségét. + +Ezeket a problémákat hivatott feloldani az API Gateway \cite{microservices-apigateway}, melynek feladata az egységes API kialakítása. Az API Gateway feladata többek között a kliensek leválasztása a konkrét rendszerarchitektúráról, egyes mikroszolgáltatások elérési információjának ismerete – a kliensek helyett és a különböző protokollt használó API-k esetében protokollfordítás. + +Mindemellett fontos még az úgynevezett circuit breaker logika biztosítása, amely megnöveli a felhasználói élményt, ugyanis az API Gateway képes észlelni, ha egy mikroszolgáltatás túl sokáig nem válaszol vagy nem elérhető, és ez esetben valamilyen logika alapján választ tud adni a klienseknek. + +\section{A munka állapota, készültségi foka a félév elején} +A félév elején rendelkezésünkre álltak a Nagy Kristóf által tanított modellek, az általa használt audio fájlok és a futtató szoftver. Így a mesterséges intelligencia komponense a projektnek gyakorlatilag kulcsra készen rendelkezésre állt kezdéskor. A projekt kezdésekor Linuxos és Dockerrel kapcsolatos tudásunk jelentős volt. Kubernetessel Bsc Témalaboratórium tantárgy keretein belül ismerkedtem meg, azóta napi szinten használom. Kristóf által a hangfájlok analízisére használt szoftver Python nyelven készült. + +Python programnyelven Marcell és én kényelmesen tudunk fejleszteni, tanulmányaink során számos szoftvert fejlesztettünk e nyelven, ezért úgy döntöttünk, hogy a mikroszolgáltatások nagy részét is e nyelven fejlesztjük le. diff --git a/src/content/work.tex b/src/content/work.tex new file mode 100644 index 0000000..5e216bc --- /dev/null +++ b/src/content/work.tex @@ -0,0 +1,132 @@ +% !TeX root = ../thesis.tex +\chapter{Az elvégzett munka és eredmények ismertetése} +\label{sec:second} + +\section{Rendszer tervezése} +A \ref{fig:birbnetes-architecture} ábrán látható architektúrát logisztikai okokból kifolyólag a mesterséges intelligenciát megvalósító szoftver ismerete nélkül alkottuk. Úgy tekintettünk rá, mint egy fekete dobozra, amely képes fájlokat beolvasni valamilyen módon és a vizsgálat eredményét is közli a felhasználóval valamilyen módon. Fontos szempont volt, hogy az egyes mikroszolgáltatások belső működése tetszőlegesen refaktorálható legyen anélkül, hogy az másik komponensben módosítást tenne szükségessé. + +Jelenleg a rendszer csővezetékként működik, egyik végén beérkeznek a bemeneti adatok, amin a mesterséges intelligencia klasszifikációt hajt végre, majd ennek az eredményét továbbítja a kimenetet feldolgozó szolgáltatások felé, akik a pipeline másik vége. + +\begin{figure}[!ht] +\centering +\includegraphics[width=120mm, keepaspectratio]{figures/architecture-simple.png} +\caption{A rendszer komponensei \'es azok k\"oz\"otti kapcsolatok} +\label{fig:birbnetes-architecture} +\end{figure} + +A rendszer tervezésekor célunk volt a bővíthetőség minél jobb támogatása, ezért megadtuk a lehetőségét annak, hogy a beérkező hangfájlt több mesterséges intelligencia is megvizsgálja párhuzamosan, az ilyen lehetséges elágazási pontokon üzenetsort használtunk. Így, ha a jelenleg egyenes pipeline-t szeretnénk leágaztatni, a megfelelő helyekre fel kell iratkoztatni az új komponenseket. Lentebb olvashatók részletesen az általam javasolt komponensek. + +\subsection{Input Service} +Fogadja a bemeneti hangfájlokat, ezeket továbbítja a hosszú idejű tárolást megvalósító Storage Service felé. Ezen felül ellátja egy egyedi azonosítóval is és minimális validációt végez. + +Kapcsolódik egy relációs adatbázishoz, amelyben lementi az információkat, amelyeket fogadott a hangfájllal együtt. Ezeket összerendeli az egyedi azonosítóval, amelyet ő adott a hangfájlnak. + +Miután a Storage Service lementette a hangfájlt, a service publikál egy üzenetet az üzenetsorba, amely tartalmazza a mentett hangfájl címkéjét. A feliratkozott komponensek ezekután a tag használatával letölthetik a lementett hangot és folytathatják rajta a feldolgozást. + +\subsection{Independent Results Service} +Feldolgozza a mesterséges intelligencia kimenetét, letárolja azt egy tetszőleges relációs adatbázisban. Lekérdezhető tőle - egymástól függetlenül - az egyes hangfájlokról hozott döntés. Az itt tárolt adatok összevethetők az Input Service-ben található adatokkal. Ez segíthet a hiba keresésben, valamint az itt található adatok segítségével a rendszerbe tanulás illeszthető. + +\subsection{Results Statistics Service} +Feldolgozza a mesterséges intelligencia kimenetét. Az eredményeket egy idősoros adatbázisban tárolja le. Ez az adatbázis sokkal alkalmasabb és hatékonyabb az eredmények "mérés" szerű kezelésén, de cserébe nem lehet lekérni tőle egyesével a hangfájlokról hozott döntéseket. Használata lehetővé teszi dashboardok készítését, ahol heat-map vagy más grafikonok segítségével tájékozódhat a felhasználó. + +\section{API-k tervez\'ese} +Mivel a projekten ketten dolgoztunk, fontos volt számunkra az egyes szolgáltatások API-jainak definiálása. Erre Swagger-t használtunk, ami egy jól dokumentált, nyitott definíciós eszköztár RESTful API-k leírására. Itt lényeges volt számomra, hogy az elvárt bemeneti formátumon felül minden lehetséges visszatérési státusz kódja és üzenetformátuma dokumentálva legyen az általam fejlesztett szolgáltatásoknak, ugyanis ez megkönnyíti a fejlesztést és a lehetséges félreértéseket is elkerüli. A rendszerben bevezettük a címkék vagy tagek fogalmát, amely egyedi azonosítója minden beküldött hangfájlnak. Az egyes tagekhez tárolt metaadatokat is le lehet kérdezni egy endpoint segítségével. + +Az Input Service API-ján kifejezetten sokat gondolkodtam, ugyanis a fájlok és az azokat kísérő metaadatok fogadására több alternatíva létezik. Állományok feltöltése miatt adódik a http mulipart form használata, viszont a metaadatok kerülhetnek külön részbe a kérésnek, vagy egybe valamilyen JSON formátumú adatstruktúrában. Végül az utóbbi mellett döntöttem, ugyanis Pythonhoz rendkívül kiforrott JSON sémavalidációs könyvtárak érhetők el, ezzel szemben ilyen eszközt, ami elegánsan képes multipart formok sémáját validálni, nem találtam. + +A Results Statistics Service nem szolgál ki REST-es API-t, csupán fogadja a message queue-n érkező eredményeket és azokat letárolja a hozzá kapcsolódó timeseries adatbázisban. + +Ez előbbivel szemben az Independent Results Service egyik legfontosabb tulajdonsága, hogy egy REST API-t nyújt. Itt kihasználva a relációs adatbázis által nyújtott lehetőségeket definiáltam olyan végpontokat, melyek visszaadnak minden pozitív vagy negatív eredményt, valamint adott dátum előtt, illetve után rögzített eredményeket. A cél az volt, hogy le lehessen kérdezni azegyes hangfájlokhoz tartozó adatokat, és ezt egy olyan endpoint segítségével lehet megtenni, amelyben a hangfájl tagje alapján azonosítható ez be. + +\section{Fejleszt\'es folyamata} +Fejlesztés során igyekeztem arra figyelni, hogy az általam írt kód helyes legyen, ezért a projekthez beállítottam egy folyamatos integrációs rendszert, amely minden git commitra lefuttatott teszteket, és amennyiben a kód átment ezeken a tesztken, container image-et épített és publikált az általam beállított container registry-be. Később a Kubernetes rendszerbe is innen kerültek be az egyes mikroszolgáltatások. + +Az egyes komponensek futásakor keletkező kivételeket és hibaeseményeket egy központi rendszerben gyűjtöttük, ami képes volt kimutatások készítésére és egyes eseményekről értesítések küldésére. Mivel a rendszer Kubernetesben futott, jelentősen megkönnyítette a hibakeresési folyamatot, hogy a rendszer képes volt rámutatni arra a kódsorba, amely a hibát kiváltotta, valamint az aktuális környezetet és a hibaüzenetet is tárolta. + +\subsection{Input Service} +Az Input Service implementálásához a Flask nevű Python web mikroframeworköt használtam. A Flask csak a webes rétegét valósítja meg egy alkalmazásnak, ORM-et (Object-relation mapping) vagy validációt nem nyújt a fejlesztőknek, viszont egyszerűen kiegészíthető tetszőleges beépülő modulokkal. Ebben a mikroszolgáltatásban viszont szükség volt adatbázissal történő kommunikációra és a kapott adatok sémájának validációjára. + +Előbbire az SQLAlchemy nevű könyvtárat használtam, melynek kényelmes Flask-os pluginja van. Emiatt csupán definiálnom kellett az általam használt sémát, megadni a Flask-nak az adatbázis elérési helyét, ez után tetszőleges metódusban lehetett lekérdezni, beilleszteni és frissíteni rekordokat az adatbázisba. + +Lényeges feladatom volt a konkrét adatbázis motor kiválasztása e. Számos népszerű adatbázis motort megvizsgáltam, hogy az általuk nyújtott szolgáltatások mennyire felelnek meg az igényeinknek. Az első és legfontosabb szempont az volt, hogy Kubernetesbe jól illeszkedjen, a másik lényeges szempont a kis erőforrás lábnyom. + +Az első általam vizsgált adatbázis motor a MySQL volt. Ez az első szempontnak megfelelt, lévén, hogy ez az egyik legnépszerűbb adatbázis motor Kubernetesben futtatása megoldott. Emellett relatíve alacsony az erőforrás lábnyoma. Mindezek mellett viszont nem a MySQL-t tartottam a lehető legjobb választásnak a szegényes funkciókészlete miatt. + +Kifejezetten tetszetős volt számomra a Microsoft által fejlesztett SQL Server, amit a legfrissebb kiadásban mélyen integráltak a Kubernetesbe és az általa nyújtott szolgáltatások is kedvezőek, viszont sajnos igen sok erőforrást használ. + +Az ideális kompromisszumot a képességek, erőforrásigény és Kubernetesbe illeszthetőség között a Postgresql jelentette, amely egy népszerű, nyílt forráskódú adatbázis motor, emellett az SQLAlchemyvel is jól integrálható. + +Mivel ez volt az első mikroszolgáltatás, amely üzenetsort is kellett használjon, itt is én választottam ki az általunk használt megoldást. Itt is megvizsgáltam számos megoldást. Ebben az esetben is fontos szempont volt a Kubernetesbe integrálhatóság, viszont funkciók terén csak annyi megkötésünk volt, hogy legyen képes egy küldő, több fogadó típusú üzenetsorok kezelésére. + +A KubeMQ tűnt először az egyik legjobb csomagnak, ugyanis telepítése Kubernetesbe egyszerű, üzemeltetése pedig egyszerű. Ellene szól viszont, hogy az ingyenesen elérhető változata havi szinten limitált számú üzenetet képes továbbítani, emiatt használatát elvetettük. + +Kipróbáltam az Apache Alapítvány több üzenetsor megoldását is. Az egyik ilyen az egyik legnépszerűbb message queue megoldás, a Kafka. Ez viszont timeseries üzenetek továbbítására specializálódott, ami kifejezetten nem a mi use-case-ünk. A másik az ActiveMQ, amely képességei lefedik a mi igényeinket, de Python-hoz másodrangú eszköztára van csak, a fejlesztők a Java-ban található Java Message Service API-ra koncentrálnak. + +A választás végül a RabbitMQ-ra esett, amely egy Erlang nyelven készült, nyílt forráskódú megoldás. Elsőrangú Python könyvtárt készítettek hozzá, a Kubernetesbe telepítése Helm chart segítségével lehetséges. A fejlesztést megkönnyíti az adminisztrációs felülete, ahol minden üzenetsoron minden üzenetet, valamint ezekről statisztikákat is meg lehet tekinteni. Az egyes üzenetsorokhoz megadható a bejelentkezés szükségessége, így a mikroszolgáltatások biztonsági szempontból történő elválasztása is lehetséges. Sajnos nem létezik hozzá működő Flask plugin, ezért a kapcsolat életben tartását kézzel kellett elvégeznem. Ennek ellenére úgy gondoltam, hogy továbbra is a RabbitMQ a legjobb message queue megoldás, ami kielégíti minden igényünk. + +A metaadatok validációjára Marshmallow-t használtam. Ez a könyvtár képes előre definiált séma alapján JSON-ből betölteni adatokat, valamint szerializálni őket. A fejlesztés során előkerült egy olyan probléma, hogy az SQLAlchemy segítségével lekérdezett rekordokat a Flask nem tudta automatikusan JSON-ba szerializálni a Python beépített szerializálójával. Erre is megoldást jelentett a Marshmallow, ugyanis létezik egy Marshmallow-SQLAlchemy nevű könyvtár, amely definiál olyan SQLAlchemy sémaosztályokat, amiket a Marshmallow képes JSON-be szerializálni és betölteni. + +\subsection{Independent Results Service} +A mikroszolgáltatás architektúra lehetővé teszi divergens technológiák együttműködését. Ezt kihasználva az Independent Results Service mikroszolgáltatást nem Python, hanem Kotlin nyelven írtam. Ez azt jelentette, hogy a teljes eszköztár, melyet megismertem nem voltak használhatók e komponens fejlesztése esetében, viszont utóbbi programnyelvben elérhető coroutine-ok olyan előnyt jelentettek, ami miatt megérte megtanulni az új eszköztár használatát. Például a Kotlin esetében a webes logika megvalósítására a legnépszerűbb könyvtár a Ktor, melynek szolgáltatáskészlete hasonlít a Flaskhoz. + +A Kotlin egy a Java Virtual Machine-t használó modern programnyelv, amelynek célja a Java hiányosságait, hátrányait javítani. A Java-hoz képest a legnagyobb különbség a null-safe viselkedése és a coroutine-ok használata. Utóbbi használatával könnyedén fejleszthető nagy teljesítményű alkalmazást. Mivel a Kotlin egy fiatal nyelv, valamint leginkább Android appok fejlesztésére használják, így az egyes könyvtárak nem feltétlen olyan fejlettek, mint a Python esetében. Ilyen volt például az általam használt ORM megoldás, az Exposed. Ennek előnye, hogy jól illeszkedik a kotlinos programozási paradigmákhoz, viszont nem képes connection poolingra másik library-k használata nélkül, a Postgresql-t viszont natívan támogatja. + +Bár a Kotlin fiatal nyelv, mivel a kód JVM bájtkóddá fordul, minden Java nyelven írott kóddal együtt tud működni egy Kotlin nyelven írt alkalmazás. Ennek hála a a Kotlin RabbitMQ támogatása elsőrangú. A Javához készült RabbitMQ könyvtár használata mellett szükség volt egy olyan library-re, amely lehetővé teszi coroutine-t használó üzenetfeldolgozó metódusok írását. + +A Kotlin használata akkor fizetődött ki, miután a REST API-t kiszolgáló réteget megírtam és az alkalmazásba kellett illesszem a message queuetól üzeneteket fogadó kódot. Itt egy tradicionális programnyelvben problémába ütköztem volna, ugyanis az üzenet feldolgozása vagy blokkolná a webes kérések kiszolgálását vagy bonyolult többszálú logikát kellene megvalósítsak. Ez esetben viszont elég volt egy új objektum létrehozása, amiben definiáltam a coroutine-t. + +A mikroszolgáltatás fejlesztése során sok időt töltöttem az adatbázis réteg fejlesztésével, mert nehézkesen tudtam csak működésre bírni az Exposed könyvtárat a connection poolinggal és a JSON szerializációval. + +\subsection{Result Statistics Service} +Timeseries adatbázist a rendszerben csak ez a mikroszolgáltatás használ, így ennek kiválasztása ezen komponens fejlesztése során történt. A kiválasztás során a szempontok csak a mikroszolgáltatás saját szempontjai voltak. Próbáltam kiválasztani a lehető legegyszerűbb megoldást, ugyanis nincs szükség például komplex adatstruktúrák támogatására, viszont a retention policy-k használatának lehetősége és a nagy teljesítmény követelmény volt. + +Először a Prometheust vizsgáltam meg, amely egy népszerű timeseries adatbázis rendszer, amit főleg metrikák tárolására használnak. Emiatt támogatja a retention policy-ket, viszont nagy erőforrás lábnyomba van és a lehetőségeinek kis százalékát tudnám csak kihasználni. + +Az InfluxDB egy nyílt forráskódú, nagy teljesítményű timeseries adatbázis. Nagy előnye az egyszerű API-ja és jó támogatottsága. Kellően alacsony az erőforrásigénye és SQL-szerű lekérdezőnyelve kedvező opcióvá teszi. Kifejezetten könnyű hozzá Grafana segítségével grafikonok, dashboardok készítése. + +Végezetül az OpenTSDB timeseries adatbázist vizsgáltam meg. Könnyen lehet vele grafikus interfészén grafikonokat készíteni, viszont ezek az opciók limitáltibbak, mint a Grafana esetében, valamint az adatbázis rendszer Hadoop alapokon nyugszik, ami azt jelenti, hogy a projekt jelenlegi skáláján nem ez a legjobb választás. + +A Result Statistics Service mikroszolgáltatást először C\# nyelven kezdtem el megvalósítani, ugyanis .NET fejlett aszinkron API-val rendelkezik és eredeti elképzeléseim szerint erre szükség lett volna annak érdekében, hogy az eredményeket megfelelő sebességgel le tudja tárolni a mikroszolgáltatás, viszont rövidesen olyan problémába ütköztem, amely megakadályozta a .NET Core platform használatát, ami az InfluxDB API-ját implementáló könyvtárak és azok dokumentációjának rossz minősége volt. Ez jelenthette volna az InfluxDB leváltását, viszont úgy gondoltam az itt ismertetett szakmai érvek erősek voltak annak megtartása mellett. Emiatt döntöttem úgy, hogy inkább a programnyelvet cserélem le Pythonra. + +E mikroszolgáltatás esetében az üzleti logika eleve nem bonyolult, az üzenetsoron érkező üzenetben található adatot az aktuális idővel megcímkézve be kell illeszteni az InfluxDB-be. Ezt viszont szerettem volna aszinkron módon megtenni, ugyanis elképzelhető az üzenetsoron nagy számú üzenet érkezése rövid idő alatt. Ennek implementációját is elvetettem, ugyanis az InfluxDB, ahogy kutatásom során kiderült, olyan nagy számú kérést képes feldolgozni rövid idő alatt, hogy nem érné meg aszinkron logikával bonyolítani a mikroszolgáltatást \cite{influxdb-performance} . + +\section{Kubernetes} +Az általunk használt Kubernetes klaszter egy fizikai számítógépen futott négy virtuális gépen. A rendszerben egy Master node és három Worker node volt. A tárterületet ugyanerről a fizikai gépről osztottuk ki a fürt számára NFS-sel, a Persistent Volume-okat statikusan definiáltuk. Az általam fejlesztett mikroszolgáltatásokat és az azokhoz kapcsolódó komponenseket magam telepítettem a klaszterbe. + +Az általunk fejlesztett rendszer számára létrehoztam egy Kubernetes névteret, ahova telepítettük az általunk fejlesztett mikroszolgáltatásokat és minden általuk használt komponenst. + +Minden mikroszolgáltatáshoz tartozó Kubernetes API obejktumokat leíró YAML állományt hasonlóan készítettem el. Magát az alkalmazást egy Deployment segítségével telepítettem a klaszterbe. Az egyes mikroszolgáltatások környezeti változók segítségével konfigurálhatók. Ezeket ConfigMap segítségével állítottam be. Mivel el kell érjék egymást a szolgáltatások, szükség volt Service objektum definiálása, ezek viszont ClusterIP típusúak voltak, hiszen a külvilágnak nem szabad közvetlen elérni egyes végpontokat. + +A RabbitMQ telepítését Helm segítségével végeztem. Egészen pontosan a Helm legújabb, hármas verzióját használva, ami használatához nincs szükség semmilyen extra komponens telepítésére a klaszterbe. Az általam használt Helm Chartban lehetőség volt megadni a PersitentVolumeClaim (PVC) méretét, melyet 10 gigabájtra állítottam. + +A PostgreSQL számára saját Deploymentet definiáltam, ugyanis a fejlesztők által készített konténer image ezt könnyedén elvégezhetővé teszi. Megadtam minden adatbázis számára egy-egy 10 gigabájtos PVC-t, valamint a saját komponenseimhez hasonlóan a konfigurációs környezeti változókat ConfigMapben adtam meg. Itt is szükség volt hálózati kommunikációra, ezért az adatbázis motoroknak is adtam meg saját ClusterIP típusú Service objektumot. + +Az InfluxDB telepítése hasonló lépéseket követelt meg, csupán más paraméterekkel. + +Mint azt az első fejezetben írtam, a mikroszolgáltatás alapú rendszerekhez gyakran használnak API Gateway-t. Ennek kiválasztását és telepítését is én végeztem. Megvizsgáltam olyan megoldásokat, amik Kubernetes Ingress Controllerként viselkednek és olyanokat is, amelyeket szimpla Kubernetesbe telepített alkalmazásként lehet használni. + +Az egyik legnépszerűbb API Gateway, ami az utóbbi kategóriába sorolható a Netflix által Java nyelven fejlesztett Zuul. Ezt a megoldást nagy számú mikroszolgáltatásokból álló rendszerekhez tervezték, amelyek nagy számú kérést kell kiszolgáljanak. Konfigurációja Spring Boot segítségével lehetséges YAML fájllal, vagy Java kód alapú konfigurációval. + +Alternatív a Spring projekt által készített Spring Cloud Gateway. Ez gyakorlatilag ugyanazon szolgáltatásokat nyújtja, mint a Zuul, viszont támogatja a reaktív programozási paradigmát, az általunk fejlesztett rendszer viszont nem ezt követi. + +A Kubernetes-natív kategóriába sorolható API Gatewayek közé tartozik a Kong, ami a háttérben NGINX-et használ, annak konfigurációját generálja. Támogat minden fontosabb funkciót, melyet egy API Gateway-től elvárhatunk. Ilyen például a rate limiting, circuit breaking, fallback és autentikációs képességek. Előnye, hogy az Ingress objektumban lehet konfigurálni az egyes endpointokat. + +Alternatíva az Ambassador használata, ami a háttérben Envoy-t használ. Szintén támogat minden fontos képességet, viszont hátránya, hogy konfigurációja label-be ágyazott YAML segítségével lehetséges. Ez nem kívánatos, hiszen erre Custom Resource Definitionöket hibabiztosabban és flexibilisebben lehetne használni. + +Megvizsgáltam továbbáa Gloo-t, aminek különleges előnye, hogy képes automatikusan alkalmazások API-jának automatikus felismerésére OpenAPI definíciók segítségével, amiket mi a fejlesztési folyamat elején definiáltunk. + +A választásom végül a Kong-ra esett, mert számomra szimpatikus volt, hogy egy egyszerű NGINX webszerver segítségével oldja meg funkcióit. A telepítést ez után az Ingress objektumok definiálásával és a klaszterbe telepítésével folytattam. + +\section{Elkészült rendszer próbája} +A mikroszolgáltatások fejlesztése közben önmagukban teszteltem őket és próbáltam ki működésüket. A fejlesztési folyamat végén viszont közösen kipróbáltuk, hogy működnek együtt az általunk fejlesztett komponensek, milyen hibák jönnek itt elő. + +Előkerültek olyan hibák, amik eltérő feltételezésekből következnek. Ezen esetekben egyeztettük a konvencióink, majd a javítás után újra teszteltük a működést. + +\section{\"Osszefoglal\'as} +A félév során számos új tudással bővültem, többek között elsajátítottam a Kotlin nyelv alapszintű működését, valamint megtanultam, hogy kell mikroszolgáltatás alapú rendszert tervezni, fejleszteni és az ezek Kubernetesbe telepítésével kapcsolatos megontolásokat is részletesebben megismertem. Több technológia működésébe nyertem betekintést, ezzel tágítva az eszköztáram. + +Elkészítettem több újra használható Kubernetes Deploymentet és a hozzájuk tartozó egyéb API objektumokat, ami a későbbi munkám során segítségemre lehet. Megterveztem és végrehajtottam az általunk fejlesztett komponensek automatikus Kubernetesbe telepítését és a frissítések automatikus elvégzését. + +Marcell-lel közösen egy majdnem kész terméket fejlesztettünk le, amire büszke vagyok. A munkafolyamataink részletesen dokumentáltuk, így amennyiben a jövőben a projektet folytatni kívánja valaki az itt leírtak és az általunk felhalmozott dokumentáció alapján hatékonyan megteheti. + +A továbbiakban véleményem szerint érdekes lehet a kialakított rendszert teljesítmény, áteresztőképesség szempontjából megvizsgálni, mire képes és hogyan viselkedik komolyabb terhelés alatt. diff --git a/src/figures/architecture-simple.png b/src/figures/architecture-simple.png new file mode 100644 index 0000000000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ldG9 HPB`m7fi@*d literal 0 HcmV?d00001 diff --git a/src/figures/convert.cmd b/src/figures/convert.cmd new file mode 100644 index 0000000..f351bcd --- /dev/null +++ b/src/figures/convert.cmd @@ -0,0 +1,7 @@ +@echo off +for %%j in (*.eps) do ( +echo converting file "%%j" +epstopdf "%%j" +) +echo done . + diff --git a/src/huplain.bst b/src/huplain.bst new file mode 100644 index 0000000..0c02e48 --- /dev/null +++ b/src/huplain.bst @@ -0,0 +1,1910 @@ +% +% huplain.bst -- plain.bst in Hungarian +% by pts@fazekas.hu at Thu Oct 30 10:10:04 CET 2003 +% tetex-url at Mon May 3 20:01:40 CEST 2004 +% derived from BibTeX standard bibliography style `plain' +% version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09. +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 2 of the License, or +% (at your option) any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% !! title={Az foo} -> key={foo} +% !! auto add space into URLs longer than 70 characters +% !! don't remove double-accent in T1 encoding: \'{\`a}} +% !! sort year +% !! make sure about Hungarian typography of {proceedings} and {inproceedings} +% it is better now to have talked=1, (Elhangzott a ... cm konferencin) +% !! also remove space after \ae before calling purify$ +% !! crossrefs +% !! ` type ' +% !! hu ordering: author, year, title if author is present +% title, year if author is missing! +% !! use and document ``address'' +% !! MSZ 3401--81. A bibliogrfiai ttelek betrendbe sorolsnak szablyai. +% !! MSZ 3402--80. Knyvek bibliogrfiai adatkzlse s bels elrendezse. +% !! MSZ 3424/*-*. Bibliogrfiai lers. *. +% !! MSZ 3432-85. Szavak s szkapcsolatok rvidtse a bibliogrfiai lersban. +% !! MSZ 3440/*-*. A bibiliogrfiai lers besorolsi adatai. *. +% !! abbrv style for J.-P. Sartre +% !! test all entry types +% !! optional \uppercase or \textsc +% !! "5~ {\hbox{ja}}nu\'ar" #1 "({l,}{ff,})" format.name$ warning$ +% !! format.name$ keeps the first char of the name only, so specify {Gy}ula +% !! don't use width$ ??, because it's the cmr10 font in 1987. +% !! getting the first chars of names +% !! \include... +% !! bibgerman.sty, gerplain.bst, language = "german" | "USenglish" | "english" etc. +% \selectlanguage{...} \bibitem... +% !! doc: parametric volume: `ktet' (volumeisyearly={1}) instead of `vf.' +% OK: smaller space for \newblock +% OK: huname: name in hungarian order +% SUXX: cannot read current (overridden) MACRO values from .bst +% SUXX: #161 int.to.chr$ doesn't work (out of bounds), stupid BibTeX... +% Dat: @preamble { "..." # "..." } +% Dat: bibtex removes spaces from end of field contents +% Dat: `volume=' is `vfolyam' +% Dat: Doc: key={{ }.} +% Dat: Doc: write non-decaptilized titles: title = {Fejt {Ferenc} s a szocildemokrcia}, +% Dat: print debug messages with "foo" warning$ +% + +ENTRY + { address + author + booktitle + chapter + edition + editor + howpublished + institution + journal + key + month + note + number + organization + pages + publisher + school + series + title + type + volume + year + + street + zip + city + phone + mobile + name + + numvolumes + numpages + tetex-url + ctan-url + url + isbn + issn + nocheck % ****pts**** + huname % ****pts**** + inputenc % ****pts**** + author2 % ****pts**** + talked % ****pts**** + volumeisyearly % ****pts**** + + % vvv for fmts + firstname.fmt % ****pts**** + lastname.fmt % ****pts**** + } + {} + { label adr.char } % !! what does this mean? + + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} + +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} + +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} + + + +STRINGS { ss tt } + +%STRINGS { acc.latin2.160 acc.latin1.160 acc.160 } +%FUNCTION {init.accs} { +% " A L LS SSTZ-ZZ a l ls sstz zzRAAAALCCCEEEEIIDDNNOOOO*RUUUUYTsraaaalccceeeeiiddnnoooo/ruuuuytd" 'acc.latin2.160 := +% " ! | AAAAAAACEEEEIIIIDNOOOOO*OUUUUYTsaaaaaaaceeeeiiiidnooooo/ouuuuyty" 'acc.latin1.160 := +%} +%%** @param #1 string +%%** @return string +%FUNCTION {rmacc.latinx} { % ****pts**** +% 'tt := +% "" 'ss := +% { tt empty$ not } { +% #1 +% { duplicate$ tt swap$ #1 substring$ +% duplicate$ "" = { pop$ #0 } { chr.to.int$ #160 < } if$ +% } { #1 + } while$ +% duplicate$ tt swap$ #1 swap$ #1 - substring$ +% % duplicate$ ";" * warning$ +% ss swap$ * 'ss := +% duplicate$ tt swap$ #1 substring$ +% duplicate$ "" = { pop$ } { +% chr.to.int$ #159 - acc.160 swap$ #1 substring$ +% ss swap$ * 'ss := +% #1 + +% } if$ +% tt swap$ global.max$ substring$ 'tt := +% % tt warning$ +% } while$ +% ss +%} +% +%%** @param #1 a string +%%** @return a string +%FUNCTION {rmacc} { % **** pts **** +% inputenc empty$ 'skip$ { +% inputenc "latin1" = { acc.latin1.160 'acc.160 := rmacc.latinx } 'skip$ if$ +% inputenc "latin2" = { acc.latin2.160 'acc.160 := rmacc.latinx } 'skip$ if$ +% } if$ +%} + +STRINGS { acc4.latin2.160 acc4.latin1.160 acc4.160 } +FUNCTION {init.accs4} { + "%%%%%%%%%%%%%%%%%%%%%%%%%%%%\S %\" quote$ "{}%%%%%%%%%%%%%%%%%%%%%%%%\={}%%%%%%%%%%%%%%%%\'{}%%%%\P %%%%%\c\ %%%%%%%%%%%%%%%%%%%%%%%%%%%%\`A%\'A%\^A%\~A%\" quote$ "A%\r A\AE%\c C\`E%\'E%\^E%\" quote$ "E%\`I%\'I%\^I%\" quote$ "I%\DH%\~N%\`O%\'O%\^O%\~O%\" quote$ "O%%%%%\O %\`U%\'U%\^U%\" quote$ "U%\'Y%\TH%\ss%\`a%\'a%\^a%\~a%\" quote$ "a%\r a\ae%\c c\`e%\'e%\^e%\" quote$ "e%\`\i\'\i\^\i\" quote$ "\i\dh%\~n%\`o%\'o%\^o%\~o%\" quote$ "o%%%%%\o %\`u%\'u%\^u%\" quote$ "u%\'y%\th%\" quote$ "y%" * * * * * * * * * * * * * * * * * * * * * * * * 'acc4.latin1.160 := + "%%%%\k A\u{}\L %%%%%\v L\'S%\S %\" quote$ "{}\v S\c S\v T\'Z%%%%%\v Z\.Z%%%%%\k a\k\ \l %\'{}\v l\'s%\v{}\c\ \v s\c s\v t\'z%\H{}\v z\.z%\'R%\'A%\^A%\u A\" quote$ "A%\'L%\'C%\c C\v C\'E%\k E\" quote$ "E%\v E\'I%\^I%\v D\DJ%\'N%\v N\'O%\^O%\H O\" quote$ "O%%%%%\v R\r U\'U%\H U\" quote$ "U%\'Y%\c T\ss%\'r%\'a%\^a%\u a\" quote$ "a%\'l%\'c%\c c\v c\'e%\k e\" quote$ "e%\v e\'\i\^\i\v d\dj%\'n%\v n\'o%\^o%\H o\" quote$ "o%%%%%\v r\r u\'u%\H u\" quote$ "u%\'y%\c t\.{}" * * * * * * * * * * * * * * * * * * 'acc4.latin2.160 := +} +%** @param #1 string +%** @return string +FUNCTION {rmacc4.latinx} { % ****pts**** + 'tt := + "" 'ss := + { tt "" = not } { % Dat: empty$ is true for space + #1 + { duplicate$ tt swap$ #1 substring$ + duplicate$ "" = { pop$ #0 } { chr.to.int$ #160 < } if$ + } { #1 + } while$ + duplicate$ tt swap$ #1 swap$ #1 - substring$ + % duplicate$ ";" * warning$ + ss swap$ * 'ss := + duplicate$ tt swap$ #1 substring$ + duplicate$ "" = { pop$ } { + % chr.to.int$ #159 - acc.160 swap$ #1 substring$ + duplicate$ chr.to.int$ + acc4.160 swap$ duplicate$ + duplicate$ + #639 - #4 substring$ + duplicate$ "%%%%" = { + pop$ + } { + swap$ pop$ + duplicate$ #4 #1 substring$ "%" = { #1 #3 substring$ } 'skip$ if$ + "{" swap$ * "}" * + } if$ + ss swap$ * 'ss := + #1 + + } if$ + tt swap$ global.max$ substring$ 'tt := + % tt warning$ + } while$ + ss +} + +%** Changes "" to "{\'a}" etc. +%** @param #1 a string +%** @return a string +FUNCTION {rmacc4} { % **** pts **** + inputenc empty$ 'skip$ { + inputenc "latin1" = { acc4.latin1.160 'acc4.160 := rmacc4.latinx } 'skip$ if$ + inputenc "latin2" = { acc4.latin2.160 'acc4.160 := rmacc4.latinx } 'skip$ if$ + } if$ +} + +INTEGERS { acc.fwd } +%** Changes "fo{\'o}h{\H u}s" to "fo\'oh\H us". Helps keeping ligatures. +%** Changes `{\ae}' to `\ae ' and `{\\XY}' to `\XY ' +%** Changes only known accents inside braces, followed by 1 or 2 accented +%** letters. +%** Dat: previous \oe must be inserted as {\\oe}, the same for {\DH} etc. +%** @param #1 string +%** @return string +FUNCTION {rmbrace.accs} { % ****pts**** + % Dat: LaTeX non-alphanumeric accents \`\'\^\~\"\=\. + % Dat: LaTeX accents for purify$: \c\u\v\H\d\b\t\r + % Dat: specially removed: {\?...} -> ... + 'tt := + "" 'ss := + { tt "" = not } { + #1 + { duplicate$ tt swap$ #2 substring$ + duplicate$ "" = { pop$ #0 } { "{\" = not } if$ + } { #1 + } while$ + duplicate$ tt swap$ #1 swap$ #1 - substring$ + % duplicate$ ";" * warning$ + ss swap$ * 'ss := + + duplicate$ tt swap$ #2 + #1 substring$ + "}" = { #3 } { + duplicate$ tt swap$ #3 + #1 substring$ + "}" = { % `{\i}' etc. + duplicate$ tt swap$ #2 + #1 substring$ + duplicate$ "o" = {#4} { + duplicate$ "O" = {#4} { + duplicate$ "l" = {#4} { + duplicate$ "L" = {#4} { + duplicate$ "i" = {#4} { + duplicate$ "j" = {#4} { + #3} % Dat: disallow other {\X} + if$} if$} if$} if$} if$} if$ + swap$ pop$ + } { + duplicate$ tt swap$ #4 + #1 substring$ + "}" = { #5 } { + duplicate$ tt swap$ #5 + #1 substring$ + "}" = { #6 } { #3 } if$ + } if$ + } if$ + } if$ + 'acc.fwd := + % Status: offset-of-"\{" + %%acc.fwd int.to.str$ warning$ + acc.fwd #3 = { + duplicate$ tt swap$ acc.fwd substring$ % copy 3 bytes + } { + duplicate$ #1 + tt swap$ acc.fwd #2 - substring$ % keep "\'o" or "\H u" only + %%duplicate$ warning$ + duplicate$ "\oe" = {#5} { + duplicate$ "\OE" = {#5} { + duplicate$ "\ae" = {#5} { + duplicate$ "\AE" = {#5} { + duplicate$ "\aa" = {#5} { + duplicate$ "\AA" = {#5} { + duplicate$ "\th" = {#5} { + duplicate$ "\TH" = {#5} { + duplicate$ "\dh" = {#5} { + duplicate$ "\DH" = {#5} { + duplicate$ "\dj" = {#5} { + duplicate$ "\DJ" = {#5} { + duplicate$ "\ng" = {#5} { + duplicate$ "\NG" = {#5} { + duplicate$ "\ss" = {#5} { + duplicate$ "\SS" = {#5} { + duplicate$ "\o" = {#5} { + duplicate$ "\O" = {#5} { + duplicate$ "\l" = {#5} { + duplicate$ "\L" = {#5} { + duplicate$ "\i" = {#5} { + duplicate$ "\j" = {#5} { + duplicate$ #2 #1 substring$ + duplicate$ "`" = {#1} { + duplicate$ "'" = {#1} { + duplicate$ "^" = {#1} { + duplicate$ "~" = {#1} { + duplicate$ quote$ = {#1} { + duplicate$ "=" = {#1} { + duplicate$ "." = {#1} { + duplicate$ "c" = {#2} { + duplicate$ "u" = {#2} { + duplicate$ "v" = {#2} { + duplicate$ "H" = {#2} { + duplicate$ "d" = {#2} { + duplicate$ "b" = {#2} { + duplicate$ "t" = {#2} { + duplicate$ "r" = {#2} { + duplicate$ "?" = {#3} { + duplicate$ "\" = {#4} { % added at Mon May 17 15:39:30 CEST 2004 + #0} if$} if$} if$} if$} if$} if$} if$} if$} if$} + if$} if$} if$} if$} if$} if$} if$} if$ + % Stack: "\'o" "'" 0|1|2 + swap$ pop$ + } if$} if$} if$} if$} if$} if$} if$} if$} if$} if$} if$} if$} if$} if$} + if$} if$} if$} if$} if$} if$} if$} if$ + + % Stack: "\'o" 0|1|2|3 + duplicate$ #5 = { + pop$ " " * % `{\oe}' becomes `\oe ' + } { duplicate$ #4 = { + pop$ #2 global.max$ substring$ % include single backlsash + " " * % add space so `{\\th}' becomes `\th ' + } { duplicate$ #3 = { + pop$ #3 global.max$ substring$ + } { duplicate$ #2 = { + pop$ + duplicate$ #3 #1 substring$ + " " = + } 'skip$ if$ + % Stack: "\'o" 0|1 + 'skip$ { "{" swap$ * "}" * } if$ + } if$ } if$ } if$ + } if$ + ss swap$ * 'ss := + acc.fwd + tt swap$ global.max$ substring$ 'tt := + } while$ + ss +} + +% --- + +INTEGERS { output.state before.all mid.sentence after.sentence after.block + cur.adr.char after.authors } +STRINGS { s t ls rs } + +FUNCTION {init.state.consts} +{ #0 'before.all := + #1 'mid.sentence := + #2 'after.sentence := + #3 'after.block := + #4 'after.authors := +} + + +FUNCTION {output.nonnull} +{ 's := + output.state mid.sentence = + { ", " * write$ } + { output.state after.block = + { add.period$ write$ + newline$ + "\bibNewBlock " write$ + } + { output.state before.all = + 'write$ + { output.state after.authors = + { write$ newline$ "\bibNewBlock " write$ } + { add.period$ " " * write$ } + if$ + } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ + s +} + +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} + +FUNCTION {output.check} +{ 't := + duplicate$ empty$ + { pop$ + nocheck empty$ { "empty " t * " in " * cite$ * warning$ } {} if$ + } + 'output.nonnull + if$ +} + +% @return a string +FUNCTION {output.bibitem} +{ newline$ + "\bibitem{" write$ + cite$ write$ + "}" write$ + inputenc empty$ {} { " \bibInputEncoding{" inputenc "}" * * write$ } if$ + newline$ + "" + before.all 'output.state := +} + +FUNCTION {fin.entry} +{ add.period$ + write$ + newline$ + inputenc empty$ 'skip$ { "\bibResetInputEncoding" write$ newline$ } if$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} + +% ****pts**** +FUNCTION {new.block.authors} { + duplicate$ empty$ 'skip$ { ":" * } if$ + output.state before.all = + 'skip$ + { after.authors 'output.state := } + if$ +} + +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} + +FUNCTION {new.block.checka} +{ empty$ + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.sentence.checka} +{ empty$ + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {new.sentence.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} + +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "{\em " swap$ * "}" * } + if$ +} + +INTEGERS { nameptr namesleft numnames } + +FUNCTION {format.isbn} +{ isbn empty$ + { "" } + { new.block "ISBN " isbn * } + if$ +} + +FUNCTION {format.issn} +{ issn empty$ + { "" } + { new.block "ISSN " issn * } + if$ +} + +%** is.url.split.char <0-or-1> +%** Is the spefified char candidate to split the URL at? +FUNCTION {is.url.split.char} { + duplicate$ "/" = { pop$ #1 } { + duplicate$ "." = { pop$ #1 } { + duplicate$ "?" = { pop$ #1 } { + duplicate$ "&" = { pop$ #1 } { + duplicate$ "-" = { pop$ #1 } { + pop$ #0 } if$ } if$ } if$ } if$ } if$ +} + +%** string.length +%** Imp: a faster implementation +%** Dat: destroys 'ls +FUNCTION {string.length} { + 'ls := + #1 + { duplicate$ ls swap$ #1 substring$ "" = #1 swap$ - } + { #1 + } while$ + #1 - + "" 'ls := +} + + +INTEGERS { last.split.ofs } + +%** split.url +%** We have to add spaces (works with \usepackage{url}), because otherwise +%** bibtex adds a % at column 79. +%** After a maxinmum of 71 chars, a space gets inserted. +%** Clobbers 'ss, 'ls and 'rs. +FUNCTION {split.url} { + % We add spaces after the last is.url.split.char + 'ss := % save original string + #0 'last.split.ofs := % Dat: last offset to split _after_ + "" 'rs := + #1 % loop variable + { duplicate$ ss swap$ #1 substring$ "" = #1 swap$ - } % more chars in ss + { duplicate$ ss swap$ #1 substring$ is.url.split.char { + duplicate$ 'last.split.ofs := + } 'skip$ if$ + duplicate$ #70 > { + last.split.ofs #0 = { + duplicate$ 'last.split.ofs := % Dat: split at any char if cannot split at good position + } 'skip$ if$ + rs ss #1 last.split.ofs substring$ " " * * 'rs := + ss last.split.ofs #1 + ss string.length substring$ 'ss := + %% ss warning$ + last.split.ofs - #1 + % decrement loop variable + %% duplicate$ warning$ + #0 'last.split.ofs := + } { #1 + } if$ + } while$ + pop$ % Dat: pop loop variable + rs ss * + "" 'ss := + "" 'rs := +} + +FUNCTION {output.url} { + url empty$ + { "" } + { new.block "" output.nonnull + before.all 'output.state := + newline$ % Dat: bibtex breaks lines -- let it be longer + "\bibUrll{URL} >" url split.url * ">" * } + if$ output + ctan-url empty$ + { "" } + { new.block "" output.nonnull + before.all 'output.state := + newline$ % Dat: bibtex breaks lines -- let it be longer + "\bibUrll{CTAN} >" ctan-url split.url * ">" * } + if$ output + tetex-url empty$ + { "" } + { new.block "" output.nonnull + before.all 'output.state := + newline$ % Dat: bibtex breaks lines -- let it be longer + "\bibUrll{te\TeX} >" tetex-url * split.url ">" * } + if$ output +} + +% ****pts**** +STRINGS { nfmt0 nfmt1 nfmt2 nfmt3 } +STRINGS {firstname.fmt0 lastname.fmt0} +FUNCTION {init.nfmt0} { + "ff" 'firstname.fmt0 := + "ll" 'lastname.fmt0 := + % "f." 'firstname.fmt0 := % similar to abbrev.bst +} +FUNCTION {init.nfmts} { + "{" firstname.fmt0 "~}{vv~}{" lastname.fmt0 "}{, jj}" * * * * 'nfmt0 :=% 0: English order + "{jj~}{vv~}{" lastname.fmt0 "}{~" firstname.fmt0 "}" * * * * 'nfmt1 := % 1: Hungarian name in Hungarian bib + "{vv~}{" lastname.fmt0 "}{, " firstname.fmt0 "}{, jj}" * * * * 'nfmt2 := % 2: English name in Hungarian bib + "{jj~}{vv~}{ll}{~f.}" 'nfmt3 := % 3: Hungarian name in Hungarian bib, abbreviated name +} + +FUNCTION {format.names} +{ rmacc4 's := % ****pts**** + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } { + % ****pts**** + huname empty$ { s nameptr nfmt0 format.name$ 't := }{ % empty: English order + huname "0" = { s nameptr nfmt0 format.name$ 't := }{ % 0: English order + huname "1" = { s nameptr nfmt1 format.name$ 't := }{ % 1: Hungarian name in Hungarian bib + huname "2" = { s nameptr nfmt2 format.name$ 't := } % 2: English name in Hungarian bib + { s nameptr nfmt3 format.name$ 't := } % 3: Hungarian name in Hungarian bib, abbreviated name + if$ }if$ }if$ }if$ + % ^^^ Dat: important to have no space in {ll} for "others" + t rmbrace.accs 't := % ****pts**** + nameptr #1 > + { namesleft #1 > + { "\bibAnd 0" * t * } + { % numnames #2 > { "," * } 'skip$ if$ % ****pts**** + %% t ";;" * warning$ + t "others" = + { "\bibEtAl ." * } + { numnames #2 > { "\bibAnd 2" } { "\bibAnd 1"} if$ * t * } + if$ + } + if$ + } + 't + if$ + %% t warning$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } while$ +} + +FUNCTION {format.authors} +{ author empty$ + { "" } + { author format.names } + if$ +} + +FUNCTION {format.editors} +{ editor empty$ + { "" } + { editor format.names + editor num.names$ #1 > { "\bibEd 1" } { "\bibEd 0" } if$ * %****pts**** + } + if$ +} + +FUNCTION {format.title} +{ title empty$ + { "" } + { title rmacc4 "t" change.case$ rmbrace.accs } % Dat: ****pts**** get used to it in English... + if$ +} + +FUNCTION {n.dashify} +{ 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { t #1 #2 substring$ "--" = not + { "--" * + t #2 global.max$ substring$ 't := + } + { { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + if$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +% Dat: possible months formats in .bib: +% month = jun # "-" # aug, --> "j\'unius--\allowbreak augusztus" !! +% month = jun, --> "j\'unius" +% month = "8~" # feb, --> "februr 8." +% month = nov # ", " # dec, --> "november\nobreak\hskip--\allowbreak december" + +FUNCTION {format.date} +{ year empty$ + { month empty$ + { "" } + { "there's a month but no year in " cite$ * warning$ + month + } + if$ + } + { month empty$ + 'year + { year ".\ " * + month #1 "{ll}{~ff.}" format.name$ % convert "december" -> "december"; "5~december" -> "december~5." + % ^^^ !! convert "janu\'ar--febru\'ar" and "janu\'ar, febru\'ar" to "j--f"... + % ^^^ !! convert . to \hbox{.} at end, to have frenchspacing... + * } % !! date + if$ + } + if$ +} + +FUNCTION {format.btitle} +{ title rmbrace.accs emphasize +} + +%** tie.or.space.connect "" +%** is ~ if is long (>=3 normal letters) +FUNCTION {tie.or.space.connect} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ * * +} + +FUNCTION {numpages.output} { % ****pts**** + numpages empty$ 'skip$ { + numpages "p." tie.or.space.connect output + } if$ +} + +FUNCTION {note.output} { % ****pts**** + note empty$ 'skip$ { note rmbrace.accs output.nonnull } if$ +} + +FUNCTION {either.or.check} +{ empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} + +FUNCTION {format.series} { % ****pts**** + series empty$ { "" } { + series + type$ "inproceedings" = type$ "proceedings" = or + { " kon\-fe\-ren\-cia\-so\-ro\-zat" } { " sorozat" } if$ + * + } if$ +} + +% Dat: INCOLLECTION: number = 23, series = "Fast Computers", +FUNCTION {format.bvolume} { % ****pts**** + volume empty$ number empty$ and { + series empty$ 'skip$ { format.series output new.block } if$ + % ^^^ Dat: don't emphasize {Osiris kziknyvek sorozat}, because it's after the book title. + numvolumes empty$ { "" } + { "\bibNumVolumes {" numvolumes "}." * * } if$ % ****pts**** + } { + "numvolumes and volume/number" numvolumes either.or.check + series empty$ 'skip$ { format.series output } if$ % Dat: no new.block + number empty$ + { volume } + { "volume and number" volume either.or.check number } if$ + n.dashify + duplicate$ #-1 #1 substring$ "-" = 'skip$ 'add.period$ if$ + "\bibVolume {" swap$ * "}." * + } if$ +} + +FUNCTION {format.edition} +{ edition empty$ + { "" } + { output.state mid.sentence = + { edition rmacc4 "l" change.case$ } + { edition rmacc4 "t" change.case$ } + if$ + add.period$ + " kiad." * % Dat: " kiad.": Gyurgyk Jnos: Szerkesztk s szerzk kziknyve, 533. oldal, 2. sor. + } + if$ +} + +% Dat: `FUNCTION {multi.page.check}' not needed + +%** Used by type$ {inbook} and {incollection} +%** English typography has: +%** pages 23--45 (pages={23--45}) +%** pp. 23--45. (pages={23--45}) +%** p. 23. (pages=={23}: on page 23) +%** p. 234 (numpages=234: the book has 234 pages) +%** Hungarian typography has: +%** 234 p. (numpages=234) +%** 23--45. p (pages={23--45}) +%** 23. p. (pages=23) +FUNCTION {format.pages} { % ****pts**** + pages empty$ + { "" } + { pages add.period$ n.dashify "p." tie.or.space.connect } + if$ +} + +FUNCTION {volume.caption} { % ****pts**** + volumeisyearly empty$ { "1" } { volumeisyearly } if$ % default is "1" + "0" = { "k\" quote$ "otet" * * } { "\'evf." } if$ +} + +FUNCTION {format.vol.num.pages} { % ****pts**** + volume duplicate$ empty$ { pop$ "" } { + add.period$ + volume.caption % "\'evf." + tie.or.space.connect } if$ + year empty$ { + nocheck empty$ { "empty year in " cite$ * warning$ } 'skip$ if$ + } { + duplicate$ empty$ + { pop$ format.date add.period$ } + { " (" * format.date * ")" * } if$ + } if$ + number empty$ 'skip$ { + duplicate$ empty$ 'skip$ { " " * } if$ + volume empty$ nocheck empty$ and { "there's a number but no volume in " cite$ * warning$ } 'skip$ if$ + number add.period$ "sz." tie.or.space.connect * + } if$ +} + +FUNCTION {format.chapter.pages} +{ chapter empty$ + { "" } % 'format.pages + { chapter + type empty$ { "fejezet" } { + type "subsection" = { "alszakasz" } { + type "subsubsection" = { "alalszakasz" } { + type "chapter" = { "fejezet" } { + type "section" = { "szakasz" } { + type "part" = { "r{\'e}sz" } { + type "appendix" = { "f{\" quote$ "u}ggel{\'e}k" * * } { + type rmacc4 "l" change.case$ } if$ } if$ } if$ } if$ } if$ } if$ } if$ + tie.or.space.connect + % Dat: no format.pages here % ****pts**** + } + if$ +} + +FUNCTION {format.in.edited} { % ****pts**** + editor "self" = % ****pts**** + { "\bibInSelf0" } + { "In " format.editors * ": " * } if$ + booktitle rmbrace.accs emphasize * +} + +FUNCTION {format.in.ed.booktitle} { + booktitle empty$ + { "" } + { editor empty$ + % vvv "In ": Gyurgyk Jnos: Szerkesztk s szerzk kziknyve, 130. oldal, 12. sor. + { "In " booktitle rmbrace.accs emphasize * } + 'format.in.edited if$ + } if$ +} + +INTEGERS { len } + +FUNCTION {chop.word} +{ 's := + 'len := + s #1 len substring$ = + { s len #1 + global.max$ substring$ } + 's + if$ +} + + +%* @param #1 a string beginning with a possibly accented letter +%* @return "" or "z", corresponding to the Hungarian definite article "a" and "az" +FUNCTION {article.az} { + rmacc4 % remove accents smartly + purify$ + "l" change.case$ + #1 #1 substring$ + duplicate$ " " = {"z"} { % hack + duplicate$ "a" = {"z"} { + duplicate$ "e" = {"z"} { + duplicate$ "i" = {"z"} { + duplicate$ "o" = {"z"} { + duplicate$ "u" = {"z"} { + ""} if$ }if$ }if$ }if$ }if$ }if$ + swap$ pop$ +} + +%** by pts@fazekas.hu at Thu Nov 9 17:03:00 CET 2006 +%** @example "foo}" split.last.brace "foo" "}" +%** @example "food" split.last.brace "food" "" +FUNCTION {split.last.brace} { + duplicate$ #-1 #1 substring$ "}" = + { duplicate$ string.length #1 - #1 swap$ substring$ "}" } + { "" } if$ +} + +%** by pts@fazekas.hu at Thu Nov 9 17:03:00 CET 2006 +%** Clobbers 'rs and 'ls +%** @example "foobar" "bar" replace.at.end "foo" 1 +%** @example "foobar!" "bar" replace.at.end "foobar!" 0 +FUNCTION {remove.at.end} { + 'rs := % save pattern string % Dat: string.length destroys 'ls + duplicate$ rs string.length #-1 swap$ + substring$ rs = + { duplicate$ string.length rs string.length - #1 swap$ substring$ #1 } + { #0 } if$ +} + +FUNCTION {format.in.talked.booktitle} { + booktitle empty$ + { "" } + { editor empty$ + { + booktitle duplicate$ 's := + "A " swap$ #2 swap$ chop.word + "Az " swap$ #3 swap$ chop.word + %% duplicate$ warning$ + s = { + "a" booktitle article.az * + booktitle rmbrace.accs emphasize + tie.or.space.connect + } { booktitle rmbrace.accs emphasize } if$ + % Dat: now: "a~{\em Foo Konferencia}" + split.last.brace + swap$ + % Dat: now "}" "a~{\em Foo Konferencia" + % vvv Imp: maybe we don't need \- here, because it + % prevents hyphenation in earlier parts of the word + "Conference" remove.at.end { "Con\-fe\-ren\-ce-en" * swap$ * } { + "conference" remove.at.end { "con\-fe\-ren\-ce-en" * swap$ * } { + "Konferencia" remove.at.end { "Kon\-fe\-ren\-ci\'an" * swap$ * } { + "konferencia" remove.at.end { "kon\-fe\-ren\-ci\'an" * swap$ * } { + swap$ * " c{\'i}m{\H u} konferenci{\'a}n" * + } if$ } if$ } if$ } if$ + %% duplicate$ warning$ + % Dat: now "a~{\em Foo Konferencin}" + % or "a~{\em Foo} cm konferencin" + %% "alma" string.length warning$ + "Elhangzott " swap$ * + } 'format.in.edited if$ + } if$ +} + +FUNCTION {empty.misc.check} +{ author empty$ title empty$ howpublished empty$ + month empty$ year empty$ note empty$ + and and and and and + key empty$ not and + { "all relevant fields are empty in " cite$ * warning$ } + 'skip$ + if$ +} + +%** @param #1 default value for `type' +FUNCTION {format.thesis.type} { % ****pts**** + type empty$ 'skip$ { pop$ type } if$ + rmacc4 "t" change.case$ rmbrace.accs +} + +FUNCTION {format.tr.number} % ****pts**** +{ type empty$ + { "{\bibTechRep 0}" } % Dat: `{'..`}' to avoid "t" change.case$ + 'type + if$ + number empty$ + { rmacc4 "t" change.case$ } + { number add.period$ swap$ tie.or.space.connect } + if$ +} + +FUNCTION {format.article.crossref} +{ key empty$ + { journal empty$ + { "need key or journal for " cite$ * " to crossref " * crossref * + warning$ + "" + } + { "In {\em " journal * "\/}" * } + if$ + } + { "In " key * } + if$ + " \cite{" * crossref * "}" * +} + +FUNCTION {format.crossref.editor} +{ editor #1 "{vv~}{ll}" format.name$ + editor num.names$ duplicate$ + #2 > + { pop$ " \bibEtAl ." * } + { #2 < + 'skip$ + { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = + { " \bibEtAl ." * } + { " \'es " * editor #2 "{vv~}{ll}" format.name$ * } % !! + if$ + } + if$ + } + if$ +} + +FUNCTION {format.book.crossref} +{ volume empty$ + { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ + "In " + } + { "Volume" volume tie.or.space.connect + " of " * + } + if$ + editor empty$ + editor field.or.null author field.or.null = + or + { key empty$ + { series empty$ + { "need editor, key, or series for " cite$ * " to crossref " * + crossref * warning$ + "" * + } + { "{\em " * series * "\/}" * } + if$ + } + { key * } + if$ + } + { format.crossref.editor * } + if$ + " \cite{" * crossref * "}" * +} + +FUNCTION {format.incoll.inproc.crossref} +{ editor empty$ + editor field.or.null author field.or.null = + or + { key empty$ + { booktitle empty$ + { "need editor, key, or booktitle for " cite$ * " to crossref " * + crossref * warning$ + "" + } + { "In {\em " booktitle * "\/}" * } + if$ + } + { "In " key * } + if$ + } + { "In " format.crossref.editor * } + if$ + " \cite{" * crossref * "}" * +} + +FUNCTION {article} %*type* ****pts**** +{ output.bibitem + format.authors "author" output.check + new.block.authors + format.title "title" output.check + new.block + crossref missing$ + { journal emphasize "journal" output.check + format.vol.num.pages output % format.date is inside this + } + { format.article.crossref output.nonnull + } if$ + format.pages output + format.issn output + output.url + new.block numpages.output note.output + fin.entry +} + +% copied from KOMA-Script +% by pts at Thu Oct 30 09:56:33 CET 2003 + +% !! how does it work and why? +FUNCTION {print.adrchr} +{ adr.char empty$ 'skip$ { % ****pts**** Dat: default + adr.char chr.to.int$ cur.adr.char > + { newline$ "\adrchar{" adr.char "}" * * write$ newline$ + adr.char chr.to.int$ 'cur.adr.char := + } + 'skip$ + if$ + } if$ % !! +} + +FUNCTION {get.names} +{ name empty$ + { organization empty$ + { "{}{}" } + { organization "{}" * } + if$ + } + { "{" name #1 "{ll}" format.name$ "}" * * + "{" name #1 "{ff}{ vv}" format.name$ "}" * * * + } + if$ +} + +%** Dat: deliberately with `sss', to avoid conflict +FUNCTION {addresss} { %*type* + % !! many improvements + output.bibitem pop$ + print.adrchr % !! + "\adrentry" write$ + get.names write$ newline$ + "{" + street empty$ + { "" } + { street " \\ " *} + if$ + * + zip empty$ + { "" } + { zip } + if$ + " " * * + city empty$ + { "" } + { city } + if$ + "}{" * * + phone empty$ + { + mobile empty$ + { "" } + { mobile } + if$ + }{ + mobile empty$ + { phone } + { phone "\\" mobile * * } + if$ + } + if$ + "}{}{}{}{" * * + key empty$ + { "" } + { key } + if$ + "}" * * write$ newline$ +} + + +% --- + +%** Used by type$ {book}, {inbook} and {incollection} +FUNCTION {books.tail} { % ****pts**** + crossref missing$ { + format.bvolume output % includes functionality of format.number.series + new.block % no comma in `1--4. kt., 7. kiad.' + } 'skip$ if$ + type$ "book" = { + chapter empty$ 'skip$ + { "can't use chapter for @book; try @inbook or @incollection" warning$ } if$ + } { + format.chapter.pages + pages empty$ { "chapter and pages" output.check } {output} if$ + new.block % new.sentence? -- for incollection + } if$ + author2 empty$ 'skip$ { author2 output.nonnull new.block } if$ + format.edition output new.block + crossref missing$ { + % format.bvolume output + % new.block + % format.number.series output % ****pts**** + % new.sentence + address output + format.date "year" output.check + publisher "publisher" output.check + } { + format.date "year" output.check + new.block + format.book.crossref output.nonnull + } if$ + format.pages output + format.isbn output + format.issn output % Dat: most books don't have this + output.url + new.block numpages.output note.output fin.entry +} + +FUNCTION {book} { %*type* + output.bibitem + author empty$ + { editor empty$ key missing$ { "" } { key } if$ "." = and + 'skip$ + { format.editors "author and editor" output.check } if$ + } + { format.authors output.nonnull + crossref missing$ + { "author and editor" editor either.or.check } + 'skip$ + if$ + } + if$ + new.block.authors + format.btitle "title" output.check + new.block + books.tail +} + +FUNCTION {booklet} { %*type* ****pts**** + output.bibitem + format.authors output + new.block.authors + format.title "title" output.check + new.block + format.bvolume output new.block + author2 output.nonnull new.block + format.edition output new.block + % howpublished address new.block.checkb + howpublished output + address output + % Dat: no publisher= + format.date output + format.isbn output + format.issn output % Dat: most books don't have this + output.url + new.block numpages.output note.output fin.entry +} + +FUNCTION {inbook} %*type* +{ book % ****pts**** +} + +FUNCTION {incollection} %*type* +{ output.bibitem + format.authors "author" output.check + new.block.authors + format.title "title" output.check + new.block + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check new.block } + { format.incoll.inproc.crossref output.nonnull } if$ + books.tail +} + +%** @param #1 thesis type +FUNCTION {thesises.tail} { % ****pts**** + format.thesis.type output.nonnull + school empty$ { nocheck empty$ { "empty school in " * cite$ * warning$ } 'skip$ if$ } 'skip$ if$ + school empty$ address empty$ and 'skip$ { + write$ before.all 'output.state := " (" + % school output address ")" * output + school ")" * output + new.block + } if$ + author2 empty$ 'skip$ { author2 output new.block } if$ + new.block + address output + format.date "year" output.check + output.url + new.block numpages.output note.output fin.entry +} + +%** Emits a decapitalized title. +FUNCTION {mastersthesis} { %*type* + output.bibitem + format.authors "author" output.check + new.block.authors + format.title "title" output.check + new.block + "{Diplomaterv}" % "{Doktori} {{\'e}rtekez{\'e}s} " % "Master's thesis" + thesises.tail +} + +%** Emits an \emph-asized title. +FUNCTION {phdthesis} { %*type* + output.bibitem + format.authors "author" output.check + new.block.authors + format.btitle "title" output.check + new.block + "{PhD} {\'e}rtekez{\'e}s " % "PhD thesis" + thesises.tail +} + +FUNCTION {misc} %*type* % ****pts**** +{ output.bibitem + format.authors output + title empty$ howpublished empty$ and 'skip$ { + new.block.authors % Dat: emits ":" + % title howpublished new.block.checkb % Dat: emits "." + format.title output + howpublished new.block.checka + howpublished output + } if$ + format.date output + format.isbn output + format.issn output % Dat: most books don't have this + output.url + new.block numpages.output note.output fin.entry + empty.misc.check +} + +FUNCTION {manual} %*type* ****pts**** +{ output.bibitem + author empty$ + { organization empty$ + 'skip$ + { organization output.nonnull } if$ + new.block + } + { format.authors output.nonnull new.block.authors } + if$ + format.btitle "title" output.check + author2 empty$ 'skip$ { author2 output new.block } if$ + format.edition output new.block + + publisher empty$ 'skip$ { "can't use publisher for @manual; try @book" warning$ } if$ + author empty$ + { address output } + { % organization address new.block.checkb + organization output + address output + } if$ + format.edition output + format.date output + publisher output + output.url + new.block numpages.output note.output fin.entry +} + + +FUNCTION {techreport} %*type* +{ output.bibitem + format.authors "author" output.check + new.block.authors + format.title "title" output.check + new.block + format.tr.number output.nonnull + author2 empty$ 'skip$ { author2 output new.block } if$ + address output + format.date "year" output.check + institution "institution" output.check + output.url + new.block numpages.output note.output fin.entry +} + +FUNCTION {unpublished} %*type* % ****pts**** +{ output.bibitem + format.authors "author" output.check + new.block.authors + format.title "title" output.check new.block + format.date output + output.url + new.block + note "note" output.check + fin.entry +} + +FUNCTION {inproceedings} %*type* +{ output.bibitem + format.authors "author" output.check + new.block.authors + format.title + talked empty$ 'skip$ 'emphasize if$ % at Thu Nov 9 16:19:53 CET 2006 + "title" output.check + new.block + crossref missing$ + { talked empty$ 'format.in.ed.booktitle 'format.in.talked.booktitle if$ + duplicate$ #1 #1 substring$ "I" = { % Dat: don't append to `Elhangzott' or empty booktitle + series empty$ { duplicate$ empty$ 'skip$ { " (kon\-fe\-ren\-cia\-anyag)" * } if$ } 'skip$ if$ + } 'skip$ if$ + "booktitle" output.check + format.bvolume output % includes functionality of format.number.series + author2 empty$ 'skip$ { author2 output.nonnull new.block } if$ + new.block + address output % ****pts**** + format.date "year" output.check + % new.sentence + organization output + publisher output + } + { format.incoll.inproc.crossref output.nonnull } + if$ + format.pages output + format.isbn output + format.issn output % Dat: most books don't have this + output.url + new.block numpages.output note.output fin.entry +} + +FUNCTION {proceedings} %*type* +{ output.bibitem + editor empty$ + { organization output } + { format.editors output.nonnull } + if$ + new.block + format.btitle "title" output.check + series empty$ { " (konferenciaanyag)" * } 'skip$ if$ + format.bvolume output % includes functionality of format.number.series + author2 empty$ 'skip$ { author2 output.nonnull new.block } if$ + address empty$ + { editor empty$ + { publisher new.sentence.checka } + { organization publisher new.sentence.checkb + organization output + } + if$ + publisher output + format.date "year" output.check + } + { address output.nonnull + format.date "year" output.check + % new.sentence % ****pts**** + editor empty$ + 'skip$ + { organization output } + if$ + publisher output + } + if$ + format.isbn output + format.issn output % Dat: most books don't have this + output.url + new.block numpages.output note.output fin.entry +} + +FUNCTION {conference} %*type* % ****pts**** +{ inproceedings } + +FUNCTION {default.type} { misc } + +FUNCTION {fmts} { %*type* % ****pts**** + % Emulation of \bibtem without typesetting anything. + newline$ + "\immediate\write\@auxout{\string\bibcite{" write$ + cite$ write$ + "}{0}}" write$ newline$ +} +FUNCTION {fmts2} { + firstname.fmt empty$ 'skip$ { firstname.fmt 'firstname.fmt0 := } if$ + lastname.fmt empty$ 'skip$ { lastname.fmt 'lastname.fmt0 := } if$ + init.nfmts +} + +%****pts**** +% Dat: {\-} is needed for format.name$ +MACRO {jan} {"ja{\-}nu{\-}\'ar"} +MACRO {feb} {"feb{\-}ru\'ar"} +MACRO {mar} {"m\'ar{\-}cius"} +MACRO {apr} {"\'ap{\-}ri{\-}lis"} +MACRO {may} {"m\'a{\-}jus"} +MACRO {jun} {"j\'u{\-}ni{\-}us"} +MACRO {jul} {"j\'u{\-}li{\-}us"} +MACRO {aug} {"au{\-}gusz{\-}tus"} +MACRO {sep} {"szep{\-}tem{\-}ber"} +MACRO {oct} {"ok{\-}t\'o{\-}ber"} +MACRO {nov} {"no{\-}vem{\-}ber"} +MACRO {dec} {"de{\-}cem{\-}ber"} + +% Dat: see also in mrabbrev.bib +MACRO {acmcs} {"ACM Computing Surveys"} +MACRO {acta} {"Acta Informatica"} +MACRO {cacm} {"Communications of the ACM"} +MACRO {ibmjrd} {"IBM Journal of Research and Development"} +MACRO {ibmsj} {"IBM Systems Journal"} +MACRO {ieeese} {"IEEE Transactions on Software Engineering"} +MACRO {ieeetc} {"IEEE Transactions on Computers"} +MACRO {ieeetcad} {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"} +MACRO {ipl} {"Information Processing Letters"} +MACRO {jacm} {"Journal of the ACM"} +MACRO {jcss} {"Journal of Computer and System Sciences"} +MACRO {scp} {"Science of Computer Programming"} +MACRO {sicomp} {"SIAM Journal on Computing"} +MACRO {tocs} {"ACM Transactions on Computer Systems"} +MACRO {tods} {"ACM Transactions on Database Systems"} +MACRO {tog} {"ACM Transactions on Graphics"} +MACRO {toms} {"ACM Transactions on Mathematical Software"} +MACRO {toois} {"ACM Transactions on Office Information Systems"} +MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"} +MACRO {tcs} {"Theoretical Computer Science"} + +READ + +%** @param #1 string +%FUNCTION {reverse} { % +% 't := "" 's := +% #1 +% { duplicate$ t swap$ #1 substring$ "" = not } { +% duplicate$ t swap$ #1 substring$ +% s * 's := +% #1 + +% } while$ +% pop$ s +%} + +%** by pts@fazekas.hu at Mon May 17 16:50:26 CEST 2004 +%** @param 1: TeX string +%** @return {\th}, {\TH} {\dh} {\DH} {\dj} {\DJ} {\ng} {\NG} {\SS} changed to +%** th TH dh DH dj DJ ng NG SS +FUNCTION {rmbrace.extrat1} { + % Dat: #4 #1 substring$ is substr($_,3,1) + 'ss := + "" 'tt := + #1 'len := + #5 + { duplicate$ ss swap$ #1 substring$ "" = not } { + % Stack: index-value (#5, #6 ...) + duplicate$ ss swap$ #1 substring$ "}" = { + duplicate$ ss swap$ #4 - #5 substring$ + %% duplicate$ warning$ + duplicate$ "{\th}" = {#1} { + duplicate$ "{\TH}" = {#1} { + duplicate$ "{\dh}" = {#1} { + duplicate$ "{\DH}" = {#1} { + duplicate$ "{\dj}" = {#1} { + duplicate$ "{\DJ}" = {#1} { + duplicate$ "{\ng}" = {#1} { + duplicate$ "{\NG}" = {#1} { + duplicate$ "{\SS}" = {#1} { + #0 }if$ }if$ }if$ }if$ }if$ }if$ }if$ }if$ }if$ + } {#42 #0} if$ + #1 = { + swap$ + % Stack: 5-char-substring index-value + duplicate$ tt swap$ ss swap$ len swap$ len - #4 - substring$ * 'tt := + swap$ tt swap$ #3 #2 substring$ * 'tt := + #1 + + duplicate$ 'len := + } { pop$ #1 + } if$ + } while$ + pop$ % index value + tt ss len global.max$ substring$ * +} + + +FUNCTION {sortify} +{ rmacc4 % remove accents smartly, so purify$ will remove the accent + % rmbrace.accs + duplicate$ % ****pts**** + rmbrace.extrat1 % ****pts**** + purify$ + % Dat: purify$ removes from "vrom", keeps `varom' in "v\'arom","v{\'a}rom" + % Dat: purify$ changes {\ss} to ss, but {\dj} to empty + "l" change.case$ + " " * + swap$ * +} + +FUNCTION {sort.format.names} +{ 's := + #1 'nameptr := + "" + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { nameptr #1 > + { " " * } + 'skip$ + if$ + s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't := + nameptr numnames = t "others" = and + { "et al" * } + { t sortify % Dat: calls rmacc4 and purify$ + %% duplicate$ warning$ + * } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {sort.format.title} +{ rmacc4 't := + "A " #2 + "An " #3 + "The " #4 + "Egy " #4 + "Der " #4 + "Die " #4 + "Das " #4 + "Un " #3 + "Une " #4 + "Az " #3 t chop.word + chop.word chop.word chop.word chop.word chop.word % ***pts**** + chop.word + chop.word + chop.word + chop.word + sortify + #1 global.max$ substring$ +} + +FUNCTION {author.sort} +{ name empty$ + { author empty$ + { key empty$ + { "to sort, need author/key/name in " cite$ * warning$ + title empty$ { "" } { title sort.format.title } if$ % ****pts**** + }{ key sortify } + if$ + }{ author sort.format.names } + if$ + }{ name sort.format.names } + if$ +} + +FUNCTION {author.editor.sort} +{ author empty$ + { editor empty$ + { key missing$ + { title empty$ nocheck empty$ or + { "to sort, need author, editor, or key in " cite$ * warning$ } 'skip$ if$ + title empty$ { "" } { title sort.format.title } if$ % ****pts**** + } + { key "." = % ****pts**** + { " " title sort.format.title * } % duplicate$ warning$ + % ^^^ Dat: " " is here to put them in front of other books + { key sortify } if$ + } + if$ + } + { editor sort.format.names } + if$ + } + { author sort.format.names } + if$ +} + +FUNCTION {author.organization.sort} +{ author empty$ + { organization empty$ + { key empty$ + { "to sort, need author, organization, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { "The " #4 organization chop.word sortify } + if$ + } + { author sort.format.names } + if$ +} + +FUNCTION {editor.organization.sort} +{ editor empty$ + { organization empty$ + { key empty$ + { "to sort, need editor, organization, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { "The " #4 organization chop.word sortify } + if$ + } + { editor sort.format.names } + if$ +} + +FUNCTION {presort} +{ type$ "book" = type$ "inbook" = or + 'author.editor.sort + { type$ "proceedings" = + 'editor.organization.sort + { type$ "manual" = + 'author.organization.sort + { type$ "fmts" = + { fmts2 "" } % ****pts**** + 'author.sort + if$ + } + if$ + } + if$ + } + if$ + " " + * + year field.or.null sortify + * + " " + * + title field.or.null + sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} + +EXECUTE {init.accs4} +EXECUTE {init.nfmt0} +EXECUTE {init.nfmts} + +ITERATE {presort} + +SORT + +STRINGS { longest.label } + +INTEGERS { number.label longest.label.width } + +FUNCTION {initialize.longest.label} +{ "" 'longest.label := + #1 'number.label := + #0 'longest.label.width := +} + +FUNCTION {longest.label.pass} +{ number.label int.to.str$ 'label := + number.label #1 + 'number.label := + label width$ longest.label.width > + { label 'longest.label := + label width$ 'longest.label.width := + } + 'skip$ + if$ +} + +EXECUTE {initialize.longest.label} + +ITERATE {longest.label.pass} + +FUNCTION {bibIE.a} { + "\makeatletter" write$ newline$ + "\global\def\bibIE@lowc{%" write$ newline$ + " \expandafter\ifx\csname inputencoding\endcsname\relax" write$ newline$ + " \def\NeedsTeXFormat##1]{}%" write$ newline$ + " \def\ProvidesPackage##1]{}%" write$ newline$ + " \def\DeclareOption##1##2{}%" write$ newline$ + " \def\ProcessOptions{\@ifstar\@gobble\@empty}%" write$ newline$ + " \input inputenc.sty" write$ newline$ + " \let\NeedsTeXFormat \@notprerr" write$ newline$ + " \let\ProvidesPackage\@notprerr" write$ newline$ + " \let\DeclareOption \@notprerr" write$ newline$ + " \let\ProcessOptions \@notprerr" write$ newline$ + " \fi" write$ newline$ + " \global\let\bibIE@lowc\relax}" write$ newline$ + "\def\bibIE@lowa#1#2{%" write$ newline$ + " \global\def\bibResetInputEncoding{\bibIE@lowb{ascii}}% anti-warning" write$ newline$ + " \ifx#1\relax\else" write$ newline$ + " \ifx#1\@inpenc@undefined@\@empty" write$ newline$ + " \global\def\bibResetInputEncoding{\bibIE@lowb{#2}}%" write$ newline$ + " \ifx\bibResetInputEncoding\reserved@a% keep old encoding" write$ newline$ + " \global\let\bibResetInputEncoding\@empty \let\reserved@a\@empty \fi" write$ newline$ + " \fi\fi}" write$ newline$ +} +FUNCTION {bibIE.b} { + "\let\bibIE@input\input" write$ newline$ + "\def\bibIE@ascii{ascii}" write$ newline$ + "\def\bibIE@lowb#1{%" write$ newline$ + " \def\reserved@a{#1}\ifx\reserved@a\bibIE@ascii" write$ newline$ + " \gdef\@inpenc@test{\global\let\@inpenc@test\relax}%" write$ newline$ + " \edef\@inpenc@undefined{\noexpand\@inpenc@undefined@{ascii}}%" write$ newline$ + " \@inpenc@loop\^^A\^^H\@inpenc@loop\^^K\^^K%" write$ newline$ + " \@inpenc@loop\^^N\^^_\@inpenc@loop\^^?\^^ff%" write$ newline$ + "\else\def\input{\global\let\@inpenc@test\relax \bibIE@input}% no {ascii} warn" write$ newline$ + " \inputencoding{#1}\fi}%" write$ newline$ + "\def\bibInputEncoding#1{%" write$ newline$ + " \bibIE@lowc" write$ newline$ + " \def\reserved@a{\bibIE@lowb{#1}}%" write$ newline$ + " % vvv \@inpenc@undefined -> `\@inpenc@undefined@{latin2}' or undefined" write$ newline$ + " \expandafter\expandafter\expandafter\bibIE@lowa\csname" write$ newline$ + " @inpenc@undefined\endcsname\relax" write$ newline$ + " \reserved@a}" write$ newline$ newline$ +} + +%** Usage: insert `\let\bibEarlyBegin\hfuzz \InputIfFileExists{\jobname.bbl}{}{}' +%** into the LaTeX document preamble to avoid running latex(1) twice after +%** bibtex(1) has been run. +FUNCTION {bibIE.c} { + "\makeatletter \ifx\bibEarlyBegin\hfuzz" write$ newline$ + " \def\bibEarlyBegin{\begingroup\everypar{}\sloppy\hbadness10000 " write$ newline$ + " \def\Hy@colorlink##1{\begingroup}" write$ newline$ % for hyperref.sty + " \def\Hy@endcolorlink{\endgroup}" write$ newline$ % for hyperref.sty + " \def\@inpenc@loop##1##2{}" write$ newline$ + " \def\thebibliography##1{}" write$ newline$ + " \def\endthebibliography{\skip@egroup\aftergroup\bibEarlyEnd}%" write$ newline$ + " \def\inputencoding##1{}\c@enumi\z@" write$ newline$ + " \def\bibitem{\skip@egroup \let\skip@egroup\egroup" write$ newline$ + " \advance\c@enumi\@ne\@ifnextchar[\@lbibitem\@bibitem}%" write$ newline$ + " \def\@lbibitem[##1]##2{\bibcite{##2}{##1}%" write$ newline$ + " \setbox0\vbox\bgroup}% avoid emitting boxes" write$ newline$ + " \def\@bibitem##1{\expandafter\skip@bibcite\expandafter" write$ newline$ + " {\the\c@enumi}{##1}\setbox0\vbox\bgroup}% avoid emitting boxes" write$ newline$ + " \def\skip@bibcite##1##2{\bibcite{##2}{##1}}%" write$ newline$ + " \catcode11=9 % ignored" write$ newline$ + " \@tempcnta 1 \loop\catcode\@tempcnta=9" write$ newline$ + " \ifnum\@tempcnta< 8 \advance\@tempcnta\@ne\repeat" write$ newline$ + " \@tempcnta 14 \loop\catcode\@tempcnta=9" write$ newline$ + " \ifnum\@tempcnta< 31 \advance\@tempcnta\@ne\repeat" write$ newline$ + " \@tempcnta127 \loop\catcode\@tempcnta=9" write$ newline$ + " \ifnum\@tempcnta<255 \advance\@tempcnta\@ne\repeat" write$ newline$ + " \let\skip@egroup\relax}" write$ newline$ + " \def\bibEarlyEnd{\endgroup \let\bibcite\@gobbletwo" write$ newline$ + " \global\let\bibEarlyRead\relax}" write$ newline$ + " \bibEarlyBegin" write$ newline$ + "\else \let\bibEarlyEnd\relax \fi" write$ newline$ + newline$ +} + +FUNCTION {begin.bib} +{ bibIE.c + % Dat: bibTeX breaks long lines (>78 chars), so we wouldn't emit such lines + "\begin{thebibliography}{" longest.label * "}" * write$ newline$ + preamble$ empty$ 'skip$ { preamble$ write$ newline$ } if$ + % ****pts**** Dat: put preamble$ after \begin{thebibliography} + "\frenchspacing" write$ newline$ % !! optional + bibIE.a + bibIE.b + "\def\leftflushbreak{\ifx\\\@centercr\penalty100 \else" write$ newline$ % Dat: \\ is \@centercr for \raggedright + " \unpenalty\unpenalty{\@tempdima\lastskip\unskip\nobreak" write$ newline$ + " \hskip\@tempdima plus1fil}\null\penalty100 \hskip0pt plus-1fil\relax\fi}" write$ newline$ + % "\def\leftflushbreak{\nobreak\hskip0pt plus1fil\null\penalty100 \hskip0pt plus-1fil\relax}" write$ newline$ + + % Ignoring newline + spaces in a \verb (usually called in \bibUrll). + % This doesn't apply for \usepackage{url} -- please use that to have + % line breaks in the URLs. + % Example .bbl excerpt (to be converted to \bibUrll{URL} >http://foobarbaz>.) + % \bibUrll{URL} >http:// + % foobar + % baz<, + "\begingroup\lccode\string`~=\string`\^^M" write$ newline$ + " \lowercase{\endgroup\def\verb@eol@error{\obeylines\def~{\bibVerbNoSp}}}" write$ newline$ + "\begingroup\lccode\string`~=\string`\ \relax" write$ newline$ + " \lowercase{\endgroup\def\bibVerbNoSp#1{\ifx#1~\expandafter\bibVerbNoSp" write$ newline$ + " \else\expandafter#1\fi}}" write$ newline$ + + "\expandafter\ifx\csname bibUrll\endcsname\relax" write$ newline$ + "\expandafter\ifx\csname url\endcsname\relax" write$ newline$ + " \def\bibUrll#1>{\leavevmode\leftflushbreak #1~\verb>}" write$ newline$ % Imp: line breaks etc., \PVerb + "\else\def\bibUrll#1>{\leavevmode\leftflushbreak#1~\begingroup" write$ newline$ + " \catcode\string`\%=12 \catcode\string`\#=12 \bibUrlll}" write$ newline$ + " \def\bibUrlll#1>{\url{#1}\endgroup}\fi" write$ newline$ + % ^^^ "\else\def\bibUrll#1>#2>{\leftflushbreak #1~\url{#2}}\fi" write$ newline$ + % ^^^ Imp: do these parens work? Includes field URL for Internet addresses (best used with with the url.sty package of Donald Arseneau) + "\fi" write$ newline$ + % vvv Dat: so user can specify `{\empty Maf}fia' and still have the `ffi' ligature -- undocumented. + % vvv Dat: doesn't work with hyperref.sty, and has marginal benefits -- commented out + % "\def\empty{\egroup\expandafter\@firstofone\expandafter{\iffalse}\fi}" write$ newline$ + "\def\bibHU@mix#1{\egroup#1}" write$ newline$ + %"\def\empty{\expandafter\bibHU@mix\expandafter{\iffalse}\fi}" write$ newline$ + %"\def\bibHU@mix#1{\egroup#1}" write$ newline$ + % vvv Dat: Hungarian typgrphy dictates 1/3 non-stretchable space, which + % might look ugly, because the space between f+l names stretches more. + "\def\bibAnd#1{\nobreak\,\nobreak\hbox{--}\,}" write$ newline$ + % "\def\bibAnd#1{\ifcase#1 , \or\space and \or, and \fi}" write$ newline$ + % "\def\bibAnd#1{\ifcase#1 , \else\space\'es \fi}" write$ newline$ + % "\def\bibEtAl#1{ et~al.}" write$ newline$ % Dat: or `et al.' (meaning: et alii) + "\def\bibEtAl#1{ \'es m\'asok}" write$ newline$ + % ^^^ Dat: botht \bibEtAl confirmed by Gyurgyk (p. 137) + "\def\bibEd#1{ (szerk.)}" write$ newline$ + % "\def\bibEd#1{ (szerk\ifcase#1 .\else eszt\H{o}k\fi)}" write$ newline$ % (szerk.) or (szerkesztk) + % "\let\bibNewBlock\newblock" write$ newline$ + "\def\bibNewBlock{\unskip\space}" write$ newline$ + % "\def\bibVolume#1{k\" quote$ "otet}" * * write$ newline$ + "\def\bibVolume#1#2{#1 k\" quote$ "ot.} \let\bibNumVolumes\bibVolume" * * write$ newline$ + % "\def\bibTechRep#1{Technical Report}" write$ newline$ + "\def\bibTechRep#1{Jelent\'{e}s}" write$ newline$ % Dat: `.' utn van => nagybet + "\def\bibInSelf#1{In u\H{o}: }" write$ newline$ + "\csname bibOverride\endcsname" write$ newline$ +} + + +EXECUTE {begin.bib} + +EXECUTE {init.state.consts} + +ITERATE {call.type$} + +FUNCTION {end.bib} +{ newline$ + "\end{thebibliography}" write$ newline$ +} + +EXECUTE {end.bib} + +% #****pts**** !! +FUNCTION {what} { + % "dr. Kpeczi, Bla and Jules Verne and Kossuth, Lajos and grf Szchenyi, Istvn and John von Neumann and Donald E. Knuth and Strunk, Jr., William and Knzy, ifj., Jen and L. R. McColvin and Tindi Lantos, Sebestyn and Molnr-Sska, Balzs and Claude Lvi-Strauss and Kis, Pter Pl and Mary-Claire van Leunen and Paul Gerhard Hoel and G. Bernard Godfrey and II., Jnos-Pl and {Szerencsejtk Rt.} and {\empty Earl of} Traquair and Horace [pseud.] Hunt and Verne, {\empty Gy}ula" 's := + % init.nfmts s #1 nfmt0 format.name$ warning$ + % ss #385 #1 substring$ warning$ + % "fo{\'o}\oe{\H u}s{\HON}{\HANT}" rmbrace.accs warning$ % to "fo\'o\oe\H us{\HON}{\HANT}" + % "fr\'e ncia" purify$ warning$ + % "bar" #-1 #1 substring$ warning$ + % "5~janu\'ar" #1 "{ll~~}{ff{}}" format.name$ warning$ + % "janu\'ar" #1 "{ll}{~ff.}" format.name$ warning$ + % "{\null Gy}urgyk" #1 "{l}/" format.name$ warning$ + % "AzBrvztr~tkrfrgp" rmacc.latin2 warning$ + % "fogbar" #3 #1 substring$ warning$ + % "Az rvztr tkrfrgp" sortify warning$ + % "Marjai, Imre and Pataky, Dnes" rmacc.latin2 warning$ + % "{\empty\'\i}purify" purify$ warning$ + % "grof Szechenyi, Istvan" #1 "{ll}/{ff}/{jj}/{vv}" format.name$ warning$ + % "John von Neumann" #1 "{ll}/{ff}/{jj}/{vv}" format.name$ warning$ + % "Tindi Lantos, Sebestyn" #1 "{ll}/{ff}/{jj}/{vv}" format.name$ warning$ + % "II., Janos., Pal" #1 "{ll}/{ff}/{jj}/{vv}" format.name$ warning$ + % "lom" "u" change.case$ warning$ % "LOM" + % "{\'a}lom" "u" change.case$ warning$ % "{\'A}LOM" + %"alma{\ss}t" purify$ warning$ % alma{\ss}t + %"alma{\dj}t" purify$ warning$ % almat (!) + % "egykor{\th}Alma korte" rmbrace.extrat1 warning$ +} +EXECUTE {what} diff --git a/src/include/declaration.tex b/src/include/declaration.tex new file mode 100644 index 0000000..e6b8c5f --- /dev/null +++ b/src/include/declaration.tex @@ -0,0 +1,32 @@ +\selectlanguage{magyar} +\pagenumbering{gobble} +%-------------------------------------------------------------------------------------- +% Nyilatkozat +%-------------------------------------------------------------------------------------- +\begin{center} +\large +\textbf{HALLGATÓI NYILATKOZAT}\\ +\end{center} + +Alulírott \emph{\vikszerzoVezeteknev{} \vikszerzoKeresztnev}, szigorló hallgató kijelentem, hogy ezt a \vikmunkatipusat{} meg nem engedett segítség nélkül, saját magam készítettem, csak a megadott forrásokat (szakirodalom, eszközök stb.) használtam fel. Minden olyan részt, melyet szó szerint, vagy azonos értelemben, de átfogalmazva más forrásból átvettem, egyértelműen, a forrás megadásával megjelöltem. + +Hozzájárulok, hogy a jelen munkám alapadatait (szerző(k), cím, angol és magyar nyelvű tartalmi kivonat, készítés éve, konzulens(ek) neve) a BME VIK nyilvánosan hozzáférhető elektronikus formában, a munka teljes szövegét pedig az egyetem belső hálózatán keresztül (vagy autentikált felhasználók számára) közzétegye. Kijelentem, hogy a benyújtott munka és annak elektronikus verziója megegyezik. Dékáni engedéllyel titkosított diplomatervek esetén a dolgozat szövege csak 3 év eltelte után válik hozzáférhetővé. + +\begin{flushleft} +\vspace*{1cm} +Budapest, \today +\end{flushleft} + +\begin{flushright} + \vspace*{1cm} + \makebox[7cm]{\rule{6cm}{.4pt}}\\ + \makebox[7cm]{\emph{\vikszerzoVezeteknev{} \vikszerzoKeresztnev}}\\ + \makebox[7cm]{hallgató} +\end{flushright} +\thispagestyle{empty} + +\vfill +\clearpage +\thispagestyle{empty} % an empty page + +\selectthesislanguage diff --git a/src/include/guideline.tex b/src/include/guideline.tex new file mode 100644 index 0000000..4bbe4e2 --- /dev/null +++ b/src/include/guideline.tex @@ -0,0 +1,54 @@ +\selecthungarian +%-------------------------------------------------------------------------------------- +% Rovid formai es tartalmi tajekoztato +%-------------------------------------------------------------------------------------- + +\footnotesize +\begin{center} +\large +\textbf{\Large Általános információk, a diplomaterv szerkezete}\\ +\end{center} + +A diplomaterv szerkezete a BME Villamosmérnöki és Informatikai Karán: +\begin{enumerate} +\item Diplomaterv feladatkiírás +\item Címoldal +\item Tartalomjegyzék +\item A diplomatervező nyilatkozata az önálló munkáról és az elektronikus adatok kezeléséről +\item Tartalmi összefoglaló magyarul és angolul +\item Bevezetés: a feladat értelmezése, a tervezés célja, a feladat indokoltsága, a diplomaterv felépítésének rövid összefoglalása +\item A feladatkiírás pontosítása és részletes elemzése +\item Előzmények (irodalomkutatás, hasonló alkotások), az ezekből levonható következtetések +\item A tervezés részletes leírása, a döntési lehetőségek értékelése és a választott megoldások indoklása +\item A megtervezett műszaki alkotás értékelése, kritikai elemzése, továbbfejlesztési lehetőségek +\item Esetleges köszönetnyilvánítások +\item Részletes és pontos irodalomjegyzék +\item Függelék(ek) +\end{enumerate} + +Felhasználható a következő oldaltól kezdődő \LaTeX diplomatervsablon dokumentum tartalma. + +A diplomaterv szabványos méretű A4-es lapokra kerüljön. Az oldalak tükörmargóval készüljenek (mindenhol 2,5~cm, baloldalon 1~cm-es kötéssel). Az alapértelmezett betűkészlet a 12 pontos Times New Roman, másfeles sorközzel, de ettől kismértékben el lehet térni, ill. más betűtípus használata is megengedett. + +Minden oldalon -- az első négy szerkezeti elem kivételével -- szerepelnie kell az oldalszámnak. + +A fejezeteket decimális beosztással kell ellátni. Az ábrákat a megfelelő helyre be kell illeszteni, fejezetenként decimális számmal és kifejező címmel kell ellátni. A fejezeteket decimális aláosztással számozzuk, maximálisan 3 aláosztás mélységben (pl. 2.3.4.1.). Az ábrákat, táblázatokat és képleteket célszerű fejezetenként külön számozni (pl. 2.4. ábra, 4.2. táblázat vagy képletnél (3.2)). A fejezetcímeket igazítsuk balra, a normál szövegnél viszont használjunk sorkiegyenlítést. Az ábrákat, táblázatokat és a hozzájuk tartozó címet igazítsuk középre. A cím a jelölt rész alatt helyezkedjen el. + +A képeket lehetőleg rajzoló programmal készítsék el, az egyenleteket egyenlet-szerkesztő segítségével írják le (A \LaTeX~ehhez kézenfekvő megoldásokat nyújt). + +Az irodalomjegyzék szövegközi hivatkozása történhet sorszámozva (ez a preferált megoldás) vagy a Harvard-rendszerben (a szerző és az évszám megadásával). A teljes lista névsor szerinti sorrendben a szöveg végén szerepeljen (sorszámozott irodalmi hivatkozások esetén hivatkozási sorrendben). A szakirodalmi források címeit azonban mindig az eredeti nyelven kell megadni, esetleg zárójelben a fordítással. A listában szereplő valamennyi publikációra hivatkozni kell a szövegben (a \LaTeX-sablon a Bib\TeX~segítségével mindezt automatikusan kezeli). Minden publikáció a szerzők után a következő adatok szerepelnek: folyóirat cikkeknél a pontos cím, a folyóirat címe, évfolyam, szám, oldalszám tól-ig. A folyóiratok címét csak akkor rövidítsük, ha azok nagyon közismertek vagy nagyon hosszúak. Internetes hivatkozások megadásakor fontos, hogy az elérési út előtt megadjuk az oldal tulajdonosát és tartalmát (mivel a link egy idő után akár elérhetetlenné is válhat), valamint az elérés időpontját. + +\vspace{5mm} +Fontos: +\begin{itemize} + \item A szakdolgozatkészítő / diplomatervező nyilatkozata (a jelen sablonban szereplő szövegtartalommal) kötelező előírás, Karunkon ennek hiányában a szakdolgozat/diplomaterv nem bírálható és nem védhető! + \item Mind a dolgozat, mind a melléklet maximálisan 15~MB méretű lehet! +\end{itemize} + +\vspace{5mm} +\begin{center} +Jó munkát, sikeres szakdolgozatkészítést, ill. diplomatervezést kívánunk! +\end{center} + +\normalsize +\selectthesislanguage diff --git a/src/include/onlab-variables.tex b/src/include/onlab-variables.tex new file mode 100644 index 0000000..0806a6c --- /dev/null +++ b/src/include/onlab-variables.tex @@ -0,0 +1,77 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Ezt ne piszkáld!!!! +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\pagestyle{myheadings} % legyen fejléc + +\newcommand{\onlabcim}{ + \begin{center} + \huge{\textbf{Önálló laboratórium beszámoló}} + + \small{Távközlési és Médiainformatikai Tanszék} + \end{center} +} + +% Argumentumok: #1=Név, #2=Neptunkód, #3=szakirány, #4=email, #5 konzulens-1, #6 konzulens-1-email, #7 konzulens-2, #8 konzulens-2-email +\newcommand{\onlabszerzo}[8]{ + +\begin{center} + \begin{tabular}{ r l } + készítette: & \textbf{#1} \\ + & \href{mailto:#4}{\textbf{#4}} \\ + neptun-kód: & \textbf{\texttt{#2}} \\ + ágazat: & \textbf{#3} \\ + konzulens: & \textbf{#5} \\ + & \href{mailto:#6}{\textbf{#6}} \\ + konzulens: & \textbf{#7} \\ + & \href{mailto:#8}{\textbf{#8}} \\ + + \end{tabular} +\end{center} + +} + +% % Argumentumok: #1=Név, #2=email +% \newcommand{\konzulens}[2]{ +% \noindent\textbf{Konzulens:} #1 +% \newline\emph{Email cím:}\/ \href{mailto:#2}{#2} +% \newline +% +% } + +% Argumentumok: #1=Tanév (xxxx/xx alakban, #2=félév (pont nélkül) +\newcommand{\tanevfelev}[2]{ + \large\noindent\textbf{Tanév:} #1. tanév, #2. félév + \newline +} + +% Argumentumok: #1=téma címe +\newcommand{\feladatcim}[1]{ + \large\noindent\textbf{Téma címe: #1} + \bigskip +} + +% Argumentumok: #1=téma részletei +\newcommand{\feladatmaga}[1]{ +\large\noindent\textbf{Feladat:} + \newline + #1 + \newline + \smallskip +} + +% A fejezetek közé beágyazott irod.jegyzék +\def\thebibliography#1{\renewcommand{% +\baselinestretch}{1}\subsection{A tanulm\'anyozott irodalom jegyz\'eke}\list + {\small [\arabic{enumi}]}{\settowidth\labelwidth{[#1]}\leftmargin\labelwidth + \advance\leftmargin\labelsep + \usecounter{enumi}} + \def\newblock{\small \hskip .11em plus .33em minus .07em} + \sloppy\clubpenalty4000\widowpenalty4000 + \sfcode`\.=1000\relax} +\let\endthebibliography=\endlist% + + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "template" +%%% End: diff --git a/src/include/packages.tex b/src/include/packages.tex new file mode 100644 index 0000000..bd90e7e --- /dev/null +++ b/src/include/packages.tex @@ -0,0 +1,73 @@ +% !TeX root = ../thesis.tex +% thanks to http://tex.stackexchange.com/a/47579/71109 +\usepackage{ifxetex} +\usepackage{ifluatex} +\newif\ifxetexorluatex % a new conditional starts as false +\ifnum 0\ifxetex 1\fi\ifluatex 1\fi>0 + \xetexorluatextrue +\fi + +\ifxetexorluatex + \usepackage{fontspec} +\else + \usepackage[T1]{fontenc} + \usepackage[utf8]{inputenc} + \usepackage[lighttt]{lmodern} +\fi + +\usepackage[english,magyar]{babel} % Alapértelmezés szerint utoljára definiált nyelv lesz aktív, de később külön beállítjuk az aktív nyelvet. + +%\usepackage{cmap} +\usepackage{amsfonts,amsmath,amssymb} % Mathematical symbols. +%\usepackage[ruled,boxed,resetcount,linesnumbered]{algorithm2e} % For pseudocodes. % beware: this is not compatible with LuaLaTeX, see http://tex.stackexchange.com/questions/34814/lualatex-and-algorithm2e +\usepackage{booktabs} % For publication quality tables for LaTeX +\usepackage{graphicx} + +\usepackage{listings} + +%\usepackage{fancyhdr} +%\usepackage{lastpage} + +\usepackage{anysize} +%\usepackage{sectsty} +\usepackage{setspace} % For setting line spacing + +\usepackage[unicode]{hyperref} % For hyperlinks in the generated document. +\usepackage{xcolor} +\usepackage{listings} % For source code snippets. + +\usepackage[amsmath,thmmarks]{ntheorem} % Theorem-like environments. + +\usepackage[hang]{caption} + +\singlespacing + +\newcommand{\selecthungarian}{ + \selectlanguage{magyar} + \setlength{\parindent}{2em} + \setlength{\parskip}{0em} + \frenchspacing +} + +\newcommand{\selectenglish}{ + \selectlanguage{english} + \setlength{\parindent}{0em} + \setlength{\parskip}{0.5em} + \nonfrenchspacing + \renewcommand{\figureautorefname}{Figure} + \renewcommand{\tableautorefname}{Table} + \renewcommand{\partautorefname}{Part} + \renewcommand{\chapterautorefname}{Chapter} + \renewcommand{\sectionautorefname}{Section} + \renewcommand{\subsectionautorefname}{Section} + \renewcommand{\subsubsectionautorefname}{Section} +} + +\usepackage[numbers]{natbib} +\usepackage{xspace} + +\usepackage{tikz} +\usepackage{pgfplots} +\pgfplotsset{compat=1.6} + +\PassOptionsToPackage{hyphens}{url}\usepackage{hyperref} diff --git a/src/include/preamble.tex b/src/include/preamble.tex new file mode 100644 index 0000000..7b2e514 --- /dev/null +++ b/src/include/preamble.tex @@ -0,0 +1,125 @@ +%-------------------------------------------------------------------------------------- +% Page layout setup +%-------------------------------------------------------------------------------------- +% we need to redefine the pagestyle plain +% another possibility is to use the body of this command without \fancypagestyle +% and use \pagestyle{fancy} but in that case the special pages +% (like the ToC, the References, and the Chapter pages)remain in plane style + +\pagestyle{plain} +\marginsize{35mm}{25mm}{15mm}{15mm} + +\setcounter{tocdepth}{3} +%\sectionfont{\large\upshape\bfseries} +\setcounter{secnumdepth}{3} + +\sloppy % Margón túllógó sorok tiltása. +\widowpenalty=10000 \clubpenalty=10000 %A fattyú- és árvasorok elkerülése +\def\hyph{-\penalty0\hskip0pt\relax} % Kötőjeles szavak elválasztásának engedélyezése + + +%-------------------------------------------------------------------------------------- +% Setup hyperref package +%-------------------------------------------------------------------------------------- +\hypersetup{ + % bookmarks=true, % show bookmarks bar? + unicode=true, % non-Latin characters in Acrobat's bookmarks + pdftitle={\vikcim}, % title + pdfauthor={\szerzoMeta}, % author + pdfsubject={\vikdoktipus}, % subject of the document + pdfcreator={\szerzoMeta}, % creator of the document + pdfproducer={}, % producer of the document + pdfkeywords={}, % list of keywords (separate then by comma) + pdfnewwindow=true, % links in new window + colorlinks=true, % false: boxed links; true: colored links + linkcolor=black, % color of internal links + citecolor=black, % color of links to bibliography + filecolor=black, % color of file links + urlcolor=black % color of external links +} + + +%-------------------------------------------------------------------------------------- +% Set up listings +%-------------------------------------------------------------------------------------- +\definecolor{lightgray}{rgb}{0.95,0.95,0.95} +\lstset{ + basicstyle=\scriptsize\ttfamily, % print whole listing small + keywordstyle=\color{black}\bfseries, % bold black keywords + identifierstyle=, % nothing happens + % default behavior: comments in italic, to change use + % commentstyle=\color{green}, % for e.g. green comments + stringstyle=\scriptsize, + showstringspaces=false, % no special string spaces + aboveskip=3pt, + belowskip=3pt, + backgroundcolor=\color{lightgray}, + columns=flexible, + keepspaces=true, + escapeinside={(*@}{@*)}, + captionpos=b, + breaklines=true, + frame=single, + float=!ht, + tabsize=2, + literate=* + {á}{{\'a}}1 {é}{{\'e}}1 {í}{{\'i}}1 {ó}{{\'o}}1 {ö}{{\"o}}1 {ő}{{\H{o}}}1 {ú}{{\'u}}1 {ü}{{\"u}}1 {ű}{{\H{u}}}1 + {Á}{{\'A}}1 {É}{{\'E}}1 {Í}{{\'I}}1 {Ó}{{\'O}}1 {Ö}{{\"O}}1 {Ő}{{\H{O}}}1 {Ú}{{\'U}}1 {Ü}{{\"U}}1 {Ű}{{\H{U}}}1 +} + + +%-------------------------------------------------------------------------------------- +% Set up theorem-like environments +%-------------------------------------------------------------------------------------- +% Using ntheorem package -- see http://www.math.washington.edu/tex-archive/macros/latex/contrib/ntheorem/ntheorem.pdf + +\theoremstyle{plain} +\theoremseparator{.} +\newtheorem{example}{\pelda} + +\theoremseparator{.} +%\theoremprework{\bigskip\hrule\medskip} +%\theorempostwork{\hrule\bigskip} +\theorembodyfont{\upshape} +\theoremsymbol{{\large \ensuremath{\centerdot}}} +\newtheorem{definition}{\definicio} + +\theoremseparator{.} +%\theoremprework{\bigskip\hrule\medskip} +%\theorempostwork{\hrule\bigskip} +\newtheorem{theorem}{\tetel} + + +%-------------------------------------------------------------------------------------- +% Some new commands and declarations +%-------------------------------------------------------------------------------------- +\newcommand{\code}[1]{{\upshape\ttfamily\scriptsize\indent #1}} +\newcommand{\doi}[1]{DOI: \href{http://dx.doi.org/\detokenize{#1}}{\raggedright{\texttt{\detokenize{#1}}}}} % A hivatkozások közt így könnyebb DOI-t megadni. + +\DeclareMathOperator*{\argmax}{arg\,max} +%\DeclareMathOperator*[1]{\floor}{arg\,max} +\DeclareMathOperator{\sign}{sgn} +\DeclareMathOperator{\rot}{rot} + + +%-------------------------------------------------------------------------------------- +% Setup captions +%-------------------------------------------------------------------------------------- +\captionsetup[figure]{ + width=.75\textwidth, + aboveskip=10pt} + +\renewcommand{\captionlabelfont}{\bf} +%\renewcommand{\captionfont}{\footnotesize\it} + +%-------------------------------------------------------------------------------------- +% Hyphenation exceptions +%-------------------------------------------------------------------------------------- +\hyphenation{Shakes-peare Mar-seilles ár-víz-tű-rő tü-kör-fú-ró-gép} + + +\author{\vikszerzo} +\title{\viktitle} + +\renewcommand{\lstlistingname}{K\'odr\'eszlet}% Listing -> Algorithm +\renewcommand{\lstlistlistingname}{List of \lstlistingname s}% List of Listings -> List of Algorithms diff --git a/src/include/project.tex b/src/include/project.tex new file mode 100644 index 0000000..251eda7 --- /dev/null +++ b/src/include/project.tex @@ -0,0 +1,10 @@ +%-------------------------------------------------------------------------------------- +% Feladatkiiras (a tanszeken atveheto, kinyomtatott valtozat) +%-------------------------------------------------------------------------------------- +\clearpage +\begin{center} +\large +\textbf{FELADATKIÍRÁS}\\ +\end{center} + +A feladatkiírást a tanszéki adminisztrációban lehet átvenni, és a leadott munkába eredeti, tanszéki pecséttel ellátott és a tanszékvezető által aláírt lapot kell belefűzni (ezen oldal \emph{helyett}, ez az oldal csak útmutatás). Az elektronikusan feltöltött dolgozatban már nem kell beleszerkeszteni ezt a feladatkiírást. diff --git a/src/include/tdk-variables.tex b/src/include/tdk-variables.tex new file mode 100644 index 0000000..3408e12 --- /dev/null +++ b/src/include/tdk-variables.tex @@ -0,0 +1,11 @@ +%-------------------------------------------------------------------------------------- +% TDK-specifikus változók +%-------------------------------------------------------------------------------------- +\newcommand{\tdkszerzoB}{Második Szerző} % Második szerző neve; hagyd üresen, ha egyedül írtad a TDK-t. +\newcommand{\tdkev}{2014} % A dolgozat írásának éve (pl. "2014") (Ez OTDK-nál eltérhet az aktuális évtől.) + +% További adatok az OTDK címlaphoz (BME-s TDK-hoz nem kell kitölteni) +\newcommand{\tdkevfolyamA}{IV} % Első szerző évfolyama, római számmal (pl. IV). +\newcommand{\tdkevfolyamB}{III} % Második szerző évfolyama, római számmal (pl. III). +\newcommand{\tdkkonzulensbeosztasA}{egyetemi tanár} % Első konzulens beosztása (pl. egyetemi docens) +\newcommand{\tdkkonzulensbeosztasB}{doktorandusz} % Második konzulens beosztása (pl. egyetemi docens) diff --git a/src/include/thesis-en.tex b/src/include/thesis-en.tex new file mode 100644 index 0000000..50cb082 --- /dev/null +++ b/src/include/thesis-en.tex @@ -0,0 +1,57 @@ +%-------------------------------------------------------------------------------------- +% Elnevezések +%-------------------------------------------------------------------------------------- +\newcommand{\bme}{Budapest University of Technology and Economics} +\newcommand{\vik}{Faculty of Electrical Engineering and Informatics} + +\newcommand{\bmemit}{Department of Measurement and Information Systems} +\newcommand{\bmetmit}{Department of Telecommunications and Media Informatics} + +\newcommand{\keszitette}{Author} +\newcommand{\konzulens}{Advisor} + +\newcommand{\bsc}{Bachelor's Thesis} +\newcommand{\msc}{Master's Thesis} +\newcommand{\tdk}{Scientific Students' Association Report} +\newcommand{\bsconlab}{BSc Project Laboratory} +\newcommand{\msconlabi}{MSc Project Laboratory 1} +\newcommand{\msconlabii}{MSc Project Laboratory 2} + +\newcommand{\pelda}{Example} +\newcommand{\definicio}{Definition} +\newcommand{\tetel}{Theorem} + +\newcommand{\bevezetes}{Introduction} +\newcommand{\koszonetnyilvanitas}{Acknowledgements} +\newcommand{\fuggelek}{Appendix} + +% Optional custom titles +%\addto\captionsenglish{% +%\renewcommand*{\listfigurename}{Your list of figures title} +%\renewcommand*{\listtablename}{Your list of tables title} +%\renewcommand*{\bibname}{Your bibliography title} +%} + +\newcommand{\szerzo}{\vikszerzoKeresztnev{} \vikszerzoVezeteknev} +\newcommand{\vikkonzulensA}{\vikkonzulensAMegszolitas\vikkonzulensAKeresztnev{} \vikkonzulensAVezeteknev} +\newcommand{\vikkonzulensB}{\vikkonzulensBMegszolitas\vikkonzulensBKeresztnev{} \vikkonzulensBVezeteknev} +\newcommand{\vikkonzulensC}{\vikkonzulensCMegszolitas\vikkonzulensCKeresztnev{} \vikkonzulensCVezeteknev} + +\newcommand{\selectthesislanguage}{\selectenglish} + +\bibliographystyle{unsrt} + +\newcommand{\ie}{i.e.\@\xspace} +\newcommand{\Ie}{I.e.\@\xspace} +\newcommand{\eg}{e.g.\@\xspace} +\newcommand{\Eg}{E.g.\@\xspace} +\newcommand{\etal}{et al.\@\xspace} +\newcommand{\etc}{etc.\@\xspace} +\newcommand{\vs}{vs.\@\xspace} +\newcommand{\viz}{viz.\@\xspace} % videlicet +\newcommand{\cf}{cf.\@\xspace} % confer +\newcommand{\Cf}{Cf.\@\xspace} +\newcommand{\wrt}{w.r.t.\@\xspace} % with respect to +\newcommand{\approximately}{approx.\@\xspace} + +\newcommand{\appendixnumber}{1} % a fofejezet-szamlalo az angol ABC 1. betuje (A) lesz diff --git a/src/include/thesis-hu.tex b/src/include/thesis-hu.tex new file mode 100644 index 0000000..29335e9 --- /dev/null +++ b/src/include/thesis-hu.tex @@ -0,0 +1,46 @@ +%-------------------------------------------------------------------------------------- +% Elnevezések +%-------------------------------------------------------------------------------------- +\newcommand{\bme}{Budapesti Műszaki és Gazdaságtudományi Egyetem} +\newcommand{\vik}{Villamosmérnöki és Informatikai Kar} + +\newcommand{\bmemit}{Méréstechnika és Információs Rendszerek Tanszék} +\newcommand{\bmetmit}{Távközlési és Médiainformatikai Tanszék} + +\newcommand{\keszitette}{Készítette} +\newcommand{\konzulens}{Konzulens} + +\newcommand{\bsc}{Szakdolgozat} +\newcommand{\msc}{Diplomaterv} +\newcommand{\tdk}{TDK dolgozat} +\newcommand{\bsconlab}{BSc Önálló laboratórium} +\newcommand{\msconlabi}{MSc Önálló laboratórium 1.} +\newcommand{\msconlabii}{MSc Önálló laboratórium 2.} + +\newcommand{\pelda}{Példa} +\newcommand{\definicio}{Definíció} +\newcommand{\tetel}{Tétel} + +\newcommand{\bevezetes}{Bevezetés} +\newcommand{\koszonetnyilvanitas}{Köszönetnyilvánítás} +\newcommand{\fuggelek}{Függelék} + +% Opcionálisan átnevezhető címek +%\addto\captionsmagyar{% +%\renewcommand{\listfigurename}{Saját ábrajegyzék cím} +%\renewcommand{\listtablename}{Saját táblázatjegyzék cím} +%\renewcommand{\bibname}{Saját irodalomjegyzék név} +%} + +\newcommand{\szerzo}{\vikszerzoVezeteknev{} \vikszerzoKeresztnev} +\newcommand{\vikkonzulensA}{\vikkonzulensAMegszolitas\vikkonzulensAVezeteknev{} \vikkonzulensAKeresztnev} +\newcommand{\vikkonzulensB}{\vikkonzulensBMegszolitas\vikkonzulensBVezeteknev{} \vikkonzulensBKeresztnev} +\newcommand{\vikkonzulensC}{\vikkonzulensCMegszolitas\vikkonzulensCVezeteknev{} \vikkonzulensCKeresztnev} + +\newcommand{\selectthesislanguage}{\selecthungarian} + +\bibliographystyle{unsrt} + +\def\lstlistingname{lista} + +\newcommand{\appendixnumber}{6} % a fofejezet-szamlalo az angol ABC 6. betuje (F) lesz diff --git a/src/include/titlepage-otdk.tex b/src/include/titlepage-otdk.tex new file mode 100644 index 0000000..54ecb05 --- /dev/null +++ b/src/include/titlepage-otdk.tex @@ -0,0 +1,58 @@ +%% OTDK külső címlap +\begin{titlepage} + $\;$ + \vspace{5cm} + + \begin{center} + \Huge + \textbf{TDK-dolgozat}\let\thefootnote\relax\footnote{A dolgozat bemutatását a XXXXXXXXX ``Lorem ipsum dolor sit amet'' című program támogatta.} + \end{center} + + \vspace{13cm} + + \Large + \hspace{8cm} \szerzo + + \hspace{8cm} \tdkszerzoB + + \hspace{8cm} \tdkev. +\end{titlepage} + +\newpage +\thispagestyle{empty} + + +%% OTDK belső címlap +\begin{titlepage} + \begin{center} + \includegraphics[width=7cm]{./figures/bme_logo.pdf} + \vspace{0.3cm} + + \bme \\ + \vik \\ + \viktanszek \\ + \vspace{3.5cm} + + \huge {\vikcim} + \vspace{1.5cm} + + \large {\textbf{\vikdoktipus}} + \vfill + + {\Large + {\large \keszitette:} \\ \vspace{0.2cm} + \szerzo \\ \tdkevfolyamA. évfolyam \\ + \vspace{0.5cm} + \tdkszerzoB \\ \tdkevfolyamB. évfolyam \\ + \vspace{1.5cm} + {\large \konzulens:} \\ \vspace{0.2cm} + \vikkonzulensA,\\ \tdkkonzulensbeosztasA \\ + \vspace{0.5cm} + \vikkonzulensB,\\ \tdkkonzulensbeosztasB \\ + } + + \vspace{2cm} + \large {\tdkev.} + + \end{center} +\end{titlepage} \ No newline at end of file diff --git a/src/include/titlepage-tdk.tex b/src/include/titlepage-tdk.tex new file mode 100644 index 0000000..fdd3bb3 --- /dev/null +++ b/src/include/titlepage-tdk.tex @@ -0,0 +1,32 @@ +%% TDK címlap +\begin{titlepage} + \begin{center} + \includegraphics[width=7cm]{./figures/bme_logo.pdf} + \vspace{0.3cm} + + \bme \\ + \vik \\ + \viktanszek \\ + \vspace{5cm} + + \huge {\vikcim} + \vspace{1.5cm} + + \large {\textbf{\tdk}} + \vfill + + {\Large + \keszitette: \\ \vspace{0.3cm} + \szerzo \\ + \tdkszerzoB \\ + \vspace{1.5cm} + \konzulens: \\ \vspace{0.3cm} + \vikkonzulensA \\ + \vikkonzulensB \\ + } + + \vspace{2cm} + \large {\tdkev} + \end{center} +\end{titlepage} +%% Címlap vége diff --git a/src/include/titlepage-tmit.tex b/src/include/titlepage-tmit.tex new file mode 100644 index 0000000..ead5d0b --- /dev/null +++ b/src/include/titlepage-tmit.tex @@ -0,0 +1,47 @@ +% !TeX root = main.tex + +\begin{titlepage} +%bme logo + \begin{figure}[h] + \centering + \includegraphics[width=12cm]{figures/bme_logo.pdf} + \label{fig:bme_logo} + \end{figure} + \thispagestyle{empty} + %cím generálás + \onlabcim + +% \begin{center} +% \begin{tabular}{ p{3cm} p{5cm} } +% +% Készítette: & Beszámoló Péter \\ +% Neptun-kód: & BPOX43 \\ +% Ágazat: & Médiainformatika \\ +% E-mail cím: & b.peter@onlab.hu \\ +% Konzulens: & Dr. Péhádes István \\ +% E-mail cím: & pehades@tmit.bme.hu \\ +% Konzulens: & Doktor Andusz \\ +% E-mail cím: & doktora@tmit.bme.hu \\ +% +% \end{tabular} +% \end{center} + + + %\szerzo argumentumok: #1=Név, #2=Neptunkód, #3=szakirány, #4=email,#5 konzulens-1, #6 konzulens-1-email, #7 konzulens-2, #8 konzulens-2-email + \onlabszerzo{\szerzoMeta}{\vikszerzoNeptun}{\vikszerzoAgazat}{\vikszerzoEmail}{\vikkonzulensAMeta}{\vikkonzulensAEmail}{\vikkonzulensBMeta}{\vikkonzulensBEmail} + + + +%\feladatcim argumentuma a feladat rövid, 1 soros címe + \feladatcim{\vikcim} + + %\feladatmaga argumentuma a feladat 1-2 bekezdésnyi ismertetése + \feladatmaga{\feladatSzovege} + + + %\tanevfelev argumentumok: + % #1=Tanév (xxxx/xx alakban), #2=félév (pont nélkül!) + + \tanevfelev{2019/20}{II} + +\end{titlepage} diff --git a/src/include/titlepage.tex b/src/include/titlepage.tex new file mode 100644 index 0000000..0a996d3 --- /dev/null +++ b/src/include/titlepage.tex @@ -0,0 +1,33 @@ +\hypersetup{pageanchor=false} +%-------------------------------------------------------------------------------------- +% The title page +%-------------------------------------------------------------------------------------- +\begin{titlepage} +\begin{center} +\includegraphics[width=60mm,keepaspectratio]{figures/bme_logo.pdf}\\ +\vspace{0.3cm} +\textbf{\bme}\\ +\textmd{\vik}\\ +\textmd{\viktanszek}\\[5cm] + +\vspace{0.4cm} +{\huge \bfseries \vikcim}\\[0.8cm] +\vspace{0.5cm} +\textsc{\Large \vikdoktipus}\\[4cm] + +{ + \renewcommand{\arraystretch}{0.85} + \begin{tabular}{cc} + \makebox[7cm]{\emph{\keszitette}} & \makebox[7cm]{\emph{\konzulens}} \\ \noalign{\smallskip} + \makebox[7cm]{\szerzo} & \makebox[7cm]{\vikkonzulensA} \\ + & \makebox[7cm]{\vikkonzulensB} \\ + & \makebox[7cm]{\vikkonzulensC} \\ + \end{tabular} +} + +\vfill +{\large \today} +\end{center} +\end{titlepage} +\hypersetup{pageanchor=false} + diff --git a/src/lua/language.dat.lua b/src/lua/language.dat.lua new file mode 100644 index 0000000..cd0d9e4 --- /dev/null +++ b/src/lua/language.dat.lua @@ -0,0 +1,731 @@ +-- Generated by ./install-tl on Sun Feb 12 19:17:26 2017 +-- $Id: language.us.lua 18737 2010-06-04 17:09:02Z karl $ +--[[ +language.us.dat (and the start of language.dat.lua), used by: +- a special luatex version of hyphen.cfg (derived from the babel system); +- a special luatex version of etex.src (from the e-TeX distributon). + +See luatex-hyphen.pdf (currently part of the hyph-utf8 package) for details. + +DO NOT EDIT THIS FILE (language.dat.lua)! It is generated by tlmgr. +See language.dat (or language.us) for more information. + +Warning: formats using this file also use one of language.dat or +language.def. Update them accordingly. The interaction between these +files is documented in luatex-hyphen.pdf, but here is a summary: +- a language must be mentioned in language.dat or language.def to be +available; if, in addition, it is: + - not mentioned in language.dat.lua, then it is dumped in the format; + - mentioned in language.dat.lua with a key special="disabled:", + then it is not available at all; + - mentioned in language.dat.lua with a normal entry, then it will not + be dumped in the format, but loaded at runtime when activated. +]] + +return { + ["english"]={ + loader="hyphen.tex", + special="language0", -- should be dumped in the format + lefthyphenmin=2, + righthyphenmin=3, + synonyms={"usenglish","USenglish","american"}, + }, + -- dumylang and zerohyph are dumped in the format, + -- since they contain either very few or no patterns at all +-- END of language.us.lua (missing '}' appended after all entries) +-- from dehyph-exptl: + ['german-x-2014-05-21'] = { + loader = 'dehypht-x-2014-05-21.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { 'german-x-latest' }, + patterns = 'hyph-de-1901.pat.txt', + hyphenation = 'hyph-de-1901.hyp.txt', + }, + ['ngerman-x-2014-05-21'] = { + loader = 'dehyphn-x-2014-05-21.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { 'ngerman-x-latest' }, + patterns = 'hyph-de-1996.pat.txt', + hyphenation = 'hyph-de-1996.hyp.txt', + }, +-- from hyphen-afrikaans: + ['afrikaans'] = { + loader = 'loadhyph-af.tex', + lefthyphenmin = 1, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-af.pat.txt', + hyphenation = 'hyph-af.hyp.txt', + }, +-- from hyphen-ancientgreek: + ['ancientgreek'] = { + loader = 'loadhyph-grc.tex', + lefthyphenmin = 1, + righthyphenmin = 1, + synonyms = { }, + patterns = 'hyph-grc.pat.txt', + hyphenation = '', + }, + ['ibycus'] = { + loader = 'ibyhyph.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + special = 'disabled:8-bit only', + }, +-- from hyphen-arabic: + ['arabic'] = { + loader = 'zerohyph.tex', + lefthyphenmin = 2, + righthyphenmin = 3, + synonyms = { }, + patterns = '', + }, +-- from hyphen-armenian: + ['armenian'] = { + loader = 'loadhyph-hy.tex', + lefthyphenmin = 1, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-hy.pat.txt', + hyphenation = '', + }, +-- from hyphen-basque: + ['basque'] = { + loader = 'loadhyph-eu.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-eu.pat.txt', + hyphenation = '', + }, +-- from hyphen-bulgarian: + ['bulgarian'] = { + loader = 'loadhyph-bg.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-bg.pat.txt', + hyphenation = '', + }, +-- from hyphen-catalan: + ['catalan'] = { + loader = 'loadhyph-ca.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-ca.pat.txt', + hyphenation = 'hyph-ca.hyp.txt', + }, +-- from hyphen-chinese: + ['pinyin'] = { + loader = 'loadhyph-zh-latn-pinyin.tex', + lefthyphenmin = 1, + righthyphenmin = 1, + synonyms = { }, + patterns = 'hyph-zh-latn-pinyin.pat.txt', + hyphenation = '', + }, +-- from hyphen-churchslavonic: + ['churchslavonic'] = { + loader = 'loadhyph-cu.tex', + lefthyphenmin = 1, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-cu.pat.txt', + hyphenation = 'hyph-cu.hyp.txt', + }, +-- from hyphen-coptic: + ['coptic'] = { + loader = 'loadhyph-cop.tex', + lefthyphenmin = 1, + righthyphenmin = 1, + synonyms = { }, + patterns = 'hyph-cop.pat.txt', + hyphenation = '', + }, +-- from hyphen-croatian: + ['croatian'] = { + loader = 'loadhyph-hr.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-hr.pat.txt', + hyphenation = '', + }, +-- from hyphen-czech: + ['czech'] = { + loader = 'loadhyph-cs.tex', + lefthyphenmin = 2, + righthyphenmin = 3, + synonyms = { }, + patterns = 'hyph-cs.pat.txt', + hyphenation = 'hyph-cs.hyp.txt', + }, +-- from hyphen-danish: + ['danish'] = { + loader = 'loadhyph-da.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-da.pat.txt', + hyphenation = '', + }, +-- from hyphen-dutch: + ['dutch'] = { + loader = 'loadhyph-nl.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-nl.pat.txt', + hyphenation = 'hyph-nl.hyp.txt', + }, +-- from hyphen-english: + ['ukenglish'] = { + loader = 'loadhyph-en-gb.tex', + lefthyphenmin = 2, + righthyphenmin = 3, + synonyms = { 'british', 'UKenglish' }, + patterns = 'hyph-en-gb.pat.txt', + hyphenation = 'hyph-en-gb.hyp.txt', + }, + ['usenglishmax'] = { + loader = 'loadhyph-en-us.tex', + lefthyphenmin = 2, + righthyphenmin = 3, + synonyms = { }, + patterns = 'hyph-en-us.pat.txt', + hyphenation = 'hyph-en-us.hyp.txt', + }, +-- from hyphen-esperanto: + ['esperanto'] = { + loader = 'loadhyph-eo.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-eo.pat.txt', + hyphenation = '', + }, +-- from hyphen-estonian: + ['estonian'] = { + loader = 'loadhyph-et.tex', + lefthyphenmin = 2, + righthyphenmin = 3, + synonyms = { }, + patterns = 'hyph-et.pat.txt', + hyphenation = '', + }, +-- from hyphen-ethiopic: + ['ethiopic'] = { + loader = 'loadhyph-mul-ethi.tex', + lefthyphenmin = 1, + righthyphenmin = 1, + synonyms = { 'amharic', 'geez' }, + patterns = 'hyph-mul-ethi.pat.txt', + hyphenation = '', + }, +-- from hyphen-farsi: + ['farsi'] = { + loader = 'zerohyph.tex', + lefthyphenmin = 2, + righthyphenmin = 3, + synonyms = { 'persian' }, + patterns = '', + }, +-- from hyphen-finnish: + ['finnish'] = { + loader = 'loadhyph-fi.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-fi.pat.txt', + hyphenation = '', + }, +-- from hyphen-french: + ['french'] = { + loader = 'loadhyph-fr.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { 'patois', 'francais' }, + patterns = 'hyph-fr.pat.txt', + hyphenation = '', + }, +-- from hyphen-friulan: + ['friulan'] = { + loader = 'loadhyph-fur.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-fur.pat.txt', + hyphenation = '', + }, +-- from hyphen-galician: + ['galician'] = { + loader = 'loadhyph-gl.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-gl.pat.txt', + hyphenation = '', + }, +-- from hyphen-georgian: + ['georgian'] = { + loader = 'loadhyph-ka.tex', + lefthyphenmin = 1, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-ka.pat.txt', + hyphenation = '', + }, +-- from hyphen-german: + ['german'] = { + loader = 'loadhyph-de-1901.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-de-1901.pat.txt', + hyphenation = '', + }, + ['ngerman'] = { + loader = 'loadhyph-de-1996.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-de-1996.pat.txt', + hyphenation = '', + }, + ['swissgerman'] = { + loader = 'loadhyph-de-ch-1901.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-de-ch-1901.pat.txt', + hyphenation = '', + }, +-- from hyphen-greek: + ['monogreek'] = { + loader = 'loadhyph-el-monoton.tex', + lefthyphenmin = 1, + righthyphenmin = 1, + synonyms = { }, + patterns = 'hyph-el-monoton.pat.txt', + hyphenation = '', + }, + ['greek'] = { + loader = 'loadhyph-el-polyton.tex', + lefthyphenmin = 1, + righthyphenmin = 1, + synonyms = { 'polygreek' }, + patterns = 'hyph-el-polyton.pat.txt', + hyphenation = '', + }, +-- from hyphen-hungarian: + ['hungarian'] = { + loader = 'loadhyph-hu.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { 'hungarian', 'magyar' }, + patterns = 'hyph-hu.pat.txt', + hyphenation = '', + }, +-- from hyphen-icelandic: + ['icelandic'] = { + loader = 'loadhyph-is.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-is.pat.txt', + hyphenation = '', + }, +-- from hyphen-indic: + ['assamese'] = { + loader = 'loadhyph-as.tex', + lefthyphenmin = 1, + righthyphenmin = 1, + synonyms = { }, + patterns = 'hyph-as.pat.txt', + hyphenation = '', + }, + ['bengali'] = { + loader = 'loadhyph-bn.tex', + lefthyphenmin = 1, + righthyphenmin = 1, + synonyms = { }, + patterns = 'hyph-bn.pat.txt', + hyphenation = '', + }, + ['gujarati'] = { + loader = 'loadhyph-gu.tex', + lefthyphenmin = 1, + righthyphenmin = 1, + synonyms = { }, + patterns = 'hyph-gu.pat.txt', + hyphenation = '', + }, + ['hindi'] = { + loader = 'loadhyph-hi.tex', + lefthyphenmin = 1, + righthyphenmin = 1, + synonyms = { }, + patterns = 'hyph-hi.pat.txt', + hyphenation = '', + }, + ['kannada'] = { + loader = 'loadhyph-kn.tex', + lefthyphenmin = 1, + righthyphenmin = 1, + synonyms = { }, + patterns = 'hyph-kn.pat.txt', + hyphenation = '', + }, + ['malayalam'] = { + loader = 'loadhyph-ml.tex', + lefthyphenmin = 1, + righthyphenmin = 1, + synonyms = { }, + patterns = 'hyph-ml.pat.txt', + hyphenation = '', + }, + ['marathi'] = { + loader = 'loadhyph-mr.tex', + lefthyphenmin = 1, + righthyphenmin = 1, + synonyms = { }, + patterns = 'hyph-mr.pat.txt', + hyphenation = '', + }, + ['oriya'] = { + loader = 'loadhyph-or.tex', + lefthyphenmin = 1, + righthyphenmin = 1, + synonyms = { }, + patterns = 'hyph-or.pat.txt', + hyphenation = '', + }, + ['panjabi'] = { + loader = 'loadhyph-pa.tex', + lefthyphenmin = 1, + righthyphenmin = 1, + synonyms = { }, + patterns = 'hyph-pa.pat.txt', + hyphenation = '', + }, + ['tamil'] = { + loader = 'loadhyph-ta.tex', + lefthyphenmin = 1, + righthyphenmin = 1, + synonyms = { }, + patterns = 'hyph-ta.pat.txt', + hyphenation = '', + }, + ['telugu'] = { + loader = 'loadhyph-te.tex', + lefthyphenmin = 1, + righthyphenmin = 1, + synonyms = { }, + patterns = 'hyph-te.pat.txt', + hyphenation = '', + }, +-- from hyphen-indonesian: + ['indonesian'] = { + loader = 'loadhyph-id.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-id.pat.txt', + hyphenation = 'hyph-id.hyp.txt', + }, +-- from hyphen-interlingua: + ['interlingua'] = { + loader = 'loadhyph-ia.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-ia.pat.txt', + hyphenation = 'hyph-ia.hyp.txt', + }, +-- from hyphen-irish: + ['irish'] = { + loader = 'loadhyph-ga.tex', + lefthyphenmin = 2, + righthyphenmin = 3, + synonyms = { }, + patterns = 'hyph-ga.pat.txt', + hyphenation = 'hyph-ga.hyp.txt', + }, +-- from hyphen-italian: + ['italian'] = { + loader = 'loadhyph-it.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-it.pat.txt', + hyphenation = '', + }, +-- from hyphen-kurmanji: + ['kurmanji'] = { + loader = 'loadhyph-kmr.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-kmr.pat.txt', + hyphenation = '', + }, +-- from hyphen-latin: + ['latin'] = { + loader = 'loadhyph-la.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-la.pat.txt', + hyphenation = '', + }, + ['classiclatin'] = { + loader = 'loadhyph-la-x-classic.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-la-x-classic.pat.txt', + hyphenation = '', + }, + ['liturgicallatin'] = { + loader = 'loadhyph-la-x-liturgic.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-la-x-liturgic.pat.txt', + hyphenation = '', + }, +-- from hyphen-latvian: + ['latvian'] = { + loader = 'loadhyph-lv.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-lv.pat.txt', + hyphenation = '', + }, +-- from hyphen-lithuanian: + ['lithuanian'] = { + loader = 'loadhyph-lt.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-lt.pat.txt', + hyphenation = '', + }, +-- from hyphen-mongolian: + ['mongolian'] = { + loader = 'loadhyph-mn-cyrl.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-mn-cyrl.pat.txt', + hyphenation = '', + }, + ['mongolianlmc'] = { + loader = 'loadhyph-mn-cyrl-x-lmc.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + special = 'disabled:only for 8bit montex with lmc encoding', + }, +-- from hyphen-norwegian: + ['bokmal'] = { + loader = 'loadhyph-nb.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { 'norwegian', 'norsk' }, + patterns = 'hyph-nb.pat.txt', + hyphenation = 'hyph-nb.hyp.txt', + }, + ['nynorsk'] = { + loader = 'loadhyph-nn.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-nn.pat.txt', + hyphenation = 'hyph-nn.hyp.txt', + }, +-- from hyphen-occitan: + ['occitan'] = { + loader = 'loadhyph-oc.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-oc.pat.txt', + hyphenation = '', + }, +-- from hyphen-piedmontese: + ['piedmontese'] = { + loader = 'loadhyph-pms.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-pms.pat.txt', + hyphenation = '', + }, +-- from hyphen-polish: + ['polish'] = { + loader = 'loadhyph-pl.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-pl.pat.txt', + hyphenation = 'hyph-pl.hyp.txt', + }, +-- from hyphen-portuguese: + ['portuguese'] = { + loader = 'loadhyph-pt.tex', + lefthyphenmin = 2, + righthyphenmin = 3, + synonyms = { 'portuges' }, + patterns = 'hyph-pt.pat.txt', + hyphenation = 'hyph-pt.hyp.txt', + }, +-- from hyphen-romanian: + ['romanian'] = { + loader = 'loadhyph-ro.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-ro.pat.txt', + hyphenation = '', + }, +-- from hyphen-romansh: + ['romansh'] = { + loader = 'loadhyph-rm.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-rm.pat.txt', + hyphenation = '', + }, +-- from hyphen-russian: + ['russian'] = { + loader = 'loadhyph-ru.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-ru.pat.txt', + hyphenation = 'hyph-ru.hyp.txt', + }, +-- from hyphen-sanskrit: + ['sanskrit'] = { + loader = 'loadhyph-sa.tex', + lefthyphenmin = 1, + righthyphenmin = 3, + synonyms = { }, + patterns = 'hyph-sa.pat.txt', + hyphenation = '', + }, +-- from hyphen-serbian: + ['serbian'] = { + loader = 'loadhyph-sr-latn.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-sh-latn.pat.txt,hyph-sh-cyrl.pat.txt', + hyphenation = 'hyph-sh-latn.hyp.txt,hyph-sh-cyrl.hyp.txt', + }, + ['serbianc'] = { + loader = 'loadhyph-sr-cyrl.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-sh-latn.pat.txt,hyph-sh-cyrl.pat.txt', + hyphenation = 'hyph-sh-latn.hyp.txt,hyph-sh-cyrl.hyp.txt', + }, +-- from hyphen-slovak: + ['slovak'] = { + loader = 'loadhyph-sk.tex', + lefthyphenmin = 2, + righthyphenmin = 3, + synonyms = { }, + patterns = 'hyph-sk.pat.txt', + hyphenation = 'hyph-sk.hyp.txt', + }, +-- from hyphen-slovenian: + ['slovenian'] = { + loader = 'loadhyph-sl.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { 'slovene' }, + patterns = 'hyph-sl.pat.txt', + hyphenation = '', + }, +-- from hyphen-spanish: + ['spanish'] = { + loader = 'loadhyph-es.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { 'espanol' }, + patterns = 'hyph-es.pat.txt', + hyphenation = '', + }, +-- from hyphen-swedish: + ['swedish'] = { + loader = 'loadhyph-sv.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-sv.pat.txt', + hyphenation = '', + }, +-- from hyphen-thai: + ['thai'] = { + loader = 'loadhyph-th.tex', + lefthyphenmin = 2, + righthyphenmin = 3, + synonyms = { }, + patterns = 'hyph-th.pat.txt', + hyphenation = '', + }, +-- from hyphen-turkish: + ['turkish'] = { + loader = 'loadhyph-tr.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-tr.pat.txt', + hyphenation = '', + }, +-- from hyphen-turkmen: + ['turkmen'] = { + loader = 'loadhyph-tk.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-tk.pat.txt', + hyphenation = '', + }, +-- from hyphen-ukrainian: + ['ukrainian'] = { + loader = 'loadhyph-uk.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-uk.pat.txt', + hyphenation = '', + }, +-- from hyphen-uppersorbian: + ['uppersorbian'] = { + loader = 'loadhyph-hsb.tex', + lefthyphenmin = 2, + righthyphenmin = 2, + synonyms = { }, + patterns = 'hyph-hsb.pat.txt', + hyphenation = 'hyph-hsb.hyp.txt', + }, +-- from hyphen-welsh: + ['welsh'] = { + loader = 'loadhyph-cy.tex', + lefthyphenmin = 2, + righthyphenmin = 3, + synonyms = { }, + patterns = 'hyph-cy.pat.txt', + hyphenation = '', + }, +} diff --git a/src/magyar.ldf b/src/magyar.ldf new file mode 100644 index 0000000..06c3961 --- /dev/null +++ b/src/magyar.ldf @@ -0,0 +1,5801 @@ +% +% magyar.ldf -- LaTeX Language Definition for `magyar' (Hungarian), v1.5c +% written and copyright (C) by P\'eter SZAB\'O +% (version 1.5 -- Early October 2003 -- February 2004 --) +% +% The newest version of this magyar.ldf is part of MagyarLaTeX, available from +% http://www.math.bme.hu/latex/ . The web page is in Hungarian language, but +% it is easy to figure out how to download the newest magyar.ldf. Please +% bookmark this link as the definitive source of the newest version. +% +% This program is free software. There is NO WARRANTY. Use at your own risk! +% You can choose any of these licenses: GNU GPL, LaTeX's license, +% Babel's license. +% +% When will magyar.ldf 1.5 be part of mainstream LaTeX / Babel? I have no +% idea, ask the maintainer of Babel. magyar.ldf 1.5 has ptebeen converted to +% magyar.dtx on June 27, 2004. That version has been submitted to the +% maintainer of the Babel package. No reply from him since then. +% +% Should magyar.ldf 1.5 be part of tetex, or should it be available as a +% supplementary package in TeX distributions? Yes, but this is the task of the +% creators of those distributions. The Debian package ``magyarlatex'', +% which supplements the teTeX shipped with Debian Woody, Sarge and Sid, +% is available from http://www.math.bme.hu/latex/dl +% (file magyarlatex-latest.deb). +% +% The author of magyar.ldf 1.5 has uploaded it to CTAN +% (http://www.ctan.org), but he doesn't re-upload regularly, because he +% doesn't have time to maintain it and re-upload it after each bugfix. If +% you think that magyar.ldf 1.5 should be on CTAN, feel free to upload a +% snapshot, since it is free software. +% +% magyar.ldf 1.5 is based on magyar.ldf 1.4. However, it has been totally +% rewritten and extended (just compare the file sizes), and it doesn't share +% code from the earlier versions anymore. However, its default configuration +% tries to be compatible with older versions. +% +% Earlier versions of file `magyar.dtx' Babel package for LaTeX version 2e +% Copyright (C) 1989--2004 by Johannes Braams, TeXniek +% Copyright (C) 1989--2004 by +% \'Arp\'ad B\'IR\'O +% J\'ozsef B\'ERCES (version 1.4c -- 2001; contains a lot of work of him) +% +% To typeset text in Hungarian, please +% +% 1. Include `magyar huhyph.tex' in language.dat, re-run initex(1) (initex +% 'latex.ini \dump') or pdfinitex(1), verify that running latex(1) displays +% the word `magyar' in the line containing `hyphenation patterns' in its +% console output. +% +% 2. In the document preamble, use +% +% \def\magyarOptions{defaults=hu-min} +% \usepackage[magyar]{babel} +% \usepackage{t1enc}% for automatic hyphenation of accented chars +% \usepackage[latin2]{inputenc}% for typing chars +% +% This file is quite long, because it implements a lot of parametric features +% related to typesetting Hungarian text with \LaTeX. Sorry. +% +% Motto: ``There is a lot to do in the future'' -- by Gyngyi Bujdos and +% Ferenc Wettl in their conference proceedings article ``On the localization +% of TeX in Hungary'', presented at EuroBachoTeX 2002. +% +% Most of the code and comments in this file are written by P\'eter Szab\'o. +% The newest version is available from http://www.math.bme.hu/latex/ +% +% The version of this file is 1.5, even when new releases come out. Please see +% the \expandafter\ProvidesLanguage line for the release date. +% + +\expandafter\ifx\csname CurrentOption\endcsname\relax + \def\CurrentOption{magyar}% +\fi +%** So `\input magyar.ldf' will work as well. +\expandafter\ifx\csname ver@babel.sty\endcsname\relax + \csname fi\endcsname + \endinput \expandafter\RequirePackage\expandafter[\CurrentOption]{babel} +\fi + +%\ProvidesFile{magyar.ldf}[1996/12/23 v1.3h Magyar support from the babel system] +%\ProvidesLanguage{magyar}[2001/03/05 v1.4c Magyar support from the babel system] +% vvv for Babel v3.7 +\expandafter\ProvidesLanguage\expandafter{\CurrentOption}[2015/11/24 v1.5c Magyar support from the babel v3.7 system] + +% Possibly do \endinput if .ldf already loaded +\expandafter\LdfInit\expandafter{\CurrentOption}{captions\CurrentOption}% + +% Fix \catcodes{} possibly screwed up by other Babel languages. +% Dat: \string`\string! could have been written as \string`! +\edef\@@magyar@restcats{% + \catcode\string`\string`\the\catcode\string``\space\space + \catcode\string`\string!\the\catcode\string`!\space\space + \catcode\string`\string*\the\catcode\string`*\space\space + \catcode\string`\string+\the\catcode\string`+\space\space + \catcode\string`\string-\the\catcode\string`-\space\space + \catcode\string`\string=\the\catcode\string`=\space\space + \catcode\string`\string|\the\catcode\string`|\space\space + \catcode\string`\string;\the\catcode\string`;\space\space + \catcode\string`\string:\the\catcode\string`:\space\space + \catcode\string`\string'\the\catcode\string`'\space\space + \catcode\string`\string"\the\catcode\string`"\space\space + \catcode\string`\string?\the\catcode\string`?\space\space + \catcode\string`\string/\the\catcode\string`/\space\space + \let\noexpand\@@magyar@restcats\noexpand\@undefined +} +\catcode\string``12 \catcode`!12 \catcode`*12 \catcode`+12 \catcode`-12 +\catcode`=12 \catcode`|12 \catcode`;12 \catcode`:12 \catcode`'12 \catcode`"12 +\catcode`?12 \catcode`/12 + +%** Expand \CurrentOption early. +\edef\@@magyar@error#1{\noexpand\PackageError{\CurrentOption.ldf}{#1}\noexpand\@ehc} + +% --- Declare options. +% +% Dat: \languageattribute{magyar}{...} and \bbl@declare@ttribute{magyar}{foo}{...} +% isn't enough for us, because it is processed +% after \usepackage[magyar]{babel}, but we need the options information +% earlier. And also it cannot contain `='. +% + +%** `\dMf foo-bar {...}' is `\def\foo-bar{...}' where `-' is a letter +\def\dMf#1 {\expandafter\def\csname#1\endcsname} +\def\magyar@@unchanged{unchanged} +\def\magyar@enumarg#1#2{% + \expandafter\ifx\csname magyar@opt@#1@@#2\endcsname\relax + \@@magyar@error{Invalid arg for option: #1 = #2}% + \else + \csname magyar@opt@#1@@#2\endcsname + \fi +} +\def\@@magyar@argw@no {0}% +\def\@@magyar@argw@weak{1}% +\def\@@magyar@argw@yes {2}% +\def\magyar@yesweaknoarg#1#2{% + \expandafter\ifx\csname @@magyar@argw@#2\endcsname\relax + \@@magyar@error{Invalid arg for option: #1 = #2\MessageBreak Must be =no, =yes or =weak}% + \else + \expandafter\edef\csname magyar@opt@@#1\endcsname{\csname @@magyar@argw@#2\endcsname}% + \fi +} + +% Declare defaults. + +%** These defaults load most of the new functionality, but try not to +%** introduce visible typographical changes over magyar.ldf v1.4. These +%** are the ovarall defaults of magyar.ldf v1.5, in case of +%** \def\magyarOptions{} (or if is missing). +%** +%** These are the defaults: (over-1.4) +%** \def\magyarOptions{ +%** accents=defaulthigh, % or =high or =low +%** active=safe, % or =problematic or =none or =onlycs +%** activeprefix=babelopt2, % or =none or =babelopt3 or =grave or =acute or =quotedbl +%** activespace=none, % or =safe or =problematic +%** afterindent=unchanged, % or =force-no or =force-yes +%** amslevelfix=fix-ams, % or =unchanged or =fix-all +%** amsuppercasefix=fix-ams, % or =unchanged or =fix-all +%** amstocnumskip=\enskip, % TeX code or --empty-- +%** amstocnumlang=all, % or =hu +%** amspostsectiondot=no, % or =unchanged +%** appendixdot=yes, % or =no % !! dokumentlni +%** az=weak, % or =yes or =no +%** babelmarkfix=yes, % or =unchanged +%** captionfix=yes, % or =unchanged +%** captions=hu, % or =unchanged +%** chapterhead=yes, % or =unchanged(=no) +%** chapternumber=unchanged, % see partnumber= +%** cjhebrewfix=yes, % or =unchanged or =onlyouter +%** classmod=yes, % or =unchanged(=no) or TeX class name +%** %defaults=over-1.4, % or =compat-1.4 or =safest or =prettiest +%** dottedtocline=fix, % or =unchanged +%** emitdate=weak, % or =no or =yes +%** extras=yes, % or =no +%** fancyhdr=hu, % or =unchanged +%** figurecaptions=hu, % or =us or =unchanged +%** frenchspacing=unchanged, % or =no or =yes +%** hang=weak, % or =no or =yes +%** hunnewlabel=yes, % or =no or =only-hu +%** hunumbers=yes, % or =no +%** hutoday=yes, % or =no +%** hyphenmins=22, % or =unchanged or two chars: \lefthyphenmin\righthyphenmin +%** hyphenation=huhyph3, % or =none or =composite or =phonetic or =huhyphn +%** hynumberline=unchanged, % or =hu +%** labelenums=unchanged, % or =hu-a or =hu-A or =hu-d +%** labelitems=unchanged, % or =hu +%** longcaption=justified, % or =centered or =centernewline or =none (=unchanged) +%** mathbrk=define, % or =unchanged or =fix +%** mathhucomma=define, % or =unchanged or =fix +%** mathfactorial=define, % or =unchanged or =fix +%** mathmuskips=unchanged, % or =latex or =hu +%** mathreal=weak, % or =no or =yes +%** mond=weak, % or =no or =yes +%** ntheoremfix=yes, % or =unchanged +%** openqq=maybedown, % or =up or =down or =unchanged +%** partnumber=unchanged, % or =huordinal or =Huordinal +%** postdescription=unchanged, % see postpara= +%** postpara=unchanged, % or =bfdot or =dot or =quad or =diamond or =enskip or =quad or =em or =empty ... (\magyar@post@...) +%** postsubpara=unchanged, % see postpara= +%** refstruc=weak, % or =no or =yes +%** %safest=no, % or =yes (safest=no has no effect, safest=yes is equivalent to defaults=safest) +%** sectiondot=safe, % or =none or =problematic +%** shorthandcs=\shu, % or =none or a csname or a \cs, e.g shorthandcs=\shu +%** shortrefcmds=yes, % or =no +%** showfix=yes, % or =unchanged +%** suggestions=yes, % or =no +%** tablecaptions=hu, % or =us or =unchanged +%** textqq=weak, % or =no or =yes +%** theoremtitle=hu, % or =unchanged +%** footnote=yes, % or =unchanged or =huplain or =starplain +%** titles=\enskip, % TeX code: =unchanged, =\quad or other +%** toclang=good, % or =badfloat or =badall or =unchanged +%** told=weak, % or =no or =yes +%** varioref=hu, % or =unchanged +%** }\usepackage[magyar]{babel} +\dMf magyar@opt@defaults@@over-1.4 {% + \magyar@opt@accents@@defaulthigh + \magyar@opt@active@@safe + \magyar@opt@activeprefix{activeprefix}{babelopt2}% + \magyar@opt@activespace@@none + \magyar@opt@afterindent@@unchanged + \magyar@opt@amslevelfix{amslevelfix}{fix-ams}% + \magyar@opt@amsuppercasefix{amsuppercasefix}{fix-ams}% + \magyar@opt@amspostsectiondot@@no% change over 1.4 + \magyar@opt@amstocnumlang@@all + \magyar@opt@amstocnumskip{amstocnumskip}{\enskip}% change over 1.4 + \magyar@opt@appendixdot@@yes + \magyar@opt@babelmarkfix@@yes + \magyar@opt@az{az}{weak}% + \magyar@opt@captionfix@@yes + \magyar@opt@captions@@hu + \magyar@opt@chapternumber@@unchanged + \magyar@opt@classmod@@yes + \magyar@opt@dottedtocline@@fix + \magyar@opt@emitdate{emitdate}{weak}% + \magyar@opt@extras@@yes + \magyar@opt@chapterhead@@yes + \magyar@opt@fancyhdr@@hu% change over 1.4 + \magyar@opt@figurecaptions@@hu + \magyar@opt@footnote@@yes + \magyar@opt@frenchspacing@@unchanged + \magyar@opt@hang{hang}{weak}% + \magyar@opt@hunnewlabel@@yes + \magyar@opt@hunumbers@@yes + \magyar@opt@hutoday@@yes + \magyar@opt@hyphenation{hyphenation}{huhyph3-or-any}% + \magyar@opt@hyphenmins{hyphenmins}{22}% change over 1.4 Dat: Default LaTeX is {23} + \magyar@opt@labelenums@@unchanged + \magyar@opt@labelitems@@unchanged + \magyar@opt@longcaption@@justified + \magyar@opt@mathbrk@@define + \magyar@opt@mathfactorial@@define + \magyar@opt@mathhucomma@@define + \magyar@opt@mathmuskips@@unchanged + \magyar@opt@hynumberline@@unchanged + \magyar@opt@mathreal{mathreal}{weak}% + \magyar@opt@mond{mond}{weak}% + \magyar@opt@ntheoremfix@@yes + \magyar@opt@openqq@@maybedown + \magyar@opt@partnumber@@unchanged + \magyar@opt@postpara{}{unchanged}% + \magyar@opt@postsubpara{}{unchanged}% + \magyar@opt@refstruc{refstruc}{weak}% + \magyar@opt@sectiondot@@safe + \magyar@opt@shorthandcs{shorthandcs}{\shu}% + \magyar@opt@shortrefcmds@@yes + \magyar@opt@showfix@@yes + \magyar@opt@suggestions@@yes + \magyar@opt@tablecaptions@@hu + \magyar@opt@textqq{textqq}{weak}% + \magyar@opt@theoremtitle@@hu + \magyar@opt@titles{}{\enskip}% change over 1.4 + \magyar@opt@toclang@@good + \magyar@opt@told{told}{weak}% + \magyar@opt@varioref@@hu + \magyar@opt@cjhebrewfix@@yes +} + +%** These defaults try to be compatible with magyar.ldf v1.4 as much as +%** possible -- but avoids stupid, problematic, dangerous implementation +%** mistakes that would make magyar.ldf incompatible with many LaTeX +%** packages. The purpose of compat-1.4 is to make the document compilable: +%** if a fix would produce better results, but documents are compilable +%** without the fix, the fix will not be applied in compat-1.4. +%** Some very useful fixes are not applied here -- please use +%** defaults=over-1.4 to have them. Also some very nice features such +%** as \emitdate and \told are not available here. +\dMf magyar@opt@defaults@@compat-1.4 {% + \magyar@opt@accents@@defaulthigh% OK + \magyar@opt@active@@safe% we don't want =problematic + \magyar@opt@activeprefix@@grave% OK + \magyar@opt@activespace@@none% OK + \magyar@opt@afterindent@@unchanged% OK + \magyar@opt@amslevelfix@@unchanged% OK + \magyar@opt@amsuppercasefix@@unchanged% OK + \magyar@opt@amspostsectiondot@@unchanged% OK + \magyar@opt@amstocnumlang@@all% OK, irrelevant + \magyar@opt@amstocnumskip{amstocnumskip}{}% OK + \magyar@opt@appendixdot@@yes + \magyar@opt@babelmarkfix@@unchanged + \magyar@opt@az{az}{yes}% OK + \magyar@opt@captionfix@@unchanged + \magyar@opt@captions@@hu% OK + \magyar@opt@chapterhead@@yes% OK + \magyar@opt@chapternumber@@unchanged% OK + \magyar@opt@classmod@@yes% OK + \magyar@opt@dottedtocline@@unchanged% OK + \magyar@opt@emitdate{emitdate}{no}% OK + \magyar@opt@extras@@yes% OK + \magyar@opt@fancyhdr@@unchanged% OK + \magyar@opt@figurecaptions@@hu% OK + \magyar@opt@footnote@@unchanged% OK + \magyar@opt@frenchspacing@@unchanged% OK + \magyar@opt@hang{hang}{no}% OK + \magyar@opt@hunnewlabel@@yes% OK + \magyar@opt@hunumbers@@no% OK + \magyar@opt@hutoday@@yes% OK + \magyar@opt@hyphenation{hyphenation}{huhyph3-or-any}% OK + \magyar@opt@hyphenmins{hyphenmins}{unchanged}% + \magyar@opt@labelenums@@unchanged% OK + \magyar@opt@labelitems@@unchanged% OK + \magyar@opt@longcaption@@justified% OK + \magyar@opt@mathbrk@@unchanged% OK + \magyar@opt@mathhucomma@@unchanged% OK + \magyar@opt@mathfactorial@@unchanged% OK + \magyar@opt@mathmuskips@@unchanged% OK + \magyar@opt@hynumberline@@unchanged% OK + \magyar@opt@mathreal{mathreal}{no}% + \magyar@opt@mond{mond}{no}% OK + \magyar@opt@ntheoremfix@@yes% OK + \magyar@opt@openqq@@maybedown% OK + \magyar@opt@partnumber@@unchanged% OK + \magyar@opt@postpara{}{unchanged}% OK + \magyar@opt@postsubpara{}{unchanged}% OK + \magyar@opt@refstruc{refstruc}{no}% OK + \magyar@opt@sectiondot@@safe% we don't want =problematic + \magyar@opt@shorthandcs{shorthandcs}{none}% OK + \magyar@opt@shortrefcmds@@yes% OK + \magyar@opt@showfix@@yes% OK + \magyar@opt@suggestions@@no% OK -- user has explicity requested defaults=compat-1.4 + \magyar@opt@tablecaptions@@hu% OK + \magyar@opt@textqq{textqq}{no}% OK + \magyar@opt@theoremtitle@@hu% OK + \magyar@opt@titles{}{\quad}% OK -- ugly, but compatible + \magyar@opt@toclang@@good% we don't want weird errors and mischosen languages (would be =badall) + \magyar@opt@told{told}{no}% OK + \magyar@opt@varioref@@hu% was =unchanged, but varioref.sty (2000) is buggy + \magyar@opt@cjhebrewfix@@yes +} + +%** These defaults turn of most features -- the effect is similar to as if +%** magyar.ldf hasn't been loaded at all. Useful for debugging purposes. +\def\magyar@opt@defaults@@safest{% + \magyar@opt@accents@@defaulthigh + \magyar@opt@active@@none + \magyar@opt@activeprefix@@none + \magyar@opt@activespace@@none + \magyar@opt@afterindent@@unchanged + \magyar@opt@amslevelfix@@unchanged + \magyar@opt@amsuppercasefix{amsuppercasefix}{fix-ams}% + \magyar@opt@amspostsectiondot@@unchanged + \magyar@opt@amstocnumlang@@all% OK, irrelevant + \magyar@opt@amstocnumskip{amstocnumskip}{}% + \magyar@opt@appendixdot@@yes + \magyar@opt@az{az}{no}% + \magyar@opt@babelmarkfix@@yes + \magyar@opt@captionfix@@yes + \magyar@opt@captions@@unchanged + \magyar@opt@chapternumber@@unchanged + \magyar@opt@classmod@@unchanged + \magyar@opt@dottedtocline@@unchanged + \magyar@opt@emitdate{emitdate}{no}% + \magyar@opt@extras@@no + \magyar@opt@chapterhead@@no + \magyar@opt@fancyhdr@@unchanged + \magyar@opt@figurecaptions@@unchanged + \magyar@opt@footnote@@unchanged + \magyar@opt@frenchspacing@@unchanged + \magyar@opt@hang{hang}{no}% + \magyar@opt@hunnewlabel@@no + \magyar@opt@hunumbers@@no + \magyar@opt@hutoday@@no + \magyar@opt@hyphenation{hyphenation}{huhyph3-or-any}% + \magyar@opt@hyphenmins{hyphenmins}{unchanged}% + \magyar@opt@labelenums@@unchanged + \magyar@opt@labelitems@@unchanged + \magyar@opt@longcaption@@unchanged + \magyar@opt@mathbrk@@unchanged + \magyar@opt@mathhucomma@@unchanged + \magyar@opt@mathfactorial@@unchanged + \magyar@opt@mathmuskips@@unchanged + \magyar@opt@hynumberline@@unchanged + \magyar@opt@mathreal{mathreal}{no}% + \magyar@opt@mond{mond}{no}% + \magyar@opt@ntheoremfix@@unchanged + \magyar@opt@openqq@@unchanged + \magyar@opt@partnumber@@unchanged + \magyar@opt@postpara{}{unchanged}% + \magyar@opt@postsubpara{}{unchanged}% + \magyar@opt@refstruc{refstruc}{no}% + \magyar@opt@sectiondot@@none + \magyar@opt@shorthandcs{shorthandcs}{none}% + \magyar@opt@shortrefcmds@@no + \magyar@opt@showfix@@unchanged + \magyar@opt@suggestions@@yes + \magyar@opt@tablecaptions@@unchanged + \magyar@opt@textqq{textqq}{no}% + \magyar@opt@theoremtitle@@unchanged + \magyar@opt@titles{}{unchanged}% + \magyar@opt@toclang@@unchanged + \magyar@opt@told{told}{no}% + \magyar@opt@varioref@@unchanged + \magyar@opt@cjhebrewfix@@unchanged +} + +%** These defaults load almost all features, and try to do their best to make +%** the document comply to the Hungarian typography standards. Full compliance +%** is not achieved yet, and as new features are implemented, they will be +%** added to these defaults. +\def\magyar@opt@defaults@@prettiest{% + \magyar@opt@accents@@defaulthigh% {low} would have no effect with \usepackage{t1enc} + \magyar@opt@active@@safe + \magyar@opt@activeprefix{activeprefix}{babelopt2}% + \magyar@opt@activespace@@safe + \magyar@opt@afterindent@@unchanged% keep =force-no + \magyar@opt@amslevelfix{amslevelfix}{fix-ams}% + \magyar@opt@amsuppercasefix{amsuppercasefix}{fix-ams}% + \magyar@opt@amspostsectiondot@@no + \magyar@opt@amstocnumlang@@all + \magyar@opt@amstocnumskip{amstocnumskip}{\enskip}% + \magyar@opt@appendixdot@@no + \magyar@opt@az{az}{yes}% + \magyar@opt@babelmarkfix@@yes + \magyar@opt@captionfix@@yes + \magyar@opt@captions@@hu + \magyar@opt@chapternumber@@unchanged + \magyar@opt@classmod@@yes + \magyar@opt@dottedtocline@@fix + \magyar@opt@emitdate{emitdate}{yes}% + \magyar@opt@extras@@yes + \magyar@opt@chapterhead@@yes + \magyar@opt@fancyhdr@@hu + \magyar@opt@figurecaptions@@hu + \magyar@opt@footnote@@yes + \magyar@opt@frenchspacing@@yes + \magyar@opt@hang{hang}{yes}% + \magyar@opt@hunnewlabel@@yes + \magyar@opt@hunumbers@@yes + \magyar@opt@hutoday@@yes + \magyar@opt@hyphenation{hyphenation}{composite-or-any}% + \magyar@opt@hyphenmins{hyphenmins}{22}% Dat: Default LaTeX is {23} + \magyar@opt@labelenums{labelenums}{hu-a}% + \magyar@opt@labelitems@@hu + \magyar@opt@longcaption@@centered + \magyar@opt@mathbrk@@fix + \magyar@opt@mathhucomma@@fix + \magyar@opt@mathfactorial@@fix + \magyar@opt@mathmuskips@@hu + \magyar@opt@hynumberline@@hu + \magyar@opt@mathreal{mathreal}{yes}% + \magyar@opt@mond{mond}{yes}% + \magyar@opt@ntheoremfix@@yes + \magyar@opt@openqq@@maybedown + \magyar@opt@partnumber@@Huordinal + \magyar@opt@postdescription{}{dot}% + \magyar@opt@postpara{}{diamond}% + \magyar@opt@postsubpara{}{star}% + \magyar@opt@refstruc{refstruc}{yes}% + \magyar@opt@sectiondot@@safe + \magyar@opt@shorthandcs{shorthandcs}{\shu}% + \magyar@opt@shortrefcmds@@no + \magyar@opt@showfix@@yes + \magyar@opt@suggestions@@yes + \magyar@opt@tablecaptions@@hu + \magyar@opt@textqq{textqq}{yes}% + \magyar@opt@theoremtitle@@hu + \magyar@opt@titles{}{\enskip}% + \magyar@opt@toclang@@good + \magyar@opt@told{told}{yes}% + \magyar@opt@varioref@@hu + \magyar@opt@cjhebrewfix@@yes +} + +%** Expands to the \magyarOptions changes defaults=hu-min makes over +%** defaults=safest. +\def\magyar@@humin@options{% + active=safe, + activeprefix=babelopt2, + activespace=safe, + amslevelfix=fix-ams, + amspostsectiondot=no, + amstocnumlang=all, + amstocnumskip=\enskip, + appendixdot=no, + az=weak, + captions=hu, + chapterhead=yes, + cjhebrewfix=yes, + classmod=yes, + classmod=yes, + dottedtocline=fix, + emitdate=weak, + extras=yes, + fancyhdr=hu, + figurecaptions=hu, + footnote=huplain, + frenchspacing=yes, + hang=weak, + hunnewlabel=yes, + hunumbers=yes, + hutoday=yes, + hynumberline=hu, + hyphenmins=22, + labelenums=hu-d, + labelitems=hu, + longcaption=centered, + mathbrk=define, + mathbrk=fix, + mathfactorial=define, + mathhucomma=fix, + mathreal=weak, + mond=weak, + ntheoremfix=yes, + openqq=maybedown, + postdescription=dot, + postpara=diamond, + postsubpara=star, + refstruc=weak, + sectiondot=safe, + shorthandcs=\shu, + shortrefcmds=yes, + showfix=yes, + tablecaptions=hu, + textqq=weak, + theoremtitle=hu, + titles=\enskip, + toclang=good, + told=weak, + varioref=hu, +} + +%** Matches Hungarian typographic rules most closely -- and most +%** simplistically (minimally). +\dMf magyar@opt@defaults@@hu-min {% + %\csname magyar@opt@defaults@@over-1.4\endcsname + \csname magyar@opt@defaults@@safest\endcsname + % Dat: no openqq=unchanged (!) + \expandafter\magyar@doopt\magyar@@humin@options\hfuzz,% +} + +\def\magyarDumpHuMin{% + \begingroup + \typeout{} + \typeout{\expandafter\@gobble\string\% for defaults=hu-min}% + \typeout{\string\def\string\magyarOptions\expandafter\@gobble\string\{}% + \typeout{ \space defaults=safest,}% + \typeout{ \space\expandafter\@gobble\string\%}% + \def\magyar@applyopt##1##2{% + \def\reserved@a{##1=##2,}% + \typeout{ \space\expandafter\strip@prefix\meaning\reserved@a}% + }% + \expandafter\magyar@doopt\magyar@@humin@options\hfuzz,% + \typeout{\expandafter\@gobble\string\}}% + \typeout{\string\usepackage[magyar]{babel}}% + \typeout{}% + \endgroup +} + +\let\magyar@opt@defaults\magyar@enumarg +\def\magyar@opt@safest@@yes{\magyar@opt@defaults@@safest} +\def\magyar@opt@safest@@no{} +\let\magyar@opt@safest\magyar@enumarg + +% Declare normal options. + +\def\magyar@opt@titles#1#2{\def\magyar@opt@@titleskip{#2}} +\def\@@magyar@twodigitcheck#1#2#3\hfuzz#4#5{% + \csname if\ifnum0<0\string#1 \ifnum0<0\string#2 false\else true\fi\else true\fi\endcsname + \@@magyar@error{Option #4 needs [1-9][1-9], got #1#2}% + \fi +} +\def\magyar@opt@hyphenmins#1#2{% + \def\reserved@a{#2}% + \ifx\reserved@a\magyar@@unchanged + \let\magyar@opt@@hyphenmins\@empty + \else + \@@magyar@twodigitcheck#2..\hfuzz{#1}{#2}% + \def\magyar@opt@@hyphenmins{#2}% + \fi +} + +\def\magyar@opt@amstocnumskip#1#2{\def\magyar@opt@@amstocnumskip{#2}} +\def\magyar@opt@amstocnumlang@@all{\def\magyar@opt@@amstocnumlang{2}} +\def\magyar@opt@amstocnumlang@@hu {\def\magyar@opt@@amstocnumlang{1}} +\let\magyar@opt@amstocnumlang\magyar@enumarg +\def\magyar@opt@active@@none{\def\magyar@opt@@active{0}} +\def\magyar@opt@active@@onlycs{\def\magyar@opt@@active{1}} +\def\magyar@opt@active@@safe{\def\magyar@opt@@active{2}} +\def\magyar@opt@active@@problematic{\def\magyar@opt@@active{3}} +\let\magyar@opt@active\magyar@enumarg +\def\magyar@opt@activeprefix@@none {\let\magyar@opt@@activeprefix\relax} +\def\magyar@opt@activeprefix@@acute {\def\magyar@opt@@activeprefix{'}} +\def\magyar@opt@activeprefix@@grave {\def\magyar@opt@@activeprefix{`}} +\def\magyar@opt@activeprefix@@quotedbl{\def\magyar@opt@@activeprefix{"}} +\dMf magyar@opt@activeprefix@@babelopt2 {% + \@ifpackagewith{babel}{activeacute}% Dat: not expandable + {\def\magyar@opt@@activeprefix{'}}% + {\def\magyar@opt@@activeprefix{`}}% +} +\dMf magyar@opt@activeprefix@@babelopt3 {% + \@ifpackagewith{babel}{activeacute}% + {\def\magyar@opt@@activeprefix{'}}% + {\@ifpackagewith{babel}{activegrave}% + {\def\magyar@opt@@activeprefix{`}}% + {\def\magyar@opt@@activeprefix{"}}}% +} +\let\magyar@opt@activeprefix\magyar@enumarg +\def\magyar@opt@activespace@@none{\def\magyar@opt@@activespace{0}} +\def\magyar@opt@activespace@@safe{\def\magyar@opt@@activespace{2}} +\def\magyar@opt@activespace@@problematic{\def\magyar@opt@@activespace{3}} +\let\magyar@opt@activespace\magyar@enumarg +\def\magyar@opt@amspostsectiondot@@no {\def\magyar@opt@@amspostsectiondot{1}} +\def\magyar@opt@amspostsectiondot@@unchanged{\def\magyar@opt@@amspostsectiondot{0}} +\let\magyar@opt@amspostsectiondot\magyar@enumarg +\let\magyar@opt@hyphenation\magyar@enumarg +\def\magyar@opt@hyphenation@@huhyphf {\magyar@opt@hyphenation@@phonetic} +\def\magyar@opt@hyphenation@@huhyphc {\magyar@opt@hyphenation@@composite} +\expandafter\ifx\csname @OFWO\endcsname\relax +% Imp: fix --:hyphenation= reporting above +\def\magyar@opt@hyphenation@@none {\def\magyar@opt@@hyphenation{}} +\dMf magyar@opt@hyphenation@@huhyph3 {\def\magyar@opt@@hyphenation{3rN}} +\dMf magyar@opt@hyphenation@@huhyph3-or-any {\def\magyar@opt@@hyphenation{3CmhwN}} +\def\magyar@opt@hyphenation@@huhyphn {\def\magyar@opt@@hyphenation{nrN}} +\def\magyar@opt@hyphenation@@composite {\def\magyar@opt@@hyphenation{crN}} +\dMf magyar@opt@hyphenation@@composite-or-any {\def\magyar@opt@@hyphenation{cCmhwN}} +\def\magyar@opt@hyphenation@@any {\def\magyar@opt@@hyphenation{CmhwN}} +\def\magyar@opt@hyphenation@@phonetic {\def\magyar@opt@@hyphenation{frN}} +\else% report to lafmtgen.pl + \typeout{--:hyphenation-=\CurrentOption} + \def\magyar@opt@@hyphenation{}% + \def\magyar@opt@hyphenation@@none {\def\magyar@opt@@hypr{}} + \dMf magyar@opt@hyphenation@@huhyph3 {\def\magyar@opt@@hypr{\typeout{--:hyphenation=magyar3}\typeout{--:hyphenation=magyar}}} % install both for safety + \def\magyar@opt@hyphenation@@huhyphn {\def\magyar@opt@@hypr{\typeout{--:hyphenation=magyarn}\typeout{--:hyphenation=magyar}}} + \def\magyar@opt@hyphenation@@composite{\def\magyar@opt@@hypr{\typeout{--:hyphenation=magyarc}\typeout{--:hyphenation=magyar}}} + \def\magyar@opt@hyphenation@@phonetic {\def\magyar@opt@@hypr{\typeout{--:hyphenation=magyarf}}} +\fi +\def\magyar@opt@sectiondot@@none{\def\magyar@opt@@sectiondot{0}} +\def\magyar@opt@sectiondot@@safe{\def\magyar@opt@@sectiondot{1}} +\def\magyar@opt@sectiondot@@problematic{\def\magyar@opt@@sectiondot{2}} +\let\magyar@opt@sectiondot\magyar@enumarg +\def\magyar@opt@captions@@unchanged{\def\magyar@opt@@captions{0}} +\def\magyar@opt@captions@@hu{\def\magyar@opt@@captions{1}} +\let\magyar@opt@captions\magyar@enumarg +\def\magyar@opt@varioref@@unchanged{\def\magyar@opt@@varioref{0}} +\def\magyar@opt@varioref@@hu{\def\magyar@opt@@varioref{1}} +\let\magyar@opt@varioref\magyar@enumarg +\def\magyar@opt@cjhebrewfix@@unchanged{\def\magyar@opt@@cjhebrewfix{0}} +\def\magyar@opt@cjhebrewfix@@onlyouter{\def\magyar@opt@@cjhebrewfix{1}} +\def\magyar@opt@cjhebrewfix@@yes{\def\magyar@opt@@cjhebrewfix{2}} +\let\magyar@opt@cjhebrewfix\magyar@enumarg +\def\magyar@opt@fancyhdr@@unchanged{\def\magyar@opt@@fancyhdr{0}} +\def\magyar@opt@fancyhdr@@hu{\def\magyar@opt@@fancyhdr{1}} +\let\magyar@opt@fancyhdr\magyar@enumarg +\def\magyar@opt@ntheoremfix@@unchanged{\def\magyar@opt@@ntheoremfix{0}} +\def\magyar@opt@ntheoremfix@@yes{\def\magyar@opt@@ntheoremfix{1}} +\let\magyar@opt@ntheoremfix\magyar@enumarg +\def\magyar@opt@figurecaptions@@unchanged{\def\magyar@opt@@figurecaptions{0}} +\def\magyar@opt@figurecaptions@@hu{\def\magyar@opt@@figurecaptions{1}} +\def\magyar@opt@figurecaptions@@us{\def\magyar@opt@@figurecaptions{2}} +\let\magyar@opt@figurecaptions\magyar@enumarg +\def\magyar@opt@tablecaptions@@unchanged{\def\magyar@opt@@tablecaptions{0}} +\def\magyar@opt@tablecaptions@@hu{\def\magyar@opt@@tablecaptions{1}} +\def\magyar@opt@tablecaptions@@us{\def\magyar@opt@@tablecaptions{2}} +\let\magyar@opt@tablecaptions\magyar@enumarg +\def\magyar@opt@toclang@@unchanged{\def\magyar@opt@@toclang{0}}% same as =badall +\def\magyar@opt@toclang@@badall{\def\magyar@opt@@toclang{0}} +\def\magyar@opt@toclang@@badfloat{\def\magyar@opt@@toclang{1}} +\def\magyar@opt@toclang@@good{\def\magyar@opt@@toclang{2}} +\let\magyar@opt@toclang\magyar@enumarg +\def\magyar@opt@mathbrk@@unchanged{\def\magyar@opt@@mathbrk{0}} +\def\magyar@opt@mathbrk@@define{\def\magyar@opt@@mathbrk{1}} +\def\magyar@opt@mathbrk@@fix{\def\magyar@opt@@mathbrk{2}} +\let\magyar@opt@mathbrk\magyar@enumarg +\def\magyar@opt@mathfactorial@@unchanged{\def\magyar@opt@@mathfactorial{0}} +\def\magyar@opt@mathfactorial@@define{\def\magyar@opt@@mathfactorial{1}} +\def\magyar@opt@mathfactorial@@fix{\def\magyar@opt@@mathfactorial{2}} +\let\magyar@opt@mathfactorial\magyar@enumarg +\def\magyar@opt@mathhucomma@@unchanged{\def\magyar@opt@@mathhucomma{0}} +\def\magyar@opt@mathhucomma@@define{\def\magyar@opt@@mathhucomma{1}} +\def\magyar@opt@mathhucomma@@fix{\def\magyar@opt@@mathhucomma{2}} +\let\magyar@opt@mathhucomma\magyar@enumarg +\def\magyar@opt@mathmuskips@@unchanged{\def\magyar@opt@@mathmuskips{0}} +\def\magyar@opt@mathmuskips@@latex{\def\magyar@opt@@mathmuskips{1}} +\def\magyar@opt@mathmuskips@@hu{\def\magyar@opt@@mathmuskips{2}} +\let\magyar@opt@mathmuskips\magyar@enumarg +\def\magyar@opt@hynumberline@@unchanged{\def\magyar@opt@@hynumberline{0}} +\def\magyar@opt@hynumberline@@latex{\def\magyar@opt@@hynumberline{1}} +\def\magyar@opt@hynumberline@@hu{\def\magyar@opt@@hynumberline{2}} +\let\magyar@opt@hynumberline\magyar@enumarg +\def\magyar@opt@hunnewlabel@@no {\def\magyar@opt@@hunnewlabel{0}} +\dMf magyar@opt@hunnewlabel@@only-hu {\def\magyar@opt@@hunnewlabel{1}} +\def\magyar@opt@hunnewlabel@@yes{\def\magyar@opt@@hunnewlabel{2}} +\let\magyar@opt@hunnewlabel\magyar@enumarg +\def\magyar@opt@partnumber@@unchanged{\def\magyar@opt@@partnumber{0}} +\def\magyar@opt@partnumber@@huordinal{\def\magyar@opt@@partnumber{1}} +\def\magyar@opt@partnumber@@Huordinal{\def\magyar@opt@@partnumber{2}} +\let\magyar@opt@partnumber\magyar@enumarg +\def\magyar@opt@chapternumber@@unchanged{\def\magyar@opt@@chapternumber{0}} +\def\magyar@opt@chapternumber@@huordinal{\def\magyar@opt@@chapternumber{1}} +\def\magyar@opt@chapternumber@@Huordinal{\def\magyar@opt@@chapternumber{2}} +\let\magyar@opt@chapternumber\magyar@enumarg +\def\magyar@opt@accents@@high{\def\magyar@opt@@umlaut{\umlauthigh}} +\def\magyar@opt@accents@@low{\def\magyar@opt@@umlaut{\umlautlow\umlautelow}} +\def\magyar@opt@accents@@defaulthigh{\let\magyar@opt@@umlaut\@empty} +\let\magyar@opt@accents\magyar@enumarg +\def\magyar@opt@longcaption@@centered{\def\magyar@caption@centering{\centering}\def\magyar@caption@newline{\ }} +\def\magyar@opt@longcaption@@justified{\def\magyar@caption@centering{\relax}\def\magyar@caption@newline{\ }} +\def\magyar@opt@longcaption@@centernewline{\def\magyar@caption@centering{\centering}\def\magyar@caption@newline{\\\relax}} +\def\magyar@opt@longcaption@@none{\let\magyar@caption@centering\@empty} +\def\magyar@opt@longcaption@@unchanged{\let\magyar@caption@centering\@empty} +\let\magyar@opt@longcaption\magyar@enumarg +\def\magyar@opt@suggestions@@no {\def\magyar@opt@@suggestions{0}} +\def\magyar@opt@suggestions@@yes{\def\magyar@opt@@suggestions{1}} +\let\magyar@opt@suggestions\magyar@enumarg +\def\magyar@opt@appendixdot@@no {\def\@@magyar@appendixname{\appendixname}} +\def\magyar@opt@appendixdot@@yes{\def\@@magyar@appendixname{}} +\let\magyar@opt@appendixdot\magyar@enumarg +\def\magyar@opt@extras@@no {\def\magyar@opt@@extras{0}} +\def\magyar@opt@extras@@yes{\def\magyar@opt@@extras{1}} +\let\magyar@opt@extras\magyar@enumarg +\def\magyar@opt@chapterhead@@unchanged{\def\magyar@opt@@chapterhead{0}} +\def\magyar@opt@chapterhead@@no{\def\magyar@opt@@chapterhead{0}} +\def\magyar@opt@chapterhead@@yes{\def\magyar@opt@@chapterhead{1}} +\let\magyar@opt@chapterhead\magyar@enumarg +\def\magyar@opt@classmod@@no {\let\magyar@opt@@classmod\relax} +\def\magyar@opt@classmod@@unchanged{\let\magyar@opt@@classmod\relax} +\def\magyar@opt@classmod@@yes {\let\magyar@opt@@classmod\@empty} +\def\magyar@opt@classmod#1#2{% + \expandafter\ifx\csname magyar@opt@#1@@#2\endcsname\relax + \@namedef{magyar@opt@@#1}{#2}% + \else + \csname magyar@opt@#1@@#2\endcsname + \fi +} +\def\magyar@opt@shorthandcs#1#2{% + \def\reserved@a{#2}% + \def\reserved@b{none}% + \ifx\reserved@a\reserved@b + \def\magyar@opt@@shorthandcs{0}% overridable + \else + \def\magyar@opt@@shorthandcs{1}% + \ifcat\hfuzz\noexpand#2\relax% #2 is \shu \shu`tty is `tty + \def#2##1{\protect\@@magyar@shorthand}% Dat: ##1 is usually `_12 + \else + \@namedef{#2}{\protect\@@magyar@shorthand}% + \fi + \fi +} +\def\magyar@opt@hunumbers@@no{\def\magyar@opt@@hunumbers{0}} +\def\magyar@opt@hunumbers@@yes{\def\magyar@opt@@hunumbers{1}} +\let\magyar@opt@hunumbers\magyar@enumarg +\let\magyar@opt@az\magyar@yesweaknoarg +\let\magyar@opt@told\magyar@yesweaknoarg +\let\magyar@opt@textqq\magyar@yesweaknoarg +\let\magyar@opt@emitdate\magyar@yesweaknoarg +\let\magyar@opt@mathreal\magyar@yesweaknoarg +\let\magyar@opt@refstruc\magyar@yesweaknoarg +\let\magyar@opt@mond\magyar@yesweaknoarg +\let\magyar@opt@hang\magyar@yesweaknoarg +\def\magyar@opt@theoremtitle@@unchanged{\def\magyar@opt@@theoremtitle{0}} +\def\magyar@opt@theoremtitle@@hu{\def\magyar@opt@@theoremtitle{1}} +\let\magyar@opt@theoremtitle\magyar@enumarg +\def\magyar@opt@footnote@@unchanged{\def\magyar@opt@@footnote{0}} +\def\magyar@opt@footnote@@yes{\def\magyar@opt@@footnote{1}} +\def\magyar@opt@footnote@@huplain{\def\magyar@opt@@footnote{2}} +\def\magyar@opt@footnote@@starplain{\def\magyar@opt@@footnote{3}} +\let\magyar@opt@footnote\magyar@enumarg +\def\magyar@opt@hutoday@@no{\def\magyar@opt@@hutoday{0}} +\def\magyar@opt@hutoday@@yes{\def\magyar@opt@@hutoday{1}} +\let\magyar@opt@hutoday\magyar@enumarg +\def\magyar@opt@shortrefcmds@@no{\def\magyar@opt@@shortrefcmds{0}} +\def\magyar@opt@shortrefcmds@@yes{\def\magyar@opt@@shortrefcmds{1}} +\let\magyar@opt@shortrefcmds\magyar@enumarg +\def\magyar@opt@dottedtocline@@fix{\def\magyar@opt@@dottedtocline{1}} +\def\magyar@opt@dottedtocline@@unchanged{\def\magyar@opt@@dottedtocline{0}} +\let\magyar@opt@dottedtocline\magyar@enumarg +\let\magyar@opt@amslevelfix\magyar@enumarg +\def\magyar@opt@amslevelfix@@unchanged{\def\magyar@opt@@amslevelfix{0}} +\dMf magyar@opt@amslevelfix@@fix-ams {\def\magyar@opt@@amslevelfix{1}} +\dMf magyar@opt@amslevelfix@@fix-all {\def\magyar@opt@@amslevelfix{2}} +\let\magyar@opt@amsuppercasefix\magyar@enumarg +\def\magyar@opt@amsuppercasefix@@unchanged{\def\magyar@opt@@amsuppercasefix{0}} +\dMf magyar@opt@amsuppercasefix@@fix-ams {\def\magyar@opt@@amsuppercasefix{1}} +\dMf magyar@opt@amsuppercasefix@@fix-all {\def\magyar@opt@@amsuppercasefix{2}} +\let\magyar@opt@captionfix\magyar@enumarg +\def\magyar@opt@captionfix@@unchanged{\def\magyar@opt@@captionfix{0}} +\def\magyar@opt@captionfix@@yes {\def\magyar@opt@@captionfix{1}} +\let\magyar@opt@babelmarkfix\magyar@enumarg +\def\magyar@opt@babelmarkfix@@unchanged{\def\magyar@opt@@babelmarkfix{0}} +\def\magyar@opt@babelmarkfix@@yes {\def\magyar@opt@@babelmarkfix{1}} +\let\magyar@opt@showfix\magyar@enumarg +\def\magyar@opt@showfix@@unchanged{\def\magyar@opt@@showfix{0}} +\def\magyar@opt@showfix@@yes {\def\magyar@opt@@showfix{1}} +\def\magyar@opt@labelenums@@unchanged{\def\magyar@opt@@labelenums{0}} +\dMf magyar@opt@labelenums@@hu-a {\def\magyar@opt@@labelenums{1}} +\dMf magyar@opt@labelenums@@hu-A {\def\magyar@opt@@labelenums{2}} +\dMf magyar@opt@labelenums@@hu-d {\def\magyar@opt@@labelenums{3}} +\let\magyar@opt@labelenums\magyar@enumarg +\def\magyar@opt@labelitems@@unchanged{\def\magyar@opt@@labelitems{0}} +\def\magyar@opt@labelitems@@hu {\def\magyar@opt@@labelitems{1}} +\let\magyar@opt@labelitems\magyar@enumarg +\def\magyar@opt@openqq@@unchanged{\def\magyar@opt@@openqq{0}} +\def\magyar@opt@openqq@@up{\def\magyar@opt@@openqq{1}} +\def\magyar@opt@openqq@@down{\def\magyar@opt@@openqq{2}} +\def\magyar@opt@openqq@@maybedown{\def\magyar@opt@@openqq{3}} +\let\magyar@opt@openqq\magyar@enumarg +\def\magyar@opt@frenchspacing@@unchanged{\def\magyar@opt@@frenchspacing{0}}% same as =no +\def\magyar@opt@frenchspacing@@no {\def\magyar@opt@@frenchspacing{1}} +\def\magyar@opt@frenchspacing@@yes{\def\magyar@opt@@frenchspacing{2}} +\let\magyar@opt@frenchspacing\magyar@enumarg +\dMf magyar@opt@afterindent@@force-no {\def\magyar@opt@@afterindent{0}} +\dMf magyar@opt@afterindent@@force-yes {\def\magyar@opt@@afterindent{1}} +\dMf magyar@opt@afterindent@@unchanged {\def\magyar@opt@@afterindent{9}} +\let\magyar@opt@afterindent\magyar@enumarg +\def\magyar@opt@postpara#1#2{% + \def\reserved@a{#2}% + \ifx#2\magyar@@unchanged + \let\magyar@opt@@paragraphs\@undefined + \else + \expandafter\def\csname magyar@opt@@#1\endcsname{#2}% + \let\magyar@opt@@paragraphs\@empty + \fi +} +\let\magyar@opt@postsubpara\magyar@opt@postpara +\let\magyar@opt@postdescription\magyar@opt@postpara + +% --- Option processing code of \magyarOptions +% +% Example: \def\magyarOptions{titles=\quad,active=safe} \usepackage[magyar]{babel} +% Dat: Babel has \languageoptions, but it is quite weak and it's too late +% Dat: this is a complete rewrite based on examplep.sty + +%** @param #1 to gobble a space token +%** @usage \magyar@doopt foo=bar,foo2=bar2,\hfuzz,% +\def\magyar@doopt#1,{% + \if,\noexpand#1,% ignore multiple commas (#1 is empty) + \expandafter\magyar@doopt + \else + \csname fi\endcsname% don't count as `\fi' when being skipped + \magyar@doopt@low#1,=,% + \fi +} +\@gobble\iftrue% \def\magyar@doopt@low contains `\fi'. Make it skippable. +\def\magyar@applyopt#1#2{\csname magyar@opt@#1\endcsname{#1}{#2}}% +%** @param #1 is here for gobbling space tokens +\def\magyar@doopt@low#1#2=#3,#4\fi{% + % Dat: Normal case: #1#2 is key, #3 is value, #4 is `=,' + % Dat: MissingArg case: #1#2 is `key,', #3 is empty, #4 is empty + % Dat: Terminator case: #1#2 is `\hfuzz,', #3 is empty, #4 is empty + % Dat: OnlySpace case: #1 is `,', #2 is empty, #3 is empty, #4 is empty + \ifx\relax#4\relax% MissingArg or Terminator + \ifx#1\hfuzz% Terminator + \else + \if,\noexpand#1\else% OnlySpace case + \if=\noexpand#1\magyar@doopt@missingkey#2% #2 already contains comma at end + \else \magyar@doopt@missingval#1#2\fi + \fi + \expandafter\expandafter\expandafter\magyar@doopt + \fi + \else% Normal + \expandafter\ifx\csname magyar@opt@#1#2\endcsname\relax + \@@magyar@error{Unknown option: #1#2 (= #3)}% + \else + \magyar@applyopt{#1#2}{#3}% + \fi + \expandafter\magyar@doopt + \fi +} +\def\magyar@doopt@missingkey#1,{% + \@@magyar@error{Key missing for value: #1}% +} +\def\magyar@doopt@missingval#1,{% + \@@magyar@error{Value (=) missing for option: #1}% +} +%** Dat: Spaces and newlines at end of #1 are not ignored, so please prefix +%** them with a comma, e.g \magyar@doopts{foo=bar, } +%** @param #1 comma-separated optoinname=value pairs +%\def\magyar@doopts#1{\magyar@doopt #1,\hfuzz,}% + +\def\magyar@dooptions{% + \expandafter\ifx\csname opt@\CurrentOption.ldf.sty\endcsname\relax\else + % Usage: \PassOptionsToPackage{foo=bar}{magyar.ldf} + \expandafter\expandafter\expandafter + \magyar@doopt\csname opt@\CurrentOption.ldf.sty\endcsname,\hfuzz,% + \expandafter\let\csname opt@\CurrentOption.ldf.sty\endcsname\relax + \fi + \expandafter\ifx\csname \CurrentOption Options\endcsname\relax\else% \magyarOptions + \expandafter\expandafter\expandafter + \magyar@doopt\csname\CurrentOption Options\endcsname,\hfuzz,% + \expandafter\let\csname \CurrentOption Options\endcsname\relax + \fi +} +\def\magyar@do@option@low#1#2=#3=,\vfuzz{% + \ifx#1\hfuzz\else + %%\typeout{(#1#2)=(#3)}% + % vvv wastes some heap (\csname), but never mind + \fi +} + + +\magyar@opt@defaults{defaults}{over-1.4} % defaults=over-1.4 by default +\def\magyar@opt@@hdrtitleskip{\enskip}% !! option for that +\magyar@dooptions% in \magyarOptions +\ifnum\magyar@opt@@openqq=3 % =maybedown + \ifnum\magyar@opt@@active=0 + \def\magyar@opt@@openqq{0}% =unchanged + \else + \def\magyar@opt@@openqq{2}% =down + \fi +\fi +\ifnum\magyar@opt@@partnumber >0 \let\magyar@needopt@hunumbers\@empty \fi +\ifnum\magyar@opt@@chapternumber>0 \let\magyar@needopt@hunumbers\@empty \fi +\expandafter\ifx\csname magyar@needopt@hunumbers\endcsname\relax\else + \ifnum\magyar@opt@@hunumbers=0 + \@@magyar@error{(chapter|part)number=... needs hunumbers=yes}% + \magyar@opt@@hunumbers1 + \fi + \def\magyar@hunumbers@noclassmod{% + \@@magyar@error{unsupported \string\documentclass,\MessageBreak + hunumbers=yes,chapternumber=...,partnumber=... disabled}% + }% + % This may get redefined to \@empty later. + \def\magyar@hunumbers@errmsg{\magyar@hunumbers@noclassmod}% + \AtBeginDocument\magyar@hunumbers@errmsg +\fi +\if0\magyar@opt@@shorthandcs\else + \if\magyar@opt@@active0% + \@@magyar@error{active=none implies shorthandcs=none}% + \magyar@opt@@active2 % active=safe + \fi +\fi +% Imp: undef \magyar\@opt@* to save memory + +\@gobble\iftrue +%** Usage: `\if...\else\@@magyar@skiplong\fi ... \@gobble{^}', where {^} is in +%** its own line +\def\@@magyar@skiplong#1{% + \fi + %\typeout{--skipfrom:\the\inputlineno} + \bgroup% so ^} would close it + \catcode\string`^13 \lccode\string`~=\string`^ + \lowercase{\let~\fi}% \lowercase because catcode of ^ in \let^ would have been already assigned + %\lowercase{\def~{\typeout{--skipto:\inputlineno}\fi}}% + \catcode\string`\\14 % comment -- avoid using hash memory + \catcode\string`$14 % %$ + \iffalse +} +\@gobble\fi + +\@namedef{extras\CurrentOption}{}% + +% --- hyphenation= + +\csname magyar@opt@@hypr\endcsname +\let\magyar@sugg@pa\@gobble +%\show\magyar@opt@@hyphenation +\ifx\magyar@opt@@hyphenation\@empty + % Hungarian words won't be hyphenated automatically + \expandafter\chardef\csname l@\CurrentOption\endcsname255 + \@@magyar@skiplong\fi +% Define a warning, will be printed later. +\def\@@magyar@suggpa@req@def{% + \def\magyar@sugg@pa##1{% + \PackageWarningNoLine{##1.ldf}{% + Requested Hungarian hyphenation= patterns missing.\MessageBreak + To make LaTeX hyphenate Hungarian words, please\MessageBreak + modify language.dat and rerun initex or texconfig}}}% +% Define a warning, will be printed later. +\def\@@magyar@suggpa@all@def{% + \def\magyar@sugg@pa##1{% + \PackageWarningNoLine{##1.ldf}{% + All Hungarian hyphenation= patterns missing.\MessageBreak + To make LaTeX hyphenate Hungarian words, please\MessageBreak + modify language.dat and rerun initex or texconfig}}}% +\def\@@magyar@hyphenation@last#1\@@magyar@hyphenation@next#2\hfuzz{#1}% +\def\@@magyar@hyphenation@defcs#1#2{\ifx#1#2\else\chardef#1#2\fi}% Dat: \chardef\foo\foo doesn't work +\def\@@magyar@hyphenation@def#1{% + \expandafter\ifx\csname l@#1\endcsname\relax\else + \expandafter\expandafter\expandafter\@@magyar@hyphenation@defcs + \expandafter\expandafter\csname l@\CurrentOption\endcsname + \csname l@#1\endcsname + \@@magyar@hyphenation@last\fi}% +\def\@@magyar@hyphenation@next#1{% + \ifx#1\hfuzz + \else\if#1N% none + % Turn of hyphenation. + \expandafter\chardef\csname l@\CurrentOption\endcsname255 + \@@magyar@hyphenation@last + \else\if#1C% use l@\CurrentOption if defined + \expandafter\ifx\csname l@\CurrentOption\endcsname\relax\else + \@@magyar@hyphenation@last + \fi + \else\if#1w% print the all-missing-warning + \@@magyar@suggpa@all@def + \else\if#1r% print the req-missing-warning + \@@magyar@suggpa@req@def + \else\if#1h\@@magyar@hyphenation@def{hungarian}% + \else\if#1m\@@magyar@hyphenation@def{magyar}% + \else\if#13\@@magyar@hyphenation@def{magyar3}% + \else\if#1c\@@magyar@hyphenation@def{magyarc}% + \else\if#1f\@@magyar@hyphenation@def{magyarf}% + \else\if#1n\@@magyar@hyphenation@def{magyarn}% + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\@@magyar@hyphenation@next + % Dat: no \adddialect\l@magyar... - it's only a chardef +}% + +%\tracingmacros1 \show\magyar@opt@@hyphenation +\expandafter\@@magyar@hyphenation@next\magyar@opt@@hyphenation\hfuzz +%\show\l@magyar +%\tracingmacros0 +\expandafter\ifx\csname l@\CurrentOption\endcsname\relax + \expandafter\newcount\csname l@\CurrentOption\endcsname + % ^^^ BUGFIX at Tue Oct 12 14:13:54 CEST 2004 +\fi +\let\@@magyar@suggpa@all@def\@undefined +\let\@@magyar@suggpa@req@def\@undefined +\@gobble +{^} + +% --- accents= + +\ifx\magyar@opt@@umlaut\@empty\else% !! test this + % Dat: this only affects \" + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\"\umlautlow \magyar@opt@@umlaut} +\fi + +% --- theorem title number ordering and the dot; theoremtitle= +% +% Dat: \ref{mytheorem} never appends a dot +% +% If you want to define your own theorem style without using theorem.sty or +% ntheorem.sty, then do a +% \PassOptionsToPackage{theoremtitle=unchanged}{magyar.ldf} , and then +% define a custom \@begintheorem, \@opargbegintheorem and \@endtheorem. + +\if0\magyar@opt@@theoremtitle \@@magyar@skiplong\fi +% for theorem.sty and ntheorem.sty +% Define your \newtheorem commands in the preamble, before \theoremstyle +\def\magyar@th@magyar{% + \def\@begintheorem##1##2{% + \item[\hskip \labelsep{\theorem@headerfont ##2.\ ##1.}]}% + \def\@opargbegintheorem##1##2##3{% + \item[\hskip \labelsep{\theorem@headerfont ##2.\ ##1\ (##3).}]}% +} + +% vvv Dat: theorem.sty needs \th@magyar-plain when \theoremstyle{...} +% is called, so we have to define it early (even if theorem.sty is not +% loaded). +\expandafter\let\csname th@\CurrentOption-plain\endcsname\magyar@th@magyar% Dat: moved to earlier +% !! now \usepackage{theorem} +% \usepackage[magyar]{babel} +% \theoremstyle{magyar-plain}% % Dat: must be put before \new +% \newtheorem{Def}{Defin\'{i}ci\'o} + +%** @param #1 magyar +\def\@@magyar@setup@theoremstyle#1{% + \expandafter\ifx\csname theorem@headerfont\endcsname\relax + \let\magyar@th@magyar\@undefined + \else + %\expandafter\let\csname th@#1-plain\endcsname\magyar@th@magyar% Dat: moved to earlier + % vvv Dat: activate the Hungarian theorem style by default. + \def\theorem@headerfont{\bf}% + \edef\reserved@a{\the\theorem@style}% + \def\reserved@b{plain}% + \ifx\reserved@a\reserved@b + \expandafter\theorem@style\expandafter{#1-plain}% + \fi + \fi +} + +% Do this quite late in case theorem.sty or ntheorem.sty is loaded late. +\expandafter\AtBeginDocument\expandafter{\expandafter + \@@magyar@setup@theoremstyle\expandafter{\CurrentOption}} + +\expandafter\addto\csname extras\CurrentOption\endcsname{% + %%\show\theorem@headerfont + \expandafter\ifx\csname thm@swap\endcsname\relax + \expandafter\ifx\csname theorem@headerfont\endcsname\relax% no theorem.sty + \babel@save\@begintheorem + % Dat: amsart.cls: \def\@begintheorem#1#2[#3]{}% + \def\@begintheorem#1#2{\trivlist + \item[\hskip \labelsep{\bfseries #2.\ #1.}]\itshape}% old: \slshape + \babel@save\@opargbegintheorem + \def\@opargbegintheorem#1#2#3{\trivlist + \item[\hskip \labelsep{\bfseries #2.\ #1\ (#3).}]\itshape}% old: \slshape + \else% theorem.sty or ntheorem.sty + % Nothing -- style already set up in the preamble. + \fi + \else% amsthm.sty + \babel@save\thmhead + \babel@save\swappedhead + %** \swapnumbers. \newtheorem{...}{...} already inserts the trailing dot + % \def\thm@swap{S}% no effect :-( + %** overrides amsart.cls + \def\thmhead#1#2#3{% + \thmnumber{\@upn{#2}\@ifnotempty{#1}{.~}}% + \thmname{#1}% + \thmnote{ {\the\thm@notefont(#3)}}% + }% + \let\swappedhead\thmhead + \fi +}% +\@gobble +{^}% + +% --- Quotation marks with \textqq +% +% Symbols of Hungarian quoting: unquoted ,,outer >>middle 'inner'<<'' +% Equivalent: unquoted \quotedblbase outer \guillemotright middle +% \textquoteright inner\textquoteright\guillemotleft\textquotedblright +% With magyar.ldf: unquoted \textqq{outer \textqq{middle \textqq{inner}}} +% Typing this with magyar.ldf works for outer: \textqq{foo} +% Typing this works with T1 and OT1 for outer: \glqq foo'' +% Typing this works in T1, but not in OT1 for outer: ,,foo'' +% + +\if0\magyar@opt@@textqq \@@magyar@skiplong\fi +\def\magyar@textqq@level{0} +%** Provide a placeholder for language-unspecific \textqq +\def\@@magyar@textqq@nolang#1{% + \ifcase\magyar@textqq@level + \def\magyar@textqq@level{1}% + \textquotedblleft#1\textquotedblright + \def\magyar@textqq@level{0}% + \or + \textquoteleft#1\textquoteright + \fi +} +\def\@@magyar@textqq@hu#1{\ifmmode\expandafter\mbox\fi{% + % Imp: \textqq{\textqq{foo}} -> \textqq{\textqq{foo}\,} + % Dat: \showhyphens{\textqq{hello bello}} --> hel-lo bel-lo + % Dat: \guillemotleft is provided by babel.def even for the OT1 encoding + \ifcase\magyar@textqq@level + \def\magyar@textqq@level{1}% + % Dat: \hskip instead of \kern to allow hyphenation + % \nobreak\hskip-.06em adds a non-breakable skip and allows hyphenation + % of the following word. + \quotedblbase\nobreak\hskip-.06em\relax#1\kern\z@\textquotedblright% skip OK for the CM and EC fonts + \def\magyar@textqq@level{0}% + \or + \def\magyar@textqq@level{2}% + \guillemotright\nobreak\hskip-.07em\relax#1\kern-0.05em\guillemotleft% skip OK for CM and EC fonts + \def\magyar@textqq@level{1}% + \or + \def\magyar@textqq@level{3}% + \textquoteright\nobreak\hskip\z@\relax#1\kern\z@\textquoteright + \def\magyar@textqq@level{2}% + \else + \quotedblbase\nobreak\hskip-.06em\relax#1\kern\z@\textquotedblright% skip OK for the CM and EC fonts + \fi +}}% + +\catcode`\ =11\relax% make space a letter +\ifnum\magyar@opt@@textqq\expandafter\ifx\csname\@gobble.textqq\endcsname\relax1\fi>1\relax% 21, 2, 11, 1 +\def\textqq{\protect\textqq }% \MakeRobust +\def\@@magyar@textqq{\protect\textqq }% +\let\textqq \@@magyar@textqq@nolang% +\expandafter\addto\csname\@gobble.extras\CurrentOption\endcsname% +{\babel@save\textqq \let\textqq \@@magyar@textqq@hu}% +\else% +\def\@@magyar@textqq{\protect\@@magyar@textqq }% \MakeRobust +\let\@@magyar@textqq \@@magyar@textqq@nolang% +\expandafter\addto\csname\@gobble.extras\CurrentOption\endcsname% +{\babel@save\@@magyar@textqq \let\@@magyar@textqq \@@magyar@textqq@hu}% +\fi% +\catcode`\ =10\relax% back to space again +\@gobble +{^}% + +% --- Definite articles (\az, \pageref -> \apageref etc.) + +\if0\magyar@opt@@az \@@magyar@skiplong\fi + +\makeatletter + +%** modified by pts at Fri Oct 3 22:19:13 CEST 2003 +%** @param #1 tokens, will be \edef\vfuzz'ed +\def\@@magyar@az@vfuzzedef#1{% + \begingroup + \@safe@activestrue% allow active `:' inside labels; + \def\hyper@@link[##1]##2##3##4{##4}% Dat: \def\b@abook{\hyper@@link [cite]{}{cite.sokt}{2}}% with hyperref.sty + \let\romannumeral\number% by pts@fazekas.hu at Mon Oct 27 23:44:06 CET 2003 + % Dat: deliberately no \autoref for hyperref.sty !! (why??) + \let\ref\@@magyar@zeroref \let\pageref\@@magyar@zeropageref + \let\cite\@@magyar@zerocite \let\eqref\@@magyar@zeroeqref + % ^^^ fix so \az{\ref{...}} works + \let\refstruc\@@magyar@zerorefplus + \let\refstrucparen\@@magyar@zerorefplus + \def\setbox ##1{}% to get rid of accents and special letters + \def\hbox ##1{}% + \def\accent ##1 ##2{##2}% + \def\add@accent ##1##2{##2}% + \def\@text@composite@x ##1##2{##2}% + \def\i{i}\def\j{j}% + \def\ae{a}\def\AE{A}\def\oe{o}\def\OE{O}% + \def\ss{s}\def\L{L}% + \def\d{}\def\b{}\def\c{}\def\t{}% Dat: no need to redefine \H and \. + % Dat: no need to remove \textsf or \mdseries, because they are + % handled properly by \protect == \string here. + \let\@safe@activestrue\@empty% babel puts these inside \b@...: % Dat: \def\b@abook{\@safe@activesfalse 2}% (what is \@safe@actives??) + \let\@safe@activesfalse\@empty + \edef\vfuzz{\noexpand\def\noexpand\vfuzz{#1}}% + \expandafter\endgroup\vfuzz +} + +%** Makes \az etc. not emit the definite article. +%** Unused. +\def\@@magyar@noaz{% + \def\@@magyar@az@lowt{\@ifstar\@gobble\@firstofone}% + \def\az{\@@magyar@az@lowt}% + \let\Az\az + \def\aref{\@ifstar\@gobble\@@magyar@az@lowa}% + \let\Aref\aref + \def\apageref{\@ifstar\@gobble\firstoftwo}% + \let\Apageref\apageref + \def\acite{\@ifstar\@gobble\cite}% + \let\Acite\acite +} + +%** Usage: \az{alma} -> `az alma'; \Az*{alma} -> `az' +%** Usage: \az+\ref{foo} is equivalent to \az{\ref{foo}} +\def\@@magyar@az@lowt{\@ifstar{\@@magyar@az@lowy}{\@ifnextchar+\@@magyar@az@lowz\@@magyar@az@lowx}} +\def\@@magyar@az@lowz#1#2#3{\@@magyar@az@lowy{#2{#3}}~#2{#3}} +%** Used by new varioref.sty +\def\@@magyar@az@lowxu{\unskip\@@magyar@az@lowx}% +\def\@@magyar@az@lowx#1{\@@magyar@az@lowy{#1}~#1} +\def\@@magyar@az@lowy#1{{% + \begingroup + %\def\protect{\noexpand\protect\noexpand}% + \set@display@protect% screws up \r + \@@magyar@az@vfuzzedef{#1}% + %%\show\vfuzz + \expandafter\endgroup\expandafter + \set@display@protect\expandafter% fixes \r; why?? + \@@magyar@az@set\expandafter{\vfuzz}\hbox$% +}} + +\def\@@magyar@firstarg#1#2\hbox${#1}% + +%** \Aref({e:foo}) -> `az~(5)'; \aref*{e:foo}: `az' +\def\@@magyar@az@lowa{\@ifnextchar({\@@magyar@az@lowb}{\@@magyar@az@lowb\@empty}} +\def\@@magyar@az@lowb#1#2{\@@magyar@az@ref\@firstoftwo{#2}~#1\ref{#2}} +%** @param #1 \@firstoftwo (for \ref) or \@secondoftwo (for \pageref) +%** everything which is not \@secondoftwo is treated is \@firstoftwo +%** @param #2 for \csname r@#2\endcsname +\def\@@magyar@az@ref#1#2{% + \begingroup + % Dat: this works when turning on hyperref.sty for the 1st time (1st .aux file) -- but the original \ref doesn't work (\@fifthoffive) + % Dat: #2 might contain an active : ; ! ? in case + % \def\magyarOptions{activespace=safe} + \begingroup\lccode`~`: \lowercase{\endgroup\edef~{\string~}}% + \begingroup\lccode`~`; \lowercase{\endgroup\edef~{\string~}}% + \begingroup\lccode`~`! \lowercase{\endgroup\edef~{\string~}}% + \begingroup\lccode`~`? \lowercase{\endgroup\edef~{\string~}}% + \@ifundefined{@@magyar@r@#2}{% + \@ifundefined{r@#2}{\let\reserved@a\@empty}{\expandafter\let\expandafter\reserved@a\csname r@#2\endcsname}% + }{\expandafter\let\expandafter\reserved@a\csname @@magyar@r@#2\endcsname}% + \ifx\reserved@a\@empty\endgroup\else% a speed boost + \ifx#1\@secondoftwo\relax % Dat: remove the 1st {...} arg inside \reserved@a + \expandafter\expandafter\expandafter\def\expandafter\expandafter + \expandafter\reserved@a\expandafter\expandafter\expandafter{% + \expandafter\expandafter\expandafter\@gobble\reserved@a{}}% + \fi + % vvv keep only the 1st arg (w/o braces) of \vbox, without expansion. + % This is to have hyperref.sty with `\newlabel{tab}{{1}{2}{\texorpdfstring {\textit {bg}}{asd}\relax }{section.1}{}}' + % right, and \texorpdfstring not expanded in the \edef below. + \expandafter\expandafter\expandafter\def\expandafter\expandafter + \expandafter\reserved@a\expandafter\expandafter\expandafter{% + \expandafter\expandafter\expandafter\@@magyar@firstarg\reserved@a{}\hbox$}% + \expandafter\@@magyar@az@vfuzzedef\expandafter{\reserved@a}% + \expandafter\endgroup\expandafter\@@magyar@az@set\expandafter{\vfuzz}\hbox$% + \fi +} + +\def\@@magyar@az@lowd#1{\@@magyar@az@ref\@secondoftwo{#1}~\pageref{#1}} + +\def\@@magyar@acite@lowb{\@ifnextchar [{\@@magyar@acite@lowa}{\@@magyar@acite@lowa[]}} +\def\@@magyar@acite@lowa[#1]#2{% + \@@magyar@acite@lowd{#2}~% + \ifx\vfuzz#1\vfuzz\cite{#2}\else\cite[#1]{#2}\fi +} +\def\@@magyar@acite@lowd#1{\@@magyar@acite@lowc#1,\hbox$} +\def\@@magyar@acite@lowc#1,#2\hbox#3${% + \begingroup + \@ifundefined{@@magyar@b@#1}{% + \@ifundefined{b@#1}{\def\vfuzz{}}{% + \@@magyar@az@vfuzzedef{% + \expandafter\expandafter\expandafter\@@magyar@b@number + \expandafter\expandafter\expandafter{\csname b@#1\endcsname}}}% + } {\@@magyar@az@vfuzzedef{\csname @@magyar@b@#1\endcsname}}% + \expandafter\endgroup\expandafter + \@@magyar@az@set\expandafter{\vfuzz}\hbox$% +} + +% The original version of the \@az macros below were written by +% David Carlisle, but they have been completely rewritten by pts. + +%** Adds definite article for a word #1#2#3 if #1 is in [A..Z]. Spaces +%** between #1, #2 and #3 can be -- fortunately -- ignored. +%** This is used to distinguish single-letter labels from text labels. +%** Dat: by pts: `\Az{Sz} bet' emits `Az Sz bet'; `\az{szlam}' is also OK +%** @param #1#2#3 doesn't contain \hbox (but may contain space) +%** @param #1 #2 #3 never lower case +\def\@@magyar@azuc#1#2#3{% + \if\noexpand#1Az% + \else\if\noexpand#1Ez% + \else\if\noexpand#1F\ifnum11=\the\catcode\string`#2\else z\fi + \else\if\noexpand#1Iz% + \else\if\noexpand#1L\ifnum11=\the\catcode\if\noexpand#2Y\string`#3\else\string`#2\fi\else z\fi + \else\if\noexpand#1M\ifnum11=\the\catcode\string`#2\else z\fi + \else\if\noexpand#1N\ifnum11=\the\catcode\if\noexpand#2Y\string`#3\else\string`#2\fi\else z\fi + \else\if\noexpand#1Oz% + \else\if\noexpand#1S\ifnum11=\the\catcode\if\noexpand#2Z\string`#3\else\string`#2\fi\else z\fi + \else\if\noexpand#1R\ifnum11=\the\catcode\string`#2\else z\fi + \else\if\noexpand#1Uz% + \else\if\noexpand#1X\ifnum11=\the\catcode\string`#2\else z\fi + \else\if\noexpand#1Y\ifnum11=\the\catcode\string`#2\else z\fi + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi +} +\def\@@magyar@azuc@pre#1#2#3#4\hbox${% + \uppercase{\@@magyar@azuc#1#2#3}% Dat: we map a..z -> A..Z +} + +%** Also defined elsewhere. +%** @param #2 \else...\else...\fi...\fi etc. +\def\@@magyar@swaprelax#1#2\relax{#2#1} +\def\@@magyar@ignorehbox@pre#1\hbox${}% +%** Counts the number of digits until a nondigit is found, and insert `z' if +%** appropriate (divisible by 3). +%** We need this to properly handle \aref for eg. 1.3.12 (subsec number) +%** or 3-45 (pagenumber preceeded by chapter number). +\def\@@magyar@eatddd#1#2#3#4{% + % Wizardry: \@@magyar@eatddd throws away #1 (\@@magyar@ignorehbox@pre) + \ifnum9<1\string#2 \ifnum9<1\string#3 \ifnum9<1\string#4 % test for digits + \@@magyar@swaprelax\@@magyar@eatddd\fi\fi\else z\fi + \relax\@@magyar@ignorehbox@pre +} + +% vvv Wizardry: ignore everything (second number?) after first space +\def\@@magyar@eatddd@pre#1 #2\hbox${\@@magyar@eatddd.#1[][]\hbox$}% + +\@gobble\iftrue +\def\@@magyar@azrb@stop#1#2\fi{#1}% +%** Strips spaces and braces automatically +%** @expands to `z' or nothing (last char of definite article) +%** @example \message{R:\removebraces {{foo}{{}{b}{{{{a\fi}}}}r}}\hfuzz;} +\def\@@magyar@azrb#1{% + \ifx\hfuzz#1\@@magyar@azrb@stop\fi + \expandafter\@@magyar@azrb\expandafter{% + \ifcat{\noexpand#1\hfuzz\iffalse}\fi\expandafter + \@@magyar@azrb\else\hfuzz}\@@magyar@azrb@nob{#1}\fi} +\def\@@magyar@azrb@nob#1#2{#2% #2 is \fi + \ifx\hfuzz#1\hfuzz\expandafter\@firstoftwo + \expandafter\@@magyar@azrb\fi\@@magyar@azrb@nobone#1} +\def\@@magyar@azrb@nobone#1{\noexpand#1\@@magyar@azrb}% + +\def\@@magyar@aznospace#1{% + \if\hfuzz\noexpand#1\expandafter\@@magyar@aznospace\else % a \cs, ignored -- may be \relax + \expandafter\@@magyar@aznospace@short\expandafter#1% + \fi +} + +%** @param #1 might not be \cs -- and isn't empty +\def\@@magyar@aznospace@short#1{% + \if5\noexpand#1z% Dat: emit `az 5' + \@@magyar@swaprelax\@@magyar@ignorehbox@pre + \else\if1\noexpand#1% + % Dat: properly handle `az 1001 jszaka', `az 1234567 ves bolyg' + \@@magyar@swaprelax\@@magyar@eatddd@pre + \else\ifnum1<1\noexpand#1 % a different digit, emit `a ' + \@@magyar@swaprelax\@@magyar@ignorehbox@pre + \else\if-\noexpand#1% \az{-5} yields `a~-5' + \@@magyar@swaprelax\@@magyar@ignorehbox@pre + \else\ifcat\string*\noexpand#1% ignore non-digit (non-letter) `other' char + % Wizardary: (undocumented) + % This is a really smart way to ignore control sequence chars resulting + % from \string\textrm etc. Fortunately, most control sequences don't + % contain digits. + \@@magyar@swaprelax\@@magyar@aznospace + \else + \@@magyar@swaprelax{\@@magyar@azuc@pre#1}% safe to call, no \cs + \fi\fi\fi\fi\fi\relax +} + +%** Typesets `z' or nothing (last char of definite article). Is _not_ +%** expandable. +%** @param #1 may contain space(_10) tokens, but mustn't contain expandable +%** tokens. +\def\@@magyar@az@set#1#2\hbox${% by pts + % ^^^ Dat: we have `$' instead of `!' because of catcode changes (shouldn't affect) + \edef\reserved@a{\@@magyar@azrb#1\hfuzz}% + \expandafter\@@magyar@aznospace\reserved@a[b][][] \hbox$% + % ^^^ Wizardry: [b][][] is a smart sentinel for \@@magyar@azuc and `b' for + % \@@magyar@aznospace@short. First `[' is there for aesthetics. Space + % is there for \@@magyar@eatddd@pre. \hbox$ is something that will not + % occur in normal text. +} + +\ifnum\magyar@opt@@az \expandafter\ifx\csname az\endcsname\relax1\fi>1 % 21, 2, 11, 1 + \DeclareRobustCommand\az{a\@@magyar@az@lowt}\fi +\ifnum\magyar@opt@@az \expandafter\ifx\csname Az\endcsname\relax1\fi>1 % 21, 2, 11, 1 + \DeclareRobustCommand\Az{A\@@magyar@az@lowt}\fi +\ifnum\magyar@opt@@az \expandafter\ifx\csname aref\endcsname\relax1\fi>1 % 21, 2, 11, 1 + \DeclareRobustCommand\aref{a\@ifstar{\@@magyar@az@ref\@firstoftwo}{\@@magyar@az@lowa}}\fi +\ifnum\magyar@opt@@az \expandafter\ifx\csname Aref\endcsname\relax1\fi>1 % 21, 2, 11, 1 + \DeclareRobustCommand\Aref{A\@ifstar{\@@magyar@az@ref\@firstoftwo}{\@@magyar@az@lowa}}\fi +\ifnum\magyar@opt@@az \expandafter\ifx\csname apageref\endcsname\relax1\fi>1 % 21, 2, 11, 1 + \DeclareRobustCommand\apageref{a\@ifstar{\@@magyar@az@ref\@secondoftwo}{\@@magyar@az@lowd}}\fi +\ifnum\magyar@opt@@az \expandafter\ifx\csname Apageref\endcsname\relax1\fi>1 % 21, 2, 11, 1 + \DeclareRobustCommand\Apageref{A\@ifstar{\@@magyar@az@ref\@secondoftwo}{\@@magyar@az@lowd}}\fi +\ifnum\magyar@opt@@az \expandafter\ifx\csname acite\endcsname\relax1\fi>1 % 21, 2, 11, 1 + \DeclareRobustCommand\acite{a\@ifstar{\@@magyar@acite@lowd}{\@@magyar@acite@lowb}}\fi +\ifnum\magyar@opt@@az \expandafter\ifx\csname Acite\endcsname\relax1\fi>1 % 21, 2, 11, 1 + \DeclareRobustCommand\Acite{A\@ifstar{\@@magyar@acite@lowd}{\@@magyar@acite@lowb}}\fi + +\@gobble +{^} + +% --- hunnewlabel= + +\if0\magyar@opt@@hunnewlabel + \let\hunnewlabel\@gobbletwo + % ^^^ with this the user would be able to switch from hunnewlabel=yes + % to hunnewlabel=no without removing the .aux file. But now I have a + % better solution to that. (??) !! + \@@magyar@skiplong\fi + +% [pts] Done properly by pts@fazekas.hu at Mon Mar 2 21:53:30 CET 2009 +% +% \label will be redefined to write another line to .aux file: +% \hunnewlabel{...}{...}: similar to \newlabel{sectionStructNr}{pageNr}, +% where the roman numerals are replaced by their arabic representations, so +% \aref and \apageref will work (`a II. rsz'). The name \hunnewlabel is a +% legacy. +% +% We have to redefine \refstepcounter, which defines \@currentlabel, so we +% can define \magyar@@currentlabel@arabic, wich is the same as \@currentlabel, +% but it contains the number in arabic instead of roman. Without +% \magyar@@currentlabel@arabic, \label would have no clue that a roman number +% was involved. hyperref.sty also redefines \refstepcounter, but we are +% agnostic to that: it doesn't matter if we are first. + +\let\magyar@@orig@refstepcounter\refstepcounter +% \relax, or {currentlabel}{pagenumber} +\let\magyar@@currentlabel@intact\relax +% \relax, or {currentlabel-in-arabic}{pagenumber-in-arabic} +\let\magyar@@currentlabel@arabic\relax + +\def\@@magyar@setup@romantoarabic{% + \let\romannumeral\number + \let\@Roman\@roman % avoid uppercasing +} + +\def\refstepcounter#1{% + \magyar@@orig@refstepcounter{#1}% + \begingroup + % Imp: wait till \shipout before expanding \thepage, in case of + % \pagenumbering{roman}. + % \c@page might be wrong (it's correcy at \shipout only), se we fake it. + \c@page\@m + \edef\reserved@b{{\thepage}}% + \let\reserved@a\@currentlabel + % Wrap \reserved@a in {...}, and then append \reserved@b to \reserved@a. + \expandafter\expandafter\expandafter\def + \expandafter\expandafter\expandafter\reserved@a% + \expandafter\expandafter\expandafter{% + \expandafter\expandafter\expandafter{% + \expandafter\reserved@a\expandafter}\reserved@b}% + \expandafter\def\expandafter\reserved@b\expandafter{% + \expandafter\def\expandafter\magyar@@currentlabel@intact\expandafter{% + \reserved@a}}% + \expandafter\endgroup\reserved@b + \begingroup + \c@page\@m + \@@magyar@setup@romantoarabic + % This \protected@edef is from the \refstepcounter code. + \protected@edef\reserved@a{% + {\csname p@#1\endcsname\csname the#1\endcsname}{\thepage}}% + \let\reserved@b\@empty + \ifx\reserved@a\@currentlabel\else + \expandafter\def\expandafter\reserved@b\expandafter{% + \expandafter\def\expandafter\magyar@@currentlabel@arabic\expandafter{% + \reserved@a}}% + \fi + \expandafter\endgroup\reserved@b +} + +%** Make its expansion short so \ifx would be fast down in noextras... +\def\@@magyar@labela{\@@magyar@labelb}% +\def\@@magyar@labelb#1{% + \@@magyar@orig@label{#1}% output \newlabel to \@auxout + \begingroup + \c@page\@m + \edef\reserved@b{{\thepage}}% + \let\reserved@a\@currentlabel + % Wrap \reserved@a in {...}, and then append \reserved@b to \reserved@a. + \expandafter\expandafter\expandafter\def + \expandafter\expandafter\expandafter\reserved@a% + \expandafter\expandafter\expandafter{% + \expandafter\expandafter\expandafter{% + \expandafter\reserved@a\expandafter}\reserved@b}% + \ifx\reserved@a\magyar@@currentlabel@intact + % \@currentlabel created by our overridden \refstepcounter. + \ifx\magyar@@currentlabel@arabic\magyar@@currentlabel@intact\else + \expandafter\@@magyar@labelc\magyar@@currentlabel@arabic{#1}% + \fi + \else + % \@currentlabel from unknown origin. + % Emit \hunnewlabel if \thepage is roman. + \@@magyar@setup@romantoarabic + \edef\reserved@c{{\thepage}}% + \ifx\reserved@b\reserved@c\else % \thepage is roman + \@@magyar@labelc\@currentlabel{}{#1}% + \fi + \fi + \endgroup +} +% @param #1 \@currentlabel (maybe expanded) as roman converted to arabic +% @param #2 any page number in any format; ignored +% @param #3 name of the label +\def\@@magyar@labelc#1#2#3{% + % We have \noexpand\number below to prevent the \edef in \protected@write + % from expanding the page number. It will be expanded at \shipout. + \protected@write\@auxout{}{% + \string\hunnewlabel{#3}{{#1}{\noexpand\number\c@page}}}% +} + +\expandafter\addto\csname extras\CurrentOption\endcsname{% + %%\message{--EXTRAS--}\show\label + \ifx\label\@@magyar@labela\else + \let\@@magyar@orig@label\label + \let\label\@@magyar@labela + \fi +} +\expandafter\addto\csname noextras\CurrentOption\endcsname{% + %%\message{--NO--}% + \ifx\label\@@magyar@labela + % The trick here is not to restore the ``original'' label command if + % somebody has changed it since the previous save in \extrasmagyar. This + % adds compatibility with hyperref.sty, because it loads nameref.sty which + % changes \label after babel.sty and magyar.ldf has been loaded. + % 1. \usepackage[magyar]{babel}% \AtBeginDocument{\select@language{magyar}} + % 2. \usepackage{hyperref}% \AtBeginDocument{\RequirePackage{nameref}} + % 3. \begin{document}: + % 4. \input \jobname.aux + % 5. \AtBeginDocument hooks: + % 6. \select@language{magyar} + % 7. \extrasmagyar + % 8. \let\@@magyar@orig@label\label + % 9. \RequirePackage{nameref}: + % 10. \def\label#1{...} + \if1\magyar@opt@@hunnewlabel % only hunnewlabel=only-hu + \let\label\@@magyar@orig@label + \fi + \fi + % \let\@@magyar@orig@label\relax % Dat: commenting out this makes it possible to load magyar.ldf twice +} +\def\hunnewlabel#1#2{% + \def\reserved@a{#2}% + \expandafter\ifx\csname r@#1\endcsname\reserved@a% hun and normal labels are the same + \relax% \message{No need for def: #1}% + \else + \global\expandafter\let\csname @@magyar@r@#1\endcsname\reserved@a% + \fi +} + +\@gobble +{^} + +% --- captions= + +\if0\magyar@opt@@captions\@@magyar@skiplong\fi +\@namedef{captions\CurrentOption}{% + % Dat: inputenc isn't known, so we just use the safe \'a for accented letters + \def\prefacename{El\H osz\'o}% + \def\refname{Hivatkoz\'asok}% + \def\abstractname{Kivonat}% + \def\bibname{Irodalomjegyz\'ek}% + \def\appendixname{f\"uggel\'ek}% BUGFIX at Sun Feb 29 22:02:51 CET 2004 + \def\contentsname{Tartalomjegyz\'ek}% + \def\listfigurename{\'Abr\'ak jegyz\'eke}% + \def\listtablename{T\'abl\'azatok jegyz\'eke}% + \def\indexname{T\'argymutat\'o}% + \def\enclname{Mell\'eklet}% + \def\ccname{K\"orlev\'el--c\'\i mzettek}% ?? + \def\headtoname{C\'\i mzett}% + \def\proofname{Bizony\'\i t\'as}% AMS-\LaTeX + \def\glossaryname{Sz\'ojegyz\'ek}% glosszrium, (magyarzatos) szjegyzk + % vvv All these are start with a small letter + \def\figurename{\'abra}% + \def\chaptername{fejezet}% + \def\tablename{t\'abl\'azat}% + \def\notesname{Jegyzetek}% endnotes.sty + \def\partname{r\'esz}% + \def\pagename{oldal}% + \def\seename{l\'asd}% + \def\alsoname{l\'asd m\'eg}% +} +\@gobble +{^} + +% --- Changing the order of the table numbers; tablecaptions= + +\if0\magyar@opt@@tablecaptions\@@magyar@skiplong\fi + % Wee need `1. tblzat' instead of `Table 1' + \if1\magyar@opt@@tablecaptions + \def\@@magyar@fnum@table{\thetable.~\tablename}% + \else \def\@@magyar@fnum@table{\tablename\nobreakspace\thetable}\fi + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\fnum@table\let\fnum@table\@@magyar@fnum@table} + \@gobble +{^} + +% --- Changing the order of the figure numbers; figurecaptions= + +\if0\magyar@opt@@figurecaptions\@@magyar@skiplong\fi + \if1\magyar@opt@@figurecaptions + \def\@@magyar@fnum@figure{\thefigure.~\figurename}% + \else \def\@@magyar@fnum@figure{\figurename\nobreakspace\thefigure}\fi + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\fnum@figure\let\fnum@figure\@@magyar@fnum@figure} + \@gobble +{^} + +% --- dottedtocline= + +\if0\magyar@opt@@dottedtocline\@@magyar@skiplong\fi + % Dat: It is quite safe to re-define \@dottedtocline, because it isn't + % redefined in standard packages of teTeX 1. + %** Overrides latex.ltx. Allows the page number extend beyond \@pnumwidth. + \def\@dottedtocline#1#2#3#4#5{% + \ifnum #1>\c@tocdepth \else + \vskip \z@ \@plus.2\p@ + {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip + \parindent #2\relax\@afterindenttrue + \interlinepenalty\@M + \leavevmode + \@tempdima #3\relax + \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip + {#4}\nobreak + \leaders\hbox{\(\m@th + \mkern \@dotsep mu\hbox{.}\mkern \@dotsep + mu\)}\hfill + \nobreak + \setbox\@tempboxa\hbox{\normalfont \normalcolor #5}% ****pts**** + \ifdim\wd\@tempboxa<\@pnumwidth\setbox\@tempboxa\hb@xt@\@pnumwidth{\hfil\unhbox\@tempboxa}\fi + \box\@tempboxa + \par}% + \fi} + \@gobble +{^}% + +% --- amslevelfix= + +% detect ams{ldoc,dtx,art,book,proc}.sty +\ifnum1<0% + \magyar@opt@@amslevelfix + \expandafter\ifx\csname setTrue\endcsname\relax\else 1\fi + \expandafter\ifx\csname allowttyhyphens\endcsname\relax\else 1\fi +\space\else\@@magyar@skiplong\fi + % Fix amsart.cls etc. so no Overfull \hbox occurs in the \listoffigures. + % Changes \@tocline{0}{3pt plus2pt}{0pt}{}{} to \@tocline{0}{3pt plus2pt}{0pt}{\parindent}{} + \def\magyar@amslevelfix#1#2#3#4#5#6#7\vfuzz{% + \def\reserved@a{#6}% + \ifx\@tocline#2\ifx\reserved@a\@empty% + \def#1{\@tocline{#3}{#4}{#5}{\parindent}{}}% + \fi\fi + } + \expandafter\magyar@amslevelfix\expandafter\l@table \l@table ,,,,,,,\vfuzz + \expandafter\magyar@amslevelfix\expandafter\l@figure\l@figure,,,,,,,\vfuzz + \@gobble +{^}% + +% --- amsuppercasefix= + +% Fix for small \'\i in capitalized title (no fix needed for \'i and ): +% \documentlcass{amsart} % amsart.cls +% \usepackage{t1enc} +% \usepackage[latin2]{inputenc} +% \author{author Anal{\'\i}{\'i}zis} +% \title {title Anal{\'\i}{\'i}zis} +% \begin{document} \maketitle a\newpage b\newpage c \end{document} +% This bug is a general amsart.cls bug, not specific to magyar.ldf. +\ifnum1<0% + \magyar@opt@@amsuppercasefix + \expandafter\ifx\csname altucnm\endcsname\relax\else 1\fi +\space\else\@@magyar@skiplong\fi + % textcase.sty is not available by default (Ubuntu 8.04 TeX Live), and + % newer amsart.cls doesn't have this bug (\'\i gets capitalized properly) + \AtEndOfPackage{\IfFileExists{textcase.sty}{\RequirePackage{textcase}}{}} + \@gobble +{^}% + +% --- babelmarkfix= + +% Fix the language name (\foreignlanguage{\languagename}}) appearing in +% \@evenhead. Reason: both amsart.cls and babel.def 3.8 redefine \markboth. +% (There is no problem in Babel 3.7.) +% This bug is a general Babel 3.8 + amsart.cls bug, not specific to +% magyar.ldf. +% +% Dat: amsart.cls redefines \markboth defined in latex.ltx +\ifnum0<0% + \magyar@opt@@babelmarkfix\relax +\space\else\@@magyar@skiplong\fi + \begingroup + %\def\foreignlanguage{\fffffff} % Dat: not called here + % Dat: usually called: \mark{\the\@temptokena} + %\def\mark#1{\showthe\@temptokena{\toks@{B#1}\global\edef\@@magyar@@marktest{\the\toks@}}} + %\def\mark#1{\global\def\@@magyar@@marktest{#1}} + \def\mark#1{\global\edef\@@magyar@@marktest{#1}} + \let\if@nobreak\iffalse \@gobble\fi\@gobble\fi % Dat: \@gobble: make skippable + \def\@@magyar@@marktest@noexp{{\noexpand\@empty BA}{\noexpand\@empty BB}} + \expandafter\org@markboth\@@magyar@@marktest@noexp + % ^^^ Dat: since we call \org@markboth, the result doesn't depend on the Babel + % version, i.e. how Babel redefines \markboth + % ^^^ Dat: call changes \@@magyar@@marktest + % amsart.cls -> {\noexpand \@empty BA}{\noexpand \@empty BB} + % article.cls -> {\@empty BA}{\@empty BB} + \ifx\@@magyar@@marktest\@@magyar@@marktest@noexp + % OK, now test for \markboth, as defined in Babel 3.8 + \def\org@markboth#1#2{\global\def\@@magyar@@marktest{#1..#2}}% + \markboth{CA}{CB}% + % ^^^ Dat: call changes \@@magyar@@marktest + % Babel 3.7 -> \foreignlanguage {magyar}{CA}..\foreignlanguage {magyar}{CB} + % Babel 3.8 -> \noexpand \foreignlanguage {\languagename }{\noexpand \bbl@restore@actives CA}..\noexpand \foreignlanguage {\languagename }{\noexpand \bbl@restore@actives CB} + \def\reserved@a#1#2\hfuzz${#1}% + \expandafter\expandafter\expandafter\ifx + \expandafter\expandafter\expandafter\noexpand + \expandafter\reserved@a\@@magyar@@marktest\relax\hfuzz$% + % Dat: we reach this if \@@magyar@@marktest starts by \noexpand + % Dat: So now we have amsart.cls + \markboth of Babel 3.8. + % The solution is to restore \markboth and \markright of Babel 3.7 + %\let\reserved@a\@empty \zzzzzz + \def\reserved@a{% + \let\markright\org@markright + \bbl@redefine\markright##1{% + \toks@{##1}% + \edef\bbl@tempa{% + \noexpand\org@markright{% + \noexpand\foreignlanguage{\languagename}{\the\toks@}}}% + \bbl@tempa + } + \let\markboth\org@markboth + \bbl@redefine\markboth##1##2{% + \toks@{##1}\toks8{##2}% + \edef\bbl@tempa{% + \noexpand\org@markboth{% + \noexpand\foreignlanguage{\languagename}{\the\toks@}}{% + \noexpand\foreignlanguage{\languagename}{\the\toks8}}}% + \bbl@tempa + }% + }% + \else \let\reserved@a\@empty + \fi + \else \let\reserved@a\empty + \fi + %\show\reserved@a \let\reserved@a\@empty + \global\let\@@magyar@@marktest\@undefined + \global\let\@@magyar@@marktest@noexp\@undefined + \expandafter\endgroup\reserved@a + \@gobble +{^}% + +% --- showfix= +% +% Fix stupid \def\show{...} in AtBeginDocument in ucsencs.def by restoring the original +% definition. + +\ifnum0<0% + \magyar@opt@@showfix\relax +\space\else\@@magyar@skiplong\fi + \def\magyar@stripcolon#1:#2\vfuzz{#2}% + \def\magyar@show@begin@fix{% + \edef\reserved@a{\expandafter\magyar@stripcolon\meaning\show:\vfuzz}% + \ifx\reserved@a\@empty\else % \show is a macro + \let\show\@@magyar@orig@show + \fi + } + \edef\reserved@a{\expandafter\magyar@stripcolon\meaning\show:\vfuzz}% + \ifx\reserved@a\@empty % \show is not a macro + \let\@@magyar@orig@show\show + \expandafter\gdef\expandafter\@preamblecmds\expandafter{% + \expandafter\magyar@show@begin@fix\@preamblecmds}% + %\show\@begindocumenthook + %\AtBeginDocument{\magyar@show@begin@fix}% + \fi + \@gobble +{^}% + +% --- captionfix= +% +% Fix ``1. bra'' order in \caption defined by caption.sty 2004/07/16 v3.0c. +% +% The manual fix would be: +% +% \DeclareCaptionLabelFormat{simpleMagyar}{#2.\bothIfSecond{\nobreakspace}{#1}} +% \let\caption@lfmt\caption@lfmt@simpleMagyar +% + +\if0\magyar@opt@@captionfix\@@magyar@skiplong\fi + \def\@@magyar@captionfix{\@ifundefined{caption@lfmt}{}{% + % Dat: only in preamble: \DeclareCaptionLabelFormat{simpleMagyar}{#2.\bothIfSecond{\nobreakspace}{#1}} + \def\caption@lfmt@simpleMagyar##1##2{##2.\bothIfSecond{\nobreakspace}{##1}}% + }} + \AtBeginDocument{\@@magyar@captionfix} + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \ifx\caption@lfmt\caption@lfmt@default % Imp: not if both undefined + \ifx\caption@lfmt@simpleMagyar\@undefined\else + \babel@save\caption@lfmt + \let\caption@lfmt\caption@lfmt@simpleMagyar + \fi + \fi} + \@gobble +{^}% + + +% --- shortrefcmds= + +\if0\magyar@opt@@shortrefcmds\@@magyar@skiplong\fi + \def\azr{\aref}% better than \let, because it won't keep old value + \def\Azr{\Aref} + \def\azp{\apageref} + \def\Azp{\Apageref} + \def\azc{\acite} + \def\Azc{\Acite} + \@gobble +{^}% + +% --- longcaption= + +\ifx\magyar@caption@centering\@empty\@@magyar@skiplong\fi + \def\magyar@caption@hsizecheck{\hsize} + % We don't emit the two dots of `1. tblzat.' here, because + % has already been emitted by \fnum@table etc. + % We apply some formatting depending on the longcaption= option. + % Dat: Gyurgyk, p95. says: `11. bra. Hajtsi vltozatok.' + \let\@@magyar@do@makecaption\relax% before .toc + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \@@magyar@do@makecaption} + \def\@@magyar@do@makecaption@captiontwo@yes{% + % Dat: caption2.sty or caption3.sty is loaded; do nothing. + } + \def\@@magyar@do@makecaption@captiontwo@no{% + %** @param #1 \fnum@table or \fnum@figure + \def\@makecaption##1##2{% + \vskip\abovecaptionskip + \sbox\@tempboxa{##1.\ ##2}% Dat: `: ' changed to `. ' to match Hungarian typography + \ifdim \wd\@tempboxa>\magyar@caption@hsizecheck\relax + {\magyar@caption@centering ##1.\magyar@caption@newline ##2\csname par\endcsname}% + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip}} + \AtBeginDocument{% + \expandafter\ifx\csname captionlabeldelim\endcsname\relax + \expandafter\ifx\csname caption@lsep@period\endcsname\relax + \let\@@magyar@do@makecaption\@@magyar@do@makecaption@captiontwo@no + \else + % Dat: caption3.sty is loaded, and it has caption@lsep defined + % Dat: \show\caption@lsep@colon % \long\def\caption@lsep@colon{: } + % Dat: \show\caption@lsep %\def\caption@lsep{\caption@lsep@colon} + \ifx\caption@lsep\caption@lsep@default + % There was no \captionsetup{labelsep=...} yet, so we set the + % default to period (dot). + % + % This sets \caption@lsep@default and \caption@lsep. + \caption@setdefaultlabelsep{period}% + \fi + \let\@@magyar@do@makecaption\@@magyar@do@makecaption@captiontwo@yes + \fi + \else + % Dat: caption2.sty is loaded (and has \def\captionlabeldelim{.} -- but it might have {:}) + % Dat: we now redefine {:} to {.} + % Dat: the user can force {:} by \def\captionlabeldelim{:\empty} + % Dat: this works now: \usepackage[german,french,magyar]{babel} \usepackage{caption2} \begin{document} \renewcommand*\captionfont{\itshape} \renewcommand*\captionlabelfont{\scshape} + \def\reserved@a{:}% + \ifx\reserved@a\captionlabeldelim \def\captionlabeldelim{.}\fi + \let\@@magyar@do@makecaption\@@magyar@do@makecaption@captiontwo@yes + \fi} + \@gobble +{^}% + +% --- labelenums= + +\if0\magyar@opt@@labelenums \@@magyar@skiplong\fi + \providecommand\@greekalph[1]{% + % We use the robust \ensuremath here, similarly to \def\@fnsymbol in + % latex.ltx. + \ensuremath{\ifcase#1\or\alpha\or\beta\or\gamma\or\delta% + \or\varepsilon\or\zeta\or\eta\or\vartheta\or\iota\or\kappa% + \or\lambda\or\mu\or\nu\or\xi\or\varphi\or\varpi\or\varrho% + \or\varsigma\or\tau\or\upsilon\or\chi\or\psi\or\omega% + \else\@ctrerr\fi}} + \expandafter\ifx\csname c@enumv\endcsname\relax + \@definecounter{enumv}% call this before \def\theenumv + \fi + \if3\magyar@opt@@labelenums + \def\theenumi {\@arabic \c@enumi} \def\labelenumi {\theenumi.} + \def\theenumii {\@alph \c@enumii} \def\labelenumii {\itshape\theenumii)} + \def\theenumiii{\@greekalph\c@enumiii}\def\labelenumiii{\itshape\theenumiii)} + \def\theenumiv {\@Alph \c@enumiv} \def\labelenumiv {\itshape\theenumiv)} + \def\theenumv {\@Roman \c@enumv} \def\labelenumc {\theenumv.} % Dat: I'm not sure + \else + \def\theenumi{\@Roman\c@enumi} \def\labelenumi{\theenumi.} + \def\theenumii{\@arabic\c@enumii} \def\labelenumii{\theenumii.} + % !! correct \ref style for \the + \if1\magyar@opt@@labelenums % hu-a + \def\theenumiii{\@alph\c@enumiii} \def\labelenumiii{\itshape\theenumiii)} + \def\theenumiv{\@greekalph\c@enumiv} \def\labelenumiv{\itshape\theenumiv)} + \def\theenumv{\@Alph\c@enumv} \def\labelenumv {\itshape\theenumv)} + \else% hu-A + \def\theenumiii{\@Alph\c@enumiii} \def\labelenumiii{\itshape\theenumiii)} + \def\theenumiv{\@alph\c@enumiv} \def\labelenumiv{\itshape\theenumiv)} + \def\theenumv{\@greekalph\c@enumv} \def\labelenumv {\itshape\theenumv)} + \fi + \fi + \def\reserved@a{% copied from latex.ltx + \ifnum \@enumdepth >\thr@@\@toodeep\else + \advance\@enumdepth\@ne + \edef\@enumctr{enum\romannumeral\the\@enumdepth}% + \expandafter\list + \csname label\@enumctr\endcsname + {\usecounter\@enumctr\def\makelabel##1{\hss\llap{##1}}}% + \fi} + \ifx\reserved@a\enumerate + \def\enumerate{% no \@enumdepth>3 + \advance\@enumdepth\@ne + \expandafter\ifx\csname labelenum\romannumeral\the\@enumdepth\endcsname\relax + \@toodeep\advance\@enumdepth\m@ne\else + \edef\@enumctr{enum\romannumeral\the\@enumdepth}% + \expandafter\list + \csname label\@enumctr\endcsname + {\usecounter\@enumctr\def\makelabel##1{\hss\llap{##1}}}% + \fi} + \fi + \@gobble +{^}% + +% --- labelitems= + +\if0\magyar@opt@@labelitems \@@magyar@skiplong\fi + \def\labelitemi{\textendash} + % vvv Dat: formerly 2.5pt + \def\labelitemii {\raise0.58ex\hbox{\scriptsize\textbullet}} + \def\labelitemiii{\raise0.58ex\hbox{\(\scriptstyle\circ\)}} + \def\labelitemiv {\raise0.58ex\hbox{\scriptsize\textasteriskcentered}} + \def\labelitemv {\raise0.58ex\hbox{\scriptsize\textperiodcentered}} + \def\reserved@a{% copied from latex.ltx + \ifnum \@itemdepth >\thr@@\@toodeep\else + \advance\@itemdepth\@ne + \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}% + \expandafter\list + \csname\@itemitem\endcsname + {\def\makelabel##1{\hss\llap{##1}}}% + \fi} + \ifx\reserved@a\itemize + \def\itemize{% no \@itemdepth>3 + \advance\@itemdepth\@ne + \expandafter\ifx\csname labelitem\romannumeral\the\@itemdepth\endcsname\relax + \@toodeep\advance\@enumdepth\m@ne\else + \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}% + \expandafter\list + \csname\@itemitem\endcsname + {\def\makelabel##1{\hss\llap{##1}}}% + \fi} + \fi + \@gobble +{^}% + +% --- postpara= and postsubpara= and postdescription= + +\expandafter\ifx\csname magyar@opt@@paragraphs\endcsname\relax\@@magyar@skiplong\fi + % Dat: We make sure that hspaces emitted by \magyar@post@... are unstretchable + \def\magyar@post@dot{.\enskip}% + \def\magyar@post@bfdot{\textbf.\enskip}% + \let\magyar@post@quad\quad% not recommended in Hungarian + \let\magyar@post@enskip\enskip% not recommended in Hungarian + \def\magyar@post@em{\hskip1em\relax}% + \let\magyar@post@empty\@empty + %** from Gyurgy\'ak J\'anos: Szerkeszt\H{o}k \'es szerz\H{o}k k\'ezik\"onyve. + %** We don't have a square-shaped, black diamond in our math fonts :-(. + \def\magyar@post@diamond{% + \enskip\raise.5ex\hbox{\font\f=msam10 at1.3ex \f\char7}\enskip%\ignorespaces% raised \blacklozenge + %{\usefont{U}{msa}{m}{n}\small\char7} + } + \def\magyar@post@star{\enskip\({}^*\)\enskip}% + \def\magyar@post@endash{ -- }% + \def\magyar@post@semicolon{:\enskip}% + \def\magyar@first#1#2\vfuzz{\noexpand#1}% + %** Calls \magyar@pf@lowb, and never emits code resulting from #3 to TOC + %** @param #1 empty or `*' + %** @param #2 \@startsection{...}{...}... call + %** @param #3 \paragraph or \subparagraph (selects one of \magyar@post@...) + %** @param #4 paragraph title text + \def\magyar@pf@lowa#1#2#3#4{% + \if#1*\relax + \bbl@afterelse\magyar@pf@lowb*% + \else + \bbl@afterfi \magyar@pf@lowb{[#4]}% + \fi + {#2}{#3}{#4}% + }% + % !! a less obscure way for \paragraph, without -1sp etc. + %** Calls \magyar@pf@lowb, and never emits code resulting from #3 to TOC + %** @param #1 \@startsection{...}{...}... call + %** @param #2 \paragraph or \subparagraph (selects one of \magyar@post@...) + %** @param #3 paragraph title text + %** @param #4 [...] arg to \paragraph + \def\magyar@pf@lowc#1#2#3[#4]{% + \magyar@pf@lowb{[#4]}{#1}{#2}{#3}% + }% + %** Calls \magyar@post@paragraph and \magyar@post@subparagraph + %** @param #1 [#4] or `*' (what goes to TOC?) + %** @param #2 \@startsection{...}{...}... call + %** @param #3 \paragraph or \subparagraph + %** @param #4 paragraph title text + \def\magyar@pf@lowb#1#2#3#4{% + #2#1{#4\csname magyar@post@\expandafter\@gobble\string#3\endcsname\kern\z@}% + % ^^^ Dat: \kern\z@ is needed so \unskip won't occur at \paragraph* + % ^^^ Dat: {#4\csname...} is needed so \magyar@post@dot makes a {\bf.} + % Dat: \ignorespaces is superflous here, it also doesn't ignore \par + }% + %** Fixes (redefines) the specified macro so postpara= and postsubpara= + %** takes effect. It is useful to call this after a `\renewcommand\paragraph' + %** in a package. Has no effect if the definition of #1 doesn't look like + %** the one in article.cls (i.e. \@startsection) or if it's not defined + %** (such as in beamer.cls). + %** @param #1 \paragraph or \subparagraph + \def\magyar@paragraphfix#1{% + \ifx#1\@undefined\else + % Change only if defined. + \expandafter\magyar@paragraphfix@defined\expandafter#1\fi + } + \def\magyar@paragraphfix@defined#1{% + \expandafter\magyar@pf@lowd\expandafter#1#1\hfuzz........\vfuzz + } + \def\magyar@pf@lowd#1#2#3#4#5#6#7#8#9\vfuzz{% + % Dat: \unskip doesn't work, have to change \hskip to -1sp: 1sp is the + % amount of horizontal space between the diamond and the paragraph text + % 0sp would be bad, because it isn't negative (positive skips are + % interpreted as vertical). + %% + \expandafter\def\expandafter\reserved@a\expandafter{\magyar@first#9\vfuzz}% + %\def\reserved@a{#9}\ifx\reserved@a\@empty + \if\reserved@a\hfuzz\ifx#2\@startsection\if-\magyar@first#7\vfuzz + \def#1{\@ifstar + {\magyar@pf@lowa *{#2{#3}{#4}{#5}{#6}{-1sp}{#8}}#1}% + {\@ifnextchar[%] + {\magyar@pf@lowc{#2{#3}{#4}{#5}{#6}{-1sp}{#8}}#1}% + {\magyar@pf@lowa{}{#2{#3}{#4}{#5}{#6}{-1sp}{#8}}#1}% + }% + }% + \fi\fi\fi + } + % !! Imp: change Hungarian \paragraphs only, with dual load + \expandafter\ifx\csname magyar@opt@@postpara\endcsname\relax\else + \magyar@paragraphfix\paragraph + \expandafter\let\expandafter\magyar@post@paragraph\csname magyar@post@\magyar@opt@@postpara\endcsname + \ifx\magyar@post@paragraph\relax + \@@magyar@error{Invalid arg for option: postpara = \magyar@opt@@postpara}% + \fi + \fi + \expandafter\ifx\csname magyar@opt@@postsubpara\endcsname\relax\else + \magyar@paragraphfix\subparagraph + \expandafter\let\expandafter\magyar@post@subparagraph\csname magyar@post@\magyar@opt@@postsubpara\endcsname + \ifx\magyar@post@subparagraph\relax + \@@magyar@error{Invalid arg for option: postsubpara = \magyar@opt@@postsubpara}% + \fi + \fi + \expandafter\ifx\csname magyar@opt@@postdescription\endcsname\relax\else + \expandafter\let\expandafter\magyar@post@description\csname magyar@post@\magyar@opt@@postdescription\endcsname + \ifx\magyar@post@description\relax + \@@magyar@error{Invalid arg for option: postdescription = \magyar@opt@@postdescription}% + \fi + \def\magyar@@descriptionfont{\normalfont\bfseries}% + \def\descriptionlabel#1{\hskip\labelsep{\magyar@@descriptionfont#1}\magyar@post@description\hskip-\labelsep}% + \fi + \@gobble +{^}% + +% --- afterindent= + +\ifnum\magyar@opt@@afterindent>8 \@@magyar@skiplong\fi + \ifnum\magyar@opt@@afterindent<1 % force-no + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\@afterindenttrue + \let\@afterindenttrue\@afterindentfalse + }% + \else% force-yes + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\@afterindentfalse + \let\@afterindentfalse\@afterindenttrue + }% + \fi + \@gobble +{^} + +% --- default \frenchspacing; frenchspacing= + +\if0\magyar@opt@@frenchspacing \@@magyar@skiplong\fi + \if1\magyar@opt@@frenchspacing% =no + \def\@@magyar@antifrenchspacing{% only does some caching + \ifnum\the\sfcode`\.=\@m + \nonfrenchspacing + \let\@@magyar@nonfrenchspacing\frenchspacing + \else + \let\@@magyar@nonfrenchspacing\relax + \fi} + \let\@@magyar@nonantifrenchspacing\frenchspacing + \expandafter\addto\csname extras\CurrentOption\endcsname{\@@magyar@antifrenchspacing} + \expandafter\addto\csname noextras\CurrentOption\endcsname{\@@magyar@nonantifrenchspacing} + \else + \expandafter\addto\csname extras\CurrentOption\endcsname{\bbl@frenchspacing} + \expandafter\addto\csname noextras\CurrentOption\endcsname{\bbl@nonfrenchspacing} + \fi + \@gobble +{^} + + +% --- Putting dots after section number in toc/lof/lot; sectiondot= +% +% This is to have a dot after figure/table numbers in lof/lot and +% section numbers in toc. +% +% The option sectiondot= is ill-named, because it doesn't apply to what is +% displayed in \section, but it applies to \tableofcontents, \listoftables +% and \listoffigures. + +\if0\magyar@opt@@sectiondot \@@magyar@skiplong\fi + \ifnum\magyar@opt@@sectiondot>1 + % This solution (for sectiondot=problematic) is what was provided by + % magyar.ldf v1.4. It is incomatible with lots of packages. + % + % [pts] This doesn't work with nameref.sty. + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\@caption + \long\def\@caption#1[#2]#3{% + \csname par\endcsname + \addcontentsline{\csname ext@#1\endcsname}{#1}% + {\protect\numberline{\csname the#1\endcsname.}{\ignorespaces #2}}% + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \@makecaption{\csname fnum@#1\endcsname}% + {\ignorespaces #3}\csname par\endcsname + \endgroup}} + + % [pts] This is incompatible with some packages. + \expandafter\addto\csname extras\CurrentOption\endcsname{% + % Alas, \@sect must also be redefined to have that dot in toc too. + % On the other hand, we include a dot after a run-in head. + \babel@save\@sect + \def\@sect#1#2#3#4#5#6[#7]#8{% + \ifnum #2>\c@secnumdepth + \let\@svsec\@empty + \else + \refstepcounter{#1}% + \protected@edef\@svsec{\@seccntformat{#1}\relax}% + \fi + \@tempskipa #5\relax + \ifdim \@tempskipa>\z@ + \begingroup + #6{% + \@hangfrom{\hskip #3\relax\@svsec}% + \interlinepenalty \@M #8\@@par}% + \endgroup + \csname #1mark\endcsname{#7}% + \addcontentsline{toc}{#1}{% + \ifnum #2>\c@secnumdepth \else + \protect\numberline{\csname the#1\endcsname.}% + \fi + #7}% + \else + \def\@svsechd{% + #6{\hskip #3\relax + \@svsec #8.}% + \csname #1mark\endcsname{#7}% + \addcontentsline{toc}{#1}{% + \ifnum #2>\c@secnumdepth \else + \protect\numberline{\csname the#1\endcsname.}% + \fi + #7}}% + \fi + \@xsect{#5}}} + + % [pts] This is incompatible with some packages. + \expandafter\addto\csname extras\CurrentOption\endcsname{% + % In order to have that dot after a run-in head when the star form of the + % sectioning commands is used, we have to redefine \@ssect + \babel@save\@ssect + \def\@ssect#1#2#3#4#5{% + \@tempskipa #3\relax + \ifdim \@tempskipa>\z@ + \begingroup + #4{% + \@hangfrom{\hskip #1}% + \interlinepenalty \@M #5\@@par}% + \endgroup + \else + \def\@svsechd{#4{\hskip #1\relax #5.}}% + \fi + \@xsect{#3}}} + \else + % This implements option sectiondot=safe. + % + % [pts] We definitely want \numberline to emit table number in \listoftables as + % `5.6.' instead of the default `5.6', but we don't want to redefine \@caption, + % because the # args \addcontentsline adds to \contentsline depends on whether + % nameref.sty (hyperref.sty) is loaded (no nameref: 3, w/ nameref: 4); this + % would cause the strange `Package hyperref Warning: No destination for + % bookmark of \addcontentsline'. + % So we rather redefine \numberline. But we cannot simply add a dot, because + % it might be already present (e.g in \tableofcontents). So we add a dot only + % if it is missing. This modification affects \tableofcontents, \listoffigures + % and \listoftables. The presence of the dot in TOC depends on the language + % the section was defined in. + % amsart.sty uses \tocsection instead of \numberline, see amstocnumskip= + % below + \def\magyar@striplastdot@lowa#1.\relax{#1\relax}% + \def\magyar@striplastdot@lowb#1\relax#2\relax{#1}% + %** \@tempdima is set by \@dottedtocline, called by \l@section + \def\magyar@numberline#1\vfuzz{\hb@xt@\@tempdima{#1.\hfil}}% + \def\@@magyar@numberline@pre#1{% + \expandafter\expandafter\expandafter\magyar@numberline + \expandafter\magyar@striplastdot@lowb\magyar@striplastdot@lowa#1\relax.\relax\vfuzz + }% + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\numberline + %** Overrides latex.ltx + \let\numberline\@@magyar@numberline@pre + } + \fi + \@gobble +{^} + +% --- amspostsectiondot= + +\if0\magyar@opt@@amspostsectiondot \@@magyar@skiplong\fi + % Now fix ams*.cls so that they don't put a dot after the section title. + % First check whether the definition of \@sect contains + % \global\@nobreaktrue\@xsect + \long\def\@@magyar@amssect@fixa#1\global\@nobreaktrue\@xsect#2\hfuzz#3{% + \ifx\hfuzz#2\hfuzz\else% found + \@@magyar@amssect@fixb#3\fi} + %** @param #1 a \cs, e.g \@sect + \def\@@magyar@amssect@fixb#1{% + \expandafter\let\csname @@magyar@amssect@saved\string#1\endcsname#1% + \edef#1{\noexpand\expandafter\noexpand\@@magyar@amssect@low + \expandafter\noexpand\csname @@magyar@amssect@saved\string#1\endcsname}% + \let\@svsechd\@empty% prevent Undefied \cs + %** Definition of \@sect in ams*.cs ends by `\global\@nobreaktrue{#5}' + \long\def\@@magyar@amssect@low##1\global\@nobreaktrue{% + ##1% + \expandafter\def\expandafter\@svsechd\expandafter{% + \expandafter\let\expandafter\@addpunct\expandafter\@gobble \@svsechd}% + \global\@nobreaktrue + }% + } + \expandafter\@@magyar@amssect@fixa\@sect[][][][][][][][]\global\@nobreaktrue\@xsect\hfuzz\@sect + \expandafter\@@magyar@amssect@fixa\@sect[][][][][][][][]\global\@nobreaktrue\@xsect\hfuzz\NR@sect% with nameref.sty + \@gobble +{^}% + +% --- amstocnumskip=, amstocnumlang= +% +% Change \tocsection, \tocsubsection etc. in amsart.cls etc. These commands +% have effect in \tableofcontents, e.g. in the .toc file: +% `\contentsline {section}{\tocsubsection {}{1.1}{Foo}}{1}' +% +% We should be careful not to define \tocchapter and \tocsection if +% tocbibind.sty is (or will be) loaded, because it provides its own definition +% as \newcommand. + +\ifx\@empty\magyar@opt@@amstocnumskip \@@magyar@skiplong\fi + % Similar to titleskip=, but AMS classes don't look at \@seccntformat + \def\@@magyar@amstocnumskip@lets{% + \ifx\tocsubsection\@undefined\else + \ifx\tocsubsection\tocparagraph + \def\tocsubsection{\tocsection}% + % These lines are similar to those in amsart.cls. + \let\tocsubsubsection\tocsubsection + \let\tocparagraph\tocsubsection + \let\tocsubparagraph\tocsubsection + \let\tocpart\tocsubsection + \let\tocchapter\tocsubsection + \fi + \fi + }% + \def\@@magyar@amstocnumskip@defs{% + \ifx\tocsubsection\@undefined\else + \ifx\tocsubsection\tocparagraph + %** Overrides amsart.cls, amsbook.cls etc. + %** Only for Hungarian \section{}s. Changes \quad to + %** \magyar@opt@@amstocnumskip in the definition. Also changes + %** ``fejezet 1'' to ``1. fejezet'' for \chapter + %** (We have \def\tocchapter{\tocsection} by default.) + \def\tocsection##1##2##3{% + %%\typeout{--##3--}% + \indentlabel{% + \def\reserved@a{##1}% + \def\reserved@b{##2}% + \ifx\reserved@b\empty + \else\ifx\reserved@a\chaptername + % * Sometimes (but not in \tableofcontents) #1 is + % `\csname chaptername\endcsname'. Why? + % * \tocappendix is called instead of \tocsection for the + % appendix. + \ifnum\magyar@opt@@chapternumber=1 \@huordinal{##2}~% + \else\ifnum\magyar@opt@@chapternumber=2 \@Huordinal{##2}~% + \else##2.~% + \fi\fi + ##1.\magyar@opt@@amstocnumskip + \else\ifx\reserved@a\partname + \ifnum\magyar@opt@@partnumber=1 \@huordinal{##2}~% + \else\ifnum\magyar@opt@@partnumber=2 \@Huordinal{##2}~% + \else##2.~% + \fi\fi + ##1.\magyar@opt@@amstocnumskip + \else + \ignorespaces##1 ##2.\magyar@opt@@amstocnumskip + \fi\fi\fi}% + ##3}% + %** Overrides amsart.cls etc. Only for Hungarian \section{}s. Changes \quad to + %** \magyar@opt@@amstocnumskip in the definition. + \def\tocappendix##1##2##3{% + \indentlabel{% + \def\reserved@a{##1}% + \ifx\reserved@a\appendixname + ##2\ifx\@@magyar@appendixname\@empty.\fi~##1% + \else + ##1\@ifnotempty{##2}{ ##2}% + \fi + .\magyar@opt@@amstocnumskip}% + ##3}% + \fi + \fi + }% + \AtBeginDocument\@@magyar@amstocnumskip@lets % must be before @defs + \if2\magyar@opt@@amstocnumlang + \AtBeginDocument\@@magyar@amstocnumskip@defs + %\let\@@magyar@amstocnumskip@defs\@undefined% for use by the user + \else + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\tocsection \babel@save\tocappendix + \@@magyar@amstocnumskip@defs + } + \fi + \@gobble +{^}% + + +% --- Fixup Babel language selection glitches; toclang= + +% There are fundamental problem of emitting \select@language items in LOT +% files. +% +% Problem (3): When using \begin{table}...\end{table} \selectlanguage{foo} +% \begin{table}...\end{table}, the LaTeX-Babel scheme will not emit a +% \select@language{foo} between the two \contentsline{}s in \jobname.lot. The +% TOC file is OK, because section titles aren't floats. (But what about +% \mark{}s?). +% +% Problem (1): \selectlanguage emits .aux entries even +% if the language isn't really changed. +% +% Problem (2): babel.def has +% `\AtBeginDocument...\selectlanguage...\bbl@main@language', from which an +% \immediate is missing, so the \select@language is emitted to the .aux file +% after the first float has been typeset. A better solution would be +% `\select@language{\languagename}', which forcibly activates the default +% language. +% +% Problem (4): \ps@headings isn't run \AtBeginDocument, but book.cls runs +% \pagestyle{headings} when it is loaded. We should change this to +% \AtBeginDocument or similar. + +\ifnum\magyar@opt@@toclang=0 \@@magyar@skiplong\fi + \ifnum\magyar@opt@@toclang>1 % toclang=good + % Solve problems (2) and (4). Timing is critical. \select@language must + % be called after \AtBeginDocument, so \catcode{}s won't be \activated + % too early. (Because some code in \AtBeginDocument might issue an + % \input such as hyperref.sty which does \RequirePackage{nameref}.) + % Note that \extrasmagyar containing the \catcode changes is + % only run when `magyar' is the default language (last arg of + % \usepackage[...]{babel}). If that is run after \AtBeginDocument hooks, + % then most packages will use 12 as \catcode\string``, which is intended. + % \@@magyar@setup@psheadings might just be run \AtBeginDocument, it doesn't + % need \@preamblecmds -- but it must be after \select@language. + % + % \@preamblecmds is expanded after \@begindocumenthook + \expandafter\gdef\expandafter\@preamblecmds\expandafter{\@preamblecmds + \@@magyar@setup@psheadings% Solve problem (4). Before \selectlanguage. + \select@language{\languagename}% force initial language + }% + % Solve problem (1) and assist solving problem (2) by not emitting + % \select@language twice. + \def\bbl@set@language#1{% + \edef\@Lang@tmp{% + \ifcat\noexpand\noexpand\noexpand#1% a control sequence + \expandafter\expandafter\expandafter\@gobble\expandafter\string + \fi + #1% + }% + \ifx\languagename\@Lang@tmp\else + \let\languagename\@Lang@tmp + \select@language{\languagename}% + \fi + }% + % Solve problem (3). + \long\def\addtocontents#1#2{% + % Dat: \noexpand should be avoided in \protected@write + \protected@write\@auxout + {\let\label\@gobble \let\index\@gobble \let\glossary\@gobble \let\select@language\relax}% + {\string\@writefile{#1}{\string\select@language{\languagename} #2}}} + \else + % Solve problems (2) and (4). + \AtBeginDocument{% + \if@filesw \immediate\write\@mainaux{% + \string\select@language{\languagename}% + \string\@writefile{toc}{\string\select@language{\languagename}}% + \string\@writefile{lof}{\string\select@language{\languagename}}% + \string\@writefile{lot}{\string\select@language{\languagename}}% + }\fi + \@@magyar@setup@psheadings% Solve problem (4). Before \selectlanguage. + \select@language{\languagename}% force initial language + } + % Solve problem (1) and assist solving problem (2) by not emitting + % \select@language twice. + \def\bbl@set@language#1{% + \edef\@Lang@tmp{% + \ifcat\noexpand\noexpand\noexpand#1% a control sequence + \expandafter\expandafter\expandafter\@gobble\expandafter\string + \fi + #1% + }% + \ifx\languagename\@Lang@tmp\else + \let\languagename\@Lang@tmp + \select@language{\languagename}% + \if@filesw \protected@write\@auxout{}{% + \string\select@language{\languagename}% + \string\@writefile{toc}{\string\select@language{\languagename}}% + \string\@writefile{lof}{\string\select@language{\languagename}}% + \string\@writefile{lot}{\string\select@language{\languagename}}% + \fi}% + \fi + }% + % Don't solve problem (3). + \fi + \@gobble +{^}% + +% --- suggestions= + +\ifnum\magyar@opt@@suggestions=0 \@@magyar@skiplong\fi + % Dat: buggy varioref.sty adds this to extrasmagyar (\AtBeginDocument is + % buggy, can be used only in the preamble. + % \def\reftextfaceafter {a k\"o\-vet\-kez\H{o} ol\-da\-lon}% + % \def\reftextfacebefore{az el\H{o}\-z\H{o} ol\-da\-lon}% + % \def\reftextafter {a k\"o\-vet\-kez\H{o} ol\-da\-lon}% + % \def\reftextbefore {az el\H{o}\-z\H{o} ol\-da\-lon}% + % \def\reftextcurrent {ezen az ol\-da\-lon}% + % \def\reftextfaraway#1{\aza{\pageref{#1}} \pageref{#1}.~ol\-da\-lon}% + % \def\reftextpagerange#1#2{\vref@stringwarning\reftextpagerange + % on pages~\pageref{#1}--\pageref{#2}}% + % \def\reftextlabelrange#1#2{\vref@stringwarning\reflabelpagerange + % \ref{#1} to~\ref{#2}}% + % \AtBeginDocument{\providecommand\aza[1]{a/az% + % \PackageError{varioref}{% + % Proper definition for command \noexpand\aza missing}% + % {You need to (re)define the command \noexpand\aza that + % takes one argument (a number or a \noexpand\pageref command) + % and produces the string `a' or `az' depending on the argument + % value. It should also accept an optional argument (default `l') + % to denote whether or not the string should be lowercase or + % uppercase.}}}% + \def\@@magyar@ignorehbox@pree#1\hbox$#2{}%$ + %\def\@@magyar@grep@reftextcurrent#1\def\reftextcurrent#2\hbox$ + \def\@@magyar@grep@reftextbegin#1\def\reftextfaceafter#2\hfuzz\hfuzz\hfuzz#3\hbox$#4{%$ + \toks@={#1#3}% Dat: # -> ## conversion for \def + \expandafter\global\expandafter\edef\csname extras#4\endcsname + {\the\toks@}% + } + \def\@@magyar@grep@reftextcurrent#1\def\reftextlabelrange#2#3#4#5#6% + \AtBeginDocument#7#8\hbox$#9{%$ Dat: no need for \long\def + % ^^^ Dat: Don't use `#21', because then #2 would match multiple tokens + \ifx#31% found real data, not sentinel + \PackageWarningNoLine{#9.ldf}{Do not load buggy \string\usepackage[magyar]{varioref},\MessageBreak load simply \string\usepackage{varioref}}% + % vvv remove code inserted by varioref.sty + \@@magyar@grep@reftextbegin#1\hfuzz\hfuzz\hfuzz#8\hbox${#9}%$ + \fi + } + \def\magyar@sugg@vr#1{% + \expandafter\expandafter\expandafter\@@magyar@grep@reftextcurrent + \csname extras#1\endcsname\hbox${#1}\@@magyar@ignorehbox@pree%$ + \def\reftextlabelrange23456\AtBeginDocument78\hbox${#1}%$ + } + \def\magyar@sugg@to#1{% + \def\reserved@a{T1} + \edef\reserved@b{\encodingdefault}% \encodingdefault is \long for t1enc.sty, but not for fontenc.sty + \ifx\reserved@a\reserved@b\else + \@latex@warning@no@line{Please use \string\usepackage{t1enc} with\MessageBreak \string\usepackage[#1]{babel}, to get accented chars hyphenated}% + % ^^^ Dat: \usepackage[T1]{fontenc} is equally good, but less effective + \fi + } + \def\magyar@sugg@ie@lowb#1{\@latex@warning@no@line{% + Please use \string\usepackage[latin2]{inputenc}\MessageBreak + or \string\usepackage[utf8]{inputenc}\MessageBreak + with \string\usepackage[#1]{babel}}}% + %** @param #1 empty (old) or \protect + %** @param #2 input encoding name + \def\magyar@sugg@ie@low#1\@inpenc@undefined@#2#3\vfuzz#4{% + \def\reserved@b{#2}% + \def\reserved@a{latin2}% + \ifx\reserved@a\reserved@b\else + \def\reserved@a{utf8}% + \ifx\reserved@a\reserved@b\else + \def\reserved@a{utf8x}% + \ifx\reserved@a\reserved@b\else + \def\reserved@a{cp1250}% + \ifx\reserved@a\reserved@b\else + \magyar@sugg@ie@lowb{#4}% + \fi + \fi + \fi + \fi + } + \def\magyar@sugg@ie#1{% + % Dat: don't print warning for missing \usepackage + \expandafter\ifx\csname @inpenc@undefined\endcsname\relax + \magyar@sugg@ie@lowb{#1}% + \else + % from inputenc.sty: \edef\@inpenc@undefined{\noexpand\@inpenc@undefined@{#1}}% + % > \@inpenc@undefined=macro: + % ->\@inpenc@undefined@ {latin2}. + \expandafter\magyar@sugg@ie@low\@inpenc@undefined....\vfuzz{#1}% + \fi + }% + \def\magyar@sugg@af#1{% + \expandafter\ifx\csname#1Options\endcsname\relax\else + \PackageWarningNoLine{#1.ldf}{No effect of \string\def\@backslashchar #1Options{...}\MessageBreak + please move it before \string\usepackage[#1]{babel}}% + \fi + }% + \def\@@magyar@@ps@fancy{\relax}%\@fancyplainfalse\ps@@fancy}% + \def\magyar@sugg@fh#1{% + \ifx\ps@fancy\@@magyar@@ps@fancy + \PackageWarningNoLine{#1.ldf}{No effect on fancyhdr.sty,\MessageBreak + please load it before \string\usepackage[#1]{babel}}% + \fi + }% + \def\magyar@sugg@ap#1{% + \expandafter\ifx\csname opt@#1.ldf.sty\endcsname\relax\else + \PackageWarningNoLine{#1.ldf}{No effect of \@backslashchar PassOptionsToPackage{?}{#1.ldf}\MessageBreak + please move it before \string\usepackage[#1]{babel}}% + \fi + }% + \edef\reserved@a{\noexpand\AtBeginDocument{% + \noexpand\magyar@sugg@pa{\CurrentOption}% + \noexpand\magyar@sugg@af{\CurrentOption}% + \noexpand\magyar@sugg@ap{\CurrentOption}% + \noexpand\magyar@sugg@to{\CurrentOption}% + \noexpand\magyar@sugg@ie{\CurrentOption}% + \noexpand\magyar@sugg@vr{\CurrentOption}% + \noexpand\magyar@sugg@fh{\CurrentOption}% + }}\reserved@a + \@gobble +{^}% + +% --- Active characters and shorthands; active=, activeprefix=, activespace= + +\ifnum0=\magyar@opt@@activespace\magyar@opt@@active\space + \def\@@magyar@declare@shorthandx#1#2{% + \expandafter\def\csname @@magyar@shorthand@\string#1\endcsname{#2}% + } +\@@magyar@skiplong\fi + \def\magyar@activate@shorthands{% + \edef\reserved@a{% + \noexpand\addto\expandafter\noexpand\csname extras\CurrentOption\endcsname + {\noexpand\languageshorthands{\CurrentOption}}% + } + \reserved@a + \let\magyar@activate@shorthands\relax + } + \let\@@magyar@saved@initiate@active@char\initiate@active@char + % + % vvv Fri Oct 1 18:09:55 CEST 2004 + % This is the ultimate fix of the .aux file catcodes when + % \usepackage[german,magyar]{babel} or + % \usepackage[french,magyar]{babel}. + % This enforces \catcode\string``=12 very early into the .aux file. + % Imp: don't let \catcode``\active too early... + {\toks@\expandafter{\expandafter\@@magyar@protect@backtick\@begindocumenthook}% + \xdef\@begindocumenthook{\the\toks@}}% Dat: \@begindocumenthook has #1 #2 etc. + \def\@@magyar@protect@backtick{% + \if@filesw\immediate\write\@auxout{\catcode\noexpand\string``=12}\fi} + % + %** @param #1 a non-active char token + %** @param #2 activation type: 0, 1, 2 or 3 + % !! quick link to \@@magyar@shorthand + \def\magyar@activate@char#1#2{% + \ifnum#2>1 % ignore 0 and 1 + \ifnum#2>2 % 3 + % SUXX, breaks compatibility with graphicx.sty and hyperref.sty and possibly + % with many other packages using \catcode`` etc. + %** Fix .aux load timing bug. + \AtBeginDocument{% + \if@filesw\immediate\write\@auxout{\catcode\noexpand\string`#1=12}\fi + } + \initiate@active@char{#1}% + \else% 2 + % Dat: german.ldf emits `\catcode`"\active'; we should emit our + % catcode change (\catcode\string``=12) before that + % Dat: this works only with \usepackage[magyar,german,magyar]{babel}, + % not with \usepackage[german,magyar]{babel} + % solution: \AtBeginDocument{\if@filesw\immediate\write\@auxout{\catcode\noexpand\string`#1=12}\fi} + \let\magyar@saved@AtBeginDocument\AtBeginDocument + \let\AtBeginDocument\@gobble + % vvv Calls \AtBeginDocument to set \catcode to \active and also write such a + % line to the .aux file. We just ignore it. + \initiate@active@char{#1}% + \let\AtBeginDocument\magyar@saved@AtBeginDocument + \let\magyar@saved@AtBeginDocument\@undefined + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@savevariable{\catcode\string`#1}% + \catcode\string`#1=13 % + }% + \fi + % Dat: now #1 is \active (done by \initiate@active@char) + \lccode\string`~=\string`#1\lowercase{% Dat: luckily everything below is in lowercase + \expandafter\addto\csname extras\CurrentOption\endcsname {\bbl@activate{~}}% + \expandafter\addto\csname noextras\CurrentOption\endcsname{\bbl@deactivate{~}}% + } + \lccode\string`~=0 + \catcode\string`#1=12 % Imp: restore _old_ catcode + \fi + } + %** @param #1 shorthand prefix character (depends on activeprefix=) + %** @param #2 a single character (will be prefixed) + %* @param #3 TeX code + \def\@@magyar@declare@shorthand@low#1#2#3{% + \declare@shorthand{\CurrentOption}{#1#2}{#3}% + } + \edef\@@magyar@shorthandprefix{\string`}% + %** @param #1 a single character (will be prefixed by ``' etc.) + %* @param #2 TeX code + %\def\@@magyar@declare@shorthand#1#2{\magyar@opt@@activeprefix#1{#2}}% defined below + \ifx\magyar@opt@@activeprefix\relax + \def\magyar@opt@@active{0}% =none + \def\magyar@opt@@openqq{0}% =unchanged (this must be defined before processing openqq below) + \else\edef\@@magyar@declare@shorthand#1#2{\noexpand\@@magyar@declare@shorthand@low\expandafter\string\magyar@opt@@activeprefix#1{#2}}\fi + %\magyar@activate@shorthands% not yet + \def\@@magyar@declare@shorthandx#1#2{% + \magyar@activate@shorthands + \expandafter\def\csname @@magyar@shorthand@\string#1\endcsname{#2}% + \expandafter\@@magyar@declare@shorthand\expandafter#1\expandafter{\csname @@magyar@shorthand@\string#1\endcsname}% + } + \@gobble +{^}% + +%** Call \@@magyar@shorthand@... For example: {`tty} and +%** {\@@magyar@shorthand tty} are interchangeable. +%** @param #1 a char token. +\def\@@magyar@shorthand#1{% + \expandafter\ifx\csname @@magyar@shorthand@\string#1\endcsname\relax + \@@magyar@error{Unknown shorthand: \string#1 }% + \else + \expandafter\expandafter\csname @@magyar@shorthand@\string#1\endcsname + \fi +} + +% --- activespace= Extra \thispace before :, ;, ! and ? +% +% french.ldf has \space after `:', but we only have \thinspace + +\ifnum\magyar@opt@@activespace=0 \@@magyar@skiplong\fi + %** @param #1 any of : ; ! ? + \def\magyar@thinspaced#1{% + % Dat: `!' at the end of the word is OK, but at the beginning it makes the + % word unhyphenatable. Imp: maybe \nobreak\hskip\z@skip? + % Dat: this is math-mode safe, because \ifhmode is false in math mode + \ifhmode% \ifhmode and \ifmmode are never true + \ifdim\lastskip>\z@ + \unskip\penalty\@M\kern.1em% \thinspace is .16667em + \else + \kern.1em + \fi + \fi + \string#1% + } + \magyar@activate@shorthands + \magyar@activate@char;\magyar@opt@@activespace + \declare@shorthand{\CurrentOption}{;}{\magyar@thinspaced;} + \magyar@activate@char!\magyar@opt@@activespace + \declare@shorthand{\CurrentOption}{!}{% + \ifmmode + \expandafter\ifx\csname factorial\endcsname\relax\mathchar"5021 \else\factorial\fi + \else\magyar@thinspaced!\fi} + % ^^^ compatibility with nath.sty + \magyar@activate@char?\magyar@opt@@activespace + \declare@shorthand{\CurrentOption}{?}{\magyar@thinspaced?} + \magyar@activate@char:\magyar@opt@@activespace + \declare@shorthand{\CurrentOption}{:}{\magyar@thinspaced:} + \@gobble +{^}% + + +% --- active= +% +% Dat: active=safe isn't safe unless other .ldf files used don't call +% \initiate@active@char{`}. +% +% `` `' `= `_ `-- `- `| `< `> `" `~ etc. + +\ifnum\magyar@opt@@active=0 + \ifnum\magyar@opt@@openqq>0 \@@magyar@error{active=none implies openqq=unchanged}\fi +\@@magyar@skiplong\fi + \ifnum\magyar@opt@@active>1 + \magyar@activate@shorthands% Dat: don't do it if \magyar@opt@@active=0 + \expandafter\magyar@activate@char\magyar@opt@@activeprefix\magyar@opt@@active + \fi + % + \ifnum\magyar@opt@@openqq>1 % =down + % Same as in in ukraineb.ldf + \@@magyar@declare@shorthandx`{\glqq}% down 99 \glqq is Babel's macro containing \quotedblbase + \@@magyar@declare@shorthandx'{\grqq}% up 66 + \else\ifnum\magyar@opt@@openqq>0 % =up + \@@magyar@declare@shorthandx`{\grqq}% up 66 + \@@magyar@declare@shorthandx'{\glqq}% down 99 + \else + \dMf @@magyar@shorthand@\string` {\string`\string`}% unchanged -- expect a ligature in font + \dMf @@magyar@shorthand@\string' {\string`\string'}% unchanged -- expect a ligature in font + \fi\fi + % + %** A hyphen, but hyphenation is OK at both sides + %** reported and asked by Jzsa Mrton + \@@magyar@declare@shorthandx ={\leavevmode\nobreak-\hskip\z@skip} + % ^^^ Dat: no need for \nobreak\hskip\z@skip, because of the empty discretionary + %** \shu?-- typesets an endash (--) with a small space around it (the one to + %** the right is breakable). \shu?- typesets a normal hyphen, having + %** hyphenation OK at both sides. + %** @example Kiss Eld\shu?--Nagy Pl + %** @example kzgazdasg\shu?-tudomnyi + \def\@@magyar@shorthandminus{% + \ifmmode \mskip2.4mu plus3.6mu minus1.8mu \else % ,`- is just a space in math mode + \if-\noexpand\@Lang@tmp \leavevmode\nobreak\,\nobreak\hbox{--}\,\expandafter\expandafter\expandafter\@gobble% Dat: \@gobble - + \else \leavevmode\nobreak-\hskip\z@skip\fi% Dat: e.g hegyes`-szg + \fi + } + \@@magyar@declare@shorthandx -{\futurelet\@Lang@tmp\@@magyar@shorthandminus}% + %** A hyphen that is displayed in both next and current lines. Hyphenation + %** is OK at both sides. This differs from ukraineb.ldf. + %** \showhyphens{ntrium`|klorid} -> nt-ri-um--klo-rid + \@@magyar@declare@shorthandx |{\leavevmode\nobreak-\nobreak\discretionary{}{-}{}\nobreak\hskip\z@skip}% Dat: all \nobreak s are important % e.g egyszer`|ktszer + \@@magyar@declare@shorthandx _{\leavevmode\nobreak\-\nobreak\hskip\z@skip} + \@@magyar@declare@shorthandx <{\flqq} + \@@magyar@declare@shorthandx >{\frqq} + \@@magyar@declare@shorthandx "{\hskip\z@skip}% \allowbreak, but hyphenation is OK at both sides + \@@magyar@declare@shorthandx ~{\textormath{\leavevmode\hbox{-}}{-}}% a hyphen that isn't part of ligatures -- and --- + % + % Dat: `CXY means \discretionary{CS-}{XY}{CXY}, which makes sense only for + % `CCS. But `Ccs wouldn't make sense, since there is no Hungarian word + % (whose first letter has to be capitalized) beginning with ccs. + % Dat: \nobreak\bbl@allowhyphens: \showhyphens{ho`sszabbra} -> hosz-szabb-ra + % Dat: \def\foo{`}\declare@shorthand{\CurrentOption{\foo c}{...} doesn't work + % Dat: these work quite well in math mode + % Dat: \showhyphens{a\hskip\z@skip b} displays "ab", but + % \showhyphens{a\hskip0pt b} displays "a b" + %** These should be equivalent: + %** \showhyphens{verembepot\nobreak\discretionary{y-}{}{}\nobreak\hskip\z@skip tyantam} + %** \showhyphens{verembepo`ttyantam} + \def\@@magyar@disc#1#2{#1\textormath{\nobreak\discretionary{#2-}{}{}}{}\nobreak\hskip\z@skip}% + \@@magyar@declare@shorthandx c{\@@magyar@disc cs}% loccsan --> locs-csan (lo`ccsan) + \@@magyar@declare@shorthandx C{\@@magyar@disc CS} + \@@magyar@declare@shorthandx g{\@@magyar@disc gy}% poggy\'asz --> pogy-gy\'asz (po`ggy\'asz) + \@@magyar@declare@shorthandx G{\@@magyar@disc GY} + \@@magyar@declare@shorthandx l{\@@magyar@disc ly}% Kod\'allyal --> Kod\'aly-lyal (Kod\'a`llyal) + \@@magyar@declare@shorthandx L{\@@magyar@disc LY} + \@@magyar@declare@shorthandx n{\@@magyar@disc ny}% mennyei --> meny-nyei (me`nnyei) + \@@magyar@declare@shorthandx N{\@@magyar@disc NY} + \@@magyar@declare@shorthandx s{\@@magyar@disc sz}% vissza --> visz-sza (vi`ssza) + \@@magyar@declare@shorthandx S{\@@magyar@disc SZ} + \@@magyar@declare@shorthandx t{\@@magyar@disc ty}% pottyan --> poty-tyan (po`ttyan) + \@@magyar@declare@shorthandx T{\@@magyar@disc TY} + \@@magyar@declare@shorthandx z{\@@magyar@disc zs}% rizzsel --> rizs-zsel (ri`zzsel) + \@@magyar@declare@shorthandx Z{\@@magyar@disc ZS} + \def\magyar@fixddzs{\@@magyar@declare@shorthandx d{% bridzs-dzsel + % vvv doesn't handle the rare combination dzs-dzs + %\@@magyar@declare@shorthandx D}{\@@magyar@disc DZ} + %\@@magyar@declare@shorthandx d}{\@@magyar@disc dz}% eddz\"unk (felsz. m.) --> edz-dz\"unk (e`ddz\"unk) + \def\reserved@a{% + \if\noexpand\reserved@b d% + \def\reserved@a{% + \if\noexpand\reserved@b z% + \def\reserved@a{% + \nobreak% so word before `ddzs gets hyphenated + \if\noexpand\reserved@b s% + \discretionary{dzs-}{dz}{ddz}% \showhyphens{szuper`ddzsungelben} + \else + \discretionary{dz-}{d}{dd}z% \showhyphens{szuper`ddzungelben} + \fi + \nobreak\hskip\z@skip% allow both pre- and post breaks + }% + \bbl@afterelse\expandafter\futurelet\expandafter\reserved@b\expandafter\reserved@a\@gobble + \else + \bbl@afterfi dd% + \fi + }% + \bbl@afterelse\expandafter\futurelet\expandafter\reserved@b\expandafter\reserved@a\@gobble + \else\bbl@afterfi d\fi + }% + \futurelet\reserved@b\reserved@a% doesn't remove next token + }}% + \magyar@fixddzs \expandafter\uppercase\expandafter{\magyar@fixddzs} + \@gobble +{^}% + + +% --- hunumbers= + +\ifnum\magyar@opt@@hunumbers=0 \@@magyar@skiplong\fi +\def\@@magyar@egyjegyu#1{% + \ifcase#1 \or\or k\'et\or h\'arom\or n\'egy\or \"ot\or hat\or h\'et\or + nyolc\or kilenc\fi +} +\def\@@magyar@upperfi@nine#1\fi\fi\fi\fi\fi\fi\fi\fi\fi{\fi\fi\fi\fi\fi\fi\fi\fi\fi#1} +\def\@@magyar@upperelse@nine#1\else#2\fi\fi\fi\fi\fi\fi\fi\fi\fi{\fi#1} +\def\@@magyar@uppernum#1{% + \ifx#1\"\@@magyar@upperelse@nine\"O\@gobble% \"o + \else\if\noexpand#1eE% + \else\if\noexpand#1hH% + \else\if\noexpand#1kK% + \else\if\noexpand#1mM% mnusz + \else\if\noexpand#1nN% + \else\if\noexpand#1oO% + \else\if\noexpand#1sS% sokadik + \else\if\noexpand#1tT% + \else\@@magyar@upperfi@nine\expandafter\@@magyar@uppernum#1% do an extra expansion + \fi\fi\fi\fi\fi\fi\fi\fi\fi +} +%** For \pagenumbering{huordinal}. Expands to the Hungarian ordered numeral, +%** spelled out in letters (i.e 1 --> first --> els). Suitable for numbering +%** \part{}s and \chapter{}s of a book (\def\thepart{\@Huordinal\c@part}}) +%** @param #1 a number (input for \number) in -9999..9999 +\def\@huordinal#1{% + % !! larger numbers, also for \@hunumeral + \ifnum#1=-1 m\'nusz egyedik\else + \ifnum#1=-2 m\'nusz kettedik\else + \ifnum#1<0 m\'inusz \expandafter\@huordinal\expandafter{\number-#1 }\else + \ifcase\number#1 nulladik\or els\H o\or m\'asodik\or harmadik\or negyedik\or + \"ot\"odik\or hatodik\or hetedik\or nyolcadik\or kilencedik\else + \ifnum#1>999 \expandafter\@@magyar@ezresedik\number#1.\else + \ifnum#1>99 \expandafter\@@magyar@szazasodik\number#1\else + \expandafter\@@magyar@tizesedik\number#1% + \fi\fi\fi\fi\fi\fi +} +%** @param #1#2 1000..9999 +\def\@@magyar@ezresedik#1#2.{% + \ifnum#1#2>9999 sokadik\else + \@@magyar@egyjegyu#1% + \ifnum#2=0 ezredik\else + ezer\ifnum#1>1 -\fi% ktezer-harmadik + \ifnum#2<100 + \expandafter\@@magyar@tizesedik\number#2% + \else + \ifnum#2<200 egy\fi% ezerszzadik -> ezeregyszzadik + \@@magyar@szazasodik#2% + \fi + \fi + \fi +} +%** @param #1#2 100..999 +%** Imp: binary search +\def\@@magyar@szazasodik#1#2#3{% + \@@magyar@egyjegyu#1sz\'az% + \@@magyar@tizesedik#2#3% +} +%** @param #1 a digit +%** @param #2 a digit +%** Imp: binary search +\def\@@magyar@tizesedik#1#2{% + \ifnum#1#2>89 kilencven\@@magyar@egyesedik#2e% + \else\ifnum#1#2>79 nyolcvan\@@magyar@egyesedik#2a% + \else\ifnum#1#2>69 hetven\@@magyar@egyesedik#2e% + \else\ifnum#1#2>59 hatvan\@@magyar@egyesedik#2a% + \else\ifnum#1#2>49 \"otven\@@magyar@egyesedik#2e% + \else\ifnum#1#2>39 negyven\@@magyar@egyesedik#2e% + \else\ifnum#1#2>29 harminc\@@magyar@egyesedik#2a% + \else\ifnum#1#2>20 huszon\@@magyar@egyesedik#2.% + \else\ifnum#1#2=20 huszadik% + \else\ifnum#1#2>10 tizen\@@magyar@egyesedik#2.% + \else\ifnum#1#2=10 tizedik% + \else \@@magyar@egyesedik#2a% ``ktszzadik'' + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi +}% +\def\@@magyar@egyesedik#1#2{% + \ifcase#1 #2\or egye\or kette\or harma\or negye\or + \"ot\"o\or hato\or hete\or nyolca\or kilence\fi dik% +} +%** Same as \@huordinal, but uppercase +\def\@Huordinal#1{% + % Dat: \newlabel{hellopart}{{Els\H o}{3}} is correctly written out + \ifcase#1 Nulladik\or Els\H o\or M\'asodik\or Harmadik\or Negyedik\or + \"Ot\"odik\or Hatodik\or Hetedik\or Nyolcadik\or Kilencedik\or Tizedik% + \or Tizenegyedik\or Tizenkettedik\else\@@magyar@uppernum\@huordinal{#1}\fi +} +\def\huordinal#1{\expandafter\@huordinal\csname c@#1\endcsname} +\def\Huordinal#1{\expandafter\@Huordinal\csname c@#1\endcsname} + +%** For \pagenumbering{hunumeral}. Expands to the Hungarian ordered numeral, +%** spelled out in letters (i.e 1 --> first --> els). Suitable for numbering +%** \part{}s and \chapter{}s of a book (\def\thepart{\@Hunumeral\c@part}}) +%** @param #1 a number (input for \number) in -9999..9999 +\def\@hunumeral#1{% + \ifnum#1<0 m\'inusz \expandafter\@hunumeral\expandafter{\number-#1 }\else + \ifcase#1 nulla\or egy\or kett\H{o}\or h\'arom\or n\'egy\or + \"ot\or hat\or h\'et\or nyolc\or kilenc\else + \ifnum#1>999 \expandafter\@@magyar@ezer\number#1.\else + \ifnum#1>99 \expandafter\@@magyar@szaz\number#1\else + \expandafter\@@magyar@tiz\number#1% + \fi\fi\fi\fi +} +%** @param #1#2 1000..9999 +\def\@@magyar@ezer#1#2.{% + \ifnum#1#2>9999 sokadik\else + \@@magyar@egyjegyu#1% + \ifnum#2=0 ezer\else + ezer\ifnum#1>1 -\fi% ktezer-harmadik + \ifnum#2<100 + \expandafter\@@magyar@tiz\number#2% + \else + \ifnum#2<200 egy\fi% ezerszzadik -> ezeregyszzadik + \@@magyar@szaz#2% + \fi + \fi + \fi +} +%** @param #1#2 100..999 +%** Imp: binary search +\def\@@magyar@szaz#1#2#3{% + \@@magyar@egyjegyu#1sz\'az% + \@@magyar@tiz#2#3% +} +%** @param #1 a digit +%** @param #2 a digit +%** Imp: binary search +\def\@@magyar@tiz#1#2{% + \ifnum#1#2>89 kilencven\@@magyar@egy#2% + \else\ifnum#1#2>79 nyolcvan\@@magyar@egy#2% + \else\ifnum#1#2>69 hetven\@@magyar@egy#2% + \else\ifnum#1#2>59 hatvan\@@magyar@egy#2% + \else\ifnum#1#2>49 \"otven\@@magyar@egy#2% + \else\ifnum#1#2>39 negyven\@@magyar@egy#2% + \else\ifnum#1#2>29 harminc\@@magyar@egy#2% + \else\ifnum#1#2>20 huszon\@@magyar@egy#2% + \else\ifnum#1#2=20 h\'usz% + \else\ifnum#1#2>10 tizen\@@magyar@egy#2% + \else\ifnum#1#2=10 t\'iz% + \else \@@magyar@egy#2% ``ktszzadik'' + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi +}% +\def\@@magyar@egy#1{% + \ifcase#1 \or egy\or kett\H{o}\or h\'arom\or n\'egy\or + \"ot\or hat\or h\'et\or nyolc\or kilenc\fi% +} +%** Same as \@hunumeral, but uppercase +\def\@Hunumeral#1{% + % Dat: \newlabel{hellopart}{{Els\H o}{3}} is correctly written out + \ifcase#1 Nulla\or Egy\or Kett\H{o}\or H\'arom\or N\'egy\or + \"Ot\or Hat\or H\'et\or Nyolc\or Kilenc\else\@@magyar@uppernum\@hunumeral{#1}\fi +} +\def\hunumeral#1{\expandafter\@hunumeral\csname c@#1\endcsname} +\def\Hunumeral#1{\expandafter\@Hunumeral\csname c@#1\endcsname} + +\@gobble +{^}% + +% --- Appending suffixes to numbers; told= + +\ifnum\magyar@opt@@told=0 \@@magyar@skiplong\fi +% Dat: double accent combinations: +adik,+a,+as,+ad +hoz,+an,+on,+at,+ban... + +% vvv Terminal suffix variants + +% Dat: meaning of classes(#1): {\ifcase 0\or 1\or 2\or 3\or 4\or 5\or 6\or 7\or 8\or 9\or 10\or 11/-1\or 12/-2\or 100\or 1000\or 10^6\or 10^9\or 20\or 30\or 40\or 60\fi} +% Dat: ...@st is is special for appending +t to \refstruc names +\def\@@magyar@suffix@adik#1{\ifnum#1=1 s\H o\else + \ifcase#1 a\or e\or o\or a\or e\or\"o\or o\or e\or a\or e\or e\or e\or e\or a\or e\or a\or a\or a\or a\or e\or a\or e\or e\fi dik\fi}% +\def\@@magyar@suffix@a#1{\ifcase #1 a\or je\or a\or a\or e\or e\or a\or e\or a\or e\or e\or e\or e\or a\or e\or a\or a\or a\or a\or e\or a\fi}% +\def\@@magyar@suffix@as#1{\ifcase #1 \or e\or e\or a\or e\or\"o\or o\or e\or a\or e\or e\or e\or e\or a\or e\or \or a\or a\or a\or e\or a\fi s}% +\def\@@magyar@suffix@ad#1{\ifcase #1 a\or e\or e\or a\or e\or\"o\or o\or e\or a\or e\or e\or e\or e\or a\or e\or a\or a\or a\or a\or e\or a\fi d}% +\def\@@magyar@suffix@@hoz#1#2{\ifcase#2 o\or e\or\"o\or o\or e\or\"o\or o\or e\or o\or e\or e\or e\or\"o\or o\or e\or o\or o\or o\or o\or e\or o\fi#1}% +\def\@@magyar@suffix@@an#1{\ifcase #1 \or e\or e\or a\or e\or e\or a\or e\or a\or e\or e\or e\or e\or a\or e\or a\or a\or a\or a\or e\or a\fi n}% +\def\@@magyar@suffix@on#1{\ifcase #1 \or e\or \or o\or e\or\"o\or o\or e\or a\or e\or e\or e\or e\or o\or e\or \or o\or o\or o\or e\or o\fi n}% +\def\@@magyar@suffix@st#1{\ifcase #1 \or \or \or \or e\or \or \or \or \or \or \or \or \or \or \or \or \or \or \or \or \fi t}% +\def\@@magyar@suffix@@at#1{\ifcase #1 \or e\or \or a\or e\or\"o\or o\or e\or a\or e\or e\or e\or \or a\or e\or \or a\or a\or a\or e\or a\fi t}% +\def\@@magyar@suffix@@a#1#2{\ifcase #2 a\or e\or e\or a\or e\or e\or a\or e\or a\or e\or e\or e\or e\or a\or e\or a\or a\or a\or a\or e\or a\fi#1}% +\def\@@magyar@suffix@nal#1{n\ifcase #1 \'a\or \'e\or \'e\or\'a\or \'e\or \'e\or\'a\or \'e\or\'a\or \'e\or \'e\or \'e\or \'e\or\'a\or \'e\or \'a\or \'a\or \'a\or\'a\or \'e\or\'a\fi l}% +\def\@@magyar@suffix@@ol#1{\ifcase #1 \'o\or\H o\or\H o\or\'o\or\H o\or\H o\or\'o\or\H o\or\'o\or\H o\or\H o\or\H o\or\H o\or\'o\or\H o\or \'o\or \'o\or \'o\or\'o\or\H o\or\'o\fi l}% +\def\@@magyar@suffix@ul#1{\ifcase #1 u\or \"u\or \"u\or u\or \"u\or \"u\or u\or \"u\or u\or \"u\or \"u\or \"u\or \"u\or u\or \"u\or u\or u\or u\or u\or \"u\or u\fi l}% +\def\@@magyar@suffix@val#1{\ifcase #1 va\or gye\or ve\or ma\or gye\or te\or ta\or te\or ca\or ce\or ze\or gye\or ve\or za\or re\or va\or da\or sza\or ca\or ne\or na\fi l}% +% @example: \atold(2.31)+es+sel{} +\def\@@magyar@suffix@sal#1{\ifcase #1 sa\or se\or se\or sa\or se\or se\or sa\or se\or sa\or se\or se\or se\or se\or sa\or se\or sa\or sa\or sa\or sa\or se\or sa\fi l}% +% @example: \atold(2.31)+ed+del{} +\def\@@magyar@suffix@dal#1{\ifcase #1 da\or de\or de\or da\or de\or de\or da\or de\or da\or de\or de\or de\or de\or da\or de\or da\or da\or da\or da\or de\or da\fi l}% +% @example: \atold(2.31)+edik+kel{} +\def\@@magyar@suffix@kal#1{\ifcase #1 ka\or ke\or ke\or ka\or ke\or ke\or ka\or ke\or ka\or ke\or ke\or ke\or ke\or ka\or ke\or ka\or ka\or ka\or ka\or ke\or da\fi l}% +\def\@@magyar@suffix@an{\@@magyar@suffix@@an}% make \ifx\@@magyar@suffix@an faster +\def\@@magyar@suffix@at{\@@magyar@suffix@@at}% make \ifx\@@magyar@suffix@at faster +\def\@@magyar@suffix@hoz{h\@@magyar@suffix@@hoz z} +\def\@@magyar@suffix@ban{b\@@magyar@suffix@@a n} +\def\@@magyar@suffix@nak{n\@@magyar@suffix@@a k} +\def\@@magyar@suffix@ba{b\@@magyar@suffix@@a \@empty} +\def\@@magyar@suffix@ra{r\@@magyar@suffix@@a \@empty} +\def\@@magyar@suffix@bol{b\@@magyar@suffix@@ol} +\def\@@magyar@suffix@tol{t\@@magyar@suffix@@ol} +\def\@@magyar@suffix@rol{r\@@magyar@suffix@@ol} +\def\@@magyar@suffix@szor{sz\@@magyar@suffix@@hoz r} + +% vvv Continued suffix variants + +\def\@@magyar@skipfi\fi\else{\fi}% +%** Usage: \@@magyar@suffix@aS{5}\magyar@@suffix@hoz +\def\@@magyar@suffix@aS#1#2{% + \ifnum#2=5 \ifx#1\@@magyar@suffix@at \"oset\else\@@magyar@skipfi\fi\else + \ifcase#2 \or e\or e\or a\or e\or \"o\or o\or e\or a\or e\or e\or e\or e\or a\or e\or \or a\or a\or a\or e\or a\fi s% + \expandafter\expandafter\expandafter\expandafter\expandafter\expandafter + \ifx#1\@@magyar@suffix@val\@@magyar@suffix@sal\else#1\fi % +es+vel -> +es+sel + % Imp: +ad+val, +adik+val etc. + \ifcase#2 3\or 1\or 1\or 3\or 1\or 5\or 3\or 1\or 3\or 1\or 1\or 1\or 1\or 3\or 1\or 3\or 3\or 3\or 3\or 1\or 3\fi + \fi +}% +\def\@@magyar@suffix@aD#1#2{% + \ifcase#2 \or e\or e\or a\or e\or \"o\or o\or e\or a\or e\or e\or e\or e\or a\or e\or \or a\or a\or a\or e\or a\fi d% + \expandafter\expandafter\expandafter\expandafter\expandafter\expandafter + \ifx#1\@@magyar@suffix@val\@@magyar@suffix@dal\else#1\fi % +ed+vel -> +ed+del + \ifcase#2 3\or 1\or 1\or 3\or 1\or 5\or 3\or 1\or 3\or 1\or 1\or 1\or 1\or 3\or 1\or 3\or 3\or 3\or 3\or 1\or 3\fi +}% +\def\@@magyar@suffix@adiK#1#2{% + \ifnum#2=1 \ifx#1\@@magyar@suffix@at s\"ot\else\@@magyar@skipfi\fi\else + \ifcase#2 \or e\or e\or a\or e\or \"o\or o\or e\or a\or e\or e\or e\or e\or a\or e\or \or a\or a\or a\or e\or a\fi dik% + \expandafter\expandafter\expandafter\expandafter\expandafter\expandafter + \ifx#1\@@magyar@suffix@val\@@magyar@suffix@kal\else#1\fi % +edik+vel -> +ed+kel + \ifcase#2 3\or 1\or 1\or 3\or 1\or 1\or 3\or 1\or 3\or 1\or 1\or 1\or 1\or 3\or 1\or 3\or 3\or 3\or 3\or 1\or 3\fi + \fi +}% +\def\@@magyar@suffix@A#1#2{% + \ifcase#2 \'a\or j\'e\or \'a\or \'a\or \'e\or \'e\or \'a\or \'e\or \'a\or \'e\or \'e\or \'e\or \'e\or \'a\or \'e\or \'a\or\'a\or\'a\or\'a\or\'e\or\'a\fi + \ifx#1\@@magyar@suffix@at t\else + \ifx#1\@@magyar@suffix@an n\else% Dat: suffix overload: 2-a-an => 2-n + \expandafter#1\ifcase#2 3\or 1\or 1\or 3\or 1\or 1\or 3\or 1\or 3\or 1\or 1\or 1\or 1\or 3\or 1\or 3\or 3\or 3\or 3\or 1\or 3\fi + \fi\fi +}% +\def\@@magyar@suffix@@bad#1#2{\@@magyar@error{Unknown suffix \string`#1' for \string\told}} + +% vvv Input suffix parser + +%** Also defined elsewhere. +%** @param #2 \else...\else...\fi...\fi etc. +\def\@@magyar@swaprelax#1#2\relax{#2#1} +%\def\@@magyar@swapno#1\noexpand{...} +\def\@@magyar@contn#1\relax{#1\@@magyar@told@cont{}} +\def\@@magyar@conta#1#2#3\relax{#3\noexpand#1\@@magyar@told@cont{#2}} +\def\@@magyar@badsuffix#1#2\relax{#2\noexpand\@@magyar@suffix@@bad{#1}\@@magyar@told@cont{#1}}% +\def\@@magyar@fs@#1{% + \if a\noexpand#1\@@magyar@swaprelax\@@magyar@fs@a\else + \if b\noexpand#1\@@magyar@swaprelax\@@magyar@fs@b\else + \if d\noexpand#1\@@magyar@swaprelax\@@magyar@fs@d\else + \if e\noexpand#1\@@magyar@swaprelax\@@magyar@fs@e\else + \if h\noexpand#1\@@magyar@swaprelax\@@magyar@fs@h\else + \if k\noexpand#1\@@magyar@swaprelax\@@magyar@fs@k\else + \if n\noexpand#1\@@magyar@swaprelax\@@magyar@fs@n\else + \if o\noexpand#1\@@magyar@swaprelax\@@magyar@fs@o\else + \if r\noexpand#1\@@magyar@swaprelax\@@magyar@fs@r\else + \if s\noexpand#1\@@magyar@swaprelax\@@magyar@fs@s\else + \if t\noexpand#1\@@magyar@swaprelax\@@magyar@fs@t\else + \if u\noexpand#1\@@magyar@swaprelax\@@magyar@fs@u\else + \if v\noexpand#1\@@magyar@swaprelax\@@magyar@fs@v\else + % Imp: SUXX: badsuffix doesn't work for +qal here -- fix error reporting + \@@magyar@badsuffix{#1}{}\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\relax +} +\def\@@magyar@fs@a#1{% + %\if -\noexpand#1\@@magyar@swapno\else + \if +\noexpand#1\noexpand\@@magyar@suffix@A\@@magyar@swaprelax\@@magyar@fs@\else + \if d\noexpand#1\@@magyar@swaprelax\@@magyar@fs@ad\else + \if n\noexpand#1\noexpand\@@magyar@suffix@an\@@magyar@contn\else + \if s\noexpand#1\@@magyar@swaprelax\@@magyar@fs@as\else + \if t\noexpand#1\noexpand\@@magyar@suffix@at\@@magyar@contn\else + \@@magyar@conta\@@magyar@suffix@a{#1}% + \fi\fi\fi\fi\fi\relax +} +\def\@@magyar@fs@ad#1{% + %\if -\noexpand#1\@@magyar@swapno\else + \if +\noexpand#1\noexpand\@@magyar@suffix@aD\@@magyar@swaprelax\@@magyar@fs@\else + \if i\noexpand#1\@@magyar@swaprelax\@@magyar@fs@adi\else + \@@magyar@conta\@@magyar@suffix@ad{#1}% + \fi\fi\relax +} +\def\@@magyar@fs@adi#1{% + \if k\noexpand#1\@@magyar@swaprelax\@@magyar@fs@adik\else + \@@magyar@badsuffix{adi#1}{}\fi\relax +} +\def\@@magyar@fs@adik#1{% + %\if -\noexpand#1\@@magyar@swapno\else + \if +\noexpand#1\noexpand\@@magyar@suffix@adiK\@@magyar@swaprelax\@@magyar@fs@\else + \@@magyar@conta\@@magyar@suffix@adik{#1}% + \fi\relax +} +\def\@@magyar@fs@as#1{% + %\if -\noexpand#1\@@magyar@swapno\else + \if +\noexpand#1\noexpand\@@magyar@suffix@aS\@@magyar@swaprelax\@@magyar@fs@\else + \@@magyar@conta\@@magyar@suffix@as{#1}% + \fi\relax +} +\def\@@magyar@fs@b#1{% + \if a\noexpand#1\@@magyar@swaprelax\@@magyar@fs@ba\else + \if e\noexpand#1\@@magyar@swaprelax\@@magyar@fs@ba\else + \if o\noexpand#1\@@magyar@swaprelax\@@magyar@fs@bo\else + \@@magyar@badsuffix{b#1}{}\fi\fi\fi\relax +} +\def\@@magyar@fs@ba#1{% + \if n\noexpand#1\noexpand\@@magyar@suffix@ban\@@magyar@contn\else + \@@magyar@conta\@@magyar@suffix@ba{#1}% + \fi\relax +} +\def\@@magyar@fs@bo#1{% + \if l\noexpand#1\noexpand\@@magyar@suffix@bol\@@magyar@contn\else + \@@magyar@badsuffix{bo#1}{}\fi\relax +} +\def\@@magyar@fs@d#1{% + \if a\noexpand#1\@@magyar@swaprelax\@@magyar@fs@da\else + \if e\noexpand#1\@@magyar@swaprelax\@@magyar@fs@da\else + \@@magyar@badsuffix{d#1}{}\fi\fi\relax +} +\def\@@magyar@fs@da#1{% + \if l\noexpand#1\noexpand\@@magyar@suffix@dal\@@magyar@contn\else + \@@magyar@badsuffix{da#1}{}\fi\relax +} +\def\@@magyar@fs@e#1{% + \if d\noexpand#1\@@magyar@swaprelax\@@magyar@fs@ad\else + \if s\noexpand#1\@@magyar@swaprelax\@@magyar@fs@as\else + \if t\noexpand#1\noexpand\@@magyar@suffix@at\@@magyar@contn\else + \if n\noexpand#1\noexpand\@@magyar@suffix@an\@@magyar@contn\else + \if +\noexpand#1\noexpand\@@magyar@suffix@A\@@magyar@swaprelax\@@magyar@fs@\else + %\@@magyar@badsuffix{e#1}{} + \@@magyar@conta\@@magyar@suffix@a{#1}{}% + \fi\fi\fi\fi\fi\relax +} +\def\@@magyar@fs@h#1{% + \if e\noexpand#1\@@magyar@swaprelax\@@magyar@fs@ho\else + \if o\noexpand#1\@@magyar@swaprelax\@@magyar@fs@ho\else + \@@magyar@badsuffix{h#1}{}\fi\fi\relax +} +\def\@@magyar@fs@ho#1{% + \if z\noexpand#1\noexpand\@@magyar@suffix@hoz\@@magyar@contn\else + \@@magyar@badsuffix{ho#1}{}\fi\relax +} +\def\@@magyar@fs@k#1{% + \if a\noexpand#1\@@magyar@swaprelax\@@magyar@fs@ka\else + \if e\noexpand#1\@@magyar@swaprelax\@@magyar@fs@ka\else + \@@magyar@badsuffix{k#1}{}\fi\fi\relax +} +\def\@@magyar@fs@ka#1{% + \if l\noexpand#1\noexpand\@@magyar@suffix@kal\@@magyar@contn\else + \@@magyar@badsuffix{ka#1}{}\fi\relax +} +\def\@@magyar@fs@n#1{% + \if a\noexpand#1\@@magyar@swaprelax\@@magyar@fs@na\else + \if e\noexpand#1\@@magyar@swaprelax\@@magyar@fs@na\else + \@@magyar@badsuffix{n#1}{}\fi\fi\relax +} +\def\@@magyar@fs@na#1{% + \if k\noexpand#1\noexpand\@@magyar@suffix@nak\@@magyar@contn\else + \if l\noexpand#1\noexpand\@@magyar@suffix@nal\@@magyar@contn\else + \@@magyar@badsuffix{na#1}{}\fi\fi\relax +} +\def\@@magyar@fs@o#1{% + \if d\noexpand#1\@@magyar@swaprelax\@@magyar@fs@ad\else + \if n\noexpand#1\noexpand\@@magyar@suffix@on\@@magyar@contn\else + \if s\noexpand#1\@@magyar@swaprelax\@@magyar@fs@as\else + \if t\noexpand#1\noexpand\@@magyar@suffix@at\@@magyar@contn\else + \@@magyar@badsuffix{o#1}{}\fi\fi\fi\fi\relax +} +\def\@@magyar@fs@r#1{% + \if a\noexpand#1\noexpand\@@magyar@suffix@ra\@@magyar@contn\else + \if e\noexpand#1\noexpand\@@magyar@suffix@ra\@@magyar@contn\else + \if o\noexpand#1\@@magyar@swaprelax\@@magyar@fs@ro\else + \@@magyar@badsuffix{r#1}{}\fi\fi\fi\relax +} +\def\@@magyar@fs@ro#1{% + \if l\noexpand#1\noexpand\@@magyar@suffix@rol\@@magyar@contn\else + \@@magyar@badsuffix{ro#1}{}\fi\relax +} +\def\@@magyar@fs@s#1{% + \if z\noexpand#1\@@magyar@swaprelax\@@magyar@fs@sz\else + \if a\noexpand#1\@@magyar@swaprelax\@@magyar@fs@sa\else + \if e\noexpand#1\@@magyar@swaprelax\@@magyar@fs@sa\else + \if t\noexpand#1\noexpand\@@magyar@suffix@st\@@magyar@contn\else + \@@magyar@badsuffix{s#1}{}\fi\fi\fi\fi\relax +} +\def\@@magyar@fs@sa#1{% + \if l\noexpand#1\noexpand\@@magyar@suffix@sal\@@magyar@contn\else + \@@magyar@badsuffix{sa#1}{}\fi\relax +} +\def\@@magyar@fs@sz#1{% + \if o\noexpand#1\@@magyar@swaprelax\@@magyar@fs@szo\else + \if e\noexpand#1\@@magyar@swaprelax\@@magyar@fs@szo\else + \@@magyar@badsuffix{sz#1}{}\fi\fi\relax +} +\def\@@magyar@fs@szo#1{% + \if r\noexpand#1\noexpand\@@magyar@suffix@szor\@@magyar@contn\else + \@@magyar@badsuffix{szo#1}{}\fi\relax +} +\def\@@magyar@fs@t#1{% + \if o\noexpand#1\@@magyar@swaprelax\@@magyar@fs@to\else% Dat: works even if #1 is empty + \@@magyar@conta\@@magyar@suffix@at{#1}% + \fi\relax +} +\def\@@magyar@fs@to#1{% + \if l\noexpand#1\noexpand\@@magyar@suffix@tol\@@magyar@contn\else + \@@magyar@badsuffix{to#1}{}\fi\relax +} +\def\@@magyar@fs@u#1{% + \if l\noexpand#1\noexpand\@@magyar@suffix@ul\@@magyar@contn\else + \@@magyar@badsuffix{u#1}{}\fi\relax +} +\def\@@magyar@fs@v#1{% + \if a\noexpand#1\@@magyar@swaprelax\@@magyar@fs@va\else + \if e\noexpand#1\@@magyar@swaprelax\@@magyar@fs@va\else + \@@magyar@badsuffix{v#1}{}\fi\fi\relax +} +\def\@@magyar@fs@va#1{% + \if l\noexpand#1\noexpand\@@magyar@suffix@val\@@magyar@contn\else + \@@magyar@badsuffix{va#1}{}\fi\relax +} + +% vvv Classification + +% Old: \def\@@magyar@skipor#1\or#2\fi{\fi#1}% +%** Usage: \expandafter\@@magyar@skipor\expandafter\token\ifcase ... \else ... \or\else\fi +\def\@@magyar@skipor#1\or{\@@magyar@skipelse#1\else}% +\def\@@magyar@skipelse#1\else#2\fi{\fi#1}% + +%** Usage: \@@magyar@classify@none{N}{...} +%** Reads till \vfuzz, considers the last decimal number, ignores space, +%** punctuation and the minus `-' sign. Ignores spaces, so `1 2' and `12' are +%** treated the same number. There must ne no `{' or `}' inside `...'. +%** x ends by 0..9, y ends by 1..9 below. +%** @expands to: +%** c0: 0 +%** c1: 1 +%** c2: x2 ... +%** c9: x9 +%** c10: x10 +%** c11: x1 +%** c12: x2 +%** c13: y00 +%** c14: y000 y0000 y00000 +%** c15: y000000 y0000000 y00000000 +%** c16: x000000000 +%** c17: x20 +%** c18: x30 +%** c19: x40 x50 x70 x90 +%** c20: x60 x80 +%** On error, expansion doesn't start with `c' +%** @param #1 default classification, if no (more) numbers found +%** @param #2 next token +\def\@@magyar@classify@none#1#2{% + \if\noexpand#20\@@magyar@swaprelax{\@@magyar@classify@none{c0}}\else + % Dat: smart way to test whether #1 is in 1..9: \ifnum0<0\string#1 foo\fi + \ifnum0<0\string#2 \@@magyar@swaprelax{\@@magyar@classify@single#2}\else + \if\noexpand#2- \@@magyar@swaprelax{\@@magyar@classify@neg{#1}}\else + \ifx#2\vfuzz \@@magyar@swaprelax{#1}\else% stop processing if terminating \vfuzz is found + \@@magyar@swaprelax{\@@magyar@classify@none{#1}}% find next (possibly) number + % ^^^ Dat: it is safe to call \@@magyar@swaprelax here, even if #2 contains \relax + \fi\fi\fi\fi\relax +} +\def\@@magyar@classify@neg#1#2{% + \if\noexpand#20\@@magyar@swaprelax{\@@magyar@classify@none{c0}}\else + % Dat: smart way to test whether #1 is in 1..9: \ifnum0<0\string#1 foo\fi + \ifnum0<0\string#2 \@@magyar@swaprelax{\@@magyar@classify@singleneg#2}\else + \if\noexpand#2- \@@magyar@swaprelax{\@@magyar@classify@none{#1}}\else% double negation + \ifx#2\vfuzz \@@magyar@swaprelax{#1}\else% stop processing if terminating \vfuzz is found + \@@magyar@swaprelax{\@@magyar@classify@none{#1}}% find next (possibly) number, start as positive + % ^^^ Dat: it is safe to call \@@magyar@swaprelax here, even if #2 contains \relax + \fi\fi\fi\fi\relax +} +%** @param #1 previous digit 1..9 +%** @param #2 next token +\def\@@magyar@classify@single#1#2{% + \if\noexpand#20\@@magyar@swaprelax{\@@magyar@classify@tens#1}\else + \ifnum0<0\string#2 \@@magyar@swaprelax{\@@magyar@classify@more#2}\else + \ifx#2\vfuzz \@@magyar@swaprelax{c#1}\else + \@@magyar@swaprelax{\@@magyar@classify@none{c#1}#2}% + % ^^^ Dat: it is safe to call \@@magyar@swaprelax here, even if #2 contains \relax + \fi\fi\fi\relax +} +%** @param #1 previous digit 1..9 +%** @param #2 next token +\def\@@magyar@classify@singleneg#1#2{% + \if\noexpand#20\@@magyar@swaprelax{\@@magyar@classify@tens#1}\else + \ifnum0<0\string#2 \@@magyar@swaprelax{\@@magyar@classify@more#2}\else + \ifx#2\vfuzz \@@magyar@swaprelax{c\ifcase#1 0\or11\or12\else#1\fi}\else % turn `-1' -> `11' and `-2' to `12' + \if#11\@@magyar@swaprelax{\@@magyar@classify@neg{c11}#2}\else + \if#12\@@magyar@swaprelax{\@@magyar@classify@neg{c12}#2}\else + \@@magyar@swaprelax{\@@magyar@classify@neg{c#1}#2}% + % ^^^ Dat: it is safe to call \@@magyar@swaprelax here, even if #2 contains \relax + \fi\fi\fi\fi\fi\relax +} +%** @param #1 previous digit 1..9 +%** @param #2 next token +\def\@@magyar@classify@more#1#2{% + \if\noexpand#20\@@magyar@swaprelax{\@@magyar@classify@tens#1}\else + \ifnum0<0\string#2 \@@magyar@swaprelax{\@@magyar@classify@more#2}\else + \@@magyar@swaprelax{% + \expandafter\@@magyar@skipor\expandafter\@@magyar@classify@none + \ifcase#1 M\or {c11}\or {c12}\else {c#1}\or\else\fi#2}% + % ^^^ Dat: it is safe to call \@@magyar@swaprelax here, even if #2 contains \relax + \fi\fi\relax +} +%** @param #1 prev-prev digit, 1..9 +%** @param #2 next token +\def\@@magyar@classify@tens#1#2{% + \if\noexpand#20\@@magyar@swaprelax{\@@magyar@classify@zeroes2}\else + \ifnum0<0\string#2 \@@magyar@swaprelax{\@@magyar@classify@more#2}\else + \@@magyar@swaprelax{% + \expandafter\@@magyar@skipor\expandafter\@@magyar@classify@none + \ifcase#1 T\or{c10}\or{c17}\or{c18}\or{c19}\or{c19}\or{c20}\or{c19}\or{c20}\else{c19}\or\else\fi#2}% + % ^^^ Dat: it is safe to call \@@magyar@swaprelax here, even if #2 contains \relax + \fi\fi\relax +} +%** @param #1 zero-count 2..9 +%** @param #2 next token +\def\@@magyar@classify@zeroes#1#2{% + \if\noexpand#20\@@magyar@swaprelax{% + %\def\foo#1,{.(#1)} + %\message{\expandafter\expandafter\expandafter\foo\expandafter + % \@@magyar@skipor\ifcase3 zero\or one\or two\else three\or\fi,done} + \expandafter\@@magyar@skipor\expandafter\@@magyar@classify@zeroes + %\ifcase#1 Y\or Y\or 3\or 4\or 5\or 6\or 7\or 8\or 9\or 9\or% Dat: no \else + \ifcase#1 Y\or Y\or 3\or 4\or 5\or 6\or 7\or 8\else 9% + \or\else\fi}\else% ^^^ Dat: 2 -> 3 ... 8 -> 9, 9 -> 9 + \ifnum0<0\string#2 \@@magyar@swaprelax{\@@magyar@classify@more#2}\else + \@@magyar@swaprelax{% + \expandafter\@@magyar@skipor\expandafter\@@magyar@classify@none + \ifcase#1 Z\or Z\or {c13}\or {c14}\or {c14}\or {c14}\or {c15}\or {c15}\or + {c15}\else {c16}\or\else\fi#2}% + % ^^^ Dat: it is safe to call \@@magyar@swaprelax here, even if #2 contains \relax + \fi\fi\relax +} + +% vvv The user interface for suffixing + +\def\@@magyar@ccheck#1#2\vfuzz#3{% + \if\noexpand#1c\relax\else + \@@magyar@error{\string\told\space needs number, not \string`#3'}% + \def\reserved@a{c0}% + \fi +} + +%** Expands #1 with \the if it is \cs (possibly \count or \toks etc.) +\def\@@magyar@the#1{% + \ifx#1\relax\else\if\noexpand\noexpand\noexpand#1% + \expandafter\expandafter\expandafter\the\fi\fi#1% +}% + +\def\@@magyar@firsthfuzz#1#2\hfuzz{#1} +\def\@@magyar@secondhfuzz#1#2#3\hfuzz{#2} +%** See docs in magyar.dtx +\def\@@magyar@zerocite#1{% + \ifx[#1\expandafter\@secondoftwo\fi\@thirdofthree\@firstoftwo + {\@@magyar@zerocite@lowa[, }% had `[' + {\@@magyar@zerocite@lowa[]{#1}}% +} +\def\@@magyar@zerocite@lowa[#1]#2{[\@@magyar@zerocite@lowb#2,\hbox,${#1}} +\def\@@magyar@swapvfuzz#1#2\vfuzz{#2#1} +\def\@@magyar@zerocite@lowb#1#2,{% + \ifx\hfuzz#1\hfuzz + \else\ifx\hbox#1\@@magyar@swapvfuzz\@@magyar@zerocite@lowc + \else\ifx,#1\@@magyar@swapvfuzz\@@magyar@zerocite@lowb{#2,}% + \else\expandafter\ifx\csname b@#1#2\endcsname\relax + 0, \@@magyar@swapvfuzz\@@magyar@zerocite@lowb + \else\expandafter\expandafter\expandafter\@@magyar@b@number + \expandafter\expandafter\expandafter{\csname b@#1#2\endcsname}, + \@@magyar@swapvfuzz\@@magyar@zerocite@lowb + \fi\fi\fi\fi\vfuzz} +\def\@@magyar@zerocite@lowc$#1{]#1} + +%** Expands to the numeric value of a \b@foobar definition +%** Dat: with natbib.sty, we get \def\b@foobar{{1}{...}...}, +%** otherwise something like \def\b@foobar{\... 1} +%** @param #1 value of a \b@foobar +\def\@@magyar@b@number{% + \expandafter\ifx\csname ver@natbib.sty\endcsname\relax + \expandafter\@firstofone + \else \expandafter\@@magyar@b@number@natbibone \fi +} +\def\@@magyar@b@number@natbibone#1{\@@magyar@b@number@natbibtwo#1.\vfuzz} +\def\@@magyar@b@number@natbibtwo#1#2\vfuzz{#1}% + +\def\@@magyar@zeroaref#1{% + % Dat: we cannot use \@ifnextchar here, because it is not expandable + \ifx(#1\expandafter\@secondoftwo\fi\@thirdofthree\@firstoftwo + {\@@magyar@zeroref}{% Dat: gobble the ( + \ifx*#1\expandafter\@secondoftwo\fi\@thirdofthree\@firstoftwo + {\NotAllowedArefStar\@@magyar@zeropageref}% Dat: gobble the * + {\@@magyar@zeroref{#1}}% + {\@@magyar@zeroref{#1}}}% +} + +\def\@@magyar@zeroapageref#1{% + % Dat: we cannot use \@ifnextchar here, because it is not expandable + \ifx*#1\expandafter\@secondoftwo\fi\@thirdofthree\@firstoftwo + {\NotAllowedApagerefStar\@@magyar@zeropageref}% Dat: gobble the * + {\@@magyar@zeropageref{#1}}% +} + +\def\@@magyar@zeroref#1{% + \expandafter\ifx\csname r@#1\endcsname\relax0\else + \expandafter\expandafter\expandafter\@@magyar@firsthfuzz\csname r@#1\endcsname00\hfuzz + \fi +}% +\def\@@magyar@zeroeqref#1{(\@@magyar@zeroref{#1})}% +\def\@@magyar@zerorefplus#1{\@@magyar@zerorefplus@low#1+\vfuzz} +\def\@@magyar@zerorefplus@low#1+#2\vfuzz{% + \expandafter\ifx\csname r@#1\endcsname\relax0\else + \expandafter\expandafter\expandafter\@@magyar@firsthfuzz\csname r@#1\endcsname00\hfuzz + \fi +}% +\def\@@magyar@zeropageref#1{% + \expandafter\ifx\csname r@#1\endcsname\relax0\else + \expandafter\expandafter\expandafter\@@magyar@secondhfuzz\csname r@#1\endcsname00\hfuzz + \fi +}% + +%** A space might be discared after the suffix, depending on the suffix. So +%** please use `\told5+adik{} ' to ensure the space. +%** May raise `! Package magyar.ldf Error: Unknown suffix `...' for \told', but +%** emits unchanged suffix to DVI file. +%** \atold\apageref emits double article +%** \cite, \acite etc. is allowed, but without comma +%** \aref({...}), \aref*, \apageref*, \acite* aren't allowed +%** \refstruc doesn't work inside it, because \refstruc isn't expandable +%** @example \told4+a+a+a+a+adik raises strange error +%** @example no -en is provided for -an/-on, to avoid ambiguity +%** @example \told4+adik: 0-adik 1-s 2-odik 3-adik 12-edik 10^8-adik +%** @example augusztus \told20-a: 1-je 2-a 3-a 4-e 5-e 6-a ... (augusztus 20-a) +%** @example \told3+as: 0-s(??) 1-es 2-es 3-as 4-es 5-s 10^6-s +%** @example \told0+ad: 0-ad 1-ed 2-ed 3-ad 5-d 10^6-ad +%** @example \told1000+hoz: 0-hoz 3-hoz 6-hoz 8-hoz 100-hoz 10^6-hoz 10^9-hoz 1-hez 4-hez 7-hez 9-hez 10-hez 1000-hez 2-hz 5-hz +%** @example \told5+an: 5-en 2-en 100-an 10^6-n +%** @example \told5+on: 5-n 2-n 3-on 100-on 10^6-n +%** @example \told0+at: 0-t 2-t 10^6-t 1-et 4-et 7-et 9-et 10-et 1000-et 3-at 8-at 6-ot 10^9-ot 5-t +%** @example \told1000+ban: 1000-ben +%** @example \told7+ba: 7-be +%** @example \told5+nak: 7-nek +%** @example \told2+ra: 2-re +%** @example \told4+nal: 4-nl +%** @example \told7+bol: 7-bl +%** @example \told5+tol: 5-tl +%** @example \told3+rol: 3-rl +%** @example \told2+ul: 0-ul 1-l 2-l 3-ul +%** @example \told5+odik+hoz +%** @example \told{300}+szor +%** @example -i and -ig don't change have alternate forms +%** @param #1 something that expands to an integer, or `\count...' or `\toks...' +\DeclareRobustCommand \@@magyar@told{\@@magyar@xtold 0} +\DeclareRobustCommand\@@magyar@atold{\@@magyar@xtold a} +\DeclareRobustCommand\@@magyar@Atold{\@@magyar@xtold A} +\def\@@magyar@xtold#1#2+{\@@magyar@told@low{#2}#1} +%** @param #1 something that expands to an integer, or `\count...' or `\toks...' +%** @param #2 add \az? (0: no, a: lowercase A: uppercase) +\def\@@magyar@told@low#1#2{% + % Dat: a level of braces has already been stripped from #1 + % Dat: negative sign isn't important, because it is skipped by \@@magyar@classify@none + \begingroup\begingroup + \@safe@activestrue% allow active `:' inside labels + \let\@safe@activesfalse\@empty \let\@safe@activestrue\@empty% inside \b@... emitted by \cite + % vvv Dat: gobbles its arg and `-' below + % `\@@magyar@toldas{42}' must be the very end of #1 + \let\@@magyar@toldas\@gobbletwo + \let\-\relax +% \let\@@magyar@save@tilde~% + \let~\relax% influenced by \@safe@activestrue + \let\refstruc\relax \let\refstrucparen\relax + \let \ref\relax \let \pageref\relax \let \cite\relax % all unexpandable, even for \@@magyar@the + \let\aref\relax \let\apageref\relax \let\acite\relax + \let\Aref\relax \let\Apageref\relax \let\Acite\relax + \let\autoref\relax + \let\hbox\@firstofone % Make \hbox{...} work by removing the braces. TODO(pts): Make \hbox to...{...} work. + \let\@@magyar@told@optdot\@empty % The optional dot disappears. + %\set@display@protect% \string. Why?? doesn't seem to screw up \r + \set@typeset@protect% \relax. + \edef\reserved@c{#1-}% + \edef\reserved@c{\def\noexpand\reserved@c{\expandafter\@@magyar@the\reserved@c\@empty}}% `\expandafter' is here so `the' and `number' take place + % + \def\@@magyar@toldas##1{.##1.}% emit the number + \let\romannumeral\number + \def\refstruc##1{0}% + \def\refstrucparen##1{0}% + \let\@safe@activestrue\@empty% babel puts these inside \b@...: % Dat: \def\b@abook{\@safe@activesfalse 2}% (what is \@safe@actives??) + \let\@safe@activesfalse\@empty% \b@DuplanJauneau1986 ->\@safe@activesfalse 15 + \def\hyper@@link[##1]##2##3##4{##4}% Dat: \def\b@abook{\hyper@@link [cite]{}{cite.sokt}{2}}% with hyperref.sty % BUGFIX at Tue Nov 21 03:15:32 CET 2006 + % + \let\ref\@@magyar@zeroref + \let\pageref\@@magyar@zeropageref + \let\cite\@@magyar@zerocite + \let\eqref\@@magyar@zeroeqref + % + \let\aref\@@magyar@zeroaref \let\Aref\aref % Dat: supports \aref* and \aref( + \let\apageref\@@magyar@zeroapageref \let\Apageref\apageref % Dat: supports \apageref* and \apageref( + \let\acite\cite \let\Acite\acite + % + \let\autoref\ref% Dat: SUXX: ``section 1-gyel'' + \edef\reserved@a{#1}% + \edef\reserved@a{\expandafter\@@magyar@the\reserved@a\@empty}% `\expandafter' is here so `the' and `number' take place + %\let~\@@magyar@save@tilde% vvv for ~ below etc. + \if0#2\else + #2% a or A + % vvv Dat: we do \az with \romannumeral changed to \number + \expandafter\@@magyar@az@set\expandafter{\reserved@a}\hbox$% Dat: \reserved@a is already expanded, as required by \@@magyar@az@set + \nobreakspace% Dat: `~' is wrong here, it has been redefined !! + \fi + \edef\reserved@a{\noexpand\reserved@c\def\noexpand\reserved@a{\reserved@a}}% + % + \expandafter\expandafter\expandafter\endgroup\reserved@a% keep \reserved@a and \reserved@c + %%\show\reserved@a \show\reserved@c \show\@@magyar@toldas + % vvv Dat: shows friendly LaTeX error: \told{\refstruc{refstruc=}}+ban + \def\refstruc{\@@magyar@error{Cannot use \string\refstruc\space inside \string\told}\@@magyar@refstruc}% + \edef\reserved@a{\expandafter\@@magyar@classify@none\expandafter N\reserved@a\vfuzz}% + %%\show\reserved@a + \expandafter\@@magyar@ccheck\reserved@a..\vfuzz\reserved@c% + %\edef\reserved@a{{\ifcase\expandafter\@gobble\reserved@a\space 0\or1\or2\or + % 3\or4\or5\or6\or7\or8\or9\or10\or11\or12\or13\or14\or15\or16\or + % 8\or8\else 9\fi}}% 20->8 30->8 40->9 % no need for this anymore + \edef\reserved@a{{\number\expandafter\@gobble\reserved@a}}% keeps 17,18,19 for +val + \expandafter\edef\expandafter\reserved@b\expandafter{\if}.\fi\@@magyar@fs@ +} +\def\@@magyar@told@optdot{.} +%** @in \reserved@a is suffix classification in braces: {0}, {1} ... or {16} +%** @param #1 \@empty or a char token +\def\@@magyar@told@cont#1{% + \reserved@a% add the suffix class, example: {11} + #1%\if/\noexpand#1\else#1\fi% add extra char unless `/' + \if{.\fi}% close \edef\reserved@b opened in \@@magyar@told + % Now: example \reserved@b: \@@magyar@suffix@aS \@@magyar@suffix@sal {11} + % Now: example \reserved@b: \@@magyar@suffix@aS \@@magyar@suffix@val {11} + % Dat: \reserved@b is now like \@@magyar@suffix@A \@@magyar@suffix@ban + % vvv Dat: \aref in \reserved@c may modify \reserved@b, so we call it + % late by \expandafter + \expandafter\reserved@c% print the number and the hyphen + \reserved@b% print the suffix + \endgroup +} +% Dat: \told is an unused \cs in LaTeX and its standard packages +\ifnum\magyar@opt@@told>1 + \let \told\@@magyar@told + \let\atold\@@magyar@atold + \let\Atold\@@magyar@Atold +\else + \expandafter\ifx\csname told\endcsname\relax \let \told\@@magyar@told\fi + \expandafter\ifx\csname atold\endcsname\relax \let\atold\@@magyar@atold\fi + \expandafter\ifx\csname Atold\endcsname\relax \let\Atold\@@magyar@Atold\fi +\fi +\@gobble +{^}% + +% --- hutoday= + +% Dat: latex.ltx has \edef for \today, but we have \def +\def\SafeToday{\the\year/\two@digits{\the\month}/\two@digits{\the\day}:% + \two@digits{\the\count@}:\two@digits{\the\count2}} + +\ifnum\magyar@opt@@hutoday=0 \@namedef{date\CurrentOption}{\let\today\SafeToday}\@@magyar@skiplong\fi +%** Same as what latex.ltx has. Expansion doesn't change it, doesn't contain +%** accents. +\@namedef{date\CurrentOption}{% + \def\today{% + \number\year.~\ifcase\month\or + janu\'ar\or febru\'ar\or m\'arcius\or + \'aprilis\or m\'ajus\or j\'unius\or + j\'ulius\or augusztus\or szeptember\or + okt\'ober\or november\or december\fi + \space\number\day.\hbox{}}% + } +% vvv Dat: ondate... and \ontoday is specific to magyar.ldf +\@namedef{ondate\CurrentOption}{% + \number\year.~\ifcase\month\or janu\'ar\or febru\'ar\or m\'arcius\or + \'aprilis\or m\'ajus\or j\'unius\or j\'ulius\or augusztus\or szeptember\or + okt\'ober\or november\or december\fi\space\ifcase\day\or + 1-j\'en\or 2-\'an\or 3-\'an\or 4-\'en\or 5-\'en\or + 6-\'an\or 7-\'en\or 8-\'an\or 9-\'en\or 10-\'en\or + 11-\'en\or 12-\'en\or 13-\'an\or 14-\'en\or 15-\'en\or + 16-\'an\or 17-\'en\or 18-\'an\or 19-\'en\or 20-\'an\or + 21-\'en\or 22-\'en\or 23-\'an\or 24-\'en\or 25-\'en\or + 26-\'an\or 27-\'en\or 28-\'an\or 29-\'en\or 30-\'an\or + 31-\'en\fi} +\edef\reserved@a{% + \noexpand\addto\expandafter\noexpand\csname extras\CurrentOption\endcsname{% + \noexpand\babel@save\noexpand\ontoday + \let\noexpand\ontoday\expandafter\noexpand\csname ondate\CurrentOption\endcsname} +} +\reserved@a +\@gobble +{^}% + +% --- refstruc= + +\if0\magyar@opt@@refstruc \@@magyar@skiplong\fi +\def\@@magyar@nonumbers@skipa#1\@@magyar@nonumbers@s{#1\@@magyar@nonumbers@a} +%** Changes arabic and roman numbers to 1 or i, respectively. +%** Usage: \typeout{((\@@magyar@nonumbers@a 35.2.iv\hfuzz))} -> ((1.1.i)) +\def\@@magyar@nonumbers@a#1{% + \ifx#1\hfuzz \expandafter\@gobble + \else\if\noexpand#101% !! Imp: 1<1\string#1 + \else\if\noexpand#111% + \else\if\noexpand#121% + \else\if\noexpand#131% + \else\if\noexpand#141% + \else\if\noexpand#151% + \else\if\noexpand#161% + \else\if\noexpand#171% + \else\if\noexpand#181% + \else\if\noexpand#191% + \else\if\noexpand#1mi% + \else\if\noexpand#1di% + \else\if\noexpand#1ci% + \else\if\noexpand#1li% + \else\if\noexpand#1xi% + \else\if\noexpand#1vi% + \else\if\noexpand#1ii% + \else\if\noexpand#1MI% + \else\if\noexpand#1DI% + \else\if\noexpand#1CI% + \else\if\noexpand#1LI% + \else\if\noexpand#1XI% + \else\if\noexpand#1VI% + \else\if\noexpand#1II% + \else\noexpand#1\@@magyar@nonumbers@skipa + \fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi \fi + \@@magyar@nonumbers@s +} +\def\@@magyar@nonumbers@s#1{% + \ifx#1\hfuzz \expandafter\@gobble + \else\if\noexpand#10% + \else\if\noexpand#11% + \else\if\noexpand#12% + \else\if\noexpand#13% + \else\if\noexpand#14% + \else\if\noexpand#15% + \else\if\noexpand#16% + \else\if\noexpand#17% + \else\if\noexpand#18% + \else\if\noexpand#19% + \else\if\noexpand#1m% + \else\if\noexpand#1d% + \else\if\noexpand#1c% + \else\if\noexpand#1l% + \else\if\noexpand#1x% + \else\if\noexpand#1v% + \else\if\noexpand#1i% + \else\if\noexpand#1M% + \else\if\noexpand#1D% + \else\if\noexpand#1C% + \else\if\noexpand#1L% + \else\if\noexpand#1X% + \else\if\noexpand#1V% + \else\if\noexpand#1I% + \else\noexpand#1\@@magyar@nonumbers@skipa + \fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi \fi + \@@magyar@nonumbers@s +} + +\let\@@magyar@toldas\@gobble +\def\@@magyar@strucname@part{r\'esz\@@magyar@toldas{4}}% SUXX: may not contain \-; !! rsszel (vs. rszszel) +\def\@@magyar@strucname@chapter{fejezet\@@magyar@toldas{9}}% !! fejezettel +\def\@@magyar@strucname@appendix{f\"ug\-gel\'ek\@@magyar@toldas{4}}% !! fuggelekkel +\def\@@magyar@strucname@section{szakasz\@@magyar@toldas{20}}% +\def\@@magyar@strucname@subsection{al\-sza\-kasz\@@magyar@toldas{20}}% +\def\@@magyar@strucname@subsubsection{al\-al\-szakasz\@@magyar@toldas{20}}% +\def\@@magyar@strucname@subsubsubsection{al\-al\-al\-szakasz\@@magyar@toldas{20}}% +\def\@@magyar@strucname@paragraph{bekezd\'es\@@magyar@toldas{4}}% +\def\@@magyar@strucname@subparagraph{albekezd\'es\@@magyar@toldas{4}}% +\def\@@magyar@strucname@subsubparagraph{alalbekezd\'es\@@magyar@toldas{4}}% +\def\@@magyar@strucname@figure{\'ab\-ra\@@magyar@toldas{4}}% !! brban etc. +\def\@@magyar@strucname@table{t\'ab\-l\'azat\@@magyar@toldas{6}}% +\def\@@magyar@strucname@equation{egyenlet\@@magyar@toldas{7}}% +\def\@@magyar@strucname@footnote{l\'ab\-jegy\-zet\@@magyar@toldas{7}}% +\def\@@magyar@strucname@item{elem\@@magyar@toldas{4}}% !! elemmel etc. +\def\@@magyar@strucname@FancyVerbLine{sor\@@magyar@toldas{8}}% !! sorral +\def\@@magyar@strucname@theorem{t\'e-tel\@@magyar@toldas{4}}% !! ttellel + +%** Must be expandable. +%** @param #1 `section' etc. +%** @expands to its name in English +\def\@@magyar@strucname#1{#1} +%** @param #1 `section' etc. +%** @expands to its name in Hungarian +\def\@@magyar@strucname@hu#1{\csname @@magyar@strucname@#1\endcsname} + +%** Keeps only structure number, discards page number etc. +\def\@@magyar@refstruc@parse#1#2\vfuzz{% + \ifx\relax#1\let\reserved@a\relax + \else\def\reserved@a{#1}\fi +}% +%** Retrieves the structure name (arg #4) from arg 2 of a \newlabel emitted +%** by hyperref.sty. +%** @example \newlabel{fig:vonal}{{1}{1}{my title}{figure.1}{}} +%** \@namedef{r@fig:vonal}{{1}{1}{my title}{figure.1}{}} +%** -> extract `figure' to \reserved@c +\def\@@magyar@refstruc@parsehyname#1#2#3#4#5\vfuzz{% + \ifx\relax#1% + \else\expandafter\@@magyar@refstruc@parsehynamedot#4\vfuzz\fi +}% +\def\@@magyar@refstruc@parsehynamedot#1.#2\vfuzz{% + \expandafter\ifx\csname @@magyar@strucname@#1\endcsname\relax + \else\def\reserved@c{#1}\fi +} + +%** @param #1 name of a count register (e.g c@part) +\def\@@magyar@refstruc@setcnt#1{% + \expandafter\ifx\csname#1\endcsname\relax\expandafter\@tempcnta + \else\csname#1\endcsname\fi +}% + +%** @param #1 a label name +\def\@@magyar@refstruc@ref#1{% + \ref{#1}.~% +} + +%** May not touch \reserved@a +\def\@@magyar@refstruc@split#1+#2\vfuzz#3{% + \if\noexpand#30\else\@@magyar@refstruc@ref{#1}\fi + \ifx\vfuzz#2% + \textbf{??}% + \G@refundefinedtrue + \else + \begingroup + \@safe@activestrue% so active `:' etc. will work inside \csname... + \edef\reserved@c{\noexpand\@@magyar@refstruc@splitlow + \expandafter\ifx\csname r@#1\endcsname\relax\relax\else + \expandafter\noexpand\csname r@#1\endcsname\fi}% + % ^^^ Dat: would emit `undefined' instead of `\relax' w/o \ifx + \expandafter\endgroup\reserved@c{#2}% + \fi +} + +%** @param #1 csname \r@foo:bar +%** @param #2 suffix to add +\def\@@magyar@refstruc@splitlow#1#2{% + \ifx#1\relax + \textbf{??+#2}% + \G@refundefinedtrue + \else + \expandafter\@@magyar@refstruc@parse#1..\vfuzz% + \@@magyar@refstruc@work#1% + \let\@@magyar@save@m\-% + \let\-\relax + \let\@@magyar@toldas\relax + \edef\reserved@c{\expandafter\@@magyar@strucname\expandafter{\reserved@c}}% + \let\-\@@magyar@save@m + \let\@@magyar@suffix@at\@@magyar@suffix@st% fix the -t suffix + \ifx\reserved@b\@empty\else + \@@magyar@refstruc@splitb#2\vfuzz% strip `+' from the end of #2 + \fi + \fi +} + +\def\@@magyar@refstruc@splitb#1+\vfuzz{% + \expandafter\@@magyar@told\reserved@c+#1{}% fejezet -> fejezetben +} + +%** The +val suffix does not produce the desired result. +%** @param #1 \ref id or with \told +%** (@param #2 1 to prefix with 1\ref{...}.~' in Hungarian order) +%** @example \refstruc{sec:foo} +%** @example \refstruc{sec:foo+as+an} +%** May not touch \reserved@a +\def\@@magyar@refstruc@name#1{% + \begingroup + \begingroup + \@safe@activestrue% so active `:' etc. will work inside \csname... + \edef\reserved@c{\noexpand\@@magyar@refstruc@namelow + \expandafter\ifx\csname r@#1\endcsname\relax\relax\else + \expandafter\noexpand\csname r@#1\endcsname\fi}% + % ^^^ Dat: would emit `undefined' instead of `\relax' w/o \ifx + \expandafter\endgroup\reserved@c{#1}% +} + +%** @param #1 csname \r@foo:bar +%** @param #2 foo:bar +%** @param #3 1 to prefix with 1\ref{...}.~' in Hungarian order) +\def\@@magyar@refstruc@namelow#1#2#3{% + \ifx#1\relax + \@@magyar@refstruc@split#2+\vfuzz#3% ends by +suffix, needs \told + \else + \expandafter\@@magyar@refstruc@parse#1..\vfuzz% sets \reserved@a to ref target + %%\show\reserved@a% first arg of ref, i.e section number, eg. `1.2.3' -- or \relax + \if\noexpand#30\else + \begingroup% Dat: \ref might redefine \reserved@a, especially in hyperref.sty + \@@magyar@refstruc@ref{#2}\endgroup\fi + \@@magyar@refstruc@work#1% + \expandafter\@@magyar@strucname\expandafter{\reserved@c}% + \fi + \endgroup +} + +\def\@@magyar@appendix@chapapp{\appendixname}% + +%** Input is \reserved@a, output is \reserved@c +%** @param #1 the control sequence \r@foo:bar +\def\@@magyar@refstruc@work#1{% + \edef\reserved@a{\expandafter\@@magyar@nonumbers@a\reserved@a\hfuzz}% + %\expandafter\lowercase\expandafter{\expandafter\def\expandafter\reserved@a\expandafter{\reserved@a}}% + % ^^^ Dat: don't do lowercasing, deliberately. + % Imp: referring from \@alph sections such as the appendix + \@@magyar@refstruc@setcnt{c@part}1 + \@@magyar@refstruc@setcnt{c@chapter}1 + \@@magyar@refstruc@setcnt{c@section}1 + \@@magyar@refstruc@setcnt{c@subsection}1 + \@@magyar@refstruc@setcnt{c@subsubsection}1 + \@@magyar@refstruc@setcnt{c@subsubsubsection}1 + \@@magyar@refstruc@setcnt{c@paragraph}1 + \@@magyar@refstruc@setcnt{c@subparagraph}1 + \@@magyar@refstruc@setcnt{c@subsubparagraph}1 + \let\reserved@c\relax + \expandafter\@@magyar@refstruc@parsehyname#1....\vfuzz% + \ifx\reserved@c\relax% hyperref.sty and nameref.sty has helped us + \def\reserved@c{subsubparagraph}\edef \reserved@b{\csname the\reserved@c\endcsname}\ifx\reserved@a\reserved@b\else + \def\reserved@c{subparagraph}\edef \reserved@b{\csname the\reserved@c\endcsname}\ifx\reserved@a\reserved@b\else + \def\reserved@c{paragraph}\edef \reserved@b{\csname the\reserved@c\endcsname}\ifx\reserved@a\reserved@b\else + \def\reserved@c{subsubsubsection}\edef\reserved@b{\csname the\reserved@c\endcsname}\ifx\reserved@a\reserved@b\else + \def\reserved@c{subsubsection}\edef \reserved@b{\csname the\reserved@c\endcsname}\ifx\reserved@a\reserved@b\else + \def\reserved@c{subsection}\edef \reserved@b{\csname the\reserved@c\endcsname}\ifx\reserved@a\reserved@b\else + \def\reserved@c{section}\edef \reserved@b{\csname the\reserved@c\endcsname}\ifx\reserved@a\reserved@b\else + \def\reserved@c{chapter}\edef \reserved@b{\csname the\reserved@c\endcsname}\ifx\reserved@a\reserved@b\else + \def\reserved@c{appendix}\edef \reserved@b{\expandafter\ifx\csname c@chapter\endcsname\relax\else\@Alph\c@chapter\fi}\ifx\reserved@a\reserved@b\else% Imp: do this without changing counters in \appendix + \def\reserved@c{part}\edef \reserved@b{\csname the\reserved@c\endcsname}\ifx\reserved@a\reserved@b\else + %%\show\@chapapp \show\@@magyar@appendix@chapapp + \ifx\@chapapp\@@magyar@appendix@chapapp% we're in an appendix referring to a normal chapter + \def\thechapter{\@arabic\c@chapter}\fi + \def\reserved@c{subsubparagraph}\edef \reserved@b{\csname the\reserved@c\endcsname}\ifx\reserved@a\reserved@b\else + \def\reserved@c{subparagraph}\edef \reserved@b{\csname the\reserved@c\endcsname}\ifx\reserved@a\reserved@b\else + \def\reserved@c{paragraph}\edef \reserved@b{\csname the\reserved@c\endcsname}\ifx\reserved@a\reserved@b\else + \def\reserved@c{subsubsubsection}\edef\reserved@b{\csname the\reserved@c\endcsname}\ifx\reserved@a\reserved@b\else + \def\reserved@c{subsubsection}\edef \reserved@b{\csname the\reserved@c\endcsname}\ifx\reserved@a\reserved@b\else + \def\reserved@c{subsection}\edef \reserved@b{\csname the\reserved@c\endcsname}\ifx\reserved@a\reserved@b\else + \def\reserved@c{section}\edef \reserved@b{\csname the\reserved@c\endcsname}\ifx\reserved@a\reserved@b\else + \def\reserved@c{chapter}\edef \reserved@b{\csname the\reserved@c\endcsname}\ifx\reserved@a\reserved@b\else + % + \@latex@error{Unknown structure level for ref \string`\reserved@a'; + \reserved@b}\@ehc% + \def\reserved@c{??}% Dat: must be expandable + \let\reserved@b\@empty + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi +} + +\def\@@magyar@refstruc@hu#1{\@@magyar@refstruc@name{#1}1}% +% Imp: Undocumented: \refstrucparen can be used instead of \refstruc +% to format the section number inside parentheses. +\def\@@magyar@refstrucparen@hu#1{% + \begingroup + \def\@@magyar@refstruc@ref##1{\told(\ref{##1})+es{}~}% + \@@magyar@refstruc@name{#1}1% + \endgroup}% +\def\@@magyar@refstruc#1{\@@magyar@refstruc@name{#1}0~\ref{#1}}% +\def\@@magyar@refstrucparen#1{\@@magyar@refstruc@name{#1}0~(\ref{#1})}% + +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\@@magyar@refstruc + \babel@save\@@magyar@strucname + \let\@@magyar@refstruc \@@magyar@refstruc@hu + \let\@@magyar@refstrucparen \@@magyar@refstrucparen@hu + \let\@@magyar@strucname\@@magyar@strucname@hu +} + +\ifnum\magyar@opt@@refstruc \expandafter\ifx\csname refstruc\endcsname\relax1\fi>1 % 21, 2, 11, 1 + \DeclareRobustCommand\refstruc{\@@magyar@refstruc}% + \DeclareRobustCommand\refstrucparen{\@@magyar@refstrucparen}% +\fi +\@gobble +{^} + +% --- Printing dates; emitdate= + +\ifnum\magyar@opt@@emitdate=0 \@@magyar@skiplong\fi +%** @param #1 1..12 (month number) +\def\@@magyar@month@a#1{\two@digits{#1}}% +\def\@@magyar@month@b#1{\ifcase#1\or janu\'ar\or febru\'ar\or m\'arcius\or + \'aprilis\or m\'ajus\or j\'unius\or j\'ulius\or augusztus\or szeptember\or + okt\'ober\or november\or december\fi}% +\def\@@magyar@month@c#1{\ifcase#1\or jan\or feb\or m\'arc\or + \'apr\or m\'aj\or j\'un\or j\'ul\or aug\or szept\or + okt\or nov\or dec\fi.\hbox{}}% +\def\@@magyar@month@d#1{\@Roman{#1}}% + +\def\@@magyar@four@digits#1{% + \ifnum#1<10 000\else\ifnum#1<100 00\else\ifnum#1<1000 0\fi\fi\fi\number#1% +} + +\def\@@magyar@date@a#1#2#3{#1-\@@magyar@month@a{#2}-\two@digits{#3}} +\def\@@magyar@date@b#1#2#3{#1.~\@@magyar@month@b{#2} \number#3\@@magyar@told@optdot\hbox{}}% Dat: \hbox is to force \frenchspacing +\def\@@magyar@date@c#1#2#3{#1.~\@@magyar@month@c{#2} \number#3\@@magyar@told@optdot\hbox{}} +\def\@@magyar@date@d#1#2#3{#1.~\@@magyar@month@d{#2}.\ \number#3\@@magyar@told@optdot\hbox{}} +\def\@@magyar@date@e#1#2#3{#1.~\@@magyar@month@a{#2}.\ \two@digits{#3}\@@magyar@told@optdot\hbox{}} +\def\@@magyar@date@f#1#2#3{#1.~\@@magyar@month@b{#2}} +\def\@@magyar@date@g#1#2#3{#1.~\@@magyar@month@b{#2} \number#3}% Dat: \told{\@@magyar@date@g{1848}{3}{15}}+e{} +\def\@@magyar@date@h#1#2#3{#1~\@@magyar@month@b{#2}}% Imp: suffixes to months +\def\@@magyar@date@i#1#2#3{#1/\@@magyar@month@a{#2}/\two@digits{#3}}% not Hungarian + +\def\@@magyar@parsedate@a#1-#2-#3!#4\hfuzz{% ISO date: YYYY-MM-DD + \ifx\hfuzz#4\hfuzz\else \ifnum1<1\string#1\relax \ifnum1<1\string#2\relax \ifnum1<1\string#3\relax + \def\reserved@a{\@@magyar@fixdate{#1}{#2}{#3}}% + \fi\fi\fi\fi +} +\def\@@magyar@parsedate@b#1/#2/#3!#4\hfuzz{% LaTeX date: YYYY/MM/DD + \ifx\hfuzz#4\hfuzz\else \ifnum1<1\string#1\relax \ifnum1<1\string#2\relax \ifnum1<1\string#3\relax + \def\reserved@a{\@@magyar@fixdate{#1}{#2}{#3}}% + \fi\fi\fi\fi +} +\def\@@magyar@parsedate@c#1.#2.#3!#4\hfuzz{% English date: YYYY.DD.MM + \ifx\hfuzz#4\hfuzz\else \ifnum1<1\string#1\relax \ifnum1<1\string#2\relax \ifnum1<1\string#3\relax + \def\reserved@a{\@@magyar@fixdate{#1}{#3}{#2}}% + \fi\fi\fi\fi +} +\def\@@magyar@mon@jan{1}% +\def\@@magyar@mon@feb{2}% +\def\@@magyar@mon@mar{3}% +\def\@@magyar@mon@apr{4}% +\def\@@magyar@mon@maj{5}% +\def\@@magyar@mon@may{5}% english.ldf +\def\@@magyar@mon@jun{6}% +\def\@@magyar@mon@jul{7}% +\def\@@magyar@mon@aug{8}% +\def\@@magyar@mon@sze{9}% +\def\@@magyar@mon@sep{9}% english.ldf +\def\@@magyar@mon@okt{10}% +\def\@@magyar@mon@oct{10}% english.ldf +\def\@@magyar@mon@nov{11}% +\def\@@magyar@mon@dec{12}% +\def\@@magyar@parsedate@d#1. #2#3#4#5 #6!#7\hfuzz{% {2003. oktober 25} with \catcodes 12 and 10 + \ifx\hfuzz#7\hfuzz\else + % Dat: now: {#1} is {2003}, {#2#3#4#5} is {oktober}, {#6} is {25} + \ifnum1<1\string#1\relax \ifnum1<1\string#6\relax + \lowercase{% + \expandafter\ifx\csname @@magyar@mon@#2#3#4\endcsname\relax\else + %%\errmessage{(#1)(#2#3#4)(#6)}% + \edef\reserved@a{\noexpand\@@magyar@fixdate{\number#1}{\csname @@magyar@mon@#2#3#4\endcsname}{\number#6}}\fi + }% + \fi\fi\fi +} +\def\@@magyar@parsedate@e#1#2#3#4 #5, #6!#7\hfuzz{% {October 25, 2003} with \catcodes 12 and 10 + \ifx\hfuzz#7\hfuzz\else + \ifnum1<1\string#5\relax \ifnum1<1\string#6\relax + \lowercase{% + \expandafter\ifx\csname @@magyar@mon@#1#2#3\endcsname\relax\else + \edef\reserved@a{\noexpand\@@magyar@fixdate{\number#6}{\csname @@magyar@mon@#1#2#3\endcsname}{\number#5}}\fi + }% + \fi\fi\fi +} + +\def\@@magyar@parsedate@f#1/#2/#3:#4!#5\hfuzz{% LaTeX default \today: YYYY/MM/DD:XX:YY + \ifx\hfuzz#5\hfuzz\else \ifnum1<1\string#1\relax \ifnum1<1\string#2\relax \ifnum1<1\string#3\relax + \def\reserved@a{\@@magyar@fixdate{#1}{#2}{#3}}% + \fi\fi\fi\fi +} + +\def\@@magyar@stripdot@lowa#1.\relax{#1\relax}% +\def\@@magyar@stripdot@lowb#1\relax#2\relax{#1}% +%** by pts@fazekas.hu at Sun Jul 27 15:17:57 CEST 2003 +%** Expands to #1, with a single optional dot (token `.') at the end removed. +%** @param #1 a token list not containing `\relax' (sic) +\def\@@magyar@stripdot#1{\expandafter\@@magyar@stripdot@lowb\@@magyar@stripdot@lowa#1\relax.\relax}% + +%** Definies \reserved@a to {{YYYY}{MM}{DD}} (possibly fewer digits). Parsing +%** is not perfect, but can distinguish between the known formats +%** @param #1 a date in any format, will be expanded +\def\@@magyar@parsedate#1{% + %\let\@@protect\protect \let\protect\@gobble \afterassignment\restore@protect + \begingroup + \def\today{\the\year-\the\month-\the\day}% ISO format + \let\protect\string + \let\'\@firstofone% Dat: (j\'unius, janu\'ar, okt\'ober) date won't contain other accents -- I hope + \let~\space + % ^^^ change `2003.~okt\'ober 25.' to `2003. oktober 25.' + \edef\reserved@b{\def\noexpand\reserved@b{#1}}% + \expandafter\endgroup\reserved@b + \edef\reserved@b{\expandafter\@@magyar@stripdot\expandafter{\reserved@b}}% + %%\show\reserved@b\tracingmacros1 + % vvv Wizardry: deep, parsing dates + \let\reserved@a\@empty \expandafter\@@magyar@parsedate@a\reserved@b!--!\hfuzz + \ifx\reserved@a\@empty \expandafter\@@magyar@parsedate@f\reserved@b!//:!\hfuzz \fi + \ifx\reserved@a\@empty \expandafter\@@magyar@parsedate@b\reserved@b!//!\hfuzz \fi + \ifx\reserved@a\@empty \expandafter\@@magyar@parsedate@c\reserved@b!..!\hfuzz \fi + \ifx\reserved@a\@empty \expandafter\@@magyar@parsedate@d\reserved@b!. xyz !\hfuzz \fi + \ifx\reserved@a\@empty \expandafter\@@magyar@parsedate@e\reserved@b!xyz , !\hfuzz \fi + %%\show\reserved@a + \ifx\reserved@a\@empty + \@@magyar@error{Unrecognised date: \reserved@b}% + %\@@magyar@fixdate{0}{1}{1}}% + \def\reserved@a{{0}{1}{1} {\noexpand\reset@font\noexpand\bfseries \string?date\string?}}% + \else + \reserved@a% calls \@@magyar@fixdate, which sets \reserved@a + \fi + %%\show\reserved@a +}% +%** Definies \reserved@a to {{YYYY}{MM}{DD}} (possibly fewer digits) +%** @param #1 year (50..99 += 1900, 0..49 += 2000) +%** @param #2 month (1..12) +%** @param #3 day of month (1..31), validity of 29..31 not verified +\def\@@magyar@fixdate#1#2#3{% + \edef\reserved@a{\number#1}% + \ifnum\reserved@a<0 \def\reserved@a{0}\@@magyar@error{Year too small: #1}\else + \ifnum\reserved@a<10 \edef\reserved@a{200\reserved@a}\else + \ifnum\reserved@a<50 \edef\reserved@a{20\reserved@a}\else + \ifnum\reserved@a<100 \edef\reserved@a{19\reserved@a}\else + \ifnum\reserved@a<10000 \else + \def\reserved@a{0}\@@magyar@error{Year too large: #1}% + \fi\fi\fi\fi\fi + \ifnum#2<1 \@@magyar@error{Month too small: #2}\fi% Imp: reset to 0? + \ifnum#2>12 \@@magyar@error{Month too large: #2}\fi + \ifnum#3<1 \@@magyar@error{Day of month too small: #3}\fi% Imp: reset to 0? + \ifnum#3>31 \@@magyar@error{Day of month too large: #3}\fi + \edef\reserved@a{{\reserved@a}{\number#2}{\number#3}}% +} + +%** Usage: \magyar@emitdate{FMT}{DATE} or \magyar@emitdate[SUFFIX]{FMT}{DATE} +%** @example [\emitdate{b}{October 25, 2003}] +%** @example %[\emitdate{b}{x-y-z}]% ! Package magyar.ldf Error: Unrecognised date: x-y-z. +%** @example A mai dtum: [\emitdate{b}{\today}]. +%** @example [\emitdate[e]{g}{1848.15.3}] a nap, mikor elhangzott a Nemzeti dal. +%** @example [\emitdate{b}{1956-10-23}] +%** @example \told{\@@magyar@date@g{1848}{3}{115}}+a{} +%** @param SUFFIX any suffix for \told, e.g `e' or `adik+an' +%** @param DATE date in any format, will be expanded +%** @param FMT a single letter, specifies the format of the emitted date +%** a: 1848-03-15 (ISO dtumformtum, 2002-tl(?) a magyar helyesrs rsze) +%** b: 1848.\ mrcius 15. +%** c: 1848.\ mrc.\ 15. +%** d: 1848.\ III.\ 15. +%** e: 1848.\ 03.\ 15. +%** f: 1848. mrcius kzepe +%** g: 1848. mrcius 15[-e reggele] +%** h: 1848 mrcius [hnapjnak kzepe, mrciusnak kzepe, mrciusban stb.] birtokos rag +%** english.ldf: `October 25, 2003' or [UK]: `25th October 2003' +\def\@@magyar@emitdate{% + \@ifnextchar[\@@magyar@emitdate@opt{\@@magyar@emitdate@opt[]}%] +} +\def\@@magyar@emitdate@opt[#1]#2#3{% + \begingroup + \@@magyar@parsedate{#3}% + % Imp: error message if \@@magyar@told is undefined + %\show\reserved@a + \edef\reserved@a{% + \ifx\vfuzz#1\vfuzz \expandafter\noexpand\csname @@magyar@date@#2\endcsname\reserved@a + \else \noexpand\@@magyar@told{\expandafter\noexpand\csname @@magyar@date@#2\endcsname\reserved@a}+#1{}\fi + }% + %\show\reserved@a + %%\show~ + %\show\reserved@a% \told {\@@magyar@date@g {1848}{3}{15}}+e{} + \reserved@a + \endgroup +} + +\ifnum\magyar@opt@@emitdate \expandafter\ifx\csname emitdate\endcsname\relax1\fi>1 % 21, 2, 11, 1 + \let\emitdate\@@magyar@emitdate +\fi +\@gobble +{^}% + +% --- titleskip= + +\ifx\magyar@opt@@titleskip\magyar@@unchanged + \def\magyar@opt@@titleskip{\enspace}% for the appendix with appendixdot=no +\@@magyar@skiplong\fi + \expandafter\addto\csname extras\CurrentOption\endcsname{\magyar@@seccntfix}% + \let\magyar@@seccntfix\@empty + \let\magyar@@default@seccntformat\@seccntformat + \AtBeginDocument{% + % vvv \ifx added for compatiblity with other packages redefining \@seccntformat _after_ magyar.ldf has been loaded + \ifx\@seccntformat\magyar@@default@seccntformat + % \@seccntformat affects dot after the section number in the main text. + % We don't change the TOC file, because we've changed \numberline. Also + % \ps@headings in book.cls already contains a dot. + \def\magyar@@seccntfix{% + \ifx\@seccntformat\@gobble\else + \babel@save\@seccntformat + \def\@seccntformat##1{\csname the##1\endcsname.\magyar@opt@@titleskip}% + \fi + } + \fi + } + \@gobble +{^}% + +% --- footnote= + +\if0\magyar@opt@@footnote \@@magyar@skiplong\fi + %** Overrides latex.ltx. Expand old contents of \cl@#2 only once. + \def\@addtoreset#1#2{% + \begingroup + \edef\reserved@a{\noexpand\@elt{#1}}% + \expandafter\magyar@fo@consra\csname cl@#2\endcsname\gdef + \endgroup + } + %** Similar to \@cons in latex.ltx + %** Appends first-level expansion of \reserved@a + %** @param #1 a \cs + %** @param #2 \def or \gdef + \def\magyar@fo@consra{\expandafter\magyar@fo@cons\expandafter{\reserved@a}}% + %** @param #1 tokens to append + %** @param #2 a \cs + %** @param #3 \def or \gdef + \def\magyar@fo@cons#1#2#3{\expandafter#3\expandafter#2\expandafter{#2#1}}% + + % vvv Dat: \@definecounter can be called twice, \newcounter cannot + \@definecounter{footnote@add}% \newcounter{footnote@add} + %** Number of times footnote numbering has been reset + \@definecounter{footnote@ch} + + \def\magyar@fo@pickzero#1#2#3\hfuzz#4{% + \ifx\relax#1\else \def#4{{#1}{#2}}\fi% pick {#1}{#2} + } + %** Dat: footnotes inside \begin{minipage} are not affected -- intentionally. + %** Will be called by \stepcounter{...} after `\advance\c@footnote1' + \def\magyar@fo@resetzero@afterpage{% + {% { is better \begingroup, because { works in a tabular + \@tempcnta\c@footnote@add + \advance\@tempcnta\c@footnote + \let\reserved@a\@empty% default + % Dat: we ignore \@roman etc. in \thefootnote + \expandafter\expandafter\expandafter\magyar@fo@pickzero\csname r@footnote&\the\c@footnote@ch&\the\@tempcnta\endcsname00\hfuzz\reserved@a% this footnote + \ifx\reserved@a\@empty \G@refundefinedtrue\fi + % + \def\magyar@fo@@prevfn{-}% default + \advance\@tempcnta\m@ne + \expandafter\expandafter\expandafter\magyar@fo@pickzero\csname r@footnote&\the\c@footnote@ch&\the\@tempcnta\endcsname00\hfuzz\magyar@fo@@prevfn% previous footnote + \advance\@tempcnta\@ne + % + \ifx\reserved@a\magyar@fo@@prevfn\else + % Restart footnote numbering (from 1) if \label is missing for previous + % footnote, or \label reports that prev and this footnotes aren't on the + % same page. + \global\advance\c@footnote@add\c@footnote + \global\advance\c@footnote@add\m@ne + \global\c@footnote\@ne + \fi + \def\@currentlabel{\noexpand\number\c@page}% + % ^^^ Dat: \noexpand is here to make \number\c@page expanded during \shipout + \ifx\@listdepth\@mplistdepth% inside \begin{minipage} + % vvv Dat: expand \thepage both early (minipage) and late (real page) + \edef\@currentlabel{\@currentlabel-\thepage}% + \fi + \edef\reserved@a{\noexpand\label{footnote&\the\c@footnote@ch&\the\@tempcnta}}% + % ^^^ Dat: the \label command above produces correct warning (LaTeX + % Warning: Label(s) may have changed. Rerun to get cross-references + % right.), and it also produces `LaTeX Warning: There were undefined + % references.' in case a footnote is removed or changed, and also for + % the very first run. Fine. + \reserved@a + }%\endgroup + } + + \let\magyar@fo@resetzero\relax + + %\magyar@fo@cons{XY}\cl@footnote\gdef + \magyar@fo@cons{\magyar@fo@resetzero}\cl@footnote\gdef + + %\def\magyar@fo@resetadd{% + % \global\advance\c@footnote\c@footnote@add + % \global\c@footnote@add\z@ + %} + \def\magyar@fo@aftergrouprelax#1{% + \ifx#1\relax\else + \aftergroup#1% + \expandafter\magyar@fo@aftergrouprelax + \fi + } + + \def\magyar@fo@mtostar#1{% + \if#1m% + *\expandafter\magyar@fo@mtostar + \fi + } + %** Producing `m's based on the idea of David Kastrup. + %** The default `*' character is in raised position, and we also move it to + %** \@textsuperscript, so it will be double raised. But never mind. + \def\magyar@fo@thefootnote@stars{\expandafter\magyar@fo@mtostar\romannumeral\number\c@footnote000A}% + \def\magyar@fo@thefootnote@starsspmax{\ifcase\c@footnote\or*\or**\or***\or\dag\or\dag\dag\or\dag\dag\dag\else*\the\c@footnote\fi}% + \def\magyar@fo@thefootnote@arabic{\@arabic\c@footnote} + \def\magyar@fo@thempfootnote@stars{\expandafter\magyar@fo@mtostar\romannumeral\number\c@mpfootnote000 A}% + \def\magyar@fo@thempfootnote@starsspmax{\ifcase\c@mpfootnote\or*\or**\or***\or\dag\or\dag\dag\or\dag\dag\dag\else*\the\c@mpfootnote\fi}% + \def\magyar@fo@thempfootnote@arabic{\@arabic\c@mpfootnote} + + % !! indent=article must work within \maketitle for article.cls etc. + + %** Copied from article.cls, added \,. + %** Has #1, but partially applied here + \def\magyar@fo@indent@articlesp{% + \parindent1em % SUXX: impossible to acquire default value + % Dat: don't use \@makefnmark here, because it puts the footnote mark + % only to the main text + \noindent\hb@xt@1.8em{\hss\@textsuperscript{\normalfont\@thefnmark\,}}% + } + %** Same as \@makefntext in article.cls + %** Has #1, but partially applied here + \def\magyar@fo@indent@articlenosp{% + \parindent1em % SUXX: impossible to acquire default value + % Dat: don't use \@makefnmark here, because it puts the footnote mark + % only to the main text + \noindent\hb@xt@1.8em{\hss\@textsuperscript{\normalfont\@thefnmark}}% + } + \def\magyar@@fo@indent@dimensetup{% + \parindent1em % SUXX: impossible to acquire default value + %\advance\leftskip1.8em % SUXX: impossible to acquire default value + \leftskip\leftmargini % SUXX: impossible to acquire default value + } + %** Has #1, but partially applied here + \def\magyar@fo@indent@hulist{% + % Dat: superscript is emitted by \@makefnmark + % Dat: \parindent doesn't apply for the 1st par of the footnote + \magyar@@fo@indent@dimensetup + \ifvmode\noindent\hb@xt@\z@\else\hbox\fi + % ^^^ \usepackage[para]{footmisc} emits footnotes in horizontal mode + {\hss\@textsuperscript{\normalfont\@thefnmark\,}}% + } + + %** Limit the size of the footnote mark (in main text) to \normalsize. + %** Overrides latex.ltx + \def\magyar@fo@makefnmark{% + \hbox{% has \begingroup + \edef\reserved@a{\f@size}% + {\normalsize\edef\reserved@b{\def\noexpand\reserved@b{\f@size}}\expandafter}\reserved@b + \ifdim\reserved@a pt>\reserved@b pt + %\normalsize\@textsuperscript{\normalfont\footnotesize\@thefnmark}% Dat: would place index too low + \@textsuperscript{\normalfont\scriptsize\@thefnmark}% + \else\@textsuperscript{\normalfont\@thefnmark}\fi + }% + } + \let\magyar@fo@@cont@number\@empty + \def\magyar@fo@savecont{\global\edef\magyar@fo@@cont@number{\global\c@footnote\the\c@footnote\space}} + + %** \footnoterule, as defined in latex.ltx + \def\magyar@fo@defaultrule{\kern-3\p@ + \hrule \@width 2in \kern 2.6\p@} % the \hrule is .4pt high + \def\magyar@fo@fourthrule{\kern-3\p@%\hrule\hrule\hrule + \hrule \@width .25\textwidth \kern 2.6\p@} % the \hrule is .4pt high + \def\magyar@fo@onelinerule{% + \unskip% undo \vskip\skip\footins + {\normalsize% Dat: \normalfont is superfluous + \vskip1\baselineskip plus.1\baselineskip minus .1\baselineskip}% + % ^^^ Dat: plus,minus is necessary to avoid `Overfull \vbox (8.86676pt too high)' + } + \def\magyar@fo@chooserule{\relax + \ifx \@listdepth\@mplistdepth \mpfootnoterule \else + \ifnum\split@prev=\z@ \pagefootnoterule \else \splitfootnoterule + \fi + %%\typeout{\string\split@prev=\split@prev}% + \xdef\split@prev{\the\insertpenalties}% + \fi + } + + % `Szerkesztk s szerzk kziknyve, p. 116' says this about Hungarian + % footnotes. Implementation notes are marked with [...]. See better docs + % in magyarldf-doc.tex + % + % (1) Use numbering and/or stars (in upper index) for footnote marks. + % Numbering is recommended. + % [1] Use \footnotestyle{mark=...} + % (2) You can put footnotes by the editor with a star, and footnotes by the + % author with numbers. + % [2] Use \footnotestyle{huplain} in the preamble, and emit each editorial + % footnote with {\footnotestyle{editor}\footnote{Her note.}} + % (3) Don't put \footnoterule if the footnote starts on current page. + % [3] Use \footnotestyle{rule=none}. Please make sure that the group lasts + % till \shipout. + % (4) Put a \footnoterule (1/3\textwidth or 1/4\textwidth) if footnote is + % continued from previous page. + % [4] Not supported. Imp: how to? + % (5) Multiple short footnotes may be put into a single line. + % [5] \usepackage[para]{footmisc} or \usepackage{fnpara} + % (6) Footnotes for \begin{figure} and \begin{table} must be put just under + % them, not at EOP. + % [6] The author should enclose the matrial in a \begin{minipage} + % (7) The size of the \footnotemark should not be scaled up. + % [7] Use \footnotestyle{marksize=max-normal} + % (8) It is possible to use either \parindent or \item when starting a + % footnote. + % [8] Use \footnotestyle{indent=hulist} + % (9) The footnotemark must be followed by a thin space (only at BOP). + % [9] OK, see \@makefntext + % (10) Don't emit too much stars. Recommended: * ** *** + ++ +++ + % [10] OK, see \footnoterule{mark=stars-max}. `\dag' is emitted instead + % of `+', and `*7' is emitted for the 7th footnote on the page. + % + + \@namedef{fos@reset=none}{\let\magyar@fo@resetzero\relax}% + %** Similar to \@addtoreset{footnote}{section}, but isn't \global. + \@namedef{fos@reset=section}{% + \let\magyar@fo@resetzero\relax + \magyar@fo@cons{\@elt{footnote}}\cl@section\def + \magyar@fo@cons{\@elt{footnote}}\cl@chapter\def + }% + \@namedef{fos@reset=chapter}{% + \let\magyar@fo@resetzero\relax + \magyar@fo@cons{\@elt{footnote}}\cl@chapter\def + }% + %** Next footnote-mark will be `*'. The slots of `*'s of \fos@huplain + %** were skipped when changing back to \fos@plain. Restarts numbering from + %** 1 (`*'). Usually called as \footnotestyle{resume,reset=page-cont} + \@namedef{fos@reset=page}{% + \stepcounter{footnote@ch}% + \global\c@footnote@add\z@% + \global\c@footnote\z@% + \let\magyar@fo@resetzero\magyar@fo@resetzero@afterpage + %\aftergroup\magyar@fo@resetadd% switched off deliberately + } + %** editorial footnote on the same page + \@namedef{fos@reset=page-cont}{% + \aftergroup\magyar@fo@savecont + \fos@resume% only \aftergroup + \magyar@fo@@cont@number + \let\magyar@fo@resetzero\magyar@fo@resetzero@afterpage + } + \@namedef{fos@reset=page-resume}{% + \fos@resume \csname fos@reset=page\endcsname + } + %** Resume to the previous footnote number at the end of the group. (Default: don't resume) + %** \footnotestyle{resume,reset=page} is the correct order + \def\fos@resume{% + \aftergroup\global + \aftergroup\c@footnote + \expandafter\magyar@fo@aftergrouprelax\the\c@footnote\relax + \aftergroup\space + %\magyar@fo@resetadd% Dat: not needed because \magyar@fo@resetzero@afterpage won't find prev. ref + } + % + \@namedef{fos@indent=article-sp}{\let\@makefntext\magyar@fo@indent@articlesp}% + \@namedef{fos@indent=article-nosp}{\let\@makefntext\magyar@fo@indent@articlenosp}% + \@namedef{fos@indent=hulist}{\let\@makefntext\magyar@fo@indent@hulist}% + %** This is not a 100% solution, because there might be multiple iterations + %** of \footnoterule with different \split@prev values. + \@namedef{fos@rule=choose}{% ripped from footmisc.sty + \ifx\footnoterule\magyar@fo@chooserule + \let\footnoterule\magyar@fo@defaultrule + \fi + \expandafter\ifx\csname pagefootnoterule\endcsname\relax \let \pagefootnoterule\footnoterule\fi + \expandafter\ifx\csname mpfootnoterule\endcsname\relax \let \mpfootnoterule\footnoterule\fi + \expandafter\ifx\csname splitfootnoterule\endcsname\relax \let\splitfootnoterule\magyar@fo@fourthrule\fi + \expandafter\ifx\csname split@prev\endcsname\relax \gdef\split@prev{0}\fi + % ^^^ Dat: \split@prev is named the same in footmisc.sty + \let\footnoterule\magyar@fo@chooserule + } + \@namedef{fos@rule=none}{\let\footnoterule\@empty}% + \@namedef{fos@rule=fourth}{\let\footnoterule\magyar@fo@fourthrule}% + \@namedef{fos@rule=one-line}{\let\footnoterule\magyar@fo@onelinerule}% + \@namedef{fos@marksize=max-normal}{\let\@makefnmark\magyar@fo@makefnmark}% + \@namedef{fos@mark=arabic}{\let\thefootnote\magyar@fo@thefootnote@arabic}% + \@namedef{fos@mark=stars}{\let\thefootnote\magyar@fo@thefootnote@stars}% + \@namedef{fos@mark=stars-max}{\let\thefootnote\magyar@fo@thefootnote@starsspmax}% + \@namedef{fos@mpmark=arabic}{\let\thempfootnote\magyar@fo@thempfootnote@arabic}% + \@namedef{fos@mpmark=stars}{\let\thempfootnote\magyar@fo@thempfootnote@stars}% + \@namedef{fos@mpmark=stars-max}{\let\thempfootnote\magyar@fo@thempfootnote@starsspmax}% + %\def\fos@globalmark{\expandafter\global\expandafter\let\csname the\@mpfn\endcsname\endcsname\thefootnote} + %\def\fos@globalmpmark{\global\let\thempfootnote\thefootnote} + + \def\fos@plain{\csname fos@reset=none\endcsname\csname fos@mark=arabic\endcsname} + \def\fos@huplain {\csname fos@marksize=max-normal\endcsname \csname fos@reset=none\endcsname\csname fos@mark=arabic\endcsname\csname fos@rule=none\endcsname\csname fos@indent=hulist\endcsname} + \def\fos@starplain{\fos@huplain\csname fos@reset=page\endcsname\csname fos@mark=stars-max\endcsname}% + %\def\fos@editor{\fos@resume\fos@starplain}% + \def\fos@editor{\fos@huplain\csname fos@reset=page-cont\endcsname\csname fos@mark=stars-max\endcsname}% + + \def\footnotestyle#1{% + \@for\reserved@a:=#1\do{% + \@ifundefined{fos@\reserved@a}{\@latex@error{Undefined footnote style: \reserved@a}\@ehc}% + {\csname fos@\reserved@a\endcsname}% + }% + } + + \def\editorfootnote#1{\begingroup\footnotestyle{editor}% + \footnote{#1}\endgroup}% + \def\headingfootnote{% + \ifx\protect\@typeset@protect\expandafter\footnote + \else\expandafter\@gobble\fi + % ^^^ Dat: this test is better, because it makes magyar.ldf compatible + % with nath.sty that says \def\protect{\noexpand} in its redefinition + % of \addtocontents + %\ifx\protect\@unexpandable@protect\expandafter\@gobble + %\else\expandafter\footnote\fi + } + + %** @param #1 an end-csname, example: \endfigure + \def\magyar@fo@mp@setup#1{% + \let\@footnotetext\@mpfootnotetext + \def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@ + % ^^^ This line is optional, but strongly recommended. Restart numbering + % for each float, and number with \thempfootnote. + % vvv Very tricky use of `#' in expansion. + % Dat: \magyar@fo@mp@show is idempotent + % vvv Prepend \magyar@fo@mp@show to the definition of \@makecaption + \expandafter\def\expandafter\@makecaption\expandafter##\expandafter1% + \expandafter##\expandafter2\expandafter{\expandafter\magyar@fo@mp@show% + \@makecaption{##1}{##2}% + }% + %%\show\@currenvir + % vvv Dat: this prepending has only local effect. + \expandafter\def\expandafter#1\expandafter{% + \expandafter\magyar@fo@mp@show#1}% + %\expandafter\magyar@fo@mp@prepend\csname\@currenvir\endcsname + \setbox\@mpfootins\box\voidb@x + } + \def\magyar@fo@mp@show{% ripped from latex.ltx (\endminipage) + \ifvoid\@mpfootins\else + \par\unskip \vskip\skip\@mpfootins + \normalcolor \footnoterule + \expandafter\ifx\csname mpmakefootnoteparagraph\endcsname\relax + \unvbox\@mpfootins + \else% fnpara.sty + \mpmakefootnoteparagraph + \fi + \fi + } + + %** Only works if \cs of #1 doesn't have macro arguments. It works for + %** \figure and \table, because their optional argument `[b]' etc. is not + %** a macro argument. + %** @example \makeFootnotable{figure} + %** @example \makeFootnotable{} -- current instance of current environment + \def\makeFootnotable#1{% + \if\relax#1\relax + \expandafter\magyar@fo@mp@setup\csname end\@currenvir\endcsname + \else + \expandafter\expandafter\expandafter\magyar@fo@makef@low + \expandafter\expandafter\csname #1\endcsname + \csname end#1\endcsname + \fi + } + %** @example \magyar@fo@makef@low\table\endtable + \def\magyar@fo@makef@low#1#2{\expandafter\def\expandafter#1\expandafter{% + \expandafter\magyar@fo@mp@setup\expandafter#2#1}}% + + \if2\magyar@opt@@footnote \fos@huplain\fi + \if3\magyar@opt@@footnote \fos@starplain\fi + \@gobble +{^} + +% --- mathbrk= + +\if0\magyar@opt@@mathbrk \@@magyar@skiplong\fi + %** Similar to \@@magyar@fixmathcmd@low, but inserts symbol immediately. + %** @param #1 `\mathchar', all catcodes + %** @param #2 hex code + %** @param #3 ignored + %** @param #4 a \cs + \def\@@magyar@breakmathcmd@low#1"#2"#3\hfuzz#4{% + \def\reserved@a{#1}% + \edef\reserved@b{\string\mathchar}% + \ifx\reserved@a\reserved@b + \mathchar"#2 + \ifnum"#2<"8000 % redundant sanity check, trueness implied by #1==\mathchar + \nobreak\discretionary{}{\hbox{\(\mathchar"#2 \)}}{}% + \fi + \fi + }% + %** Dat: robustness is tested and works with nath.sty + %** @param #1 a \cs or char of a MathBin or MathRel, e.g `\prec' or `+' + \DeclareRobustCommand\MathBrkAll[1]{% + \ifcat\noexpand#1\relax + \expandafter\@@magyar@breakmathcmd@low\meaning#1""\hfuzz#1% + \else + \ifnum\mathcode`#1="8000 + \expandafter\expandafter\expandafter#1% keep original meaning + \else + \mathchar\the\mathcode`#1\relax% disable \active meaning + \ifnum\mathcode`#1<"8000 % redundant sanity check + \nobreak\discretionary{}{\hbox{\(\mathchar\the\mathcode`#1\relax\)}}{}% + \fi + \fi + \fi + } + \let\MathBrk\relax + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\MathBrk + \let\MathBrk\MathBrkAll + } + \@gobble +{^} + +\if2\magyar@opt@@mathbrk\else \@@magyar@skiplong\fi % mathbrk=fix + \def\@@magyar@resetmathchars{% + \mathcode`+"202B \catcode`+12 + \mathcode`-"2200 \catcode`-12 + \mathcode`*"2203 \catcode`*12 + \mathcode`/"013D \catcode`/12 + \mathcode`>"313E \catcode`>12 + \mathcode`<"313C \catcode`<12 + \mathcode`="303D \catcode`=12 + % vvv Dat: leave these chars intact, for compatibility (with nath.sty and others) + %\mathcode`:"303A \catcode`:12 + %\mathcode`;"603B \catcode`;12 + %\mathcode`,"613B \catcode`,12 + %\mathcode`!"5021 \catcode`!12 + %\mathcode`?"503F \catcode`?12 + %\mathcode`|"026A \catcode`|12 + %\mathcode`."013A \catcode`.12 + } + %** Dat: don't do `/', because slash is unbreakable + \def\@@magyar@domathbins{% + \do-\@@magyar@fix@newmcodes@dash + \do+\do*\do>\do<\do=}% + %** @param #1 a char token with \mathcode != "8000, like + + \def\@@magyar@fixmathbinchar#1{% + \ifnum\mathcode`#1="8000 \else + % Dat: \(...\) is safer than `$...$', because \( has a fixed \catcode + % that works with and w/o nath.sty + \begingroup\lccode\string`~\string`#1\lowercase{\endgroup\edef~}{% + \mathchar\the\mathcode`#1\relax% Dat: would need \space\space + \noexpand\ifx\noexpand\MathBrk\noexpand\MathBrkAll% Hungarian language is active + \nobreak\discretionary{}{\hbox{\noexpand\(\mathchar\the\mathcode`#1 \noexpand\)}}{}% + \noexpand\fi}% + \mathcode`#1"8000 + \fi + \catcode`#112 + } + %** \newmcodes@ defined in amsopn.sty doesn't work (triggered by + %** \DeclareMathOperator{\tg}{tg} $\tg$) because it wants to assign + %** \mathchardef\std@minus\mathcode`\-, which is "8000, which is a bad + %** matchar. We fix that by prepending \mathcode`-45 to \newmcodes@ . + %** This is OK, because \newmcodes@ is protected by a block set up by + %** \qopname. + \def\@@magyar@newmcodes@fixed{\mathcode`-"45 \magyar@@newmcodes}% + \def\@@magyar@fix@newmcodes@dash{% + \ifx\newmcodes@\@undefined\else + \ifx\newmcodes@\@@magyar@newmcodes@fixed\else % Protect against double redefinition such as in \begin{align*}\tg\end{align*} + \let\magyar@@newmcodes\newmcodes@ + \let\newmcodes@\@@magyar@newmcodes@fixed + \fi + \fi + }% + + %** @param #1 `\mathchar', all catcodes + %** @param #2 hex code + %** @param #3 ignored + %** @param #4 a \cs + \def\@@magyar@fixmathcmd@low#1"#2"#3\hfuzz#4{% + % Imp: check \cong and \notin with txfonts and pxfonts. Do they look OK? + \def\reserved@a{#1}% + \edef\reserved@b{\string\mathchar}% + \ifx\reserved@a\reserved@b + \ifnum"#2<"8000 % redundant sanity check, trueness implied by #1==\mathchar + % Make #4 robust. + \edef#4{\noexpand\protect\expandafter\noexpand\csname + \expandafter\@gobble\string#4 \endcsname}% + % vvv Imp: \def would be better than \edef? + \expandafter\edef\csname\expandafter\@gobble\string#4 \endcsname{% + % Dat: \mathchar already produces: `! Missing $ inserted.' + \mathchar"#2 + \noexpand\ifx\noexpand\MathBrk\noexpand\MathBrkAll% Hungarian language is active + \nobreak\discretionary{}{\hbox{\noexpand\(\mathchar"#2 \noexpand\)}}{}% + \noexpand\fi + }% + \fi + \fi + }% + %** Works even if #1 is undefined (but consumes hash memory) + %** @param #1 a \cs of a MathBin or MathRel, e.g \prec + \def\@@magyar@fixmathcmd#1{% + \expandafter\@@magyar@fixmathcmd@low\meaning#1""\hfuzz#1% + } + + \let\@@magyar@domathbins@prefix\@empty + \def\@@magyar@fixeverymathcmds@appendto#1{% + \expandafter\def\expandafter#1\expandafter{#1% append + \@@magyar@resetmathchars + \let\do\@@magyar@fixmathbinchar + \@@magyar@domathbins@prefix\@@magyar@domathbins% only in math mode start + }% + } + \def\@@magyar@fixeverymathcmds@setup{% + \expandafter\ifx\csname mathoptions@on\endcsname\relax% no nath.sty + \@@magyar@fixeverymathcmds@appendto\check@mathfonts + \else\@@magyar@fixeverymathcmds@appendto\mathoptions@on\fi + } + + % The definition of \@tabular contains a $, which calls + % \@@magyar@domathbins, which has some unintended side effects of changing + % \catcode values and the meaning of the active character : . This magic + % prevents the call to \@@magyar@domathbins . + % + % Test code: \author{a:b} \maketitle + % Test code: \def\foo{a:b} \begin{tabular}[t]{c}x\foo y\end{tabular} + \def\@@magyar@mathbins@tabularfix#1${% + #1\def\@@magyar@domathbins@prefix{% + \let\@@magyar@domathbins@prefix\@empty\@gobble}$}% + \expandafter\expandafter\expandafter\def + \expandafter\expandafter\expandafter\@tabular + \expandafter\expandafter\expandafter{% + \expandafter\@@magyar@mathbins@tabularfix\@tabular} + + \def\@@magyar@fixmathcmds{% + \let\do\@@magyar@fixmathcmd + % vvv Binary relations listed in Table 3.4 in lshort.dvi + \do\leq\do\le\do\ll\do\prec\do\preceq\do\subset\do\subseteq\do\sqsubset + \do\sqsubseteq\do\in\do\vdash\do\mid\do\smile\do\geq\do\ge\do\gg\do\succ + \do\succeq\do\supset\do\supseteq\do\sqsupset\do\sqsupseteq\do\ni\do\owns + \do\dashv\do\parallel\do\frown\do\notin\do\equiv\do\doteq\do\sim\do\simeq + \do\approx\do\cong\do\Join\do\bowtie\do\propto\do\models\do\perp\do\asymp + \do\neq\do\ne + % vvv Binary operators listed in Table 3.5 in lshort.dvi + %\do\cdot% unbreakable + \do\pm\do\times\do\cup\do\sqcup\do\vee\do\lor\do\oplus\do\odot\do\otimes + \do\bigtriangleup\do\lhd\do\unlhd\do\mp\do\div\do\setminus\do\cap\do\sqcap + \do\wedge\do\land\do\ominus\do\oslash\do\bigcirc\do\bigtriangledown\do\rhd + \do\unrhd\do\triangleleft\do\triangleright\do\star\do\ast\do\circ\do\bullet + \do\diamond\do\uplus\do\amalg\do\dagger\do\ddagger\do\wr + \edef\cdot{\noexpand\protect\csname cdot \endcsname}% + \expandafter\def\csname cdot \endcsname{\nobreak\mathchar"2201\nobreak}% + \def\slash{\nobreak/\nobreak}% only in math-mode start, \nobreak + % ^^^ Dat: \slash is fragile in latex.ltx + } + \AtBeginDocument{\@@magyar@fixmathcmds\@@magyar@fixeverymathcmds@setup} + \@gobble +{^} + +% --- mathfactorial= + +\if0\magyar@opt@@mathfactorial \@@magyar@skiplong\fi + % Imp: weak define? It doesn't conflict with nath.sty -- yet. + \def\factorial{\mathchar"5021\mathopen{}\mathinner{}} + \@gobble +{^} + +\if2\magyar@opt@@mathfactorial\else \@@magyar@skiplong\fi + \expandafter\addto\csname \expandafter\ifx\csname mathoptions@on\endcsname + \relax check@mathfonts\else mathoptions@on\fi\endcsname{% detect nath.sty + \catcode`!12 \mathcode`!"8000 + \begingroup\lccode`~`!\lowercase{\endgroup\def~}{\factorial}% + } + \@gobble +{^} + +% --- mathhucomma= + +\if0\magyar@opt@@mathhucomma \@@magyar@skiplong\fi + %** Dat: works for all catcodes, even for `end group character 5' + %** Inspired by Donald Aresenau + %** @param #1 the + %** @param #2 character + %** @example The sample in your article would be typed + %** \[ F_{i}(x,y) = y^i + 1,3x \qquad x,y \in A,\ i = 1, 2, 3,\ldots \] + \edef\@@magyar@hucomma@lowa#1#2 #3#4 #5#6\hfuzz{% + \noexpand\ifnum9<1#5 \noexpand\if#1t\noexpand\if#3c% + \noexpand\mathord\noexpand\fi\noexpand\fi\noexpand\fi\mathchar + \ifnum\mathcode`,="8000 "613B \else\the\mathcode`, \space\fi% immed expand + % Dat: "613B is the punctuation, "013B is ordinary + }% + %%\show\@@magyar@hucomma@lowa + \def\@@magyar@hucomma@lowb{\expandafter\@@magyar@hucomma@lowa\meaning\reserved@a/ / /\hfuzz}% + %** Put a \mathord, if it is followed by a digit; otherwise put a normal, + \DeclareRobustCommand\HuComma{\futurelet\reserved@a\@@magyar@hucomma@lowb} + \@gobble +{^} + +\if2\magyar@opt@@mathhucomma\else \@@magyar@skiplong\fi + % !! into \extrasmagyar + \expandafter\addto\csname \expandafter\ifx\csname mathoptions@on\endcsname + \relax check@mathfonts\else mathoptions@on\fi\endcsname{% detect nath.sty + \catcode`,12 \mathcode`,"8000 + \begingroup\lccode`~`,\lowercase{\endgroup\def~}{\HuComma}% + } + \@gobble +{^} + +% --- mathmuskips= + +% +\if1\magyar@opt@@mathmuskips% =latex, as defined in latex.ltx + \thickmuskip 5mu plus 5mu + \medmuskip 4mu plus 2mu minus 4mu + \thinmuskip 3mu +\fi +\if2\magyar@opt@@mathmuskips% =hu + \thickmuskip 4mu plus 2mu minus 4mu + \medmuskip 2mu plus 1.5mu minus 2mu % \medmuskip<\thinmuskip OK + \thinmuskip 3mu +\fi + +% --- hynumberline= +% by pts@fazekas.hu at Tue Nov 21 00:34:37 CET 2006 +% +% hynumberline=hu adds a dot after the section number in the bookmarks/outline +% with \hypersetup{bookmarksnumbered=true} in hyperref.sty. + +\if0\magyar@opt@@hynumberline \@@magyar@skiplong\fi + %** Overrides original definition (\def\Hy@numberline#1{#1 }) in + %** pdfmark.def. + %** Also possible with: + %** \pdfstringdefDisableCommands{\renewcommand*{\numberline}[1]{#1. }} + \def\@@magyar@@hynumberline@old#1{#1 }% as defined in pdfmark.def + \def\@@magyar@@hynumberline@hu #1{#1. }% + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \ifx \Hy@numberline\@@magyar@@hynumberline@old + \let\Hy@numberline\@@magyar@@hynumberline@hu \fi}% +\@gobble +{^}% + +% --- mathreal= + +\if0\magyar@opt@@mathreal \@@magyar@skiplong\fi + %** @param #1 a number with a possible decimal digit, e.g `12' or `-12.3' + \def\@@magyar@mathreal@lowa#1{\ensuremath{\@@magyar@mathreal@lowb#1\@gobble.}}% + \def\@@magyar@mathreal@lowb#1.{% + #1% + \@secondoftwo\@gobble% Wizardry: \@secondoftwo may be \@gobbled by token before `.' + {\mathchar"013B \@@magyar@mathreal@lowb}% + } + \DeclareRobustCommand\@@magyar@mathreal{\ensuremath}% + \expandafter\expandafter\expandafter\addto + \expandafter\expandafter\csname extras\CurrentOption\endcsname\expandafter{% + \expandafter\babel@save\csname @@magyar@mathreal \endcsname + \expandafter\let\csname @@magyar@mathreal \endcsname \@@magyar@mathreal@lowa}% + \ifnum\magyar@opt@@mathreal \expandafter\ifx\csname mathreal\endcsname\relax1\fi>1 % 21, 2, 11, 1 + \let\MathReal\@@magyar@mathreal + \fi +\@gobble +{^}% + +% --- \documentclass-specific modifications; classmod= + +% Callback which redefines \ps@headings and runs it again if needed, when +% magyar.ldf has an override for the standard \ps@headings, and +% \pagestyle{headings} is active either explictly (e.g. in article.cls) or +% by default (e.g. in book.cls). +\let\@@magyar@setup@psheadings\relax + +%** Localized definition which replaces \ps@headings, if appropriate. +\let\@@magyar@overridden@psheadings\@empty + +\ifx\magyar@opt@@classmod\relax\@@magyar@skiplong\fi + +%** Appends the first-level expansion of argless macro ##2 to ##1. +\def\magyar@letappendto#1#2{% + \expandafter\expandafter\expandafter\def + \expandafter\expandafter\expandafter#1% + \expandafter\expandafter\expandafter{% + \expandafter#1#2}}% + +%** Defines #1 to the concatenation of \partmark ... \subparagraphmark, +%** \oddfoot, \evenfoot, \oddhead, \evenhead. +\def\magyar@mark@fingerprint@def#1{% + % We have ! here because some macros (such as \partmark) have #1, which + % gets expanded by \expandafter + \def#1{markfp: }% + \ifx\partmark\@undefined + \expandafter\def\expandafter\reserved@b\expandafter{% + \expandafter{-partmark}}% + \else + \expandafter\def\expandafter\reserved@b\expandafter{% + \expandafter{\partmark!:partmark}}% + \fi + \magyar@letappendto#1\reserved@b + % + \ifx\chaptermark\@undefined + \expandafter\def\expandafter\reserved@b\expandafter{% + \expandafter{-chaptermark}}% + \else + \expandafter\def\expandafter\reserved@b\expandafter{% + \expandafter{\chaptermark!:chaptermark}}% + \fi + \magyar@letappendto#1\reserved@b + % + \expandafter\def\expandafter\reserved@b\expandafter{% + \expandafter{\sectionmark!:sectionmark}}% + \magyar@letappendto#1\reserved@b + \expandafter\def\expandafter\reserved@b\expandafter{% + \expandafter{\subsectionmark!:subsectionmark}}% + \magyar@letappendto#1\reserved@b + \expandafter\def\expandafter\reserved@b\expandafter{% + \expandafter{\paragraphmark!:paragraphmark}}% + \magyar@letappendto#1\reserved@b + \expandafter\def\expandafter\reserved@b\expandafter{% + \expandafter{\subparagraphmark!}}% + \magyar@letappendto#1\reserved@b + \expandafter\def\expandafter\reserved@b\expandafter{% + \expandafter{\@oddfoot!:oddfoot}}% + \magyar@letappendto#1\reserved@b + \expandafter\def\expandafter\reserved@b\expandafter{% + \expandafter{\@evenfoot!:evenfoot}}% + \magyar@letappendto#1\reserved@b + \expandafter\def\expandafter\reserved@b\expandafter{% + \expandafter{\@evenhead!:evenhead}}% + \magyar@letappendto#1\reserved@b + \expandafter\def\expandafter\reserved@b\expandafter{% + \expandafter{\@oddhead!:oddhead}}% + \magyar@letappendto#1\reserved@b + % Dat: don't use \@mkboth (\let\@mkboth\markboth) +}% + +%** Branches based on whether the \pagestyle has changed since loading the +%** class file. +%** @param #1 class file name, e.g. `book.cls'. Tested with book.cls and +%** report.cls. +%** @param #2 tokens to insert before fingerprinting the current page style. +%** @param implicit-#3 then-branch +%** @param implicit-#4 else-branch +\def\magyar@if@originalpagestyle#1#2{% + \begingroup + % article.cls calls \pagenumbering, which does a \gdef\thepage and + % \global\c@page=1. We'll cancel that below. + \let\magyar@@pagestyle@save@thepage\thepage + \edef\magyar@@pagestyle@save@c@page{\the\c@page\space} + \edef\magyar@@pagestyle@save@c@tocdepth{\the\c@tocdepth\space} + % Dat: no \paragraphmark or \subparagraphmark + % vvv Dat: already defined in latex.ltx + %\providecommand\sectionmark[1]{\relax} + %\providecommand\subsectionmark[1]{\relax} + #2\magyar@mark@fingerprint@def\@@magyar@now@marks + % + \def\ProvidesClass##1[##2]{}% + \def\NeedsTeXFormat##1[##2]{}% avoid ``can be used only in preamble'' + \long\def\DeclareOption##1##2{}% + \def\ExecuteOptions##1{}% + \def\ProcessOptions{}% + \def\DeclareOldFontCommand##1##2##3{}% + % + \def\magyar@gobbleopt[##1]{}% + % Dat: \newcommand etc. are not \global. Good. + \let\@onlypreamble\@gobble % In letter.cls . + \let\newdimen\@gobble + \let\newif\@gobble + \let\newskip\@gobble + \let\newmuskip\@gobble + \let\newcount\@gobble + \let\newbox\@gobble + \let\newtoks\@gobble + \let\newread\@gobble + \let\newwrite\@gobble + \let\newlaunguage\@gobble + \let\newlength\@gobble + \def\newcounter##1{\@ifnextchar[\magyar@gobbleopt{}}% + \def\setcounter##1##2{\@ifundefined{c@##1}{\@nocounterr{##1}}% + {\csname c@##1\endcsname##2\relax}} + %** Like \newcommand, but always overrides old values. + \def\magyar@defcommand{\@star@or@long\magyar@defcommand@low} + \def\magyar@defcommand@low##1{% + \begingroup + \escapechar\m@ne\xdef\@gtempa{\string##1}% + \endgroup + \expandafter\let\csname\@gtempa\endcsname\@undefined + \@star@or@long\new@command##1% + }% + \def\newcommand{\magyar@defcommand}% + \def\renewcommand{\magyar@defcommand}% + \def\magyar@defenvironment##1{% + \@ifundefined{##1}{}{% + \expandafter\let\csname ##1\endcsname\@undefined + \expandafter\let\csname end##1\endcsname\@undefined + }% + \@star@or@long\new@environment{##1}% + }% + \def\newenvironment{\magyar@defenvironment}% + \def\renewenvironment{\magyar@defenvironment}% + % + \ps@empty % Clean \@oddhead as of latex.ltx + \let\@mkboth\@gobbletwo + \let\@oddhead\@empty + \let\@evenhead\@empty + \let\@oddfoot\@empty + \let\@evenfoot\@empty + % + \def\input##1 {} % size10.clo etc. + \makeatletter \@@input #1 % + #2\magyar@mark@fingerprint@def\@@magyar@class@marks + %\message{AAA \meaning\@@magyar@now@marks}% + %\message{BBB \meaning\@@magyar@class@marks}% + \global\let\thepage\magyar@@pagestyle@save@thepage + \global\c@page\magyar@@pagestyle@save@c@page + \global\c@tocdepth\magyar@@pagestyle@save@c@tocdepth + \ifx\@@magyar@now@marks\@@magyar@class@marks + \endgroup\expandafter\@firstoftwo + \else + \endgroup\expandafter\@secondoftwo + \fi +} + +%\begingroup +%\magyar@mark@fingerprint@def\OOO +%\message{OOO \meaning\OOO}% +%\endgroup + +%** Branches based on whether the specified \pagestyle is active. +%** @param #1 tokens which change to the \pagestyle specified, e.g. +%** `\ps@headings'. +%** @param implicit-#2 then-branch +%** @param implicit-#3 else-branch +\def\magyar@if@currentpagestyle#1{% + \begingroup + \magyar@mark@fingerprint@def\@@magyar@now@marks + #1% + \magyar@mark@fingerprint@def\@@magyar@specified@marks + \ifx\@@magyar@now@marks\@@magyar@specified@marks + \endgroup\expandafter\@firstoftwo + \else + \endgroup\expandafter\@secondoftwo + \fi +} + +%** Redefine \@@magyar@setup@psheadings for #2.cls. +%** @param #1 is the expanded value of \CurrentOption (`magyar'). +\def\magyar@def@psheadings#1#2{% + \def\@@magyar@setup@psheadings{% + % SUXX: \show doesn't work here. + \ifx\@@magyar@overridden@psheadings\ps@headings + \@@magyar@error{assert: \string\let\string\ps@headings\string\@@magyar@overridden@psheadings\space was too early}% + \else\ifx\@@magyar@overridden@psheadings\@empty + \@@magyar@error{assert: \string\@@magyar@overridden@psheadings\space should be redefined}% + \else + \magyar@if@originalpagestyle{#2.cls}{\ps@headings}{% + % \ps@headings still has its original definition (as of #1.cls). + % + % For efficiency reasons, we make the following restriction. If the + % user does \selectlanguage{...} throughout the document, he should + % call \pagetsyle{...} after that to make the pagestyle + % language-dependent. + % + % !! add support for \thispagestyle in the preamble. + % !! don't add this if extras gets cleared. + \expandafter\addto\csname extras#1\endcsname{% + \babel@save\ps@headings + \let\ps@headings\@@magyar@overridden@psheadings + }% + \magyar@if@currentpagestyle{\ps@headings}{% + % The current \pagestyle has been selected by the current + % \ps@headings, i.e. \pagestyle{headings} is active. + \edef\reserved@a{\languagename}% + \edef\reserved@a{\expandafter\strip@prefix\meaning\reserved@a}% + \edef\reserved@b{#1}% + \edef\reserved@b{\expandafter\strip@prefix\meaning\reserved@a}% + \ifx\reserved@a\reserved@b + % Localize the current \pagestyle to Hungarian `headings'. + \@@magyar@overridden@psheadings + \fi + }{}% + }{}% + \fi\fi + }% +} + +\def\magyar@ulladik{ulladik0}% [Nn]ulladik, `0' at end is intentional + +\def\@@magyar@macro@appendixname{\appendixname} + +%** \thechapter (possibly with huordinal), dot, space. +\def\magyar@huordinal@chapterheaddot{% + \ifx\@chapapp\@@magyar@appendixname \thechapter\hbox{\magyar@opt@@titleskip}% appendixdot=no + \else\ifx\@chapapp\@@magyar@macro@appendixname \thechapter.~% + \else\ifnum\magyar@opt@@chapternumber=1 \@huordinal\c@chapter~% + \else\ifnum\magyar@opt@@chapternumber=2 \@Huordinal\c@chapter~% + \else \thechapter.~% + \fi\fi\fi\fi +} + +%** \thepart (possibly with huordinal), dot, space. +\def\magyar@huordinal@partheaddot{% + \ifnum\magyar@opt@@partnumber=1 \@huordinal\c@part~% + \else\ifnum\magyar@opt@@partnumber=2 \@Huordinal\c@part~% + \else \thepart.~% + \fi\fi +} + +%** Emits the rule to the running head. Must put something of zero width +%** to the horizontal list. +%** @param #1 0: even page, 1: odd page, 3: page w/o [twoside] +\def\@@magyar@headrule#1{} +\def\@@magyar@slshape{}% running head is not slanted + +\ifx\magyar@opt@@classmod\@empty + \let\@@magyar@ifclassloaded\@ifclassloaded +\else + \def\@@magyar@ifclassloaded#1#2{% force specific class + \def\reserved@a{#1}% + \ifx\reserved@a\magyar@opt@@classmod #2\fi + } +\fi + +\@@magyar@ifclassloaded{amsbook}{% + \let\magyar@hunumbers@errmsg\@empty + \let\@@magyar@orig@makechapterhead\@makechapterhead + \def\@makechapterhead#1{% + \begingroup + \let\@@magyar@orig@centerline\centerline + \def\centerline##1{% + \@@magyar@orig@centerline{% + \normalsize\mdseries + \ifx\chaptername\appendixname % We're in the appendix. + \ifx\@@magyar@appendixname\@empty + % print a dot in the appendix only if appendixdot=yes + \thechapter.~% + \else + \thechapter\hbox{\magyar@opt@@titleskip}% + \fi + \else\ifnum\magyar@opt@@chapternumber=1 + \uppercase\@xp{\@huordinal\c@chapter}~% + \else\ifnum\magyar@opt@@chapternumber=2 + \uppercase\@xp{\@Huordinal\c@chapter}~% + \else\thechapter.~% + \fi\fi\fi + \uppercase\@xp{\chaptername}% + }% + }% + \@@magyar@orig@makechapterhead{#1}% + \endgroup + }% + \let\@@magyar@orig@chapter\@chapter + \def\@chapter{% + \let\@@magyar@orig@chapter@typeout\typeout + \def\typeout##1{% + % Original: \typeout{\chaptername\space\@secnumber} + \@@magyar@orig@chapter@typeout{% + \ifnum\c@secnumdepth<\z@ + \chaptername\space + \else + \thechapter\ifx\chaptername\appendixname\else.\fi + \space\chaptername + \fi + }% + \let\typeout\@@magyar@orig@chapter@typeout + }% + \@@magyar@orig@chapter + }% + % Just to be sure, no need for this in amsbook.cls 2004/08/06 + \@ifundefined{tocpart}{\let\tocpart\tocsection}{} + % TODO(pts): Override only parts of \@part + \def\@part[#1]#2{% + \ifnum \c@secnumdepth >-2\relax \refstepcounter{part}% + % TODO(pts): What does \tocpart do for a non-hungarian \tableofcontents? + \addcontentsline{toc}{part}{\protect\tocpart{\partname}{\thepart}% + {#1}}% + \else + \addcontentsline{toc}{part}{#1}\fi + \begingroup\centering + \ifnum \c@secnumdepth >-2\relax + {\fontsize{\@xviipt}{22}\bfseries + \ifnum\magyar@opt@@partnumber=1 \@huordinal\c@part~% + \else\ifnum\magyar@opt@@partnumber=2 \@Huordinal\c@part~% + \else\thechapter.~% + \fi\fi + \partname + } \vskip 20\p@ \fi + \fontsize{\@xxpt}{25}\bfseries + #1\vfil\vfil\endgroup \newpage\thispagestyle{empty}} +}{} + +\@@magyar@ifclassloaded{book}{% + \let\magyar@hunumbers@errmsg\@empty + % Headings: inserting dots, changing orders + %\def\@@magyar@appendixname{\appendixname}% by appendixdot= + \def\@@magyar@overridden@psheadings{% + \if@twoside + \let\@oddfoot\@empty\let\@evenfoot\@empty + \def\@evenhead{\@@magyar@headrule0\thepage\hfil\@@magyar@slshape\leftmark}% + \def\@oddhead {\@@magyar@headrule1{\@@magyar@slshape\rightmark}\hfil\thepage}% + \let\@mkboth\markboth + \def\chaptermark##1{% + \markboth {\MakeUppercase{% + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter% Dat: mainmatter only in book.cls, not in report.cls + \magyar@huordinal@chapterheaddot + \@chapapp.\magyar@opt@@hdrtitleskip% \ % + \fi + \fi + ##1}}{}}% + \def\sectionmark##1{% + \markright {\MakeUppercase{% + \ifnum \c@secnumdepth >\z@ + \thesection.\magyar@opt@@hdrtitleskip% \ % + \fi + ##1}}}% + \else + \let\@oddfoot\@empty + \def\@oddhead{\@@magyar@headrule3{\@@magyar@slshape\rightmark}\hfil\thepage}% + \let\@mkboth\markboth + \def\chaptermark##1{% + \markright {\MakeUppercase{% + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \magyar@huordinal@chapterheaddot + \@chapapp.\magyar@opt@@hdrtitleskip% \ % + \fi + \fi + ##1}}}% + \fi + }% + \expandafter\magyar@def@psheadings\expandafter{\CurrentOption}{book}% + % Part: inserting dot, changing order, toc + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\@part + \def\@part[#1]#2{% book + \ifnum \c@secnumdepth >-2\relax + \refstepcounter{part}% + \ifnum\magyar@opt@@partnumber>0 \protected@edef\@currentlabel{\@huordinal\c@part}\fi + \addcontentsline{toc}{part}{\thepart.\hspace{1em}#1}% + \else + \addcontentsline{toc}{part}{#1}% + \fi + \markboth{}{}% + {\centering + \interlinepenalty \@M + \normalfont + \ifnum \c@secnumdepth >-2\relax + \huge\bfseries \magyar@huordinal@partheaddot\partname% hu + \csname par\endcsname + \vskip 20\p@ + \fi + \Huge \bfseries #2\csname par\endcsname}% + \@endpart}} + % Chapter: dot, changing typeout, toc + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\@chapter + \def\@chapter[#1]#2{% !! don't \def, but \let, other places, too + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \refstepcounter{chapter}% + \typeout{\thechapter\ifx\@chapapp\@@magyar@appendixname\else.\fi\space\@chapapp.}% + \ifx\@chapapp\@@magyar@appendixname + % \@gobble gobbles the dot emitted by \numberline. + \addcontentsline{toc}{chapter}{\protect\numberline{\thechapter\protect\@gobble}#1}% + \else + \addcontentsline{toc}{chapter}{\protect\numberline{\thechapter}#1}% + \fi + \ifx\@chapapp\@@magyar@appendix@chapapp\else + \ifnum\magyar@opt@@chapternumber>0 \protected@edef\@currentlabel{\@huordinal\c@chapter}\fi + \fi + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \chaptermark{#1}% + \addtocontents{lof}{\protect\addvspace{10\p@}}% + \addtocontents{lot}{\protect\addvspace{10\p@}}% + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}]% + \else + \@makechapterhead{#2}% + %\csname par\endcsname + \@afterheading % Imp: why doesn't it work? + \fi}} + \if0\magyar@opt@@chapterhead\else + % Chapter: dot, changing order + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\@makechapterhead + \def\@makechapterhead#1{% + \vspace*{50\p@}% + {\parindent \z@ \raggedright \normalfont + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \huge\bfseries + \magyar@huordinal@chapterheaddot \@chapapp{}% + \csname par\endcsname\nobreak + \vskip 20\p@ + \fi + \fi + \interlinepenalty\@M + \Huge \bfseries #1\csname par\endcsname\nobreak + \vskip 40\p@ + }}% + }% + \fi +}{} + +\@@magyar@ifclassloaded{report}{% + \let\magyar@hunumbers@errmsg\@empty + %\def\@@magyar@appendixname{\appendixname}% by appendixdot= + % Headings: inserting dots, changing orders + \def\@@magyar@overridden@psheadings{% + \if@twoside + \let\@oddfoot\@empty\let\@evenfoot\@empty + \def\@evenhead{\@@magyar@headrule0\thepage\hfil\@@magyar@slshape\leftmark}% + \def\@oddhead {\@@magyar@headrule1{\@@magyar@slshape\rightmark}\hfil\thepage}% + \let\@mkboth\markboth + \def\chaptermark##1{% + \markboth {\MakeUppercase{% + \ifnum \c@secnumdepth >\m@ne + \magyar@huordinal@chapterheaddot + \@chapapp.\magyar@opt@@hdrtitleskip% \ % + \fi + ##1}}{}}% + \def\sectionmark##1{% + \markright {\MakeUppercase{% + \ifnum \c@secnumdepth >\z@ + \thesection.\magyar@opt@@hdrtitleskip% \ % + \fi + ##1}}}% + \else + \let\@oddfoot\@empty + \def\@oddhead{% + \@@magyar@headrule3{\@@magyar@slshape\rightmark}\hfil\thepage}% + \let\@mkboth\markboth + \def\chaptermark##1{% + \markright{\MakeUppercase{% + \ifnum \c@secnumdepth >\m@ne + \magyar@huordinal@chapterheaddot + \@chapapp.\magyar@opt@@hdrtitleskip% \ % + \fi + ##1}}}% + \fi + }% + \expandafter\magyar@def@psheadings\expandafter{\CurrentOption}{report}% + % Chapter: dot, changing typeout, toc + % Part... + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\@chapter + \def\@chapter[#1]#2{% + \ifnum \c@secnumdepth >\m@ne + \refstepcounter{chapter}% + \typeout{\thechapter\ifx\@chapapp\@@magyar@appendixname\else.\fi\space\@chapapp.}% + \ifx\@chapapp\@@magyar@appendixname + % \@gobble gobbles the dot emitted by \numberline. + \addcontentsline{toc}{chapter}{\protect\numberline{\thechapter\protect\@gobble}#1}% + \else + \addcontentsline{toc}{chapter}{\protect\numberline{\thechapter}#1}% + \fi + \ifx\@chapapp\@@magyar@appendix@chapapp\else + \ifnum\magyar@opt@@chapternumber>0 \protected@edef\@currentlabel{\@huordinal\c@chapter}\fi + \fi + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \chaptermark{#1}% + \addtocontents{lof}{\protect\addvspace{10\p@}}% + \addtocontents{lot}{\protect\addvspace{10\p@}}% + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}]% + \else + \@makechapterhead{#2}% + \@afterheading + \fi}% + \babel@save\@part + \def\@part[#1]#2{% report; added at Fri Jul 23 11:45:57 CEST 2004 + \ifnum \c@secnumdepth >-2\relax + \refstepcounter{part}% + \ifnum\magyar@opt@@partnumber>0 \protected@edef\@currentlabel{\@huordinal\c@part}\fi + \addcontentsline{toc}{part}{\thepart.\hspace{1em}#1}% + \else + \addcontentsline{toc}{part}{#1}% + \fi + \markboth{}{}% %%%%% \l@chapter in report.cls + {\centering + \interlinepenalty \@M + \normalfont + \ifnum \c@secnumdepth >-2\relax + \huge\bfseries \magyar@huordinal@partheaddot\partname% hu + \csname par\endcsname + \vskip 20\p@ + \fi + \Huge \bfseries #2\csname par\endcsname}% + \@endpart}% + } + \if0\magyar@opt@@chapterhead\else + % Chapter: dot, changing order + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\@makechapterhead + \def\@makechapterhead#1{% + \vspace*{50\p@}% + {\parindent \z@ \raggedright \normalfont + \ifnum \c@secnumdepth >\m@ne + \huge\bfseries + \magyar@huordinal@chapterheaddot \@chapapp{}% + \vskip 20\p@ + \fi + \interlinepenalty\@M + \Huge \bfseries #1\csname par\endcsname\nobreak + \vskip 40\p@ + }}% + }% + \fi +}{} + +\@@magyar@ifclassloaded{article}{% + % article.cls has no \chapter. We'll hook \part below though. + \let\magyar@hunumbers@errmsg\@empty + % Headings: inserting dots + % In order for this to take effect, \pagestyle{plain} should be put below + % \begin{document}. + \def\@@magyar@overridden@psheadings{% + \if@twoside + \let\@oddfoot\@empty\let\@evenfoot\@empty + % Dat: by pts: \slshape -> \relax + \def\@evenhead{\@@magyar@headrule0\thepage\hfil\@@magyar@slshape\leftmark}% + \def\@oddhead {\@@magyar@headrule1{\@@magyar@slshape\rightmark}\hfil\thepage}% + \let\@mkboth\markboth + \def\sectionmark##1{% + \markboth {\MakeUppercase{% + \ifnum \c@secnumdepth >\z@ + \thesection.\magyar@opt@@hdrtitleskip + \fi + ##1}}{}}% + \def\subsectionmark##1{% + \markright {% + \ifnum \c@secnumdepth >\@ne + \thesubsection.\magyar@opt@@hdrtitleskip + \fi + ##1}}% + \else + \let\@oddfoot\@empty + \def\@oddhead{\@@magyar@headrule3{\@@magyar@slshape\rightmark}\hfil\thepage}% + \let\@mkboth\markboth + \def\sectionmark##1{% + \markright {\MakeUppercase{% + \ifnum \c@secnumdepth >\m@ne + \thesection.\magyar@opt@@hdrtitleskip + \fi + ##1}}} + \fi}% + \expandafter\magyar@def@psheadings\expandafter{\CurrentOption}{article}% + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\@part + \def\@part[#1]#2{% article % added at Fri Jul 23 11:45:57 CEST 2004 + \ifnum \c@secnumdepth >\m@ne + \refstepcounter{part}% + \ifnum\magyar@opt@@partnumber>0 \protected@edef\@currentlabel{\@huordinal\c@part}\fi + \addcontentsline{toc}{part}{\thepart.\hspace{1em}#1}% + \else + \addcontentsline{toc}{part}{#1}% + \fi + {\parindent \z@ \raggedright + \interlinepenalty \@M + \normalfont + \ifnum \c@secnumdepth >\m@ne + \Large\bfseries \magyar@huordinal@partheaddot\partname% hu + \csname par\endcsname\nobreak + \fi + \huge \bfseries #2% + \markboth{}{}\csname par\endcsname}% + \nobreak + \vskip 3ex + \@afterheading}}% +}{} + +\@@magyar@ifclassloaded{letter}{% + % letter.cls has no \part or \chapter. No need to hook anything here, but + % we make \magyar@hunumbers@errmsg just to pacify + % `\PassOptionsToPackage{defaults=prettiest}{magyar.ldf}'. + \let\magyar@hunumbers@errmsg\@empty + % Headings: inserting dots + % In order for this to take effect, \pagestyle{plain} should be put below + % \begin{document}. + \def\@@magyar@overridden@psheadings{% + \if@twoside + \let\@oddfoot\@empty\let\@evenfoot\@empty + \def\@oddhead{\@@magyar@headrule3\@@magyar@slshape\headtoname{:} \ignorespaces\toname + \hfil \@date + \hfil \thepage.~\pagename}% + \let\@evenhead\@oddhead + \else + \let\@oddfoot\@empty + \def\@oddhead{\@@magyar@headrule3\@@magyar@slshape\headtoname{:} \ignorespaces\toname + \hfil \@date + \hfil \thepage.~\pagename}% + \fi}% + \expandafter\magyar@def@psheadings\expandafter{\CurrentOption}{letter}% +}{} +\@gobble +{^}% + +% --- mond= + +\if0\magyar@opt@@mond \@@magyar@skiplong\fi +%** Dat: `--\enspace' would be too much +%** Use this in the beginning of the paragraph. +\def\@@magyar@mond{% + % Dat: \noindent after \subsection in article.cls + % Dat: \indent after \subsection in amsart.cls (\@noskipsecfalse) + % vvv Dat: strange: \ifvmode anf \if@noskipsec. + \ifvmode\if@noskipsec\leavevmode\fi\par\vskip-\parskip + \else\@noskipsecfalse\par\vskip-\parskip\fi + \leavevmode--\hbox{ }} +\ifnum\magyar@opt@@mond \expandafter\ifx\csname mond\endcsname\relax1\fi>1 % 21, 2, 11, 1 + \let\mond\@@magyar@mond +\fi +\@gobble +{^}% + +% --- hang= + +\if0\magyar@opt@@hang \@@magyar@skiplong\fi +%** Usage: \hang{-- } Foo\par +\def\@@magyar@hang#1{% + \begingroup + \setbox0\hbox{#1}% + \advance\linewidth-\wd0 % not \hsize + \advance\@totalleftmargin\wd0 + \edef\reserved@a{\parshape=1 \the\@totalleftmargin\space\space\the\linewidth\space}% + \par\noindent\kern-\wd0 \box0 % Dat: \box0 destroys \wd0 + \expandafter\endgroup\expandafter\begingroup\reserved@a + \let\hang@@par\par + \def\par{\hang@@par\endgroup}% OK, works even inside \begin{quotation} + %\def\par{\endgroup\par}% doesn't work, restores \parshape too early + \ignorespaces +}% +\ifnum\magyar@opt@@hang \expandafter\ifx\csname hang\endcsname\relax1\fi>1 % 21, 2, 11, 1 + \let\hang\@@magyar@hang +\fi +\@gobble +{^}% + +% vvv hyphenmins= + +\ifx\magyar@opt@@hyphenmins\@empty\else + \edef\reserved@a{\noexpand\@namedef{\CurrentOption hyphenmins}{\magyar@opt@@hyphenmins}} + \reserved@a +\fi + +% !! + +%\def\skipfoo #1foo {% +% \ifx#1\hfuzz\else +% (#1)% +% \expandafter\skipfoo +% \fi +%} + + +% vvv cjhebrewfix= % by pts@fazekas.hu at Tue Apr 19 18:26:54 CEST 2005 +% thanks to Zoltn Hamar for reporting the problem +% Dat: the ultimate solution is active=onlycs, but it limits other +% functionality +% Dat: use \def\h{\cjRL} in the preamble to abbreviate \cjRL +% wrong: \let\h\cjRL +% wrong: \newcommand{\h}[1]{\cjRL{#1}} +% Dat: cjhebrew uses the following strings for typesetting Hebrew letters: +% ' b g d h w z .h .t y k K l m M n N s ` p P .s .S q r ,s +s t * a a: +% /a e i o O u U E E: A A: | * : ; -- +% Dat: headings in `\pagestyle{headings} \section{(\cjRL{`l})}' doesn't work +% as expected, because \MakeUppercase capitalizes the L, too. +% Solution #1: +% \DeclareRobustCommand\mycjcommand{\cjRL{`l}} +% \section{(\mycjcommand)} +% Solution #2: (won't convert any heading to uppercase) +% % change the definition of \ps@headings, remove \MakeUppercase +% \makeatletter \def\ps@headings{% +% \let\@oddfoot\@empty \let\@mkboth\markboth +% \def\@oddhead{{\slshape\rightmark}\hfil\thepage}% +% \def\sectionmark##1{\markright {\iffalse\MakeUppercase\fi{% +% \ifnum \c@secnumdepth >\m@ne \thesection\quad \fi##1}}}} +\if0\magyar@opt@@cjhebrewfix \@@magyar@skiplong\fi +% Dat: \cjRL{`l} in cjhebrew.sty should typeset two letters, but typesets +% only one if ` is \active. Use this code to fix it. +% Imp: also fix in command arguments etc. Change catcode later. +\if1\magyar@opt@@cjhebrewfix % =onlyouter +% Dat: this doesn't work in the argument of \section etc., but it allows +% LaTeX commands (\) in the arg of \cjRL +\def\@@magyar@cjhebrewfix{% + \let\@@magyar@orig@cjRL\cjRL + \def\cjRL{\begingroup\catcode\string``=12 \@@magyar@cjRL@low}% + \def\@@magyar@cjRL@low##1{\@@magyar@orig@cjRL{##1}\endgroup}} +\else % =yes +% Dat: this works in the argument of \section etc., but it doesn't allow +% LaTeX commands (\) in the arg of \cjRL +\def\reserved@b{\protect} +\edef\reserved@b{\expandafter\strip@prefix\meaning\reserved@b} +%\show\reserved@b +\edef\reserved@a{% + \noexpand\def\noexpand\@@magyar@cjhebrew@skipa##1\reserved@b{% + \noexpand\ifx##1\noexpand\hfuzz\noexpand\@empty\noexpand\else + ##1%(##1)% + \noexpand\expandafter\noexpand\@@magyar@cjhebrew@skipa + \noexpand\fi}% + \noexpand\def\noexpand\@@magyar@cjhebrew@skipb##1\noexpand\hfuzz{% Dat: this removes all `\protect ' + \noexpand\@@magyar@cjhebrew@skipa##1\reserved@b\noexpand\hfuzz\reserved@b}} +\reserved@a +\def\@@magyar@cjhebrewfix{% + \let\@@magyar@orig@cjRL\cjRL + %\let\@@magyar@orig@cjRL\bf + \DeclareRobustCommand\cjRL[1]{\begingroup + \toks@{##1}% + %\showthe\toks@ + \edef\reserved@a{\the\toks@}% + \edef\reserved@a{\expandafter\strip@prefix\meaning\reserved@a}% + % Dat: we're almost complete here, but 1st we want to remove all + % instances of `\protect ' (catcodes 12 and 10), which were inserted + % into \firstmark, i.e. with \section{A\cjRL{`l}B}, \firstmark + % becomes: `{}{\protect \csname foreignlanguage \endcsname {magyar}{\protect \MakeUppercase {1\hskip 1em\relax A\protect \cjRL {\protect `l}B}}}' + \edef\reserved@a{\expandafter\@@magyar@cjhebrew@skipb\reserved@a\hfuzz}% + %\show\reserved@a + \expandafter\@@magyar@orig@cjRL\expandafter{\reserved@a}\endgroup}} +\fi +\AtBeginDocument{\ifx\cjRL\@undefined\else\@@magyar@cjhebrewfix\fi} +\@gobble +{^}% + +% vvv varioref= + +\if0\magyar@opt@@varioref \@@magyar@skiplong\fi +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \@@magyar@setup@varioref} % Dat: we are we late enough so we override varioref.sty +% vvv don't apply changes if varioref.sty wasn't loaded +\AtBeginDocument{\expandafter\ifx\csname vpagerefrange\endcsname\relax + \let\@@magyar@setup@varioref\@empty\fi} +\def\@@magyar@setup@varioref{% Dat: must be a separate macro for suggestions= not to find our \reftextfaceafter etc. + \def\reftextfaceafter {\reftextvario{a t\'ul\-ol\-da\-lon}{a k\"o\-vet\-kez\H{o} ol\-da\-lon}}% + \def\reftextfacebefore{\reftextvario{a t\'ul\-ol\-da\-lon}{az el\H{o}\-z\H{o} ol\-da\-lon}}% + \def\reftextafter {a k\"o\-vet\-kez\H{o} ol\-da\-lon}% + \def\reftextbefore {az el\H{o}\-z\H{o} ol\-da\-lon}% + \def\reftextcurrent {ezen az ol\-da\-lon}% + \def\reftextfaraway##1{a~\csname @@magyar@az@lowxu\endcsname{\pageref{##1}}.~ol\-da\-lon}% + \def\reftextpagerange##1##2{a~\csname @@magyar@az@lowxu\endcsname{\pageref{##1}}% + --\pageref{##2}.~ol\-da\-la\-kon}% + \def\reftextlabelrange##1##2{{}\csname @@magyar@told\endcsname\ref{##1}+tol{} + \ref{##2}-ig}% Dat: `{}' is here for anti-\capitalize +} +\@gobble +{^}% + +% vvv fancyhdr= +% +% Dat: magyar.ldf has to be loaded first, otherwise it cannot fix +% `\usepackage{fancyhdr} \pagestyle{fancy}' + +\if0\magyar@opt@@fancyhdr \@@magyar@skiplong\fi +\expandafter\ifx\csname ps@fancy\endcsname\relax + % Emit a warning if \pagestyle{fancy} is used after this. + % The original definition: \def\ps@fancy{\@fancyplainfalse\ps@@fancy} + \def\@@magyar@@ps@fancy{\@fancyplainfalse\ps@@fancy}% +\else + \addto\ps@fancy{% works for article.cls, report.cls and book.cls + \@ifundefined{chapter}{% + % article: + % > \sectionmark=macro: + %#1->\markboth {\MakeUppercase {\ifnum \c@secnumdepth >\z@ + %\thesection \hskip 1em\relax \fi #1}}{}. + \def\sectionmark#1{\markboth{\MakeUppercase{\ifnum \c@secnumdepth>\z@ + \thesection.\magyar@opt@@hdrtitleskip \fi #1}}{}}% + % vvv Imp: do we need \if@twoside to set \subsectionmark here? + % #1->\markright {\ifnum \c@secnumdepth >\@ne \thesubsection + % \hskip 1em\relax \fi #1}. + \def\subsectionmark#1{\markright {\ifnum \c@secnumdepth >\@ne + \thesubsection.\magyar@opt@@hdrtitleskip \fi #1}}% + }{\def\chaptermark#1{ + \markboth{\MakeUppercase{\ifnum \c@secnumdepth>\m@ne + % report.cls doesn't have \if@mainmatter, so we replace it with \iftrue + \@gobble\iftrue % balance for quick skipping + \@@magyar@ifmainmatter % must be macro if quick skipping + \magyar@huordinal@chapterheaddot + \@chapapp.\magyar@opt@@hdrtitleskip + \fi % for \if@mainmatter + \fi#1}}{}}% + \def\sectionmark#1{\markright{\MakeUppercase{\ifnum \c@secnumdepth>\z@ + \thesection.\magyar@opt@@hdrtitleskip \fi#1}}}}}% + \def\@@magyar@@ps@fancy{\relax}% must be done after suggestions= +\fi +% This definition must be outside \iffalse. +\def\@@magyar@ifmainmatter{% + \csname \ifx\if@mainmatter\@undefined iftrue\else if@mainmatter\fi + \endcsname} +\@gobble +{^}% + +% vvv ntheoremfix= + +%** Fix for the `! Undefined control sequence. \select' error message with +%** ntheorem.sty +%** +%** The reason for the error is that magyar.ldf emits +%** \select@language{magyar} into .thm files (as well as .toc, .lof, .lot +%** etc. files), and LaTeX cannot read those files without \makeatletter +%** because of the @ in the \select@language command. +%** +%** Our solution: add \makeatletter somewhere before \@input{\jobname.thm} to +%** the macro which reads the .thm file (\thm@processlist) in ntheorem.sty . +\if0\magyar@opt@@ntheoremfix \@@magyar@skiplong\fi + \def\magyar@@ntheoremfix{% + \expandafter\ifx\csname ver@ntheorem.sty\endcsname\relax\else + \ifx\thm@processlist\@undefined\else + % This doesn't work, because the body of \thm@processlist contains # + %\expandafter\def\expandafter\thm@processlist\expandafter{% + % \expandafter\begingroup\expandafter\makeatletter + % \thm@processlist\endgroup}% + \expandafter\@temptokena\expandafter{% + \expandafter\begingroup\expandafter\makeatletter + \thm@processlist\endgroup}% + \edef\thm@processlist{\the\@temptokena}% + \fi + \fi + } + \AtBeginDocument{\magyar@@ntheoremfix} + \@gobble +{^}% + +% vvv extras=, must be last + +\ifnum\magyar@opt@@extras=0 + % Dat: \extrasmagyar might break compatibility with future LaTeX packages. + % Use this option to turn all of them off, for debugging purposes. + \expandafter\let\csname extras\CurrentOption\endcsname\@empty + \expandafter\let\csname noextras\CurrentOption\endcsname\@empty +\fi + +% --- Finish + +\ldf@finish\CurrentOption% \input \CurrentOption.cfg + +% !! doc: (\string!) +% !! doc: \umlautlow is much more important in OT1 cmr fonts than in T1 +% !! %** @example rtelmezs\/bellts +% \def\per{/\penalty\exhyphenpenalty\hskip\z@skip} +% !! \itemize identation +% !! layout.sty +%\DeclareOption{magyar}{% +% \def\Headertext{Fejl\'ec} +% \def\Bodytext{A dokumentum teste\qquad} +% \def\Footertext{L\'abl\'ec} +% \def\MarginNotestext{Sz\'el-\\jegyzet} +% \def\oneinchtext{1 inch} +% \def\notshown{nem l\'atszik} +% } +% !! vvv this w/ and w/o nathb.sty: $H_{`symm}$, $H_``symm $ +%\let\@@magyar@saved@mathoptions@on\mathoptions@on +%\def\mathoptions@on{% overrides nath.sty +% \catcode``12 % deactivate +% \begingroup\lccode`~``\lowercase{\endgroup\def~}{\abbreviation}% +% % ^^^ \def`{\abbreviation}, but with active ` +% \@@magyar@saved@mathoptions@on +%} +% !! doc: hegyes`-szg +% !! option to detect new magyar.ldf from a TeX file +% !! book.cls \appendix \chapter, sub-numbers into TOC, need dot after `A. fggelk'? Gyurgyk recommends `1. fggelk'. +% !! \MathReal, frenchb.ldf, \nombre +% !! \told\ref{foo}+ban{}, if \foo expands to empty (no \section etc. in .tex file) +% !! french.ldf number decimal comma etc. +% !! \hunnewlabel should store `table', `figure', `section', `equation' etc. +% !! letter.cls +% !! should \newlabel emit a `.' ? (now doesn't) -- compatibility +% `\aref{ekezetek}.\ tblzat' needs explicit `.' +% !! alternative solutions for meny-nyi (possibly defining ligatures?) +% !! baseline grid? +% !! Bujdos`--Wettl: http://www.math.bme.hu/~wettl/plcv/pdf/BWfinal.pdf +% !! some comments not related to magyar.ldf, but to *hyph.tex etc. +% !! add their postpara symbols +% !! section title sizes +% !! baseline grid +% !! rigid \parskip=0pt unless in prospestus or other short doc with \parindent=0pt +% !! add their \leftmargini and variations +% !! substitute bold-extended fonts with bold fonts +% !! no page numbers on blank pages +% !! \hsize <= 24cc (or 20cc) => parindent:=1quad else 2quad +% !! length of last line of par... (break line) +% !! reduce vertical whitespace around \section +% +% !! \MathReal{1.25 cm} +% !! \H,\. in OT1 \texttt +% !! maybe \index{|run husort.pl} +% !! virtual fonts to support \umlauthigh and \umlautlow in T1 encoding +% fnt_def1: scaled size is relative (2^20==1), design size is absolute (same as in local TFM) +% disallowed DVI: bop,eop, >=243 +% down(2^19) moves down 10/2 pt if the design size is 10pt +% dimensions must be <2^24 (160pt, ~5.62cm) +% w=x=y=z=0 +% !! \begin{description} \bf -> \em ?, auto-dot +% !! \def\mdqon{\shorthandon{"}} \def\mdqoff{\shorthandoff{"}} (possibly deactivate `?' etc.) +% !! fix \initiate@active@char for other languages +% !! \addto\shorthandsspanish... +% !! spanish.ldf \es@activate, \if@safe@actives\then +% !! esperanto.ldf why? \declare@shorthand{system}{^}{\csname normal@char\string^\endcsname} +% !! add other low accents for umlaut=low: \. (i) and \' +% !! full amsart.cls compatibility?? +% !! huhyph.tex wrong \showhyphens{azthehe}% az-t-hehe +% !! huhyph.tex wrong zs-hehe +% !! huhyph.tex why sza-badstrand, but szbadsg-rand +% !! \index{foo|hyperpagearg{\textbf}} +% !! combine \magyar@opt@@titleskip, amstocnumskip and \magyar@post@... +% !! \begin{textqq} ? combined command and env +% !! tmagyar.tex \tableofcontents wide \section +% !! \restoreparindent in \item in \itemize +% \edef\restoreparindent{\parindent\the\parindent\relax} in \@listi +% !! 1848 mrcius+nak kzepe +% !! should \told insert \, ?? (no, only \told*??) +% !! \told45{-ed-hez} ?? +% !! \told{45}-ed-hez ?? +% !! \told45\od\hoz \told45+\od\hoz +% !! \told45+adik+val +ad+val etc. +% !! \azhuphy +% !! \huphy{-3331234.5678pF^{-1}} -> $-$3\,331\,234,5678\,pF^{-1} +% !! \huphy if non-Hungarian is the lang {,}->{.} +% !! \huphy ifmmode? +% !! french.ldf \CyrillicGuillemets +% !! french.ldf \LasyGuillemets +% !! huplain.bst editor = "Wizar{\BN dj} V. Oz and Mihalis Yannakakis", +% !! huplain.bst w/o magyar.ldf +% !! hyperref.sty bugfix when turning hyperref.sty on, \ref is spoiled: +% w/ or w/o magyar.ldf +% ! Argument of \@fifthoffive has an extra }. +% +% \par +% l.48 Ld. \ref{tab} +% !! > Kiprbltam, s tnyleg pontosan ugyanaz a fjl magyar.ldf (texmf fban) s +% > magyar-0510.ldf (aktulis knyvtrban) nven ms eredmnyt ad. +% (cjhebrew) +% !! a4wide.sty doesn't compile +% \documentclass[12pt,a4paper]{article} +% \usepackage{t1enc} +% \usepackage{times}% Imp: math mode +% \usepackage[magyar]{babel} +% \usepackage{graphicx} +% \usepackage[latin2]{inputenc} +% %\usepackage{a4wide}% SUXX: doesn't work with magyar.ldf +% \pagestyle{empty} +% \begin{document} +% !! % Imp: magyar.ldf: \textdt{tudja`=e}, \textdt{tudja`-e}; +% !! space in front of `;' is too large with \usepackage{times} +% \declare@shorthand{\CurrentOption}{;}{\magyar@thinspaced;} +% !! doc: `- not suitable in .bib files etc. +% !! \cite{foo,bar} -> `[2, 1]' increasing order preferred +% Imp: indent using the maximum footnotemark *** count on the current page +% Imp: generate ,,harminchrombl'' by \told{\@huordinal{33}}+bol etc. +% +% Dat: \mathcode`\,="013B % s gy a tizedes trtekben matematikai mdban sem lesz kz +% Dat: \mathchardef\comma="613B % a vesz (,) ami matematikai mdban elvlaszt karakterknt hasznlhat +% Dat: additive \PassOptionsToPackage{foo=bar}{magyar.ldf} +% Dat: for book.cls and article.cls: the user has to run \pagestyle{headings} after \selectlanguage{magyar} -- for performance reasons +% Dat: doc: \let\@@magyar@setup@psheadings\relax maybe needed in the preamble +% Dat: \pagestyle{headings} is forced \AtBeginDocument -- user should change it later +% Dat: babel.def assumes we have: \textquotedblright \textquoteright \ll \gg +% < > +% Dat: babel.def defines for OT1 and others: \quotedblbase \quotesinglbase +% \guillemotleft \guillemotright \guilsinglleft \guilsinglright \ij \IJ +% \dj \DJ \SS +% Dat: babel.def defines the following robust commands in math and text modes: +% \glq \grq \glqq \grqq \flq \frq \flqq \frqq +% Dat: OT1 encoding respects accents=low (\umlauthigh and \umlautlow), but T1 +% doesn't -- but we need T1 for hyphenation of accented words +% Dat: \usepackage{t1enc} is faster than \usepackage[T1]{fontenc} +% Dat: \languageattribute should be specified in the document preamble, and +% not changed again +% Dat: it is possible to have 1 letter, e.g \declare@shorthand{turkish}{=}{...} +% Dat: Babel \@activated emits a \PackageInfo entry +% Dat: (` `) is equivalent to (``), because TeX ignores spaces before macro +% arguments +% Dat: example of the so-called ``dual load'': +% \PassOptionsToPackage{frenchspacing=yes}{magyar.ldf} +% \PassOptionsToPackage{frenchspacing=no}{hungarian.ldf} +% \usepackage[hungarian,magyar]{babel} +% Dat: argument of \az and \told may not contain \if..., \else and \fi +% OK: works with article.cls: (mathbrk=fix) +% \noindent s ebbl a tovbbi hrom rsz terlete +% $\displaystyle{1\over3}-{1\over 4}={1\over 12}$, +% $\displaystyle{1\over 2}-{1\over 4}={1\over 4}$ s +% $\displaystyle{1\over 4}+\bigg({1\over 2}-{1\over 3}\bigg)={1\over 4}+{1\over 6}}=\displaystyle{5\over 12}$ +% terletegysg. +% OK: doc in magyarldf-doc.tex: enumeration in math, see $a,\ b$ in nath.sty +% OK: mathbrk=fix +\\+ (all binary ops and relations) in math, \nobreak\cdot, \nobreak\slash +% OK: footnote text indented, asterisks on pages +% OK: Kiss Eld\nobreak\,\nobreak--\,Nagy Pl ... +% OK: \partname in book.cls (seems to work now) +% OK: Els rsz +% OK: smartly disable active chars in preamble +% OK: \@inpenc@undefined defined and != latin2 => recommend \usepackage[latin2]{inputenc} +% OK: \encodingdefault != T1 => recommend \usepackage{t1enc} +% OK: Warning if \l@hungarian vs \l@magyar undefined +% OK: amsart.cls \listoftables overfull \hbox (\magyar@amslevelfix) +% OK: dzs-dzs +% OK: \expandafter\addto\csname extras\CurrentOption\endcsname{\bbl@frenchspacing} +% OK: provide \magyarhyphenmins +% OK: compatibility with latex.ltx, theorem.sty, ntheorem.sty, amsthm.sty +% OK: \PackageWarning if \magyarOptions defined too late +% OK: like frenchb.ldf \declare@shorthand{french}{;}{ +% OK: \told\ref{hellopart}+es{} rszt olvasd el. +% OK: \told appends suffixes to numbers +% OK: activeacute, activegrave babel options +% OK: even more parts made conditional +% OK: \@hunumeral \@huordinal \@Hunumeral \@Huordinal +% OK: negative numbers \told-5-nek, `mnusz kettedik' etc. +% OK: magyar.ldf defaults=hu-min (mathbrk=define) $x+116=\break x-97$ adds space only to BOL; added \nobreak before \discretionary -- and the problem was solved +% OK: fixed. varioref.sty (2001/09/04 v1.3c) mustn't be loaded with option +% [magyar], because that option contains a stupid \AtBeginDocument hook +% added to \extrasmagyar +% OK: Bujdos`--Wettl: add their {itemize} symbols and {enumerate} styles +% OK: spacing around excl. marks in math mode ! closing(5) -> punct(6) +% better solution (found in nath.sty): \def!{\mathchar20513\relax\mathopen{}\mathinner{}}, +% because it doesn't need braces +% No: \@makecaption in frenchb.ldf -> magyar.ldf + +\@@magyar@restcats +\endinput% of magyar.ldf diff --git a/src/thesis.kilepr b/src/thesis.kilepr new file mode 100644 index 0000000..3df15a3 --- /dev/null +++ b/src/thesis.kilepr @@ -0,0 +1,85 @@ +[General] +bib_extensions=.bib +bibliographyBackendAutoDetected= +bibliographyBackendUserOverride=BibTeX +def_graphic_ext= +img_extIsRegExp=false +img_extensions=.eps .jpg .jpeg .png .pdf .ps .fig .gif +kileprversion=3 +kileversion=2.9.93 +masterDocument= +name=thesis +pkg_extIsRegExp=false +pkg_extensions=.cls .sty .bbx .cbx .lbx +src_extIsRegExp=false +src_extensions=.tex .ltx .latex .dtx .ins + +[Tools] +MakeIndex= +QuickBuild= + +[item:content/abstract.tex] +archive=true +encoding=UTF-8 +highlight=LaTeX +mode=LaTeX + +[item:content/acknowledgement.tex] +archive=true +encoding=UTF-8 +highlight=LaTeX +mode=LaTeX + +[item:content/appendices.tex] +archive=true +encoding=UTF-8 +highlight=LaTeX +mode=LaTeX + +[item:content/closing.tex] +archive=true +encoding=UTF-8 +highlight=LaTeX +mode=LaTeX + +[item:content/create-functions.tex] +archive=true +encoding=UTF-8 +highlight=LaTeX +mode=LaTeX + +[item:content/introduction.tex] +archive=true +encoding=UTF-8 +highlight=LaTeX +mode=LaTeX + +[item:content/preparation.tex] +archive=true +encoding=UTF-8 +highlight=LaTeX +mode=LaTeX + +[item:content/results.tex] +archive=true +encoding=UTF-8 +highlight=LaTeX +mode=LaTeX + +[item:content/theory.tex] +archive=true +encoding=UTF-8 +highlight=LaTeX +mode=LaTeX + +[item:thesis.kilepr] +archive=true +encoding= +highlight= +mode= + +[item:thesis.tex] +archive=true +encoding=UTF-8 +highlight=LaTeX +mode=LaTeX diff --git a/src/thesis.tex b/src/thesis.tex new file mode 100644 index 0000000..fa013e2 --- /dev/null +++ b/src/thesis.tex @@ -0,0 +1,110 @@ +% !TeX spellcheck = hu_HU +% !TeX encoding = UTF-8 +% !TeX program = xelatex +\documentclass[11pt,a4paper,oneside]{report} % Single-side +%\documentclass[11pt,a4paper,twoside,openri\cite{microservices-apply}ght]{report} % Duplex + +\input{include/packages} + + +% Set the main variables +\newcommand{\vikszerzoVezeteknev}{Torma} +\newcommand{\vikszerzoKeresztnev}{Krist\'of} +\newcommand{\vikszerzoNeptun}{Y8O353} +\newcommand{\vikszerzoAgazat}{Internet architektúra és szolgáltatások} +\newcommand{\vikszerzoEmail}{tormakristof@tormakristof.eu} + +\newcommand{\vikkonzulensAMegszolitas}{Dr.~} +\newcommand{\vikkonzulensAVezeteknev}{Maliosz} +\newcommand{\vikkonzulensAKeresztnev}{Markosz} +\newcommand{\vikkonzulensAEmail}{maliosz@tmit.bme.hu} +\newcommand{\vikkonzulensAMeta}{\vikkonzulensAMegszolitas{} \vikkonzulensAVezeteknev \vikkonzulensAKeresztnev} + +\newcommand{\vikkonzulensBMegszolitas}{Dr.~} +\newcommand{\vikkonzulensBVezeteknev}{Simon} +\newcommand{\vikkonzulensBKeresztnev}{Csaba} +\newcommand{\vikkonzulensBEmail}{simon@tmit.bme.hu} +\newcommand{\vikkonzulensBMeta}{\vikkonzulensBMegszolitas{} \vikkonzulensBVezeteknev \vikkonzulensBKeresztnev} + +\newcommand{\vikkonzulensCMegszolitas}{} +\newcommand{\vikkonzulensCVezeteknev}{} +\newcommand{\vikkonzulensCKeresztnev}{} + +\newcommand{\vikcim}{Felhő-natív mesterséges intelligencia alapú rendszerek fejlesztése} % Cím +\newcommand{\feladatSzovege}{A félév során a feladatom egy Mesterséges Intelligencián alapuló, monolit architektúrájú szoftver átalakítása felhő natívvá. Ezzel kapcsolatban feladatom volt a rendszer felhasználótól bemenetet fogadó, valamint a Mesterséges Intelligencia (MI) kimenetét feldolgozó mikroszolgáltatások megtervezése és fejlesztése, valamint a rendszer skálázhatóságát segítő technológiák felkutatása. } +\newcommand{\viktanszek}{\bmetmit} % Tanszék +\newcommand{\vikdoktipus}{\msc} % Dokumentum típusa (\bsc vagy \msc) +\newcommand{\vikmunkatipusat}{szakdolgozatot} % a "hallgató nyilatkozat" részhez: szakdolgozatot vagy diplomatervet + +%\input{include/tdk-variables} +\newcommand{\szerzoMeta}{\vikszerzoVezeteknev{} \vikszerzoKeresztnev} % egy szerző esetén +%\newcommand{\szerzoMeta}{\vikszerzoVezeteknev{} \vikszerzoKeresztnev, \tdkszerzoB} % két szerző esetén + +%Language configuration -- choose one +% Beállítások magyar nyelvű dolgozathoz +\input{include/thesis-hu} +% Settings for English documents +%\input{include/thesis-en} + +%Onlab beallitasok +\input{include/onlab-variables} + +%\input{include/preamble} + +%-------------------------------------------------------------------------------------- +% Table of contents and the main text +%-------------------------------------------------------------------------------------- +\begin{document} + +\pagenumbering{gobble} + +%These includes define guidelines -- remove these +%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +%\include{include/guideline} +%\include{include/project} + +\selectthesislanguage + +%Titlepage -- choose one from below +%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +\input{include/titlepage-tmit} % Szakdolgozat/Diplomaterv címlap +%\include{include/titlepage-tdk} % TDK címlap +%\include{include/titlepage-otdk} % OTDK címlap + + +% Table of Contents +%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +%\tableofcontents\vfill +\clearpage + + +% The main part of the thesis +%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +\pagenumbering{arabic} + +%import your own content +\input{content/beggining} +\input{content/work} + +% Acknowledgements +%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +%\input{content/acknowledgement} + + +% List of Figures, Tables +%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +%\listoffigures\addcontentsline{toc}{chapter}{\listfigurename} +%\listoftables\addcontentsline{toc}{chapter}{\listtablename} + + +% Bibliography +%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +\addcontentsline{toc}{chapter}{\bibname} +\bibliography{bib/mybib} + +% Appendix +%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +%\input{content/appendices} + +%\label{page:last} +\end{document}