diff --git a/.gitmodules b/.gitmodules index f7343f3..5f3d67c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,9 @@ [submodule "makefiles"] path = makefiles url = https://github.com/dbosk/makefiles.git +[submodule "bibedu"] + path = bibedu + url = https://github.com/dbosk/bibedu.git +[submodule "didactic"] + path = didactic + url = git@github.com:dbosk/didactic.git diff --git a/bibedu b/bibedu new file mode 160000 index 0000000..119228a --- /dev/null +++ b/bibedu @@ -0,0 +1 @@ +Subproject commit 119228a46d53fdf4130616bdeaf36a30356cd41d diff --git a/didactic b/didactic new file mode 160000 index 0000000..4bc4ef0 --- /dev/null +++ b/didactic @@ -0,0 +1 @@ +Subproject commit 4bc4ef0f482792c72e8e1fac8b6784257a219c90 diff --git "a/fr\303\245gesport/.gitignore" "b/fr\303\245gesport/.gitignore" new file mode 100644 index 0000000..b8a1b78 --- /dev/null +++ "b/fr\303\245gesport/.gitignore" @@ -0,0 +1,10 @@ +ltxobj/ +notes.pdf +fragesport.py +frågesport.py +frågesport.tex +frågesport +slides.pdf +__pycache__/ +didactic.sty + diff --git "a/fr\303\245gesport/Makefile" "b/fr\303\245gesport/Makefile" new file mode 100644 index 0000000..0e34072 --- /dev/null +++ "b/fr\303\245gesport/Makefile" @@ -0,0 +1,43 @@ +.PHONY: all +all: slides.pdf notes.pdf + +LATEXFLAGS+= -shell-escape +USE_PYTHONTEX=true + +SRC+= frågesport.tex +SRC+= abstract.tex +SRC+= preamble.tex +SRC+= fragesport.py + +DEPENDS+= didactic.sty + +notes.pdf: notes.tex ${SRC} ${DEPENDS} +slides.pdf: slides.tex ${SRC} ${DEPENDS} + +frågesport.tex: frågesport.nw + + +.PHONY: +all: frågesport + +frågesport.py: frågesport.nw +frågesport fragesport.py: frågesport.py + cp $^ $@ + chmod +x $@ + + +.PHONY: clean +clean: + ${RM} frågesport frågesport.py frågesport.tex + ${RM} notes.pdf slides.pdf + ${RM} -R __pycache__ + + + +INCLUDE_MAKEFILES=../makefiles +include ${INCLUDE_MAKEFILES}/tex.mk +include ${INCLUDE_MAKEFILES}/noweb.mk +INCLUDE_BIBEDU=../bibedu +include ${INCLUDE_BIBEDU}/bibedu.mk +INCLUDE_DIDACTIC=../didactic +include ${INCLUDE_DIDACTIC}/didactic.mk diff --git "a/fr\303\245gesport/abstract.tex" "b/fr\303\245gesport/abstract.tex" new file mode 100644 index 0000000..15d327d --- /dev/null +++ "b/fr\303\245gesport/abstract.tex" @@ -0,0 +1,43 @@ +% What's the problem? +% Why is it a problem? Research gap left by other approaches? +% Why is it important? Why care? +% What's the approach? How to solve the problem? +% What's the findings? How was it evaluated, what are the results, limitations, +% what remains to be done? + +I den här modulen skriver vi ett frågesportprogram. +Användaren får frågor som hen försöker att svara rätt på. + +Syftet är att illustrera enkla algoritmiska problem och ge återanvändbara block +som enkelt kan modifieras. + +\emph{Lärandemål:} +Efter att ha genomfört modulen ska den lärande kunna: +\ltnote{% + Genomgående kommer vi att kommentera texten utifrån ett lärandeteoretiskt + perspektiv och koppla tillbaka till dessa lärandemål. + + Den teoretiska utgångspunkten är variationsteori, se exempelvis + \citetitle{NecessaryConditionsOfLearning} + av \citeauthor{NecessaryConditionsOfLearning} + \cite{NecessaryConditionsOfLearning}. + För en kort genomgång, se materialet på + \begin{quote} + {https://github.com/dbosk/necessary-conditions-of-learning/releases/tag/20240228} + \end{quote} + Gå även igenom filen \texttt{slides.pdf} som finns under + \foreignblockquote{british}{Assets}. +} +\begin{restatable}{lo}{LOread} + läsa grundläggande programkod med enkla konstruktioner + och, mestadels korrekt, förklara vad koden gör; +\end{restatable} +\begin{restatable}{lo}{LOwrite} + konstruera enkla algoritmer (inte syntaktiskt korrekt programkod) på en + detaljnivå lämpad för programmering, exempelvis att man måste läsa bokstav + för bokstav och göra någonting för varje. +\end{restatable} +\begin{restatable}{lo}{LOmodify} + använda existerande programkod som block i egna program, dvs \enquote{remixa} + existerande program till nya. +\end{restatable} diff --git "a/fr\303\245gesport/bibliography.bib" "b/fr\303\245gesport/bibliography.bib" new file mode 100644 index 0000000..e3fda75 --- /dev/null +++ "b/fr\303\245gesport/bibliography.bib" @@ -0,0 +1,95 @@ +@book{NecessaryConditionsOfLearning, + author={Marton, Ference}, + title={Necessary conditions of learning}, + publisher={Routledge}, + address={London}, + year={2015}, + ISBN={9780415739139}, + keywords={Fenomenologisk psykologi Inl{\"a}rning -- psykologiska aspekter}, +} + +@article{Szekely1950, + title={Productive processes in learning and thinking.}, + author={Sz{\'e}kely, Lajos}, + journal={Acta psychologica}, + year={1950}, + publisher={Elsevier Science} +} + +@article{BransfordSchwartz1999, + title={Chapter 3: Rethinking transfer: A simple proposal with multiple + implications}, + author={Bransford, John D and Schwartz, Daniel L}, + journal={Review of research in education}, + volume={24}, + number={1}, + pages={61--100}, + year={1999}, + publisher={Sage Publications Sage CA: Thousand Oaks, CA} +} + +@article {ActualVSFeelingOfLearning, + author = {Deslauriers, Louis and McCarty, Logan S. and Miller, Kelly and Callaghan, Kristina and Kestin, Greg}, + title = {Measuring actual learning versus feeling of learning in response to being actively engaged in the classroom}, + volume = {116}, + number = {39}, + pages = {19251--19257}, + year = {2019}, + doi = {10.1073/pnas.1821936116}, + publisher = {National Academy of Sciences}, + abstract = {Despite active learning being recognized as a superior method of instruction in the classroom, a major recent survey found that most college STEM instructors still choose traditional teaching methods. This article addresses the long-standing question of why students and faculty remain resistant to active learning. Comparing passive lectures with active learning using a randomized experimental approach and identical course materials, we find that students in the active classroom learn more, but they feel like they learn less. We show that this negative correlation is caused in part by the increased cognitive effort required during active learning. Faculty who adopt active learning are encouraged to intervene and address this misperception, and we describe a successful example of such an intervention.We compared students{\textquoteright} self-reported perception of learning with their actual learning under controlled conditions in large-enrollment introductory college physics courses taught using 1) active instruction (following best practices in the discipline) and 2) passive instruction (lectures by experienced and highly rated instructors). Both groups received identical class content and handouts, students were randomly assigned, and the instructor made no effort to persuade students of the benefit of either method. Students in active classrooms learned more (as would be expected based on prior research), but their perception of learning, while positive, was lower than that of their peers in passive environments. This suggests that attempts to evaluate instruction based on students{\textquoteright} perceptions of learning could inadvertently promote inferior (passive) pedagogical methods. For instance, a superstar lecturer could create such a positive feeling of learning that students would choose those lectures over active learning. Most importantly, these results suggest that when students experience the increased cognitive effort associated with active learning, they initially take that effort to signify poorer learning. That disconnect may have a detrimental effect on students{\textquoteright} motivation, engagement, and ability to self-regulate their own learning. Although students can, on their own, discover the increased value of being actively engaged during a semester-long course, their learning may be impaired during the initial part of the course. We discuss strategies that instructors can use, early in the semester, to improve students{\textquoteright} response to being actively engaged in the classroom.}, + issn = {0027-8424}, + URL = {https://www.pnas.org/content/116/39/19251}, + eprint = {https://www.pnas.org/content/116/39/19251.full.pdf}, + journal = {Proceedings of the National Academy of Sciences} +} +@article{ClosingTeachingGap, + title={Closing the teaching gap}, + author={Stigler, James W and Hiebert, James}, + journal={Phi Delta Kappan}, + volume={91}, + number={3}, + pages={32--37}, + year={2009}, + publisher={SAGE Publications Sage CA: Los Angeles, CA} +} +@article{kapur2008productive, + title={Productive failure}, + author={Kapur, Manu}, + journal={Cognition and instruction}, + volume={26}, + number={3}, + pages={379--424}, + year={2008}, + publisher={Taylor \& Francis} +} +@article{kapur2010productive, + title={Productive failure in mathematical problem solving}, + author={Kapur, Manu}, + journal={Instructional science}, + volume={38}, + number={6}, + pages={523--550}, + year={2010}, + publisher={Springer} +} +@article{kapur2012productive, + title={Productive failure in learning the concept of variance}, + author={Kapur, Manu}, + journal={Instructional Science}, + volume={40}, + number={4}, + pages={651--672}, + year={2012}, + publisher={Springer} +} +@article{johansson1985approach, + title={An approach to describing learning as change qualitatively different + conceptions}, + author={Johansson, Bengt}, + journal={Cognitive structure and conceptual change}, + pages={233--257}, + year={1985}, + publisher={Academic Press} +} + diff --git "a/fr\303\245gesport/fr\303\245gesport.nw" "b/fr\303\245gesport/fr\303\245gesport.nw" new file mode 100644 index 0000000..c4b965a --- /dev/null +++ "b/fr\303\245gesport/fr\303\245gesport.nw" @@ -0,0 +1,487 @@ +\title{% + Frågesport +} +\author{% + Daniel Bosk\thanks{% + Detta verk är licensierat under Creative Commons Erkännande-DelaLika 4.0 + Internationell Licens. + } +} +\institute{% + KTH EECS +} + +@ + +\mode* + +\begin{frame} +\maketitle +\end{frame} + +\begin{abstract} + \input{abstract.tex} +\end{abstract} +\clearpage + +\begin{frame} +\tableofcontents +\end{frame} + +\clearpage + +\section{Översikt} + +Vi vill skriva ett program ([[<>]]) som låter användaren spela +frågesport. +\ltnote{% + Variationsteorin säger att vi ska börja med helheten, + sedan med hjälp av variationsmönter plocka isär helheten i mindre delar, + för att till sist sätta ihop delarna till helheten + igen~\cite{NecessaryConditionsOfLearning}. + + Helheten i vårt fall är en utskrift från en exempelkörning av vårt tilltänkta + program. + Det som ges i \cref{ExampleRun}. + + Denna helhet måste nu plockas isär genom variation i de relevanta aspekterna + vi är ute efter, nämligen lärandemålen: + \LOread* + \LOwrite* + \LOmodify* +} +\begin{frame}[fragile] +\begin{example}[Använda programmet]\label{ExampleRun} + \only
{Om vi kör programmet ska det se ut ungefär såhär:} + \begin{minted}{text} +$ python3 frågesport.py +Vad heter huvudstaden i Sverige? +Svar: Stockholm +Det var rätt svar! + +Vad heter huvudstaden i Norge? +Svar: Helsingfors +Det var fel svar! Rätt svar är Oslo. + +Hur mycket är 1432 + 234? +Svar: 1666 +Det var rätt svar! + \end{minted} +\end{example} +\end{frame} + + +\subsection{Programstruktur} + +Vi vill ha följande struktur på koden. +\begin{frame}[fragile] +<>= +""" +<> +""" + +<> + +def huvudfunktion(): + """ + <> + """ + <> +@ +\end{frame} + +Vi behöver även köra igång huvudfunktionen när vi kör programmet (dvs inte +använder det genom att importera det i ett annat program). +<>= +if __name__ == '__main__': + huvudfunktion() +@ + +Fördelen med denna struktur är att vi kan återanvända hjälpfunktionerna i andra +program. +Funktionen \texttt{huvudfunktion} kommer då bara att köras om vi kör programmet +som huvudprogram, dvs kör [[python3 frågesport.py]]. +Den kommer inte att köras om vi importerar programmet i ett annat program, dvs +\mintinline{python}{import frågesport}. + +\begin{pycode} +from fragesport import * +\end{pycode} + + +\subsection{Modulen och huvudprogrammet} + +Låt oss nu beskriva modulen och huvudprogrammet, så att vi kan se vad som +skiljer. +\ltnote{% + Detta ger upphov till konstrast, vad skiljer modulen från huvudprogrammet? +} +\begin{frame}[fragile] +<>= +Denna modul innehåller funktioner som gör det +enkelt att bygga frågesportprogram. +<>= +Huvudprogrammet låter användaren spela ett +frågesportspel som använder modulens funktioner. +@ +\end{frame} + + +\section[Ställa frågor]{Ställa frågor med \emph{ett} rätt svar}% +\label{AskingQuestions} + +Vi will nu börja titta på hur vi kan ställa frågor med \emph{ett} rätt svar. +\begin{frame}[fragile] +\begin{example}[Frågor med ett rätt svar] + \only
{Vi har frågan från exemplet ovan (\cref{ExampleRun}).} + \begin{description} + \item[Fråga] Vad heter huvudstaden i Sverige? + \item[Rätt svar] Stockholm + \end{description} +\end{example} +\begin{onlyenv}<1> +\only
{\ltnote{% + Vi vill i \cref{DesignAskingQuestion} att eleverna ska försöka att tänka ut + de individuella stegen som krävs algoritmiskt för att åstadkomma utmatningen + i \cref{ExampleRun}. + De ska inte tänka i programkod, utan i naturligt språk men med detaljerade + steg hur man behöver gå tillväga. + + Att utföra denna typ av övning---innan de har lärt sig något om hur man gör + det---har en bra effekt på lärandet~\cite{Szekely1950}. + Detta ger dem även möjlighet till variationsmönstret + kontrast~\cite[jmf][]{NecessaryConditionsOfLearning}. + Sedan kan denna övning även utgöra ett + \enquote{pre-test}~\cite[kap.~7]{NecessaryConditionsOfLearning}. +}} +\begin{exercise}[Designa algoritmen]\label{DesignAskingQuestion} +Vad behöver vi göra för att ställa en sådan fråga? +På samma sätt som i exemplet ovan\only
{ + (\cref{ExampleRun})% +}. +\end{exercise} +\end{onlyenv} +\only
{\ltnote{% + [[<>]] + är vad som ger kontrasten, nämnd ovan. + Här visar vi dem de individuella stegen, i kontrast till vad de tänkte själva + i \cref{DesignAskingQuestion}. + + De får även en kontrast i hur deras algoritmiska beskrivning formuleras i + Python. + Detta tack vare att pythonkod blir väldigt likt naturlig + \enquote{svengelska}. + + Detta bidrar till lärandemålen: + \LOread* + \LOwrite* +}} +\begin{onlyenv}<2> +<>= +print(fråga) +användarens_svar = input("Svar: ") + +if användarens_svar == rätt_svar: + <> +else: + <> +@ +\end{onlyenv} +\end{frame} + +Om vi provkör koden så ser vi att det ser ut precis som i \cref{ExampleRun}. +Alla frågor av den här typen kommer att se ut precis såhär. +Det enda som skiljer frågan om Norges huvudstad från frågan om Sveriges (i +\cref{ExampleRun}) är vad [[fråga]] och [[rätt_svar]] är. +Då är det lämpligt att återanvända denna kod i en funktion som vi kan använda +flera gånger. +\begin{frame}[fragile] +<>= +def ställ_fråga(fråga, rätt_svar): + """ + Ställer en fråga och rättar användarens svar. + Returnerar sant (True) om användaren svarade rätt, + annars falskt (False). + """ + <> +@ \only
{% +Detta säger också vad vi ska göra för att [[<>]] och +[[<>]].% +} +\begin{onlyenv}<1> +<>= +print("Det var rätt svar!") +<>= +print(f"Det var fel svar! Rätt svar är {rätt_svar}.") +@ +\end{onlyenv} +\begin{onlyenv}<2> +\only
{\ltnote{% + Om eleverna aldrig har programmerat tidigare, då kommer + \cref{ExerciseUseFunction} att vara väldigt svår att få rätt. + Eventuellt att de kan ge ett svar baserat på deras kunskaper om funktioner i + matematiken. + + \Cref{ExerciseUseFunction} låter dem dock försöka angripa problemet först, + vilket är bättre för lärandet~\cite{Szekely1950}. + Övningen kan också användas som en slags \enquote{pre-test} för att se hur + mycket de kan redan innan vi har gått igenom + det~\cite[kap.~7]{NecessaryConditionsOfLearning}. +}} +\begin{exercise}[Använda funktionen]\label{ExerciseUseFunction} + Hur tror ni att vi gör för att använda denna funktion? +\end{exercise} +\end{onlyenv} +\end{frame} + +Funktionen som helhet ser ut såhär. +\begin{frame}[fragile] +\inputminted[firstline=7,lastline=21]{python}{fragesport.py} +\end{frame} + +\subsection{Använda funktionen}\label{UsingTheFunction} + +Om vi nu vill använda funktionen kan vi göra såhär. +\ltnote{% + Notera variationen mellan exemplen i detta avsnitt + (\cref{ExampleStockholm,ExampleMaths,ExampleMathsWrong}). + Vi varierar frågorna och svaren för att visa att funktionen kan användas för + olika typer av frågor. + Båda frågorna har de sett tidigare i \cref{ExampleRun}. + Eleverna kan då lära sig hur de kan variera argumenten till funktionen för + att åstadkomma olika frågor. + + Detta fokuserar på + \LOmodify* +} +\begin{frame}[fragile] +\begin{example}[Använda funktionen]\label{ExampleStockholm} +\only
{% +Vi har följande kod: +}\only{% +Kod: +} + \begin{minted}{python} +ställ_fråga("Vad heter huvudstaden i Sverige?", + "Stockholm") + \end{minted} +\only
{% +Utmatningen blir följande: +}\only{% +Utmatning: +} + \begin{minted}{text} +Vad heter huvudstaden i Sverige? +Svar: Stockholm +Det var rätt svar! + \end{minted} +\end{example} +\end{frame} + +Vi kan även ställa andra typer av frågor, huvudsaken är att de har rätt svar. + +\only
{\ltnote{% + I \cref{ExerciseChangeQuestion} ger vi eleverna möjlighet att variera de + relevanta delarna av exemplet för att åstadkomma den förändring vi är ute + efter, nämligen att ändra frågan till en av de andra frågorna. + + Om de gör fel kommer vår lösning att ge dem den nödvändiga kontrasten för att + se vad som är det relevanta att ändra. + Detta betyder att vi endast ska \emph{ändra minsta möjliga} för att + åstadkomma den förändring vi är ute + efter~\cite{NecessaryConditionsOfLearning}. + Dvs vi vill bara ändra frågan och svaret, inte något annat; exempelvis, + variabelnamnen måste vara desamma. + + Detta blir också ett slags \enquote{post-test} för att testa hur väl de har + bemästrat detta~\cite[kap.~7]{NecessaryConditionsOfLearning}. +}} +\begin{frame}[fragile] +\begin{exercise}[Använda funktionen]\label{ExerciseChangeQuestion} + Vad ska vi ändra för att ställa de andra frågorna i exempelkörningen + ovan\only
{ (\cref{ExampleRun})}? + (Dvs frågan om Norges huvudstad och frågan om 1432+234.) +\end{exercise} +\end{frame} + +\begin{frame}[fragile] +\begin{example}[Använda funktionen]\label{ExampleMaths} + \only
{% + Vi har följande kod\footnote{% + Vi kommer att återkomma till hur vi kan få datorn att räkna i + \cref{MathQuestions}. + }: + }\only{% + Kod: + } + \begin{minted}{python} +ställ_fråga("Hur mycket är 1432 + 234?", + "1666") + \end{minted} + \only
{% + Utmatningen blir följande: + }\only{% + Utmatning: + } + \begin{minted}{text} +Hur mycket är 1432 + 234? +Svar: 1666 +Det var rätt svar! + \end{minted} +\end{example} +\end{frame} + +Men vi kan även svara fel. +\ltnote{% + Alla exempel vi har haft hittills (\cref{ExampleStockholm,ExampleMaths}) har + varit där användaren ger rätt svar. + Det är därför viktigt att vi även visar vad som händer när användaren svarar + något annat än rätta svaret. + Notera att vi inte varierar något annat än användarens inmatade svar mellan + \cref{ExampleMaths,ExampleMathsWrong}. + Detta är en viktig detalj. +} +\begin{frame}[fragile] +\begin{example}[Använda funktionen]\label{ExampleMathsWrong} + Samma kod som ovan\only
{ + (\cref{ExampleMaths})% + }, men med annan inmatning: + \begin{minted}{text} +Hur mycket är 1432 + 234? +Svar: 1667 +Det var fel svar! Rätt svar är 1666. + \end{minted} +\end{example} +\end{frame} + +\subsection{Ett möjligt huvudprogram}\label{ConstructingAMainProgram} + +Vi skulle nu kunna sätta ihop ett huvudprogram som ger motsvarande utmatning +som i \cref{ExampleRun}. +\ltnote{% + Här visar vi eleverna hur de kan sätta ihop de olika delarna till helheten. + Vi kan nu provköra huvudprogrammet i + [[<>]] + för att variera användarens möjliga inmatningar. + + Även här fokuserar vi på + \LOmodify* +} +\begin{frame}[fragile] +<>= +ställ_fråga("Vad heter huvudstaden i Sverige?", + "Stockholm") +ställ_fråga("Vad heter huvudstaden i Norge?", + "Oslo") +ställ_fråga("Hur mycket är 1432 + 234?", + "1666") +@ +\end{frame} + +Huvudprogrammet som helhet blir då följande: +\begin{frame}[fragile,allowframebreaks] +\inputminted[firstline=22,lastline=29]{python}{fragesport.py} +\end{frame} + +\ltnote{% + Här låter vi eleverna variera alla delar som de har lärt sig är relevanta att + ändra på. + Med det har vi gått igenom de olika variationsteoretiska stegen: kontrast, + generalisering och, nu, fusion---men bara för användandet av funktionen + [[ställ_fråga]]. + Dvs relaterat till + \LOmodify* + + För att täcka de andra lärandemålen behöver vi mer variation i algoritmiska + konstruktioner och motsvarande översättningar till Python. + Detta hamnar i fokus när vi går över till \cref{QuestionBanks,MathQuestions}. + + Det finns även andra aspekter som vi inte har tagit upp, exempelvis ordningen + på argumenten. + Detta är dock inte relevant för lärandemålen vi har satt upp, då det handlar + om att använda existerande programkod som block i egna program istället för + att producera egen kod. + Men vi kan göra eleverna uppmärksamma på denna aspekt genom + \cref{ExerciseOrderOfArguments}. + Det kan vara användbart då studenterna kan göra misstag om de skriver av + istället för att modifiera en kopia. +} +\begin{frame}[fragile] +\begin{exercise}[Konstruera ett annat huvudprogram]\label{ExerciseAnotherMain} + Konstruera ett annat huvudprogram som ställer andra frågor. + Använd funktionen + \begin{center}[[ställ_fråga]]\end{center} + för att ställa frågorna och rätta svaren. +\end{exercise} +\end{frame} + +\begin{frame}[fragile] +\begin{exercise}[Ordningen på argumenten]\label{ExerciseOrderOfArguments} + Vad händer om vi byter ordningen på argumenten till [[ställ_fråga]]? +\end{exercise} +\end{frame} + + +\section[Frågebanker]{Frågebanker för frågor med ett rätt svar}% +\label{QuestionBanks} + +Nu vill vi titta på hur vi kan använda frågebanker. +Tanken är då att vi bara lägger till frågor i frågebankerna utan att behöver +ändra koden---till skillnad från tidigare, där vi behövde lägga till ny kod för +varje fråga. +\ltnote{% + \Cref{QuestionBanks,MathQuestions,MultipleChoice} är alla variationer på den + ursprungliga algoritmen i \cref{AskingQuestions}. + Detta krävs för att vi ska kunna åstadkomma tillräckligt med variation för + att täcka + \LOread* + \LOwrite* + + Detta kommer naturligtvis att introducera nya \enquote{kodblock} som vi måste + introducera lämplig variation för för att eleverna ska kunna använda dem + korrekt. + Dvs vi behöver göra för de nya konstruktionerna samma typ av + variationsmönster som vi gjorde i + \cref{UsingTheFunction,ConstructingAMainProgram}. + På så vis behöver vi inte gå igenom saker som datatyper, även om frågebanker + handlar om just det. + Målet är att eleverna lär sig att använda konstruktionen som ett + \enquote{kodblock} som de kan modifiera för att åstadkomma andra saker. + Målet är inte att de ska lära sig använda olika datatyper, målet är att de + ska lära sig modifiera \enquote{kodblocket} (som råkar innehålla datatypen + [[dict]], exempelvis). +} + +\dots + + +\section{Matematiska frågor}\label{MathQuestions} + +Vi har tidigare sett frågan om \(1432+234\) + (\cref{ExampleRun,ExampleMaths,ExampleMathsWrong}). +Då var vi tvungna att skriva in svaret i koden. +Ville vi ha andra tal var vi tvungna att lägga till dem. +Detta känns dock kontraproduktivt då vi kör programmet på en extremt kraftfull +\enquote{miniräknare}. +Det vi vill göra här är att generera \enquote{oändligt} med frågor och räkna ut +svaren automatiskt, så att vi inte behöver skapa varje fråga och svar manuellt +i koden. + +\dots + + +\section[Flervalsfrågor]{Frågor med flera svarsalternativ}% +\label{MultipleChoice} + +Tidigare har vi haft frågor med ett rätt svar. +Ett problem med dem är att användaren måste skriva exakt rätt för att få rätt, +minsta avvikelse i stavning eller liknande ger fel. +På så vis är det enklare om användaren kan få flera svarsalternativ att välja +mellan. + +\dots + +\begin{frame}[allowframebreaks] + \printbibliography +\end{frame} + diff --git "a/fr\303\245gesport/notes.tex" "b/fr\303\245gesport/notes.tex" new file mode 100644 index 0000000..e291620 --- /dev/null +++ "b/fr\303\245gesport/notes.tex" @@ -0,0 +1,17 @@ +\documentclass[swedish,a4paper,10pt,article,oneside,oldfontcommands]{memoir} +\let\subsubsection\subsection +\let\subsection\section +\let\section\chapter + +\usepackage[notheorems]{beamerarticle} +\setjobnamebeamerversion{slides} + +\input{preamble.tex} +\noweboptions{longxref,breakcode} + +%\usepackage{authblk} +%\let\institute\affil + +\begin{document} +\input{frågesport.tex} +\end{document} diff --git "a/fr\303\245gesport/noweb.sty" "b/fr\303\245gesport/noweb.sty" new file mode 120000 index 0000000..6e42408 --- /dev/null +++ "b/fr\303\245gesport/noweb.sty" @@ -0,0 +1 @@ +../noweb.sty \ No newline at end of file diff --git "a/fr\303\245gesport/preamble.tex" "b/fr\303\245gesport/preamble.tex" new file mode 100644 index 0000000..2930b3f --- /dev/null +++ "b/fr\303\245gesport/preamble.tex" @@ -0,0 +1,57 @@ +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[swedish]{babel} + +\usepackage{noweb} +\usepackage{booktabs} + +\usepackage[natbib,style=alphabetic,maxbibnames=99]{biblatex} +\addbibresource{bibliography.bib} + +\usepackage[all]{foreign} +\renewcommand{\foreignfullfont}{} +\renewcommand{\foreignabbrfont}{} + +%\usepackage{newclude} +\usepackage{import} + +\usepackage[strict]{csquotes} +\usepackage[single]{acro} + +\usepackage{subcaption} + +\usepackage[noend]{algpseudocode} +\usepackage{xparse} + +\let\email\texttt + +\usepackage[outputdir=ltxobj]{minted} +\setminted{autogobble,linenos} + +\usepackage{pythontex} +\setpythontexoutputdir{.} +\setpythontexworkingdir{..} + +\usepackage{amsmath} +\usepackage{amssymb} +\usepackage{mathtools} +\usepackage{amsthm} +\usepackage{thmtools} +\usepackage{thm-restate} +\usepackage[unq]{unique} +\DeclareMathOperator{\powerset}{\mathcal{P}} + +\usepackage[binary-units]{siunitx} + +\usepackage{didactic} +\ProvideSemanticEnv{lo}{Learning Objective} + {learning objective}{learning objectives} + {Learning objective}{Learning objectives} +\ProvideTranslation{swedish}{Learning Objective}{Lärandemål} +\ProvideTranslation{swedish}{Learning objective}{Lärandemål} +\ProvideTranslation{swedish}{Learning objectives}{Lärandemålen} +\ProvideTranslation{swedish}{learning objective}{lärandemål} +\ProvideTranslation{swedish}{learning objectives}{lärandemålen} + +\usepackage{hyperref} +\usepackage[swedish]{cleveref} diff --git "a/fr\303\245gesport/slides.tex" "b/fr\303\245gesport/slides.tex" new file mode 100644 index 0000000..ab0517d --- /dev/null +++ "b/fr\303\245gesport/slides.tex" @@ -0,0 +1,10 @@ +\documentclass[swedish,ignoreframetext]{beamer} + +\input{preamble.tex} +\noweboptions{breakcode,noxref} + +\begin{document} +\mode +\input{frågesport.tex} +\mode* +\end{document} diff --git a/noweb.sty b/noweb.sty new file mode 100644 index 0000000..3c72b04 --- /dev/null +++ b/noweb.sty @@ -0,0 +1,993 @@ +% noweb.sty -- LaTeX support for noweb +% DON'T read or edit this file! Use ...noweb-source/tex/support.nw instead. +{\obeyspaces\AtBeginDocument{\global\let =\ }} % from texbook, p 381 +\def\nwopt@nomargintag{\let\nwmargintag=\@gobble} +\def\nwopt@margintag{% + \def\nwmargintag##1{\leavevmode\llap{##1\kern\nwmarginglue\kern\codemargin}}} +\def\nwopt@margintag{% + \def\nwmargintag##1{\leavevmode\kern-\codemargin\nwthemargintag{##1}\kern\codemargin}} +\def\nwthemargintag#1{\llap{#1\kern\nwmarginglue}} +\nwopt@margintag +\newdimen\nwmarginglue +\nwmarginglue=0.3in +\def\nwtagstyle{\footnotesize\Rm} +\def\nwgitversion{|GITVERSION|} +% make \hsize in code sufficient for 88 columns +\ifx\ttfamily\undefined + \setbox0=\hbox{\tt m} +\else + \setbox0=\hbox{\ttfamily m} +\fi +\newdimen\codehsize +\codehsize=91\wd0 % 88 columns wasn't enough; I don't know why +\newdimen\codemargin +\codemargin=0pt +\newdimen\nwdefspace +\nwdefspace=\codehsize +% need to use \textwidth in {\LaTeX} to handle styles with +% non-standard margins (David Bruce). Don't know why we sometimes +% wanted \hsize. 27 August 1997. +%% \advance\nwdefspace by -\hsize\relax +\ifx\textwidth\undefined + \advance\nwdefspace by -\hsize\relax +\else + \advance\nwdefspace by -\textwidth\relax +\fi +\chardef\other=12 +\def\setupcode{% + \chardef\\=`\\ + \chardef\{=`\{ + \chardef\}=`\} + \catcode`\$=\other + \catcode`\&=\other + \catcode`\#=\other + \catcode`\%=\other + \catcode`\~=\other + \catcode`\_=\other + \catcode`\^=\other + \catcode`\"=\other % fixes problem with german.sty + \obeyspaces\Tt +} +\def\nwendquote{\relax\ifhmode\spacefactor=1000 \fi} +{\catcode`\^^M=\active % make CR an active character + \gdef\newlines{\catcode`\^^M=\active % make CR an active character + \def^^M{\par\startline}}% + \gdef\eatline#1^^M{\relax}% +} +%%% DON'T \gdef^^M{\par\startline}}% in case ^^M appears in a \write +\def\startline{\noindent\hskip\parindent\ignorespaces} +\def\nwnewline{\ifvmode\else\hfil\break\leavevmode\hbox{}\fi} +\def\setupmodname{% + \catcode`\$=3 + \catcode`\&=4 + \catcode`\#=6 + \catcode`\%=14 + \catcode`\~=13 + \catcode`\_=8 + \catcode`\^=7 + \catcode`\ =10 + \catcode`\^^M=5 + \let\{\lbrace + \let\}\rbrace + % bad news --- don't know what catcode to give " + \Rm} +\def\LA{\begingroup\maybehbox\bgroup\setupmodname\It$\langle$} +\def\RA{\/$\rangle$\egroup\endgroup} +\def\code{\leavevmode\begingroup\setupcode\newlines} +\def\edoc{\endgroup} +\let\maybehbox\relax +\newbox\equivbox +\setbox\equivbox=\hbox{$\equiv$} +\newbox\plusequivbox +\setbox\plusequivbox=\hbox{$\mathord{+}\mathord{\equiv}$} +% \moddef can't have an argument because there might be \code...\edoc +\def\moddef{\leavevmode\kern-\codemargin\LA} +\def\endmoddef{\RA\ifmmode\equiv\else\unhcopy\equivbox\fi + \nobreak\hfill\nobreak} +\def\plusendmoddef{\RA\ifmmode\mathord{+}\mathord{\equiv}\else\unhcopy\plusequivbox\fi + \nobreak\hfill\nobreak} +\def\chunklist{% +\errhelp{I changed \chunklist to \nowebchunks. +I'll try to avoid such incompatible changes in the future.}% +\errmessage{Use \string\nowebchunks\space instead of \string\chunklist}} +\def\nowebchunks{\message{}} +\def\nowebindex{\message{}} +% here is support for the new-style (capitalized) font-changing commands +% thanks to Dave Love +\ifx\documentstyle\undefined + \let\Rm=\rm \let\It=\it \let\Tt=\tt % plain +\else\ifx\selectfont\undefined + \let\Rm=\rm \let\It=\it \let\Tt=\tt % LaTeX OFSS +\else % LaTeX NFSS + \def\Rm{\reset@font\rmfamily} + \def\It{\reset@font\itshape} + \def\Tt{\reset@font\ttfamily} + \def\Bf{\reset@font\bfseries} +\fi\fi +\ifx\reset@font\undefined \let\reset@font=\relax \fi +\def\nwbackslash{\char92} +\def\nwlbrace{\char123} +\def\nwrbrace{\char125} +\def\noweboptions#1{% + \def\@nwoptionlist{#1}% + \@for\@nwoption:=\@nwoptionlist\do{% + \@ifundefined{nwopt@\@nwoption}{% + \@latexerr{There is no such noweb option as '\@nwoption'}\@eha}{% + \csname nwopt@\@nwoption\endcsname}}} +\codemargin=10pt +\advance\codehsize by \codemargin % make room for indentation of code +\advance\nwdefspace by \codemargin % and fix adjustment for def/use +\def\setcodemargin#1{% + \advance\codehsize by -\codemargin % make room for indentation of code + \advance\nwdefspace by -\codemargin % and fix adjustment for def/use + \codemargin=#1 + \advance\codehsize by \codemargin % make room for indentation of code + \advance\nwdefspace by \codemargin % and fix adjustment for + % def/use +} +\def\nwopt@shift{% + \dimen@=-0.8in + \if@twoside % Values for two-sided printing: + \advance\evensidemargin by \dimen@ + \else % Values for one-sided printing: + \advance\evensidemargin by \dimen@ + \advance\oddsidemargin by \dimen@ + \fi +% \advance \marginparwidth -\dimen@ +} +\let\nwopt@noshift\@empty +\def\nwbegincode#1{% + \begingroup + \topsep \nwcodetopsep + \@beginparpenalty \@highpenalty + \@endparpenalty -\@highpenalty + \@begincode } +\def\nwendcode{\endtrivlist \endgroup \filbreak} % keeps code on 1 page + +\newenvironment{webcode}{% + \@begincode +}{% + \endtrivlist} +\newdimen\@nwbegincodelinewidth +\def\@begincode{% + \@nwbegincodelinewidth=\linewidth + \trivlist \item[]% + \leftskip\@totalleftmargin \advance\leftskip\codemargin + \rightskip\hsize \advance\rightskip -\codehsize + \parskip\z@ \parindent\z@ \parfillskip\@flushglue + \linewidth\codehsize + \@@par + \def\par{\leavevmode\null \@@par \penalty\nwcodepenalty}% + \obeylines + \nowebsize \setupcode + \@noligs \ifx\verbatim@nolig@list\undefined\else + \let\do=\nw@makeother \verbatim@nolig@list \do@noligs\` + \fi + \setupcode \frenchspacing \@vobeyspaces + \let\maybehbox\mbox } + \newskip\nwcodetopsep \nwcodetopsep = 3pt plus 1.2pt minus 1pt + \let\nowebsize=\normalsize + \def\nwopt@tinycode{\let\nowebsize=\tiny} + \def\nwopt@footnotesizecode{\let\nowebsize=\footnotesize} + \def\nwopt@scriptsizecode{\let\nowebsize=\scriptsize} + \def\nwopt@smallcode{\let\nowebsize=\small} + \def\nwopt@normalsizecode{\let\nowebsize=\normalsize} + \def\nwopt@largecode{\let\nowebsize=\large} + \def\nwopt@Largecode{\let\nowebsize=\Large} + \def\nwopt@LARGEcode{\let\nowebsize=\LARGE} + \def\nwopt@hugecode{\let\nowebsize=\huge} + \def\nwopt@Hugecode{\let\nowebsize=\Huge} +\newcount\nwcodepenalty \nwcodepenalty=\@highpenalty +\def\nw@makeother#1{\catcode`#1=12 } +\def\nwbegindocs#1{\ifvmode\noindent\fi} +\let\nwenddocs=\relax +\let\nwdocspar=\filbreak +\def\@nwsemifilbreak#1{\vskip0pt plus#1\penalty-200\vskip0pt plus -#1} +\newdimen\nwbreakcodespace +\nwbreakcodespace=0.2in % by default, leave no more than this on a page +\def\nwopt@breakcode{% + \def\nwdocspar{\@nwsemifilbreak{0.2in}}% + \def\nwendcode{\endtrivlist\endgroup} % ditches filbreak +} +\raggedbottom +\def\code{\leavevmode\begingroup\setupcode\@vobeyspaces\obeylines} +\let\edoc=\endgroup +\newdimen\@original@textwidth +\def\ps@noweb{% + \@original@textwidth=\textwidth + \let\@mkboth\@gobbletwo + \def\@oddfoot{}\def\@evenfoot{}% No feet. + \if@twoside % If two-sided printing. + \def\@evenhead{\hbox to \@original@textwidth{% + \Rm \thepage\qquad{\Tt\leftmark}\hfil\today}}% Left heading. + \def\@oddhead{\hbox to \@original@textwidth{% + \Rm \today\hfil{\Tt\leftmark}\qquad\thepage}}% Right heading. + \else % If one-sided printing. + \def\@oddhead{\hbox to \@original@textwidth{% + \Rm \today\hfil{\Tt\leftmark}\qquad\thepage}}% Right heading. + \let\@evenhead\@oddhead + \fi + \let\chaptermark\@gobble + \let\sectionmark\@gobble + \let\subsectionmark\@gobble + \let\subsubsectionmark\@gobble + \let\paragraphmark\@gobble + \let\subparagraphmark\@gobble + \def\nwfilename{\begingroup\let\do\@makeother\dospecials + \catcode`\{=1 \catcode`\}=2 \nw@filename} + \def\nw@filename##1{\endgroup\markboth{##1}{##1}\let\nw@filename=\nw@laterfilename}% +} +\def\nw@laterfilename#1{\endgroup\clearpage \markboth{#1}{#1}} +\let\nwfilename=\@gobble +\def\nwcodecomment#1{\@@par\penalty\nwcodepenalty + \if@firstnwcodecomment + \vskip\nwcodecommentsep\penalty\nwcodepenalty\@firstnwcodecommentfalse + \fi% + \hspace{-\codemargin}{% + \rightskip=0pt plus1in + \interlinepenalty\nwcodepenalty + \let\\\relax\footnotesize\Rm #1\@@par\penalty\nwcodepenalty}} +\def\@nwalsodefined#1{\nwcodecomment{\@nwlangdepdef\ \nwpageprep\ \@pagesl{#1}.}} +\def\@nwused#1{\nwcodecomment{\@nwlangdepcud\ \nwpageprep\ \@pagesl{#1}.}} +\def\@nwnotused#1{\nwcodecomment{\@nwlangdeprtc.}} +\def\nwoutput#1{\nwcodecomment{\@nwlangdepcwf\ {\Tt \@stripstar#1*\stripped}.}} +\def\@stripstar#1*#2\stripped{#1} +\newcommand{\nwprevdefptr}[1]{% + \mbox{$\mathord{\triangleleft}\,\mathord{\mbox{\subpageref{#1}}}$}} +\newcommand{\nwnextdefptr}[1]{% + \mbox{$\mathord{\mbox{\subpageref{#1}}}\,\mathord{\triangleright}$}} + +\newcommand{\@nwprevnextdefs}[2]{% + {\nwtagstyle + \ifx\relax#1\else ~~\nwprevdefptr{#1}\fi + \ifx\relax#2\else ~~\nwnextdefptr{#2}\fi}} +\newcommand{\@nwusesondefline}[1]{{\nwtagstyle~~(\@pagenumsl{#1})}} +\newcommand{\@nwstartdeflinemarkup}{\nobreak\hskip 1.5em plus 1fill\nobreak} +\newcommand{\@nwenddeflinemarkup}{\nobreak\hskip \nwdefspace minus\nwdefspace\nobreak} +\def\nwopt@longxref{% + \let\nwalsodefined\@nwalsodefined + \let\nwused\@nwused + \let\nwnotused\@nwnotused + \let\nwprevnextdefs\@gobbletwo + \let\nwusesondefline\@gobble + \let\nwstartdeflinemarkup\relax + \let\nwenddeflinemarkup\relax +} +\def\nwopt@shortxref{% + \let\nwalsodefined\@gobble + \let\nwused\@gobble + \let\nwnotused\@gobble + \let\nwprevnextdefs\@nwprevnextdefs + \let\nwusesondefline\@nwusesondefline + \let\nwstartdeflinemarkup\@nwstartdeflinemarkup + \let\nwenddeflinemarkup\@nwenddeflinemarkup +} +\def\nwopt@noxref{% + \let\nwalsodefined\@gobble + \let\nwused\@gobble + \let\nwnotused\@gobble + \let\nwprevnextdefs\@gobbletwo + \let\nwusesondefline\@gobble + \let\nwstartdeflinemarkup\relax + \let\nwenddeflinemarkup\relax +} +\nwopt@shortxref % to hell with backward compatibility! +\newskip\nwcodecommentsep \nwcodecommentsep=3pt plus 1pt minus 1pt +\newif\if@firstnwcodecomment\@firstnwcodecommenttrue +\newcount\@nwlopage\newcount\@nwhipage % range lo..hi-1 +\newcount\@nwlosub % subpage of lo +\newcount\@nwhisub % subpage of hi +\def\@nwfirstpage#1#2#3{% subpage page xref-tag + \@nwlopage=#2 \@nwlosub=#1 + \def\@nwloxreftag{#3}% + \advance\@nwpagecount by \@ne + \@nwhipage=\@nwlopage\advance\@nwhipage by \@ne } +\def\@nwnextpage#1#2#3{% subpage page xref-tag + \ifnum\@nwhipage=#2 + \advance\@nwhipage by \@ne + \advance\@nwpagecount by \@ne + \@nwhisub=#1 + \def\@nwhixreftag{#3}\else + \ifnum#2<\@nwlopage \advance\@nwhipage by \m@ne + \ifnum\@nwhipage=\@nwlopage + \edef\@tempa{\noexpand\noexpand\noexpand\\% + {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}% + {\@nwloxreftag}}}% + \else + \count@=\@nwhipage \advance\count@ by \m@ne + \ifnum\count@=\@nwlopage % consecutive pages + \edef\@tempa{\noexpand\noexpand\noexpand\\% + {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}% + {\@nwloxreftag}}% + \noexpand\noexpand\noexpand\\% + {{\nwthepagenum{\number\@nwhisub}{\number\@nwhipage}} + {\@nwhixreftag}}}% + \else \ifnum\@nwlopage<110 \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else + \count@=\@nwlopage \divide\count@ by 100 \multiply\count@ by 100 + \ifnum\count@=\@nwlopage \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else + \count@=\@nwlopage \divide\count@ by 100 + \@nwpagetemp=\@nwhipage \divide\@nwpagetemp by 100 + \ifnum\count@=\@nwpagetemp % lo--least 2 digits of hi + \multiply\@nwpagetemp by 100 + \advance \@nwhipage by -\@nwpagetemp + \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}% + \else \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}% + \fi + \fi + \fi% + \fi + \fi% + \edef\@tempa{\noexpand\nwix@cons\noexpand\nw@pages{\@tempa}}\@tempa\@nwfirstpage{#1}{#2}{#3}\else + \ifnum#2>\@nwhipage \advance\@nwhipage by \m@ne + \ifnum\@nwhipage=\@nwlopage + \edef\@tempa{\noexpand\noexpand\noexpand\\% + {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}% + {\@nwloxreftag}}}% + \else + \count@=\@nwhipage \advance\count@ by \m@ne + \ifnum\count@=\@nwlopage % consecutive pages + \edef\@tempa{\noexpand\noexpand\noexpand\\% + {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}% + {\@nwloxreftag}}% + \noexpand\noexpand\noexpand\\% + {{\nwthepagenum{\number\@nwhisub}{\number\@nwhipage}} + {\@nwhixreftag}}}% + \else \ifnum\@nwlopage<110 \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else + \count@=\@nwlopage \divide\count@ by 100 \multiply\count@ by 100 + \ifnum\count@=\@nwlopage \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else + \count@=\@nwlopage \divide\count@ by 100 + \@nwpagetemp=\@nwhipage \divide\@nwpagetemp by 100 + \ifnum\count@=\@nwpagetemp % lo--least 2 digits of hi + \multiply\@nwpagetemp by 100 + \advance \@nwhipage by -\@nwpagetemp + \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}% + \else \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}% + \fi + \fi + \fi% + \fi + \fi% + \edef\@tempa{\noexpand\nwix@cons\noexpand\nw@pages{\@tempa}}\@tempa\@nwfirstpage{#1}{#2}{#3}\else + \@nwlosub=0 \@nwhisub=0 + \fi\fi\fi + } +\newcount\@nwpagetemp +\newcount\@nwpagecount +\def\@nwfirstpagel#1{% label + \@ifundefined{r@#1}{\@warning{Reference `#1' on page \thepage \space undefined}% + \nwix@cons\nw@pages{\\{\bfseries ??}}}{% + \edef\@tempa{\noexpand\@nwfirstpage\subpagepair{#1}{#1}}\@tempa}} +\def\@nwnextpagel#1{% label + \@ifundefined{r@#1}{\@warning{Reference `#1' on page \thepage \space undefined}% + \nwix@cons\nw@pages{\\{\bfseries ??}}}{% + \edef\@tempa{\noexpand\@nwnextpage\subpagepair{#1}{#1}}\@tempa}} +\def\@pagesl#1{% list of labels + \gdef\nw@pages{}\@nwpagecount=0 + \def\\##1{\@nwfirstpagel{##1}\let\\=\@nwnextpagel}#1% + \advance\@nwhipage by \m@ne + \ifnum\@nwhipage=\@nwlopage + \edef\@tempa{\noexpand\noexpand\noexpand\\% + {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}% + {\@nwloxreftag}}}% + \else + \count@=\@nwhipage \advance\count@ by \m@ne + \ifnum\count@=\@nwlopage % consecutive pages + \edef\@tempa{\noexpand\noexpand\noexpand\\% + {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}% + {\@nwloxreftag}}% + \noexpand\noexpand\noexpand\\% + {{\nwthepagenum{\number\@nwhisub}{\number\@nwhipage}} + {\@nwhixreftag}}}% + \else \ifnum\@nwlopage<110 \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else + \count@=\@nwlopage \divide\count@ by 100 \multiply\count@ by 100 + \ifnum\count@=\@nwlopage \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else + \count@=\@nwlopage \divide\count@ by 100 + \@nwpagetemp=\@nwhipage \divide\@nwpagetemp by 100 + \ifnum\count@=\@nwpagetemp % lo--least 2 digits of hi + \multiply\@nwpagetemp by 100 + \advance \@nwhipage by -\@nwpagetemp + \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}% + \else \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}% + \fi + \fi + \fi% + \fi + \fi% + \edef\@tempa{\noexpand\nwix@cons\noexpand\nw@pages{\@tempa}}\@tempa\def\\##1{\@nwhyperpagenum##1}% + \ifnum\@nwpagecount=1 \nwpageword \else \nwpagesword\fi~\commafy{\nw@pages}} +\def\@nwhyperpagenum#1#2{\nwhyperreference{#2}{#1}} + +\def\@pagenumsl#1{% list of labels -- doesn't include word `pages', commas, or `and' + \gdef\nw@pages{}\@nwpagecount=0 + \def\\##1{\@nwfirstpagel{##1}\let\\=\@nwnextpagel}#1% + \advance\@nwhipage by \m@ne + \ifnum\@nwhipage=\@nwlopage + \edef\@tempa{\noexpand\noexpand\noexpand\\% + {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}% + {\@nwloxreftag}}}% + \else + \count@=\@nwhipage \advance\count@ by \m@ne + \ifnum\count@=\@nwlopage % consecutive pages + \edef\@tempa{\noexpand\noexpand\noexpand\\% + {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}% + {\@nwloxreftag}}% + \noexpand\noexpand\noexpand\\% + {{\nwthepagenum{\number\@nwhisub}{\number\@nwhipage}} + {\@nwhixreftag}}}% + \else \ifnum\@nwlopage<110 \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else + \count@=\@nwlopage \divide\count@ by 100 \multiply\count@ by 100 + \ifnum\count@=\@nwlopage \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else + \count@=\@nwlopage \divide\count@ by 100 + \@nwpagetemp=\@nwhipage \divide\@nwpagetemp by 100 + \ifnum\count@=\@nwpagetemp % lo--least 2 digits of hi + \multiply\@nwpagetemp by 100 + \advance \@nwhipage by -\@nwpagetemp + \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}% + \else \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}% + \fi + \fi + \fi% + \fi + \fi% + \edef\@tempa{\noexpand\nwix@cons\noexpand\nw@pages{\@tempa}}\@tempa% + \def\\##1{\@nwhyperpagenum##1\let\\=\@nwpagenumslrest}\nw@pages} +\def\@nwpagenumslrest#1{~\@nwhyperpagenum#1} +\def\subpages#1{% list of {{subpage}{page}} + \gdef\nw@pages{}\@nwpagecount=0 + \def\\##1{\edef\@tempa{\noexpand\@nwfirstpage##1{}}\@tempa + \def\\####1{\edef\@tempa{\noexpand\@nwnextpage####1}\@tempa}}#1% + \advance\@nwhipage by \m@ne + \ifnum\@nwhipage=\@nwlopage + \edef\@tempa{\noexpand\noexpand\noexpand\\% + {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}% + {\@nwloxreftag}}}% + \else + \count@=\@nwhipage \advance\count@ by \m@ne + \ifnum\count@=\@nwlopage % consecutive pages + \edef\@tempa{\noexpand\noexpand\noexpand\\% + {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}% + {\@nwloxreftag}}% + \noexpand\noexpand\noexpand\\% + {{\nwthepagenum{\number\@nwhisub}{\number\@nwhipage}} + {\@nwhixreftag}}}% + \else \ifnum\@nwlopage<110 \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else + \count@=\@nwlopage \divide\count@ by 100 \multiply\count@ by 100 + \ifnum\count@=\@nwlopage \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else + \count@=\@nwlopage \divide\count@ by 100 + \@nwpagetemp=\@nwhipage \divide\@nwpagetemp by 100 + \ifnum\count@=\@nwpagetemp % lo--least 2 digits of hi + \multiply\@nwpagetemp by 100 + \advance \@nwhipage by -\@nwpagetemp + \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}% + \else \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}% + \fi + \fi + \fi% + \fi + \fi% + \edef\@tempa{\noexpand\nwix@cons\noexpand\nw@pages{\@tempa}}\@tempa\def\\##1{\@firstoftwo##1}% + \ifnum\@nwpagecount=1 \nwpageword \else \nwpagesword\fi~\commafy{\nw@pages}} +\def\@nwaddrange{\advance\@nwhipage by \m@ne + \ifnum\@nwhipage=\@nwlopage + \edef\@tempa{\noexpand\noexpand\noexpand\\% + {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}% + {\@nwloxreftag}}}% + \else + \count@=\@nwhipage \advance\count@ by \m@ne + \ifnum\count@=\@nwlopage % consecutive pages + \edef\@tempa{\noexpand\noexpand\noexpand\\% + {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}% + {\@nwloxreftag}}% + \noexpand\noexpand\noexpand\\% + {{\nwthepagenum{\number\@nwhisub}{\number\@nwhipage}} + {\@nwhixreftag}}}% + \else \ifnum\@nwlopage<110 \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else + \count@=\@nwlopage \divide\count@ by 100 \multiply\count@ by 100 + \ifnum\count@=\@nwlopage \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else + \count@=\@nwlopage \divide\count@ by 100 + \@nwpagetemp=\@nwhipage \divide\@nwpagetemp by 100 + \ifnum\count@=\@nwpagetemp % lo--least 2 digits of hi + \multiply\@nwpagetemp by 100 + \advance \@nwhipage by -\@nwpagetemp + \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}% + \else \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}% + \fi + \fi + \fi% + \fi + \fi% + \edef\@tempa{\noexpand\nwix@cons\noexpand\nw@pages{\@tempa}}\@tempa} +\def\nwpageword{\@nwlangdepchk} % chunk, was page +\def\nwpagesword{\@nwlangdepchks} % chunk, was page +\def\nwpageprep{\@nwlangdepin} % in, was on +\newcommand\nw@genericref[2]{% what to do, name of ref + \expandafter\nw@g@nericref\csname r@#2\endcsname#1{#2}} +\newcommand\nw@g@nericref[3]{% control sequence, what to do, name + \ifx#1\relax + \ref{#3}% trigger the standard `undefined ref' mechanisms + \else + \expandafter#2#1.\\% + \fi} +\def\nw@selectone#1#2#3\\{#1} +\def\nw@selecttwo#1#2#3\\{#2} +\def\nw@selectonetwo#1#2#3\\{{#1}{#2}} +\newcommand{\subpageref}[1]{% + \nwhyperreference{#1}{\nw@genericref\@subpageref{#1}}} +\def\@subpageref#1#2#3\\{% + \@ifundefined{2on#2}{#2}{\nwthepagenum{#1}{#2}}} +\newcommand{\subpagepair}[1]{% % produces {subpage}{page} + \@ifundefined{r@#1}% + {{0}{0}}% + {\nw@genericref\@subpagepair{#1}}} +\def\@subpagepair#1#2#3\\{% + \@ifundefined{2on#2}{{0}{#2}}{{#1}{#2}}} +\newcommand{\sublabel}[1]{% + \leavevmode % needed to make \@bsphack work + \@bsphack + \nwblindhyperanchor{#1}% + \if@filesw {\let\thepage\relax + \def\protect{\noexpand\noexpand\noexpand}% + \edef\@tempa{\write\@auxout{\string + \newsublabel{#1}{{}{\thepage}}}}% + \expandafter}\@tempa + \if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack} +\newcommand{\nosublabel}[1]{% + \@bsphack\if@filesw {\let\thepage\relax + \def\protect{\noexpand\noexpand\noexpand}% + \edef\@tempa{\write\@auxout{\string + \newlabel{#1}{{0}{\thepage}}}}% + \expandafter}\@tempa + \if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack} +\newcommand\newsublabel{% + \nw@settrailers + \global\let\newsublabel\@newsublabel + \@newsublabel} +\newcommand{\@newsublabel}[2]{% + \edef\this@page{\@cdr#2\@nil}% + \ifx\this@page\last@page\else + \sub@page=\z@ + \fi + \edef\last@page{\this@page} + \advance\sub@page by \@ne + \ifnum\sub@page=\tw@ + \global\@namedef{2on\this@page}{}% + \fi + \pendingsublabel{#1}% + \edef\@tempa##1{\noexpand\newlabel{##1}% + {{\number\sub@page}{\this@page}\nw@labeltrailers}}% + \pending@sublabels + \def\pending@sublabels{}} +\newcommand\nw@settrailers{% -- won't work on first run + \@ifpackageloaded{nameref}% + {\gdef\nw@labeltrailers{{}{}{}}}% + {\gdef\nw@labeltrailers{}}} +\renewcommand\nw@settrailers{% + \@ifundefined{@secondoffive}% + {\gdef\nw@labeltrailers{}}% + {\gdef\nw@labeltrailers{{}{}{}}}} +\newcommand{\nextchunklabel}[1]{% + \nwblindhyperanchor{#1}% % looks slightly bogus --- nr + \@bsphack\if@filesw {\let\thepage\relax + \edef\@tempa{\write\@auxout{\string\pendingsublabel{#1}}}% + \expandafter}\@tempa + \if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack} +\newcommand\pendingsublabel[1]{% + \def\@tempa{\noexpand\@tempa}% + \edef\pending@sublabels{\noexpand\@tempa{#1}\pending@sublabels}} +\def\pending@sublabels{} +\def\last@page{\relax} +\newcount\sub@page +\def\@alphasubpagenum#1#2{#2\ifnum#1=0 \else\@alph{#1}\fi} +\def\@nosubpagenum#1#2{#2} +\def\@numsubpagenum#1#2{#2\ifnum#1=0 \else.\@arabic{#1}\fi} +\def\nwopt@nosubpage{\let\nwthepagenum=\@nosubpagenum\nwopt@nomargintag} +\def\nwopt@numsubpage{\let\nwthepagenum=\@numsubpagenum} +\def\nwopt@alphasubpage{\let\nwthepagenum=\@alphasubpagenum} +\nwopt@alphasubpage +\newcount\@nwalph@n +\let\@nwalph@d\@tempcnta +\let\@nwalph@bound\@tempcntb +\def\@nwlongalph#1{{% + \@nwalph@n=#1\advance\@nwalph@n by-1 + \@nwalph@bound=26 + \loop\ifnum\@nwalph@n<\@nwalph@bound\else + \advance\@nwalph@n by -\@nwalph@bound + \multiply\@nwalph@bound by 26 + \repeat + \loop\ifnum\@nwalph@bound>1 + \divide\@nwalph@bound by 26 + \@nwalph@d=\@nwalph@n\divide\@nwalph@d by \@nwalph@bound + % d := d * bound ; n -:= d; d := d / bound --- saves a temporary + \multiply\@nwalph@d by \@nwalph@bound + \advance\@nwalph@n by -\@nwalph@d + \divide\@nwalph@d by \@nwalph@bound + \advance\@nwalph@d by 1 \@alph{\@nwalph@d}% + \repeat +}} +\newcount\nw@chunkcount +\nw@chunkcount=\@ne +\newcommand{\weblabel}[1]{% + \@bsphack + \nwblindhyperanchor{#1}% + \if@filesw {\let\thepage\relax + \def\protect{\noexpand\noexpand\noexpand}% + \edef\@tempa{\write\@auxout{\string + \newsublabel{#1}{{}{\number\nw@chunkcount}}}}% + \expandafter}\@tempa + \global\advance\nw@chunkcount by \@ne + \if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack} +\def\nwopt@webnumbering{% + \let\sublabel=\weblabel + \def\nwpageword{chunk}\def\nwpagesword{chunks}% + \def\nwpageprep{in}} +% \nwindexdefn{printable name}{identifying label}{label of chunk} +% \nwindexuse{printable name}{identifying label}{label of chunk} + +\def\nwindexdefn#1#2#3{\@auxix{\protect\nwixd}{#2}{#3}} +\def\nwindexuse#1#2#3{\@auxix{\protect\nwixu}{#2}{#3}} + +\def\@auxix#1#2#3{% {marker}{id label}{subpage label} + \@bsphack\if@filesw {\let\nwixd\relax\let\nwixu\relax + \def\protect{\noexpand\noexpand\noexpand}% + \edef\@tempa{\write\@auxout{\string\nwixadd{#1}{#2}{#3}}}% + \expandafter}\@tempa + \if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack} +% \nwixadd{marker}{idlabel}{subpage label} +\def\nwixadd#1#2#3{% + \@ifundefined{nwixl@#2}% + {\global\@namedef{nwixl@#2}{#1{#3}}}% + {\expandafter\nwix@cons\csname nwixl@#2\endcsname{#1{#3}}}} +\def\@nwsubscriptident#1#2{\mbox{$\mbox{#1}_{\mathrm{\subpageref{#2}}}$}} +\def\@nwnosubscriptident#1#2{#1} +\def\@nwhyperident#1#2{\leavevmode\nwhyperreference{#2}{#1}} +\def\nwopt@subscriptidents{% + \let\nwlinkedidentq\@nwsubscriptident + \let\nwlinkedidentc\@nwsubscriptident +} +\def\nwopt@nosubscriptidents{% + \let\nwlinkedidentq\@nwnosubscriptident + \let\nwlinkedidentc\@nwnosubscriptident +} +\def\nwopt@hyperidents{% + \let\nwlinkedidentq\@nwhyperident + \let\nwlinkedidentc\@nwhyperident +} +\def\nwopt@nohyperidents{% + \let\nwlinkedidentq\@nwnosubscriptident + \let\nwlinkedidentc\@nwnosubscriptident +} +\def\nwopt@subscriptquotedidents{% + \let\nwlinkedidentq\@nwsubscriptident +} +\def\nwopt@nosubscriptquotedidents{% + \let\nwlinkedidentq\@nwnosubscriptident +} +\def\nwopt@hyperquotedidents{% + \let\nwlinkedidentq\@nwhyperident +} +\def\nwopt@nohyperquotedidents{% + \let\nwlinkedidentq\@nwnosubscriptident +} +\nwopt@hyperidents +\newcount\@commacount +\def\commafy#1{% + {\nwix@listcount{#1}\@commacount=\nwix@counter + \let\@comma@each=\\% + \ifcase\@commacount\let\\=\@comma@each\or\let\\=\@comma@each\or + \def\\{\def\\{ \@nwlangdepand\ \@comma@each}\@comma@each}\else + \def\\{\def\\{, % + \advance\@commacount by \m@ne + \ifnum\@commacount=1 \@nwlangdepand~\fi\@comma@each}\@comma@each}\fi + #1}} +\def\nwix@cons#1#2{% {list}{\marker{element}} + {\toks0=\expandafter{#1}\def\@tempa{#2}\toks2=\expandafter{\@tempa}% + \xdef#1{\the\toks0 \the\toks2 }}} +\def\nwix@uses#1{% {label} + \def\nwixu{\\}\let\nwixd\@gobble\@nameuse{nwixl@#1}} +\def\nwix@defs#1{% {label} + \def\nwixd{\\}\let\nwixu\@gobble\@nameuse{nwixl@#1}} +\newcount\nwix@counter +\def\nwix@listcount#1{% {list with \\} + {\count@=0 + \def\\##1{\advance\count@ by \@ne }% + #1\global\nwix@counter=\count@ }} +\def\nwix@usecount#1{\nwix@listcount{\nwix@uses{#1}}} +\def\nwix@defcount#1{\nwix@listcount{\nwix@defs{#1}}} +\def\nwix@id@defs#1{% index pair + {{\Tt \@car#1\@nil}% + \def\\##1{\nwix@defs@space\subpageref{##1}}\nwix@defs{\@cdr#1\@nil}}} + % useful above to change ~ into something that can break +% this option is undocumented because I think breakdefs is always right +\def\nwopt@breakdefs{\def\nwix@defs@space{\penalty200\ }} +\def\nwopt@nobreakdefs{\def\nwix@defs@space{~}} % old code +\nwopt@breakdefs +\def\nwidentuses#1{% list of index pairs + \nwcodecomment{\@nwlangdepuss\ \let\\=\nwix@id@defs\commafy{#1}.}} +\def\nwix@totaluses#1{% list of index pairs + {\count@=0 + \def\\##1{\nwix@usecount{\@cdr##1\@nil}\advance\count@ by\nwix@counter}% + #1\global\nwix@counter\count@ }} +\def\nwix@id@uses#1#2{% {ident}{label} + \nwix@usecount{#2}\ifnum\nwix@counter>0 + {\advance\leftskip by \codemargin + \nwcodecomment{{\Tt #1}, \@nwlangdepusd\ \nwpageprep\ \@pagesl{\nwix@uses{#2}}.}}% + \else + \ifnw@hideunuseddefs\else + {\advance\leftskip by \codemargin \nwcodecomment{{\Tt #1}, \@nwlangdepnvu.}}% + \fi + \fi} +\def\nwidentdefs#1{% list of index pairs + \ifnw@hideunuseddefs\nwix@totaluses{#1}\else\nwix@listcount{#1}\fi + \ifnum\nwix@counter>0 + \nwcodecomment{\@nwlangdepdfs:}% + {\def\\##1{\nwix@id@uses ##1}#1}% + \fi} +\newif\ifnw@hideunuseddefs\nw@hideunuseddefsfalse +\def\nwopt@hideunuseddefs{\nw@hideunuseddefstrue} +\def\nwopt@noidentxref{% + \let\nwidentdefs\@gobble + \let\nwidentuses\@gobble} +\def\nw@underlinedefs{% {list with \nwixd, \nwixu} + \let\\=\relax\def\nw@comma{, } + \def\nwixd##1{\\\underline{\subpageref{##1}}\let\\\nw@comma}% + \def\nwixu##1{\\\subpageref{##1}\let\\\nw@comma}} + +\def\nw@indexline#1#2{% + {\indent {\Tt #1}: \nw@underlinedefs\@nameuse{nwixl@#2}\par}} + +\newenvironment{thenowebindex}{\parindent=-10pt \parskip=\z@ + \advance\leftskip by 10pt + \advance\rightskip by 0pt plus1in\par\@afterindenttrue + \def\\##1{\nw@indexline##1}}{} +\def\nowebindex{% + \@ifundefined{nwixs@i}% + {\@warning{The \string\nowebindex\space is empty}}% + {\begin{thenowebindex}\@nameuse{nwixs@i}\end{thenowebindex}}} +\def\nowebindex@external{% + {\let\nwixadds@c=\@gobble + \def\nwixadds@i##1{\nw@indexline##1}% + \def\nwixaddsx##1##2{\@nameuse{nwixadds@##1}{##2}}% + \begin{thenowebindex}\@input{\jobname.nwi}\end{thenowebindex}}} +\def\nwixlogsorted#1#2{% list data + \@bsphack\if@filesw + \toks0={#2}\immediate\write\@auxout{\string\nwixadds{#1}{\the\toks0}} + \if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack} +\def\nwixadds#1#2{% + \@ifundefined{nwixs@#1}% + {\global\@namedef{nwixs@#1}{\\{#2}}}% + {\expandafter\nwix@cons\csname nwixs@#1\endcsname{\\{#2}}}} +\let\nwixaddsx=\@gobbletwo +\def\nwopt@externalindex{% + \ifx\nwixadds\@gobbletwo % already called + \else + \let\nwixaddsx=\nwixadds \let\nwixadds=\@gobbletwo + \let\nowebindex=\nowebindex@external + \let\nowebchunks=\nowebchunks@external + \fi} +\def\nowebchunks{% + \@ifundefined{nwixs@c}% + {\@warning{The are no \string\nowebchunks}}% + {\begin{thenowebchunks}\@nameuse{nwixs@c}\end{thenowebchunks}}} +\def\nowebchunks@external{% + {\let\nwixadds@i=\@gobble + \def\nwixadds@c##1{\nw@onechunk##1}% + \def\nwixaddsx##1##2{\@nameuse{nwixadds@##1}{##2}}% + \begin{thenowebchunks}\@input{\jobname.nwi}\end{thenowebchunks}}} + \@namedef{r@nw@notdef}{{0}{(\@nwlangdepnvd)}} +\def\nw@chunkunderlinedefs{% {list of labels with \nwixd, \nwixu} + \let\\=\relax\def\nw@comma{, } + \def\nwixd##1{\\\underline{\subpageref{##1}}\let\\\nw@comma}% + \def\nwixu##1{\\\subpageref{##1}\let\\\nw@comma}} +\def\nw@onechunk#1#2#3{% {name}{label of first definition}{list with \nwixd, \nwixu} + \@ifundefined{r@#2}{}{% + \indent\LA #1~{\nwtagstyle\subpageref{#2}}\RA + \if@nwlongchunks{~\nw@chunkunderlinedefs#3}\fi\par}} +\newenvironment{thenowebchunks}{\vskip3pt + \parskip=\z@\parindent=-10pt \advance\leftskip by 10pt + \advance\rightskip by 0pt plus10pt \@afterindenttrue + \def\\##1{\nw@onechunk##1}}{} +\newif\if@nwlongchunks +\@nwlongchunksfalse +\let\nwopt@longchunks\@nwlongchunkstrue +\newcommand\@nw@hyper@ref{\hyperreference} % naras +\newcommand\@nw@hyper@anc{\blindhyperanchor} % naras +\newcommand\@nw@hyperref@ref[2]{\hyperlink{noweb.#1}{#2}} % nr +\newcommand\@nw@hyperref@anc[1]{\hypertarget{noweb.#1}{\relax}} % nr +%%\renewcommand\@nw@hyperref@ref[2]{{#2}} % nr +%%\renewcommand\@nw@hyperref@anc[1]{} % nr +\newcommand\nwhyperreference{% + \@ifundefined{hyperlink} + {\@ifundefined{hyperreference} + {\global\let\nwhyperreference\@gobble} + {\global\let\nwhyperreference\@nw@hyper@ref}} + {\global\let\nwhyperreference\@nw@hyperref@ref}% + \nwhyperreference +} + +\newcommand\nwblindhyperanchor{% + \@ifundefined{hyperlink} + {\@ifundefined{hyperreference} + {\global\let\nwblindhyperanchor\@gobble} + {\global\let\nwblindhyperanchor\@nw@hyper@anc}} + {\global\let\nwblindhyperanchor\@nw@hyperref@anc}% + \nwblindhyperanchor +} +\newcommand\nwanchorto{% + \begingroup\let\do\@makeother\dospecials + \catcode`\{=1 \catcode`\}=2 \nw@anchorto} +\newcommand\nw@anchorto[1]{\endgroup\def\nw@next{#1}\nw@anchortofin} +\newcommand\nw@anchortofin[1]{#1\footnote{See URL \texttt{\nw@next}.}} +\let\nwanchorname\@gobble +\newif\ifhtml +\htmlfalse +\let\nwixident=\relax +\def\nwopt@english{% + \def\@nwlangdepdef{This definition is continued}% + \def\@nwlangdepcud{This code is used}% + \def\@nwlangdeprtc{Root chunk (not used in this document)}% + \def\@nwlangdepcwf{This code is written to file}% + \def\@nwlangdepchk{chunk}% + \def\@nwlangdepchks{chunks}% + \def\@nwlangdepin{in}% + \def\@nwlangdepand{and}% + \def\@nwlangdepuss{Uses}% + \def\@nwlangdepusd{used}% + \def\@nwlangdepnvu{never used}% + \def\@nwlangdepdfs{Defines}% + \def\@nwlangdepnvd{never defined}% +} +\let\nwopt@american\nwopt@english +\def\nwopt@icelandic{% + \def\@nwlangdepdef{This definition is continued}% + \def\@nwlangdepcud{This code is used}% + \def\@nwlangdeprtc{Root chunk (not used in this document)}% + \def\@nwlangdepcwf{This code is written to file}% + \def\@nwlangdepchk{k??a}% + \def\@nwlangdepchks{k??um}% + \def\@nwlangdepin{?}% + \def\@nwlangdepand{og}% + \def\@nwlangdepuss{Notar}% + \def\@nwlangdepusd{nota?}% + \def\@nwlangdepnvu{hvergi nota?}% + \def\@nwlangdepdfs{Skilgreinir}% + \def\@nwlangdepnvd{hvergi skilgreint}% +} +\def\nwopt@portuges{% + \def\@nwlangdepdef{Defini\c{c}\~ao continuada em}% + % This definition is continued + \def\@nwlangdepcud{C\'odigo usado em}% + % This code is used + \def\@nwlangdeprtc{Fragmento de topo (sem uso no documento)}% + % Root chunk (not used in this document) + \def\@nwlangdepcwf{Este c\'odigo foi escrito no ficheiro}% + % This code is written to file + \def\@nwlangdepchk{fragmento}% + % chunk + \def\@nwlangdepchks{fragmentos}% + % chunks + \def\@nwlangdepin{no(s)}% + % in + \def\@nwlangdepand{e}% + % and + \def\@nwlangdepuss{Usa}% + % Uses + \def\@nwlangdepusd{usado}% + % used + \def\@nwlangdepnvu{nunca usado}% + % never used + \def\@nwlangdepdfs{Define}% + % Defines + \def\@nwlangdepnvd{nunca definido}% + % never defined +} +\def\nwopt@frenchb{% + \def\@nwlangdepdef{Suite de la d\'efinition}% + % This definition is continued + \def\@nwlangdepcud{Ce code est employ\'e}% + % This code is used + \def\@nwlangdeprtc{Morceau racine (pas employ\'e dans ce document)}% + % Root chunk (not used in this document) + \def\@nwlangdepcwf{Ce code est \'ecrit dans le fichier}% + % This code is written to file + \def\@nwlangdepchk{le morceau}% + % chunk + \def\@nwlangdepchks{les morceaux}% + % chunks + \def\@nwlangdepin{dans}% + % in + \def\@nwlangdepand{et}% + % and + \def\@nwlangdepuss{Utilise}% + % Uses + \def\@nwlangdepusd{utilis\'{e}}% + % used + \def\@nwlangdepnvu{jamais employ\'{e}}% + % never used + \def\@nwlangdepdfs{D\'{e}finit}% + % Defines + % Cannot use the accent here: \def\@nwlangdepnvd{jamais d\'{e}fini}% + \def\@nwlangdepnvd{jamais defini}% + % never defined +} +\let\nwopt@french\nwopt@frenchb +\def\nwopt@german{% + \def\@nwlangdepdef{Diese Definition wird fortgesetzt}% + % This definition is continued + \def\@nwlangdepcud{Dieser Code wird benutzt}% + % This code is used + \def\@nwlangdeprtc{Hauptteil (nicht in diesem Dokument benutzt)}% + % Root chunk (not used in this document) + \def\@nwlangdepcwf{Geh\"ort in die Datei}% + % This code is written to file + \def\@nwlangdepchk{Abschnitt}% + % chunk + \def\@nwlangdepchks{den Abschnitten}% + % chunks + \def\@nwlangdepin{in}% + % in + \def\@nwlangdepand{und}% + % and + \def\@nwlangdepuss{Benutzt}% + % Uses + \def\@nwlangdepusd{benutzt}% + % used + \def\@nwlangdepnvu{nicht benutzt}% + % never used + \def\@nwlangdepdfs{Definiert}% + % Defines + \def\@nwlangdepnvd{nicht definiert}% + % never defined +} +\def\nwopt@german{% + \def\@nwlangdepdef{Diese Definition wird fortgesetzt}% + % This definition is continued + \def\@nwlangdepcud{Dieser Code wird benutzt}% + % This code is used + \def\@nwlangdeprtc{Hauptteil (nicht in diesem Dokument benutzt)}% + % Root chunk (not used in this document) + \def\@nwlangdepcwf{Dieser Code erzeugt die Datei} + % This code generates the file + \def\@nwlangdepchk{Teil}% + % chunk + \def\@nwlangdepchks{Teils}% + % chunks + \def\@nwlangdepin{im}% + % in + \def\@nwlangdepand{und}% + % and + \def\@nwlangdepuss{Benutzt}% + % Uses + \def\@nwlangdepusd{benutzt}% + % used + \def\@nwlangdepnvu{nicht benutzt}% + % never used + \def\@nwlangdepdfs{Definiert}% + % Defines + \def\@nwlangdepnvd{nicht definiert}% + % never defined +} +\let\nwopt@ngerman\nwopt@german +\def\nwopt@swedish{% + \def\@nwlangdepdef{Denna definition fortsätter}% + \def\@nwlangdepcud{Denna kod används}% + \def\@nwlangdeprtc{% + Rotstycke (används inte någon annanstans i detta dokument)% + }% + \def\@nwlangdepcwf{Denna kod skrivs till fil}% + \def\@nwlangdepchk{stycke}% + \def\@nwlangdepchks{stycken}% + \def\@nwlangdepin{i}% + \def\@nwlangdepand{och}% + \def\@nwlangdepuss{Använder}% + \def\@nwlangdepusd{använd}% + \def\@nwlangdepnvu{aldrig använd}% + \def\@nwlangdepdfs{Definierar}% + \def\@nwlangdepnvd{inte definierad}% +} +\ifx\languagename\undefined % default is English + \noweboptions{english} +\else + \@ifundefined{nwopt@\languagename} + {\noweboptions{english}} + {\expandafter\noweboptions\expandafter{\languagename}} +\fi diff --git "a/r\303\266varspr\303\245ket/noweb.sty" "b/r\303\266varspr\303\245ket/noweb.sty" deleted file mode 100644 index 437aadf..0000000 --- "a/r\303\266varspr\303\245ket/noweb.sty" +++ /dev/null @@ -1,993 +0,0 @@ -% noweb.sty -- LaTeX support for noweb -% DON'T read or edit this file! Use ...noweb-source/tex/support.nw instead. -{\obeyspaces\AtBeginDocument{\global\let =\ }} % from texbook, p 381 -\def\nwopt@nomargintag{\let\nwmargintag=\@gobble} -\def\nwopt@margintag{% - \def\nwmargintag##1{\leavevmode\llap{##1\kern\nwmarginglue\kern\codemargin}}} -\def\nwopt@margintag{% - \def\nwmargintag##1{\leavevmode\kern-\codemargin\nwthemargintag{##1}\kern\codemargin}} -\def\nwthemargintag#1{\llap{#1\kern\nwmarginglue}} -\nwopt@margintag -\newdimen\nwmarginglue -\nwmarginglue=0.3in -\def\nwtagstyle{\footnotesize\Rm} -\def\nwgitversion{|GITVERSION|} -% make \hsize in code sufficient for 88 columns -\ifx\ttfamily\undefined - \setbox0=\hbox{\tt m} -\else - \setbox0=\hbox{\ttfamily m} -\fi -\newdimen\codehsize -\codehsize=91\wd0 % 88 columns wasn't enough; I don't know why -\newdimen\codemargin -\codemargin=0pt -\newdimen\nwdefspace -\nwdefspace=\codehsize -% need to use \textwidth in {\LaTeX} to handle styles with -% non-standard margins (David Bruce). Don't know why we sometimes -% wanted \hsize. 27 August 1997. -%% \advance\nwdefspace by -\hsize\relax -\ifx\textwidth\undefined - \advance\nwdefspace by -\hsize\relax -\else - \advance\nwdefspace by -\textwidth\relax -\fi -\chardef\other=12 -\def\setupcode{% - \chardef\\=`\\ - \chardef\{=`\{ - \chardef\}=`\} - \catcode`\$=\other - \catcode`\&=\other - \catcode`\#=\other - \catcode`\%=\other - \catcode`\~=\other - \catcode`\_=\other - \catcode`\^=\other - \catcode`\"=\other % fixes problem with german.sty - \obeyspaces\Tt -} -\def\nwendquote{\relax\ifhmode\spacefactor=1000 \fi} -{\catcode`\^^M=\active % make CR an active character - \gdef\newlines{\catcode`\^^M=\active % make CR an active character - \def^^M{\par\startline}}% - \gdef\eatline#1^^M{\relax}% -} -%%% DON'T \gdef^^M{\par\startline}}% in case ^^M appears in a \write -\def\startline{\noindent\hskip\parindent\ignorespaces} -\def\nwnewline{\ifvmode\else\hfil\break\leavevmode\hbox{}\fi} -\def\setupmodname{% - \catcode`\$=3 - \catcode`\&=4 - \catcode`\#=6 - \catcode`\%=14 - \catcode`\~=13 - \catcode`\_=8 - \catcode`\^=7 - \catcode`\ =10 - \catcode`\^^M=5 - \let\{\lbrace - \let\}\rbrace - % bad news --- don't know what catcode to give " - \Rm} -\def\LA{\begingroup\maybehbox\bgroup\setupmodname\It$\langle$} -\def\RA{\/$\rangle$\egroup\endgroup} -\def\code{\leavevmode\begingroup\setupcode\newlines} -\def\edoc{\endgroup} -\let\maybehbox\relax -\newbox\equivbox -\setbox\equivbox=\hbox{$\equiv$} -\newbox\plusequivbox -\setbox\plusequivbox=\hbox{$\mathord{+}\mathord{\equiv}$} -% \moddef can't have an argument because there might be \code...\edoc -\def\moddef{\leavevmode\kern-\codemargin\LA} -\def\endmoddef{\RA\ifmmode\equiv\else\unhcopy\equivbox\fi - \nobreak\hfill\nobreak} -\def\plusendmoddef{\RA\ifmmode\mathord{+}\mathord{\equiv}\else\unhcopy\plusequivbox\fi - \nobreak\hfill\nobreak} -\def\chunklist{% -\errhelp{I changed \chunklist to \nowebchunks. -I'll try to avoid such incompatible changes in the future.}% -\errmessage{Use \string\nowebchunks\space instead of \string\chunklist}} -\def\nowebchunks{\message{}} -\def\nowebindex{\message{}} -% here is support for the new-style (capitalized) font-changing commands -% thanks to Dave Love -\ifx\documentstyle\undefined - \let\Rm=\rm \let\It=\it \let\Tt=\tt % plain -\else\ifx\selectfont\undefined - \let\Rm=\rm \let\It=\it \let\Tt=\tt % LaTeX OFSS -\else % LaTeX NFSS - \def\Rm{\reset@font\rmfamily} - \def\It{\reset@font\itshape} - \def\Tt{\reset@font\ttfamily} - \def\Bf{\reset@font\bfseries} -\fi\fi -\ifx\reset@font\undefined \let\reset@font=\relax \fi -\def\nwbackslash{\char92} -\def\nwlbrace{\char123} -\def\nwrbrace{\char125} -\def\noweboptions#1{% - \def\@nwoptionlist{#1}% - \@for\@nwoption:=\@nwoptionlist\do{% - \@ifundefined{nwopt@\@nwoption}{% - \@latexerr{There is no such noweb option as '\@nwoption'}\@eha}{% - \csname nwopt@\@nwoption\endcsname}}} -\codemargin=10pt -\advance\codehsize by \codemargin % make room for indentation of code -\advance\nwdefspace by \codemargin % and fix adjustment for def/use -\def\setcodemargin#1{% - \advance\codehsize by -\codemargin % make room for indentation of code - \advance\nwdefspace by -\codemargin % and fix adjustment for def/use - \codemargin=#1 - \advance\codehsize by \codemargin % make room for indentation of code - \advance\nwdefspace by \codemargin % and fix adjustment for - % def/use -} -\def\nwopt@shift{% - \dimen@=-0.8in - \if@twoside % Values for two-sided printing: - \advance\evensidemargin by \dimen@ - \else % Values for one-sided printing: - \advance\evensidemargin by \dimen@ - \advance\oddsidemargin by \dimen@ - \fi -% \advance \marginparwidth -\dimen@ -} -\let\nwopt@noshift\@empty -\def\nwbegincode#1{% - \begingroup - \topsep \nwcodetopsep - \@beginparpenalty \@highpenalty - \@endparpenalty -\@highpenalty - \@begincode } -\def\nwendcode{\endtrivlist \endgroup \filbreak} % keeps code on 1 page - -\newenvironment{webcode}{% - \@begincode -}{% - \endtrivlist} -\newdimen\@nwbegincodelinewidth -\def\@begincode{% - \@nwbegincodelinewidth=\linewidth - \trivlist \item[]% - \leftskip\@totalleftmargin \advance\leftskip\codemargin - \rightskip\hsize \advance\rightskip -\codehsize - \parskip\z@ \parindent\z@ \parfillskip\@flushglue - \linewidth\codehsize - \@@par - \def\par{\leavevmode\null \@@par \penalty\nwcodepenalty}% - \obeylines - \nowebsize \setupcode - \@noligs \ifx\verbatim@nolig@list\undefined\else - \let\do=\nw@makeother \verbatim@nolig@list \do@noligs\` - \fi - \setupcode \frenchspacing \@vobeyspaces - \let\maybehbox\mbox } - \newskip\nwcodetopsep \nwcodetopsep = 3pt plus 1.2pt minus 1pt - \let\nowebsize=\normalsize - \def\nwopt@tinycode{\let\nowebsize=\tiny} - \def\nwopt@footnotesizecode{\let\nowebsize=\footnotesize} - \def\nwopt@scriptsizecode{\let\nowebsize=\scriptsize} - \def\nwopt@smallcode{\let\nowebsize=\small} - \def\nwopt@normalsizecode{\let\nowebsize=\normalsize} - \def\nwopt@largecode{\let\nowebsize=\large} - \def\nwopt@Largecode{\let\nowebsize=\Large} - \def\nwopt@LARGEcode{\let\nowebsize=\LARGE} - \def\nwopt@hugecode{\let\nowebsize=\huge} - \def\nwopt@Hugecode{\let\nowebsize=\Huge} -\newcount\nwcodepenalty \nwcodepenalty=\@highpenalty -\def\nw@makeother#1{\catcode`#1=12 } -\def\nwbegindocs#1{\ifvmode\noindent\fi} -\let\nwenddocs=\relax -\let\nwdocspar=\filbreak -\def\@nwsemifilbreak#1{\vskip0pt plus#1\penalty-200\vskip0pt plus -#1} -\newdimen\nwbreakcodespace -\nwbreakcodespace=0.2in % by default, leave no more than this on a page -\def\nwopt@breakcode{% - \def\nwdocspar{\@nwsemifilbreak{0.2in}}% - \def\nwendcode{\endtrivlist\endgroup} % ditches filbreak -} -\raggedbottom -\def\code{\leavevmode\begingroup\setupcode\@vobeyspaces\obeylines} -\let\edoc=\endgroup -\newdimen\@original@textwidth -\def\ps@noweb{% - \@original@textwidth=\textwidth - \let\@mkboth\@gobbletwo - \def\@oddfoot{}\def\@evenfoot{}% No feet. - \if@twoside % If two-sided printing. - \def\@evenhead{\hbox to \@original@textwidth{% - \Rm \thepage\qquad{\Tt\leftmark}\hfil\today}}% Left heading. - \def\@oddhead{\hbox to \@original@textwidth{% - \Rm \today\hfil{\Tt\leftmark}\qquad\thepage}}% Right heading. - \else % If one-sided printing. - \def\@oddhead{\hbox to \@original@textwidth{% - \Rm \today\hfil{\Tt\leftmark}\qquad\thepage}}% Right heading. - \let\@evenhead\@oddhead - \fi - \let\chaptermark\@gobble - \let\sectionmark\@gobble - \let\subsectionmark\@gobble - \let\subsubsectionmark\@gobble - \let\paragraphmark\@gobble - \let\subparagraphmark\@gobble - \def\nwfilename{\begingroup\let\do\@makeother\dospecials - \catcode`\{=1 \catcode`\}=2 \nw@filename} - \def\nw@filename##1{\endgroup\markboth{##1}{##1}\let\nw@filename=\nw@laterfilename}% -} -\def\nw@laterfilename#1{\endgroup\clearpage \markboth{#1}{#1}} -\let\nwfilename=\@gobble -\def\nwcodecomment#1{\@@par\penalty\nwcodepenalty - \if@firstnwcodecomment - \vskip\nwcodecommentsep\penalty\nwcodepenalty\@firstnwcodecommentfalse - \fi% - \hspace{-\codemargin}{% - \rightskip=0pt plus1in - \interlinepenalty\nwcodepenalty - \let\\\relax\footnotesize\Rm #1\@@par\penalty\nwcodepenalty}} -\def\@nwalsodefined#1{\nwcodecomment{\@nwlangdepdef\ \nwpageprep\ \@pagesl{#1}.}} -\def\@nwused#1{\nwcodecomment{\@nwlangdepcud\ \nwpageprep\ \@pagesl{#1}.}} -\def\@nwnotused#1{\nwcodecomment{\@nwlangdeprtc.}} -\def\nwoutput#1{\nwcodecomment{\@nwlangdepcwf\ {\Tt \@stripstar#1*\stripped}.}} -\def\@stripstar#1*#2\stripped{#1} -\newcommand{\nwprevdefptr}[1]{% - \mbox{$\mathord{\triangleleft}\,\mathord{\mbox{\subpageref{#1}}}$}} -\newcommand{\nwnextdefptr}[1]{% - \mbox{$\mathord{\mbox{\subpageref{#1}}}\,\mathord{\triangleright}$}} - -\newcommand{\@nwprevnextdefs}[2]{% - {\nwtagstyle - \ifx\relax#1\else ~~\nwprevdefptr{#1}\fi - \ifx\relax#2\else ~~\nwnextdefptr{#2}\fi}} -\newcommand{\@nwusesondefline}[1]{{\nwtagstyle~~(\@pagenumsl{#1})}} -\newcommand{\@nwstartdeflinemarkup}{\nobreak\hskip 1.5em plus 1fill\nobreak} -\newcommand{\@nwenddeflinemarkup}{\nobreak\hskip \nwdefspace minus\nwdefspace\nobreak} -\def\nwopt@longxref{% - \let\nwalsodefined\@nwalsodefined - \let\nwused\@nwused - \let\nwnotused\@nwnotused - \let\nwprevnextdefs\@gobbletwo - \let\nwusesondefline\@gobble - \let\nwstartdeflinemarkup\relax - \let\nwenddeflinemarkup\relax -} -\def\nwopt@shortxref{% - \let\nwalsodefined\@gobble - \let\nwused\@gobble - \let\nwnotused\@gobble - \let\nwprevnextdefs\@nwprevnextdefs - \let\nwusesondefline\@nwusesondefline - \let\nwstartdeflinemarkup\@nwstartdeflinemarkup - \let\nwenddeflinemarkup\@nwenddeflinemarkup -} -\def\nwopt@noxref{% - \let\nwalsodefined\@gobble - \let\nwused\@gobble - \let\nwnotused\@gobble - \let\nwprevnextdefs\@gobbletwo - \let\nwusesondefline\@gobble - \let\nwstartdeflinemarkup\relax - \let\nwenddeflinemarkup\relax -} -\nwopt@shortxref % to hell with backward compatibility! -\newskip\nwcodecommentsep \nwcodecommentsep=3pt plus 1pt minus 1pt -\newif\if@firstnwcodecomment\@firstnwcodecommenttrue -\newcount\@nwlopage\newcount\@nwhipage % range lo..hi-1 -\newcount\@nwlosub % subpage of lo -\newcount\@nwhisub % subpage of hi -\def\@nwfirstpage#1#2#3{% subpage page xref-tag - \@nwlopage=#2 \@nwlosub=#1 - \def\@nwloxreftag{#3}% - \advance\@nwpagecount by \@ne - \@nwhipage=\@nwlopage\advance\@nwhipage by \@ne } -\def\@nwnextpage#1#2#3{% subpage page xref-tag - \ifnum\@nwhipage=#2 - \advance\@nwhipage by \@ne - \advance\@nwpagecount by \@ne - \@nwhisub=#1 - \def\@nwhixreftag{#3}\else - \ifnum#2<\@nwlopage \advance\@nwhipage by \m@ne - \ifnum\@nwhipage=\@nwlopage - \edef\@tempa{\noexpand\noexpand\noexpand\\% - {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}% - {\@nwloxreftag}}}% - \else - \count@=\@nwhipage \advance\count@ by \m@ne - \ifnum\count@=\@nwlopage % consecutive pages - \edef\@tempa{\noexpand\noexpand\noexpand\\% - {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}% - {\@nwloxreftag}}% - \noexpand\noexpand\noexpand\\% - {{\nwthepagenum{\number\@nwhisub}{\number\@nwhipage}} - {\@nwhixreftag}}}% - \else \ifnum\@nwlopage<110 \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else - \count@=\@nwlopage \divide\count@ by 100 \multiply\count@ by 100 - \ifnum\count@=\@nwlopage \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else - \count@=\@nwlopage \divide\count@ by 100 - \@nwpagetemp=\@nwhipage \divide\@nwpagetemp by 100 - \ifnum\count@=\@nwpagetemp % lo--least 2 digits of hi - \multiply\@nwpagetemp by 100 - \advance \@nwhipage by -\@nwpagetemp - \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}% - \else \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}% - \fi - \fi - \fi% - \fi - \fi% - \edef\@tempa{\noexpand\nwix@cons\noexpand\nw@pages{\@tempa}}\@tempa\@nwfirstpage{#1}{#2}{#3}\else - \ifnum#2>\@nwhipage \advance\@nwhipage by \m@ne - \ifnum\@nwhipage=\@nwlopage - \edef\@tempa{\noexpand\noexpand\noexpand\\% - {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}% - {\@nwloxreftag}}}% - \else - \count@=\@nwhipage \advance\count@ by \m@ne - \ifnum\count@=\@nwlopage % consecutive pages - \edef\@tempa{\noexpand\noexpand\noexpand\\% - {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}% - {\@nwloxreftag}}% - \noexpand\noexpand\noexpand\\% - {{\nwthepagenum{\number\@nwhisub}{\number\@nwhipage}} - {\@nwhixreftag}}}% - \else \ifnum\@nwlopage<110 \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else - \count@=\@nwlopage \divide\count@ by 100 \multiply\count@ by 100 - \ifnum\count@=\@nwlopage \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else - \count@=\@nwlopage \divide\count@ by 100 - \@nwpagetemp=\@nwhipage \divide\@nwpagetemp by 100 - \ifnum\count@=\@nwpagetemp % lo--least 2 digits of hi - \multiply\@nwpagetemp by 100 - \advance \@nwhipage by -\@nwpagetemp - \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}% - \else \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}% - \fi - \fi - \fi% - \fi - \fi% - \edef\@tempa{\noexpand\nwix@cons\noexpand\nw@pages{\@tempa}}\@tempa\@nwfirstpage{#1}{#2}{#3}\else - \@nwlosub=0 \@nwhisub=0 - \fi\fi\fi - } -\newcount\@nwpagetemp -\newcount\@nwpagecount -\def\@nwfirstpagel#1{% label - \@ifundefined{r@#1}{\@warning{Reference `#1' on page \thepage \space undefined}% - \nwix@cons\nw@pages{\\{\bfseries ??}}}{% - \edef\@tempa{\noexpand\@nwfirstpage\subpagepair{#1}{#1}}\@tempa}} -\def\@nwnextpagel#1{% label - \@ifundefined{r@#1}{\@warning{Reference `#1' on page \thepage \space undefined}% - \nwix@cons\nw@pages{\\{\bfseries ??}}}{% - \edef\@tempa{\noexpand\@nwnextpage\subpagepair{#1}{#1}}\@tempa}} -\def\@pagesl#1{% list of labels - \gdef\nw@pages{}\@nwpagecount=0 - \def\\##1{\@nwfirstpagel{##1}\let\\=\@nwnextpagel}#1% - \advance\@nwhipage by \m@ne - \ifnum\@nwhipage=\@nwlopage - \edef\@tempa{\noexpand\noexpand\noexpand\\% - {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}% - {\@nwloxreftag}}}% - \else - \count@=\@nwhipage \advance\count@ by \m@ne - \ifnum\count@=\@nwlopage % consecutive pages - \edef\@tempa{\noexpand\noexpand\noexpand\\% - {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}% - {\@nwloxreftag}}% - \noexpand\noexpand\noexpand\\% - {{\nwthepagenum{\number\@nwhisub}{\number\@nwhipage}} - {\@nwhixreftag}}}% - \else \ifnum\@nwlopage<110 \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else - \count@=\@nwlopage \divide\count@ by 100 \multiply\count@ by 100 - \ifnum\count@=\@nwlopage \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else - \count@=\@nwlopage \divide\count@ by 100 - \@nwpagetemp=\@nwhipage \divide\@nwpagetemp by 100 - \ifnum\count@=\@nwpagetemp % lo--least 2 digits of hi - \multiply\@nwpagetemp by 100 - \advance \@nwhipage by -\@nwpagetemp - \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}% - \else \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}% - \fi - \fi - \fi% - \fi - \fi% - \edef\@tempa{\noexpand\nwix@cons\noexpand\nw@pages{\@tempa}}\@tempa\def\\##1{\@nwhyperpagenum##1}% - \ifnum\@nwpagecount=1 \nwpageword \else \nwpagesword\fi~\commafy{\nw@pages}} -\def\@nwhyperpagenum#1#2{\nwhyperreference{#2}{#1}} - -\def\@pagenumsl#1{% list of labels -- doesn't include word `pages', commas, or `and' - \gdef\nw@pages{}\@nwpagecount=0 - \def\\##1{\@nwfirstpagel{##1}\let\\=\@nwnextpagel}#1% - \advance\@nwhipage by \m@ne - \ifnum\@nwhipage=\@nwlopage - \edef\@tempa{\noexpand\noexpand\noexpand\\% - {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}% - {\@nwloxreftag}}}% - \else - \count@=\@nwhipage \advance\count@ by \m@ne - \ifnum\count@=\@nwlopage % consecutive pages - \edef\@tempa{\noexpand\noexpand\noexpand\\% - {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}% - {\@nwloxreftag}}% - \noexpand\noexpand\noexpand\\% - {{\nwthepagenum{\number\@nwhisub}{\number\@nwhipage}} - {\@nwhixreftag}}}% - \else \ifnum\@nwlopage<110 \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else - \count@=\@nwlopage \divide\count@ by 100 \multiply\count@ by 100 - \ifnum\count@=\@nwlopage \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else - \count@=\@nwlopage \divide\count@ by 100 - \@nwpagetemp=\@nwhipage \divide\@nwpagetemp by 100 - \ifnum\count@=\@nwpagetemp % lo--least 2 digits of hi - \multiply\@nwpagetemp by 100 - \advance \@nwhipage by -\@nwpagetemp - \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}% - \else \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}% - \fi - \fi - \fi% - \fi - \fi% - \edef\@tempa{\noexpand\nwix@cons\noexpand\nw@pages{\@tempa}}\@tempa% - \def\\##1{\@nwhyperpagenum##1\let\\=\@nwpagenumslrest}\nw@pages} -\def\@nwpagenumslrest#1{~\@nwhyperpagenum#1} -\def\subpages#1{% list of {{subpage}{page}} - \gdef\nw@pages{}\@nwpagecount=0 - \def\\##1{\edef\@tempa{\noexpand\@nwfirstpage##1{}}\@tempa - \def\\####1{\edef\@tempa{\noexpand\@nwnextpage####1}\@tempa}}#1% - \advance\@nwhipage by \m@ne - \ifnum\@nwhipage=\@nwlopage - \edef\@tempa{\noexpand\noexpand\noexpand\\% - {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}% - {\@nwloxreftag}}}% - \else - \count@=\@nwhipage \advance\count@ by \m@ne - \ifnum\count@=\@nwlopage % consecutive pages - \edef\@tempa{\noexpand\noexpand\noexpand\\% - {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}% - {\@nwloxreftag}}% - \noexpand\noexpand\noexpand\\% - {{\nwthepagenum{\number\@nwhisub}{\number\@nwhipage}} - {\@nwhixreftag}}}% - \else \ifnum\@nwlopage<110 \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else - \count@=\@nwlopage \divide\count@ by 100 \multiply\count@ by 100 - \ifnum\count@=\@nwlopage \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else - \count@=\@nwlopage \divide\count@ by 100 - \@nwpagetemp=\@nwhipage \divide\@nwpagetemp by 100 - \ifnum\count@=\@nwpagetemp % lo--least 2 digits of hi - \multiply\@nwpagetemp by 100 - \advance \@nwhipage by -\@nwpagetemp - \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}% - \else \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}% - \fi - \fi - \fi% - \fi - \fi% - \edef\@tempa{\noexpand\nwix@cons\noexpand\nw@pages{\@tempa}}\@tempa\def\\##1{\@firstoftwo##1}% - \ifnum\@nwpagecount=1 \nwpageword \else \nwpagesword\fi~\commafy{\nw@pages}} -\def\@nwaddrange{\advance\@nwhipage by \m@ne - \ifnum\@nwhipage=\@nwlopage - \edef\@tempa{\noexpand\noexpand\noexpand\\% - {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}% - {\@nwloxreftag}}}% - \else - \count@=\@nwhipage \advance\count@ by \m@ne - \ifnum\count@=\@nwlopage % consecutive pages - \edef\@tempa{\noexpand\noexpand\noexpand\\% - {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}% - {\@nwloxreftag}}% - \noexpand\noexpand\noexpand\\% - {{\nwthepagenum{\number\@nwhisub}{\number\@nwhipage}} - {\@nwhixreftag}}}% - \else \ifnum\@nwlopage<110 \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else - \count@=\@nwlopage \divide\count@ by 100 \multiply\count@ by 100 - \ifnum\count@=\@nwlopage \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else - \count@=\@nwlopage \divide\count@ by 100 - \@nwpagetemp=\@nwhipage \divide\@nwpagetemp by 100 - \ifnum\count@=\@nwpagetemp % lo--least 2 digits of hi - \multiply\@nwpagetemp by 100 - \advance \@nwhipage by -\@nwpagetemp - \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}% - \else \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}% - \fi - \fi - \fi% - \fi - \fi% - \edef\@tempa{\noexpand\nwix@cons\noexpand\nw@pages{\@tempa}}\@tempa} -\def\nwpageword{\@nwlangdepchk} % chunk, was page -\def\nwpagesword{\@nwlangdepchks} % chunk, was page -\def\nwpageprep{\@nwlangdepin} % in, was on -\newcommand\nw@genericref[2]{% what to do, name of ref - \expandafter\nw@g@nericref\csname r@#2\endcsname#1{#2}} -\newcommand\nw@g@nericref[3]{% control sequence, what to do, name - \ifx#1\relax - \ref{#3}% trigger the standard `undefined ref' mechanisms - \else - \expandafter#2#1.\\% - \fi} -\def\nw@selectone#1#2#3\\{#1} -\def\nw@selecttwo#1#2#3\\{#2} -\def\nw@selectonetwo#1#2#3\\{{#1}{#2}} -\newcommand{\subpageref}[1]{% - \nwhyperreference{#1}{\nw@genericref\@subpageref{#1}}} -\def\@subpageref#1#2#3\\{% - \@ifundefined{2on#2}{#2}{\nwthepagenum{#1}{#2}}} -\newcommand{\subpagepair}[1]{% % produces {subpage}{page} - \@ifundefined{r@#1}% - {{0}{0}}% - {\nw@genericref\@subpagepair{#1}}} -\def\@subpagepair#1#2#3\\{% - \@ifundefined{2on#2}{{0}{#2}}{{#1}{#2}}} -\newcommand{\sublabel}[1]{% - \leavevmode % needed to make \@bsphack work - \@bsphack - \nwblindhyperanchor{#1}% - \if@filesw {\let\thepage\relax - \def\protect{\noexpand\noexpand\noexpand}% - \edef\@tempa{\write\@auxout{\string - \newsublabel{#1}{{}{\thepage}}}}% - \expandafter}\@tempa - \if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack} -\newcommand{\nosublabel}[1]{% - \@bsphack\if@filesw {\let\thepage\relax - \def\protect{\noexpand\noexpand\noexpand}% - \edef\@tempa{\write\@auxout{\string - \newlabel{#1}{{0}{\thepage}}}}% - \expandafter}\@tempa - \if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack} -\newcommand\newsublabel{% - \nw@settrailers - \global\let\newsublabel\@newsublabel - \@newsublabel} -\newcommand{\@newsublabel}[2]{% - \edef\this@page{\@cdr#2\@nil}% - \ifx\this@page\last@page\else - \sub@page=\z@ - \fi - \edef\last@page{\this@page} - \advance\sub@page by \@ne - \ifnum\sub@page=\tw@ - \global\@namedef{2on\this@page}{}% - \fi - \pendingsublabel{#1}% - \edef\@tempa##1{\noexpand\newlabel{##1}% - {{\number\sub@page}{\this@page}\nw@labeltrailers}}% - \pending@sublabels - \def\pending@sublabels{}} -\newcommand\nw@settrailers{% -- won't work on first run - \@ifpackageloaded{nameref}% - {\gdef\nw@labeltrailers{{}{}{}}}% - {\gdef\nw@labeltrailers{}}} -\renewcommand\nw@settrailers{% - \@ifundefined{@secondoffive}% - {\gdef\nw@labeltrailers{}}% - {\gdef\nw@labeltrailers{{}{}{}}}} -\newcommand{\nextchunklabel}[1]{% - \nwblindhyperanchor{#1}% % looks slightly bogus --- nr - \@bsphack\if@filesw {\let\thepage\relax - \edef\@tempa{\write\@auxout{\string\pendingsublabel{#1}}}% - \expandafter}\@tempa - \if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack} -\newcommand\pendingsublabel[1]{% - \def\@tempa{\noexpand\@tempa}% - \edef\pending@sublabels{\noexpand\@tempa{#1}\pending@sublabels}} -\def\pending@sublabels{} -\def\last@page{\relax} -\newcount\sub@page -\def\@alphasubpagenum#1#2{#2\ifnum#1=0 \else\@alph{#1}\fi} -\def\@nosubpagenum#1#2{#2} -\def\@numsubpagenum#1#2{#2\ifnum#1=0 \else.\@arabic{#1}\fi} -\def\nwopt@nosubpage{\let\nwthepagenum=\@nosubpagenum\nwopt@nomargintag} -\def\nwopt@numsubpage{\let\nwthepagenum=\@numsubpagenum} -\def\nwopt@alphasubpage{\let\nwthepagenum=\@alphasubpagenum} -\nwopt@alphasubpage -\newcount\@nwalph@n -\let\@nwalph@d\@tempcnta -\let\@nwalph@bound\@tempcntb -\def\@nwlongalph#1{{% - \@nwalph@n=#1\advance\@nwalph@n by-1 - \@nwalph@bound=26 - \loop\ifnum\@nwalph@n<\@nwalph@bound\else - \advance\@nwalph@n by -\@nwalph@bound - \multiply\@nwalph@bound by 26 - \repeat - \loop\ifnum\@nwalph@bound>1 - \divide\@nwalph@bound by 26 - \@nwalph@d=\@nwalph@n\divide\@nwalph@d by \@nwalph@bound - % d := d * bound ; n -:= d; d := d / bound --- saves a temporary - \multiply\@nwalph@d by \@nwalph@bound - \advance\@nwalph@n by -\@nwalph@d - \divide\@nwalph@d by \@nwalph@bound - \advance\@nwalph@d by 1 \@alph{\@nwalph@d}% - \repeat -}} -\newcount\nw@chunkcount -\nw@chunkcount=\@ne -\newcommand{\weblabel}[1]{% - \@bsphack - \nwblindhyperanchor{#1}% - \if@filesw {\let\thepage\relax - \def\protect{\noexpand\noexpand\noexpand}% - \edef\@tempa{\write\@auxout{\string - \newsublabel{#1}{{}{\number\nw@chunkcount}}}}% - \expandafter}\@tempa - \global\advance\nw@chunkcount by \@ne - \if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack} -\def\nwopt@webnumbering{% - \let\sublabel=\weblabel - \def\nwpageword{chunk}\def\nwpagesword{chunks}% - \def\nwpageprep{in}} -% \nwindexdefn{printable name}{identifying label}{label of chunk} -% \nwindexuse{printable name}{identifying label}{label of chunk} - -\def\nwindexdefn#1#2#3{\@auxix{\protect\nwixd}{#2}{#3}} -\def\nwindexuse#1#2#3{\@auxix{\protect\nwixu}{#2}{#3}} - -\def\@auxix#1#2#3{% {marker}{id label}{subpage label} - \@bsphack\if@filesw {\let\nwixd\relax\let\nwixu\relax - \def\protect{\noexpand\noexpand\noexpand}% - \edef\@tempa{\write\@auxout{\string\nwixadd{#1}{#2}{#3}}}% - \expandafter}\@tempa - \if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack} -% \nwixadd{marker}{idlabel}{subpage label} -\def\nwixadd#1#2#3{% - \@ifundefined{nwixl@#2}% - {\global\@namedef{nwixl@#2}{#1{#3}}}% - {\expandafter\nwix@cons\csname nwixl@#2\endcsname{#1{#3}}}} -\def\@nwsubscriptident#1#2{\mbox{$\mbox{#1}_{\mathrm{\subpageref{#2}}}$}} -\def\@nwnosubscriptident#1#2{#1} -\def\@nwhyperident#1#2{\leavevmode\nwhyperreference{#2}{#1}} -\def\nwopt@subscriptidents{% - \let\nwlinkedidentq\@nwsubscriptident - \let\nwlinkedidentc\@nwsubscriptident -} -\def\nwopt@nosubscriptidents{% - \let\nwlinkedidentq\@nwnosubscriptident - \let\nwlinkedidentc\@nwnosubscriptident -} -\def\nwopt@hyperidents{% - \let\nwlinkedidentq\@nwhyperident - \let\nwlinkedidentc\@nwhyperident -} -\def\nwopt@nohyperidents{% - \let\nwlinkedidentq\@nwnosubscriptident - \let\nwlinkedidentc\@nwnosubscriptident -} -\def\nwopt@subscriptquotedidents{% - \let\nwlinkedidentq\@nwsubscriptident -} -\def\nwopt@nosubscriptquotedidents{% - \let\nwlinkedidentq\@nwnosubscriptident -} -\def\nwopt@hyperquotedidents{% - \let\nwlinkedidentq\@nwhyperident -} -\def\nwopt@nohyperquotedidents{% - \let\nwlinkedidentq\@nwnosubscriptident -} -\nwopt@hyperidents -\newcount\@commacount -\def\commafy#1{% - {\nwix@listcount{#1}\@commacount=\nwix@counter - \let\@comma@each=\\% - \ifcase\@commacount\let\\=\@comma@each\or\let\\=\@comma@each\or - \def\\{\def\\{ \@nwlangdepand\ \@comma@each}\@comma@each}\else - \def\\{\def\\{, % - \advance\@commacount by \m@ne - \ifnum\@commacount=1 \@nwlangdepand~\fi\@comma@each}\@comma@each}\fi - #1}} -\def\nwix@cons#1#2{% {list}{\marker{element}} - {\toks0=\expandafter{#1}\def\@tempa{#2}\toks2=\expandafter{\@tempa}% - \xdef#1{\the\toks0 \the\toks2 }}} -\def\nwix@uses#1{% {label} - \def\nwixu{\\}\let\nwixd\@gobble\@nameuse{nwixl@#1}} -\def\nwix@defs#1{% {label} - \def\nwixd{\\}\let\nwixu\@gobble\@nameuse{nwixl@#1}} -\newcount\nwix@counter -\def\nwix@listcount#1{% {list with \\} - {\count@=0 - \def\\##1{\advance\count@ by \@ne }% - #1\global\nwix@counter=\count@ }} -\def\nwix@usecount#1{\nwix@listcount{\nwix@uses{#1}}} -\def\nwix@defcount#1{\nwix@listcount{\nwix@defs{#1}}} -\def\nwix@id@defs#1{% index pair - {{\Tt \@car#1\@nil}% - \def\\##1{\nwix@defs@space\subpageref{##1}}\nwix@defs{\@cdr#1\@nil}}} - % useful above to change ~ into something that can break -% this option is undocumented because I think breakdefs is always right -\def\nwopt@breakdefs{\def\nwix@defs@space{\penalty200\ }} -\def\nwopt@nobreakdefs{\def\nwix@defs@space{~}} % old code -\nwopt@breakdefs -\def\nwidentuses#1{% list of index pairs - \nwcodecomment{\@nwlangdepuss\ \let\\=\nwix@id@defs\commafy{#1}.}} -\def\nwix@totaluses#1{% list of index pairs - {\count@=0 - \def\\##1{\nwix@usecount{\@cdr##1\@nil}\advance\count@ by\nwix@counter}% - #1\global\nwix@counter\count@ }} -\def\nwix@id@uses#1#2{% {ident}{label} - \nwix@usecount{#2}\ifnum\nwix@counter>0 - {\advance\leftskip by \codemargin - \nwcodecomment{{\Tt #1}, \@nwlangdepusd\ \nwpageprep\ \@pagesl{\nwix@uses{#2}}.}}% - \else - \ifnw@hideunuseddefs\else - {\advance\leftskip by \codemargin \nwcodecomment{{\Tt #1}, \@nwlangdepnvu.}}% - \fi - \fi} -\def\nwidentdefs#1{% list of index pairs - \ifnw@hideunuseddefs\nwix@totaluses{#1}\else\nwix@listcount{#1}\fi - \ifnum\nwix@counter>0 - \nwcodecomment{\@nwlangdepdfs:}% - {\def\\##1{\nwix@id@uses ##1}#1}% - \fi} -\newif\ifnw@hideunuseddefs\nw@hideunuseddefsfalse -\def\nwopt@hideunuseddefs{\nw@hideunuseddefstrue} -\def\nwopt@noidentxref{% - \let\nwidentdefs\@gobble - \let\nwidentuses\@gobble} -\def\nw@underlinedefs{% {list with \nwixd, \nwixu} - \let\\=\relax\def\nw@comma{, } - \def\nwixd##1{\\\underline{\subpageref{##1}}\let\\\nw@comma}% - \def\nwixu##1{\\\subpageref{##1}\let\\\nw@comma}} - -\def\nw@indexline#1#2{% - {\indent {\Tt #1}: \nw@underlinedefs\@nameuse{nwixl@#2}\par}} - -\newenvironment{thenowebindex}{\parindent=-10pt \parskip=\z@ - \advance\leftskip by 10pt - \advance\rightskip by 0pt plus1in\par\@afterindenttrue - \def\\##1{\nw@indexline##1}}{} -\def\nowebindex{% - \@ifundefined{nwixs@i}% - {\@warning{The \string\nowebindex\space is empty}}% - {\begin{thenowebindex}\@nameuse{nwixs@i}\end{thenowebindex}}} -\def\nowebindex@external{% - {\let\nwixadds@c=\@gobble - \def\nwixadds@i##1{\nw@indexline##1}% - \def\nwixaddsx##1##2{\@nameuse{nwixadds@##1}{##2}}% - \begin{thenowebindex}\@input{\jobname.nwi}\end{thenowebindex}}} -\def\nwixlogsorted#1#2{% list data - \@bsphack\if@filesw - \toks0={#2}\immediate\write\@auxout{\string\nwixadds{#1}{\the\toks0}} - \if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack} -\def\nwixadds#1#2{% - \@ifundefined{nwixs@#1}% - {\global\@namedef{nwixs@#1}{\\{#2}}}% - {\expandafter\nwix@cons\csname nwixs@#1\endcsname{\\{#2}}}} -\let\nwixaddsx=\@gobbletwo -\def\nwopt@externalindex{% - \ifx\nwixadds\@gobbletwo % already called - \else - \let\nwixaddsx=\nwixadds \let\nwixadds=\@gobbletwo - \let\nowebindex=\nowebindex@external - \let\nowebchunks=\nowebchunks@external - \fi} -\def\nowebchunks{% - \@ifundefined{nwixs@c}% - {\@warning{The are no \string\nowebchunks}}% - {\begin{thenowebchunks}\@nameuse{nwixs@c}\end{thenowebchunks}}} -\def\nowebchunks@external{% - {\let\nwixadds@i=\@gobble - \def\nwixadds@c##1{\nw@onechunk##1}% - \def\nwixaddsx##1##2{\@nameuse{nwixadds@##1}{##2}}% - \begin{thenowebchunks}\@input{\jobname.nwi}\end{thenowebchunks}}} - \@namedef{r@nw@notdef}{{0}{(\@nwlangdepnvd)}} -\def\nw@chunkunderlinedefs{% {list of labels with \nwixd, \nwixu} - \let\\=\relax\def\nw@comma{, } - \def\nwixd##1{\\\underline{\subpageref{##1}}\let\\\nw@comma}% - \def\nwixu##1{\\\subpageref{##1}\let\\\nw@comma}} -\def\nw@onechunk#1#2#3{% {name}{label of first definition}{list with \nwixd, \nwixu} - \@ifundefined{r@#2}{}{% - \indent\LA #1~{\nwtagstyle\subpageref{#2}}\RA - \if@nwlongchunks{~\nw@chunkunderlinedefs#3}\fi\par}} -\newenvironment{thenowebchunks}{\vskip3pt - \parskip=\z@\parindent=-10pt \advance\leftskip by 10pt - \advance\rightskip by 0pt plus10pt \@afterindenttrue - \def\\##1{\nw@onechunk##1}}{} -\newif\if@nwlongchunks -\@nwlongchunksfalse -\let\nwopt@longchunks\@nwlongchunkstrue -\newcommand\@nw@hyper@ref{\hyperreference} % naras -\newcommand\@nw@hyper@anc{\blindhyperanchor} % naras -\newcommand\@nw@hyperref@ref[2]{\hyperlink{noweb.#1}{#2}} % nr -\newcommand\@nw@hyperref@anc[1]{\hypertarget{noweb.#1}{\relax}} % nr -%%\renewcommand\@nw@hyperref@ref[2]{{#2}} % nr -%%\renewcommand\@nw@hyperref@anc[1]{} % nr -\newcommand\nwhyperreference{% - \@ifundefined{hyperlink} - {\@ifundefined{hyperreference} - {\global\let\nwhyperreference\@gobble} - {\global\let\nwhyperreference\@nw@hyper@ref}} - {\global\let\nwhyperreference\@nw@hyperref@ref}% - \nwhyperreference -} - -\newcommand\nwblindhyperanchor{% - \@ifundefined{hyperlink} - {\@ifundefined{hyperreference} - {\global\let\nwblindhyperanchor\@gobble} - {\global\let\nwblindhyperanchor\@nw@hyper@anc}} - {\global\let\nwblindhyperanchor\@nw@hyperref@anc}% - \nwblindhyperanchor -} -\newcommand\nwanchorto{% - \begingroup\let\do\@makeother\dospecials - \catcode`\{=1 \catcode`\}=2 \nw@anchorto} -\newcommand\nw@anchorto[1]{\endgroup\def\nw@next{#1}\nw@anchortofin} -\newcommand\nw@anchortofin[1]{#1\footnote{See URL \texttt{\nw@next}.}} -\let\nwanchorname\@gobble -\newif\ifhtml -\htmlfalse -\let\nwixident=\relax -\def\nwopt@english{% - \def\@nwlangdepdef{This definition is continued}% - \def\@nwlangdepcud{This code is used}% - \def\@nwlangdeprtc{Root chunk (not used in this document)}% - \def\@nwlangdepcwf{This code is written to file}% - \def\@nwlangdepchk{chunk}% - \def\@nwlangdepchks{chunks}% - \def\@nwlangdepin{in}% - \def\@nwlangdepand{and}% - \def\@nwlangdepuss{Uses}% - \def\@nwlangdepusd{used}% - \def\@nwlangdepnvu{never used}% - \def\@nwlangdepdfs{Defines}% - \def\@nwlangdepnvd{never defined}% -} -\let\nwopt@american\nwopt@english -\def\nwopt@icelandic{% - \def\@nwlangdepdef{This definition is continued}% - \def\@nwlangdepcud{This code is used}% - \def\@nwlangdeprtc{Root chunk (not used in this document)}% - \def\@nwlangdepcwf{This code is written to file}% - \def\@nwlangdepchk{k??a}% - \def\@nwlangdepchks{k??um}% - \def\@nwlangdepin{?}% - \def\@nwlangdepand{og}% - \def\@nwlangdepuss{Notar}% - \def\@nwlangdepusd{nota?}% - \def\@nwlangdepnvu{hvergi nota?}% - \def\@nwlangdepdfs{Skilgreinir}% - \def\@nwlangdepnvd{hvergi skilgreint}% -} -\def\nwopt@portuges{% - \def\@nwlangdepdef{Defini\c{c}\~ao continuada em}% - % This definition is continued - \def\@nwlangdepcud{C\'odigo usado em}% - % This code is used - \def\@nwlangdeprtc{Fragmento de topo (sem uso no documento)}% - % Root chunk (not used in this document) - \def\@nwlangdepcwf{Este c\'odigo foi escrito no ficheiro}% - % This code is written to file - \def\@nwlangdepchk{fragmento}% - % chunk - \def\@nwlangdepchks{fragmentos}% - % chunks - \def\@nwlangdepin{no(s)}% - % in - \def\@nwlangdepand{e}% - % and - \def\@nwlangdepuss{Usa}% - % Uses - \def\@nwlangdepusd{usado}% - % used - \def\@nwlangdepnvu{nunca usado}% - % never used - \def\@nwlangdepdfs{Define}% - % Defines - \def\@nwlangdepnvd{nunca definido}% - % never defined -} -\def\nwopt@frenchb{% - \def\@nwlangdepdef{Suite de la d\'efinition}% - % This definition is continued - \def\@nwlangdepcud{Ce code est employ\'e}% - % This code is used - \def\@nwlangdeprtc{Morceau racine (pas employ\'e dans ce document)}% - % Root chunk (not used in this document) - \def\@nwlangdepcwf{Ce code est \'ecrit dans le fichier}% - % This code is written to file - \def\@nwlangdepchk{le morceau}% - % chunk - \def\@nwlangdepchks{les morceaux}% - % chunks - \def\@nwlangdepin{dans}% - % in - \def\@nwlangdepand{et}% - % and - \def\@nwlangdepuss{Utilise}% - % Uses - \def\@nwlangdepusd{utilis\'{e}}% - % used - \def\@nwlangdepnvu{jamais employ\'{e}}% - % never used - \def\@nwlangdepdfs{D\'{e}finit}% - % Defines - % Cannot use the accent here: \def\@nwlangdepnvd{jamais d\'{e}fini}% - \def\@nwlangdepnvd{jamais defini}% - % never defined -} -\let\nwopt@french\nwopt@frenchb -\def\nwopt@german{% - \def\@nwlangdepdef{Diese Definition wird fortgesetzt}% - % This definition is continued - \def\@nwlangdepcud{Dieser Code wird benutzt}% - % This code is used - \def\@nwlangdeprtc{Hauptteil (nicht in diesem Dokument benutzt)}% - % Root chunk (not used in this document) - \def\@nwlangdepcwf{Geh\"ort in die Datei}% - % This code is written to file - \def\@nwlangdepchk{Abschnitt}% - % chunk - \def\@nwlangdepchks{den Abschnitten}% - % chunks - \def\@nwlangdepin{in}% - % in - \def\@nwlangdepand{und}% - % and - \def\@nwlangdepuss{Benutzt}% - % Uses - \def\@nwlangdepusd{benutzt}% - % used - \def\@nwlangdepnvu{nicht benutzt}% - % never used - \def\@nwlangdepdfs{Definiert}% - % Defines - \def\@nwlangdepnvd{nicht definiert}% - % never defined -} -\def\nwopt@german{% - \def\@nwlangdepdef{Diese Definition wird fortgesetzt}% - % This definition is continued - \def\@nwlangdepcud{Dieser Code wird benutzt}% - % This code is used - \def\@nwlangdeprtc{Hauptteil (nicht in diesem Dokument benutzt)}% - % Root chunk (not used in this document) - \def\@nwlangdepcwf{Dieser Code erzeugt die Datei} - % This code generates the file - \def\@nwlangdepchk{Teil}% - % chunk - \def\@nwlangdepchks{Teils}% - % chunks - \def\@nwlangdepin{im}% - % in - \def\@nwlangdepand{und}% - % and - \def\@nwlangdepuss{Benutzt}% - % Uses - \def\@nwlangdepusd{benutzt}% - % used - \def\@nwlangdepnvu{nicht benutzt}% - % never used - \def\@nwlangdepdfs{Definiert}% - % Defines - \def\@nwlangdepnvd{nicht definiert}% - % never defined -} -\let\nwopt@ngerman\nwopt@german -\def\nwopt@swedish{% - \def\@nwlangdepdef{Denna definition fortsätter}% - \def\@nwlangdepcud{Denna kod används}% - \def\@nwlangdeprtc{% - Rotstycke (används inte någon annanstans i detta dokument)% - }% - \def\@nwlangdepcwf{Denna kod skrivs till fil}% - \def\@nwlangdepchk{stycke}% - \def\@nwlangdepchks{stycken}% - \def\@nwlangdepin{i}% - \def\@nwlangdepand{och}% - \def\@nwlangdepuss{Använder}% - \def\@nwlangdepusd{använd}% - \def\@nwlangdepnvu{aldrig använd}% - \def\@nwlangdepdfs{Definierar}% - \def\@nwlangdepnvd{aldrig definierad}% -} -\ifx\languagename\undefined % default is English - \noweboptions{english} -\else - \@ifundefined{nwopt@\languagename} - {\noweboptions{english}} - {\expandafter\noweboptions\expandafter{\languagename}} -\fi diff --git "a/r\303\266varspr\303\245ket/noweb.sty" "b/r\303\266varspr\303\245ket/noweb.sty" new file mode 120000 index 0000000..6e42408 --- /dev/null +++ "b/r\303\266varspr\303\245ket/noweb.sty" @@ -0,0 +1 @@ +../noweb.sty \ No newline at end of file