1<!DOCTYPE html> 2<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head> 3 4<meta charset="utf-8"> 5<meta name="generator" content="quarto-1.10.18"> 6 7<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> 8 9<meta name="author" content="András Bárány"> 10<meta name="dcterms.date" content="2026-08-13"> 11 12<title>Hello!</title> 13<style> 14/* Default styles provided by pandoc. 15** See https://pandoc.org/MANUAL.html#variables-for-html for config info. 16*/ 17span.smallcaps{font-variant: small-caps;} 18div.columns{display: flex; gap: 1.5em;} 19div.column{flex: auto;} 20@media screen { 21div.columns{gap: min(4vw, 1.5em);} 22div.column{overflow-x: auto;} 23} 24div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} 25ul.task-list{list-style: none;} 26ul.task-list li input[type="checkbox"] { 27 width: 0.8em; 28 margin: 0 0.8em 0.2em -1em; /* quarto-specific, see https://github.com/quarto-dev/quarto-cli/issues/4556 */ 29 vertical-align: middle; 30} 31</style> 32 33
34<script src="site_libs/quarto-nav/quarto-nav.js"></script>
vendor: 1 bytes, line 34
34
35<script src="site_libs/quarto-nav/headroom.min.js"></script>
vendor: 1 bytes, line 35
35
36<script src="site_libs/clipboard/clipboard.min.js"></script>
vendor: 1 bytes, line 36
36
37<script src="site_libs/quarto-search/autocomplete.umd.js"></script>
vendor: 1 bytes, line 37
37
38<script src="site_libs/quarto-search/fuse.min.js"></script>
vendor: 1 bytes, line 38
38
39<script src="site_libs/quarto-search/quarto-search.js"></script>
39 40<meta name="quarto:offset" content="./">
41<script src="site_libs/quarto-html/quarto.js" type="module"></script>
vendor: 1 bytes, line 41
41
42<script src="site_libs/quarto-html/tabsets/tabsets.js" type="module"></script>
vendor: 1 bytes, line 42
42
43<script src="site_libs/quarto-html/popper.min.js"></script>
vendor: 1 bytes, line 43
43
44<script src="site_libs/quarto-html/tippy.umd.min.js"></script>
vendor: 1 bytes, line 44
44
45<script src="site_libs/quarto-html/anchor.min.js"></script>
45 46<link href="site_libs/quarto-html/tippy.css" rel="stylesheet"> 47<link href="site_libs/quarto-html/quarto-syntax-highlighting-64a204ab8560d761af7679ceaba22944.css" rel="stylesheet" id="quarto-text-highlighting-styles">
48<script src="site_libs/bootstrap/bootstrap.min.js"></script>
48 49<link href="site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet"> 50<link href="site_libs/bootstrap/bootstrap-efc9a1b7f59d7af91b8d36b1adf66c6e.min.css" rel="stylesheet" append-hash="true" id="quarto-bootstrap" data-mode="light">
51<script id="quarto-search-options" type="application/json">{ 52 "location": "navbar", 53 "copy-button": false, 54 "collapse-after": 3, 55 "panel-placement": "end", 56 "type": "overlay", 57 "limit": 50, 58 "keyboard-shortcut": [ 59 "f", 60 "/", 61 "s" 62 ], 63 "show-item-context": false, 64 "language": { 65 "search-no-results-text": "No results", 66 "search-matching-documents-text": "matching documents", 67 "search-copy-link-title": "Copy link to search", 68 "search-hide-matches-text": "Hide additional matches", 69 "search-more-match-text": "more match in this document", 70 "search-more-matches-text": "more matches in this document", 71 "search-clear-button-title": "Clear", 72 "search-text-placeholder": "", 73 "search-detached-cancel-button-title": "Cancel", 74 "search-submit-button-title": "Submit", 75 "search-label": "Search" 76 } 77}</script>
77 78 79 80</head> 81 82<body class="nav-fixed quarto-light"> 83 84<div id="quarto-search-results"></div> 85 <header id="quarto-header" class="headroom fixed-top"> 86 <nav class="navbar navbar-expand-lg " data-bs-theme="dark"> 87 <div class="navbar-container container-fluid"> 88 <div id="quarto-search" class="" title="Search"></div> 89 <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse" aria-controls="navbarCollapse" role="menu" aria-expanded="false" aria-label="Toggle navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }"> 90 <span class="navbar-toggler-icon"></span> 91</button> 92 <div class="collapse navbar-collapse" id="navbarCollapse"> 93 <ul class="navbar-nav navbar-nav-scroll me-auto"> 94 <li class="nav-item"> 95 <a class="nav-link active" href="./index.html" aria-current="page"> 96<span class="menu-text">Home</span></a> 97 </li> 98 <li class="nav-item"> 99 <a class="nav-link" href="./projects.html"> 100<span class="menu-text">Projects</span></a> 101 </li> 102 <li class="nav-item"> 103 <a class="nav-link" href="./publications.html"> 104<span class="menu-text">Publications</span></a> 105 </li> 106 <li class="nav-item"> 107 <a class="nav-link" href="./talks.html"> 108<span class="menu-text">Talks</span></a> 109 </li> 110 <li class="nav-item"> 111 <a class="nav-link" href="./teaching.html"> 112<span class="menu-text">Teaching</span></a> 113 </li> 114 <li class="nav-item"> 115 <a class="nav-link" href="./tex.html"> 116<span class="menu-text">LaTeX</span></a> 117 </li> 118 <li class="nav-item"> 119 <a class="nav-link" href="./blog.html"> 120<span class="menu-text">Blog</span></a> 121 </li> 122</ul> 123 </div> <!-- /navcollapse --> 124 <div class="quarto-navbar-tools"> 125 <a href="mailto:andras DOT barany AT ed.ac.uk" title="" class="quarto-navigation-tool px-1" aria-label=""><i class="bi bi-envelope-fill"></i></a> 126 <div class="dropdown"> 127 <a href="" title="" id="quarto-navigation-tool-dropdown-0" class="quarto-navigation-tool dropdown-toggle px-1" data-bs-toggle="dropdown" aria-expanded="false" role="link" aria-label=""><i class="bi bi-git"></i></a> 128 <ul class="dropdown-menu" aria-labelledby="quarto-navigation-tool-dropdown-0"> 129 <li> 130 <a class="dropdown-item quarto-navbar-tools-item" href="https://codeberg.org/andrasbarany/website/"> 131 Source code 132 </a> 133 </li> 134 </ul> 135 </div> 136</div> 137 </div> <!-- /container-fluid --> 138 </nav> 139</header> 140<!-- content --> 141<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article page-navbar"> 142<!-- sidebar --> 143<!-- margin-sidebar --> 144 <div id="quarto-margin-sidebar" class="sidebar margin-sidebar"> 145 <nav id="TOC" role="doc-toc" class="toc-active"> 146 <h2 id="toc-title">On this page</h2> 147 148 <ul> 149 <li><a href="#current-position-and-interests" id="toc-current-position-and-interests" class="nav-link active" data-scroll-target="#current-position-and-interests">Current position and interests</a></li> 150 <li><a href="#previous-positions" id="toc-previous-positions" class="nav-link" data-scroll-target="#previous-positions">Previous positions</a></li> 151 </ul> 152</nav> 153 </div> 154<!-- main --> 155<main class="content" id="quarto-document-content"> 156 157<header id="title-block-header" class="quarto-title-block default"> 158<div class="quarto-title"> 159<h1 class="title">Hello!</h1> 160</div> 161 162 163 164<div class="quarto-title-meta"> 165 166 <div> 167 <div class="quarto-title-meta-heading">Author</div> 168 <div class="quarto-title-meta-contents"> 169 <p>András Bárány </p> 170 </div> 171 </div> 172 173 <div> 174 <div class="quarto-title-meta-heading">Published</div> 175 <div class="quarto-title-meta-contents"> 176 <p class="date">August 13, 2026</p> 177 </div> 178 </div> 179 180 181 </div> 182 183 184 185</header> 186 187 188<section id="current-position-and-interests" class="level2"> 189<h2 class="anchored" data-anchor-id="current-position-and-interests">Current position and interests</h2> 190<p>Thanks for coming to my website! My name is András Lumer, I publish as András Bárány, my birth name, pronounced [ËÉndraËÊ ËbaËraËɲ]. Iâm a lecturer at the <a href="https://ppls.ed.ac.uk/linguistics-and-english-language/people/academic-staff">University of Edinburgh</a>. My research focuses on cross-linguistic variation and its limits, particularly with respect to morphosyntactic phenomena. Iâm particularly interested in whether theories of grammar make correct predictions with respect to what types of grammars are attested or not, hopefully bridging theoretical morphosyntax and linguistic typology.</p> 191<figure style="float: right; width:170px; text-align:center; font-size: 192 smaller; margin: 10px; margin-right:0px;" class="figure"> 193<img style="width:170px; border-radius: 5px; filter: drop-shadow(0 0 0.25rem black)" src="./img/al.png" alt="Portrait of András Bárány" class="figure-img"> 194<figcaption> 195<strong>Fig. 1:</strong> This is me. 196</figcaption> 197</figure> 198<p>The phenomena I study include case, agreement, and their interaction, as well as ditransitive constructions, morphosyntactic alignment, the relationship between syntax and information structure, and possessive constructions.
198</p> 199<p>Iâm part of the DFG SonderÂforschungsÂbereich (collaborative research centre) <a href="https://www.uni-bielefeld.de/sfb/sfb1646/">Linguistic Creativity in Communication</a> from April 2024 onwards. My project <a href="https://www.uni-bielefeld.de/sfb/sfb1646/projekte/a01/"><strong>Creativity in (morpho)syntactic variation: The role of analogy</strong></a> (with <a href="https://www.uni-bielefeld.de/fakultaeten/linguistik-literaturwissenschaft/personen/jutta-hartmann/">Jutta-Maria Hartmann</a>) investigates whether analogical reasoning is used to create novel, grammatical structures.</p> 200<p>I am one of the coordinators of <a href="https://aaal.uni-koeln.de">AAAL</a>, a DFG-funded scientific network I co-coordinate with <a href="https://idsl1.phil-fak.uni-koeln.de/personen/lehrende-a-z/dr-jens-hopperdietzel">Jens Hopperdietzel</a> and <a href="https://www.sfu.ca/linguistics/about/people/faculty/Dr-klok.html">Jozina Vander Klok</a>. The network brings together researchers from different backgrounds who are interested in <a href="https://en.wikipedia.org/wiki/Applicative_voice">applicatives</a> and their interaction with other morphosyntactic phenomena.</p> 201</section> 202<section id="previous-positions" class="level2"> 203<h2 class="anchored" data-anchor-id="previous-positions">Previous positions</h2> 204<p>From 2020 to 2024, I was a <em>Wissenschaftlicher Mitarbeiter</em> (roughly a non-permanent lecturer) at Bielefeld University in Germany, where Iâm still involved in <a href="./projects.html">a research project on analogy in morphosyntactic variation</a>.</p> 205<p>From September 2019 to September 2020, I was a post-doc at Leiden University, working on a <a href="./projects.html">project on ditransitive constructions</a>. This was a Marie SkÅodowska-Curie Action COFUND programme, funded by the EUâs Horizon 2020 programme.</p> 206<p>Before that, I was a post-doctoral researcher and research associate at the <a href="https://soas.ac.uk/">School of African and Oriental Studies (SOAS)</a>, working on Irina Nikolaevaâs AHRC-funded project <a href="https://www.soas.ac.uk/research/prominent-possessors">Prominent Possessors</a>.</p> 207<p>My monograph <em>Person, Case, and Agreement</em> was published in late 2017 with Oxford University Press. It provides a novel analysis of differential object agreement in Hungarian and discusses its relation to inverse agreement and global case splits in other languages, and what these phenomena can tell us about case-marking and agreement. You can find out more information about the book <a href="https://academic.oup.com/book/26597">here</a>.</p> 208<p>I did my PhD in the Department of Theoretical and Applied Linguistics at the University of Cambridge, as a member of the <a href="https://cordis.europa.eu/project/id/269752">ReCoS project</a> (PI Ian Roberts). ReCoS dealt with comparative syntax and developed a novel approach to parametric variation.</p> 209<p>In my PhD dissertation, <em>Differential object marking in Hungarian and the morphosyntax of case and agreement</em>, I explored the cross-linguistic variation of different phenomena relating to agreement and case-marking in a number of languages, including differential object marking (DOM, see <a href="https://en.wikipedia.org/wiki/Differential_object_marking">Wikipedia</a>), inverse agreement, and global case splits.</p> 210<p>After finishing my PhD I spent a year at the (former) <a href="https://nytud.hu/en">Research Institute for Linguistics of the Hungarian Academy of Sciences</a> in Budapest, as part of a group studying syntactic change in Uralic languages (under PI Katalin Ã. Kiss).</p> 211<p>You can <strong>access my full CV <a href="./files/barany-cv.pdf">here</a></strong> (January 2026).</p> 212<div> 213 <button aria-label="Link to github repository" style="border: 0px;"> 214 <a href="https://github.com/andrasbarany" class="icon-link" rel="" target=""> 215 <i class="bi bi-github"></i> 216 </a> 217 </button> 218 <button aria-label="Link to github repository" style="border: 0px;"> 219 <a href="https://codeberg.org/andrasbarany" class="icon-link" rel="" target=""> 220 <i class="bi bi-git"></i> 221 </a> 222 </button> 223 <button aria-label="Link to ORCID page" style="border: 0px;"> 224 <a href="https://orcid.org/0000-0003-2356-4338" class="icon-link" rel="" target=""> 225 <img src="./img/ORCID-iD_icon_BW_vector.svg" alt="ORCID Logo" height="16px"></a> 226 227 </button> 228 <button aria-label="Link to github repository" style="border: 0px;"> 229 <a href="https://scholar.google.com/citations?hl=en&user=_SfkoTwAAAAJ" class="icon-link" rel="" target=""> 230 <i class="bi bi-mortarboard-fill"></i> 231 </a> 232 </button> 233 <button aria-label="Link to github repository" style="border: 0px;"> 234 <a href="mailto:andras DOT barany AT ed.ac.uk" class="icon-link" rel="" target=""> 235 <i class="bi bi-envelope-fill"></i> 236 </a> 237 </button> 238 <button aria-label="Link to github repository" style="border: 0px;"> 239 <a href="https://matrix.to/#/@andras.barany:matrix.org" class="icon-link" rel="" target=""> 240 <i class="bi bi-chat-left-text-fill"></i> 241 </a> 242 </button> 243 <button aria-label="Link to github repository" style="border: 0px;"> 244 <a href="https://mastodon.social/@Andraas" class="icon-link" rel="" target=""> 245 <i class="bi bi-mastodon"></i> 246 </a> 247 </button> 248</div> 249 250 251</section> 252 253</main> <!-- /main -->
254<script id="quarto-html-after-body" type="application/javascript"> 255 window.document.addEventListener("DOMContentLoaded", function (event) { 256 const icon = "î§"; 257 const anchorJS = new window.AnchorJS(); 258 anchorJS.options = { 259 placement: 'right', 260 icon: icon 261 }; 262 anchorJS.add('.anchored'); 263 const isCodeAnnotation = (el) => { 264 for (const clz of el.classList) { 265 if (clz.startsWith('code-annotation-')) { 266 return true; 267 } 268 } 269 return false; 270 } 271 const onCopySuccess = function(e) { 272 // button target 273 const button = e.trigger; 274 // don't keep focus 275 button.blur(); 276 // flash "checked" 277 button.classList.add('code-copy-button-checked'); 278 var currentTitle = button.getAttribute("title"); 279 button.setAttribute("title", "Copied!"); 280 let tooltip; 281 if (window.bootstrap) { 282 button.setAttribute("data-bs-toggle", "tooltip"); 283 button.setAttribute("data-bs-placement", "left"); 284 button.setAttribute("data-bs-title", "Copied!"); 285 tooltip = new bootstrap.Tooltip(button, 286 { trigger: "manual", 287 customClass: "code-copy-button-tooltip", 288 offset: [0, -8]}); 289 tooltip.show(); 290 } 291 setTimeout(function() { 292 if (tooltip) { 293 tooltip.hide(); 294 button.removeAttribute("data-bs-title"); 295 button.removeAttribute("data-bs-toggle"); 296 button.removeAttribute("data-bs-placement"); 297 } 298 button.setAttribute("title", currentTitle); 299 button.classList.remove('code-copy-button-checked'); 300 }, 1000); 301 // clear code selection 302 e.clearSelection(); 303 } 304 const getTextToCopy = function(trigger) { 305 const outerScaffold = trigger.parentElement.cloneNode(true); 306 const codeEl = outerScaffold.querySelector('code'); 307 for (const childEl of codeEl.children) { 308 if (isCodeAnnotation(childEl)) { 309 childEl.remove(); 310 } 311 } 312 return codeEl.innerText; 313 } 314 const clipboard = new window.ClipboardJS('.code-copy-button:not([data-in-quarto-modal])', { 315 text: getTextToCopy 316 }); 317 clipboard.on('success', onCopySuccess); 318 if (window.document.getElementById('quarto-embedded-source-code-modal')) { 319 const clipboardModal = new window.ClipboardJS('.code-copy-button[data-in-quarto-modal]', { 320 text: getTextToCopy, 321 container: window.document.getElementById('quarto-embedded-source-code-modal') 322 }); 323 clipboardModal.on('success', onCopySuccess); 324 } 325 var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//); 326 var mailtoRegex = new RegExp(/^mailto:/); 327 var filterRegex = new RegExp('/' + window.location.host + '/'); 328 var isInternal = (href) => { 329 return filterRegex.test(href) || localhostRegex.test(href) || mailtoRegex.test(href); 330 } 331 // Inspect non-navigation links and adorn them if external 332 var links = window.document.querySelectorAll('a[href]:not(.nav-link):not(.navbar-brand):not(.toc-action):not(.sidebar-link):not(.sidebar-item-toggle):not(.pagination-link):not(.no-external):not([aria-hidden]):not(.dropdown-item):not(.quarto-navigation-tool):not(.about-link)'); 333 for (var i=0; i<links.length; i++) { 334 const link = links[i]; 335 if (!isInternal(link.href)) { 336 // undo the damage that might have been done by quarto-nav.js in the case of 337 // links that we want to consider external 338 if (link.dataset.originalHref !== undefined) { 339 link.href = link.dataset.originalHref; 340 } 341 } 342 } 343 function tippyHover(el, contentFn, onTriggerFn, onUntriggerFn) { 344 const config = { 345 allowHTML: true, 346 maxWidth: 500, 347 delay: 100, 348 arrow: false, 349 appendTo: function(el) { 350 return el.parentElement; 351 }, 352 interactive: true, 353 interactiveBorder: 10, 354 theme: 'quarto', 355 placement: 'bottom-start', 356 }; 357 if (contentFn) { 358 config.content = contentFn; 359 } 360 if (onTriggerFn) { 361 config.onTrigger = onTriggerFn; 362 } 363 if (onUntriggerFn) { 364 config.onUntrigger = onUntriggerFn; 365 } 366 window.tippy(el, config); 367 } 368 const noterefs = window.document.querySelectorAll('a[role="doc-noteref"]'); 369 for (var i=0; i<noterefs.length; i++) { 370 const ref = noterefs[i]; 371 tippyHover(ref, function() { 372 // use id or data attribute instead here 373 let href = ref.getAttribute('data-footnote-href') || ref.getAttribute('href'); 374 try { href = new URL(href).hash; } catch {} 375 const id = href.replace(/^#\/?/, ""); 376 const note = window.document.getElementById(id); 377 if (note) { 378 return note.innerHTML; 379 } else { 380 return ""; 381 } 382 }); 383 } 384 const xrefs = window.document.querySelectorAll('a.quarto-xref'); 385 const processXRef = (id, note) => { 386 // Strip column container classes 387 const stripColumnClz = (el) => { 388 el.classList.remove("page-full", "page-columns"); 389 if (el.children) { 390 for (const child of el.children) {
391 stripColumnClz(child); 392 } 393 } 394 } 395 stripColumnClz(note) 396 if (id === null || id.startsWith('sec-')) { 397 // Special case sections, only their first couple elements 398 const container = document.createElement("div"); 399 if (note.children && note.children.length > 2) { 400 container.appendChild(note.children[0].cloneNode(true)); 401 for (let i = 1; i < note.children.length; i++) { 402 const child = note.children[i]; 403 if (child.tagName === "P" && child.innerText === "") { 404 continue; 405 } else { 406 container.appendChild(child.cloneNode(true)); 407 break; 408 } 409 } 410 if (window.Quarto?.typesetMath) { 411 window.Quarto.typesetMath(container); 412 } 413 return container.innerHTML 414 } else { 415 if (window.Quarto?.typesetMath) { 416 window.Quarto.typesetMath(note); 417 } 418 return note.innerHTML; 419 } 420 } else { 421 // Remove any anchor links if they are present 422 const anchorLink = note.querySelector('a.anchorjs-link'); 423 if (anchorLink) { 424 anchorLink.remove(); 425 } 426 if (window.Quarto?.typesetMath) { 427 window.Quarto.typesetMath(note); 428 } 429 if (note.classList.contains("callout")) { 430 return note.outerHTML; 431 } else { 432 return note.innerHTML; 433 } 434 } 435 } 436 for (var i=0; i<xrefs.length; i++) { 437 const xref = xrefs[i]; 438 tippyHover(xref, undefined, function(instance) { 439 instance.disable(); 440 let url = xref.getAttribute('href'); 441 let hash = undefined; 442 if (url.startsWith('#')) { 443 hash = url; 444 } else { 445 try { hash = new URL(url).hash; } catch {} 446 } 447 if (hash) { 448 const id = hash.replace(/^#\/?/, ""); 449 const note = window.document.getElementById(id); 450 if (note !== null) { 451 try { 452 const html = processXRef(id, note.cloneNode(true)); 453 instance.setContent(html); 454 } finally { 455 instance.enable(); 456 instance.show(); 457 } 458 } else { 459 // See if we can fetch this 460 fetch(url.split('#')[0]) 461 .then(res => res.text()) 462 .then(html => { 463 const parser = new DOMParser(); 464 const htmlDoc = parser.parseFromString(html, "text/html"); 465 const note = htmlDoc.getElementById(id); 466 if (note !== null) { 467 const html = processXRef(id, note); 468 instance.setContent(html); 469 } 470 }).finally(() => { 471 instance.enable(); 472 instance.show(); 473 }); 474 } 475 } else { 476 // See if we can fetch a full url (with no hash to target) 477 // This is a special case and we should probably do some content thinning / targeting 478 fetch(url) 479 .then(res => res.text()) 480 .then(html => { 481 const parser = new DOMParser(); 482 const htmlDoc = parser.parseFromString(html, "text/html"); 483 const note = htmlDoc.querySelector('main.content'); 484 if (note !== null) { 485 // This should only happen for chapter cross references 486 // (since there is no id in the URL) 487 // remove the first header 488 if (note.children.length > 0 && note.children[0].tagName === "HEADER") { 489 note.children[0].remove(); 490 } 491 const html = processXRef(null, note); 492 instance.setContent(html); 493 } 494 }).finally(() => { 495 instance.enable(); 496 instance.show(); 497 }); 498 } 499 }, function(instance) { 500 }); 501 } 502 let selectedAnnoteEl; 503 const selectorForAnnotation = ( cell, annotation) => { 504 let cellAttr = 'data-code-cell="' + cell + '"'; 505 let lineAttr = 'data-code-annotation="' + annotation + '"'; 506 const selector = 'span[' + cellAttr + '][' + lineAttr + ']'; 507 return selector; 508 } 509 const selectCodeLines = (annoteEl) => { 510 const doc = window.document; 511 const targetCell = annoteEl.getAttribute("data-target-cell"); 512 const targetAnnotation = annoteEl.getAttribute("data-target-annotation"); 513 const annoteSpan = window.document.querySelector(selectorForAnnotation(targetCell, targetAnnotation)); 514 const lines = annoteSpan.getAttribute("data-code-lines").split(","); 515 const lineIds = lines.map((line) => { 516 return targetCell + "-" + line; 517 }) 518 let top = null; 519 let height = null; 520 let parent = null; 521 if (lineIds.length > 0) { 522 //compute the position of the single el (top and bottom and make a div) 523 const el = window.document.getElementById(lineIds[0]); 524 top = el.offsetTop; 525 height = el.offsetHeight; 526 parent = el.parentElement.parentElement; 527 if (lineIds.length > 1) { 528 const lastEl = window.document.getElementById(lineIds[lineIds.length - 1]); 529 const bottom = lastEl.offsetTop + lastEl.offsetHeight; 530 height = bottom - top; 531 } 532 if (top !== null && height !== null && parent !== null) { 533 // cook up a div (if necessary) and position it 534 let div = window.document.getElementById("code-annotation-line-highlight"); 535 if (div === null) { 536 div = window.document.createElement("div"); 537 div.setAttribute("id", "code-annotation-line-highlight"); 538 div.style.position = 'absolute'; 539 parent.appendChild(div); 540 } 541 div.style.top = top - 2 + "px"; 542 div.style.height = height + 4 + "px"; 543 div.style.left = 0; 544 let gutterDiv = window.document.getElementById("code-annotation-line-highlight-gutter"); 545 if (gutterDiv === null) { 546 gutterDiv = window.document.createElement("div"); 547 gutterDiv.setAttribute("id", "code-annotation-line-highlight-gutter"); 548 gutterDiv.style.position = 'absolute'; 549 const codeCell = window.document.getElementById(targetCell); 550 const gutter = codeCell.querySelector('.code-annotation-gutter'); 551 gutter.appendChild(gutterDiv); 552 } 553 gutterDiv.style.top = top - 2 + "px"; 554 gutterDiv.style.height = height + 4 + "px"; 555 } 556 selectedAnnoteEl = annoteEl; 557 } 558 }; 559 const unselectCodeLines = () => { 560 const elementsIds = ["code-annotation-line-highlight", "code-annotation-line-highlight-gutter"]; 561 elementsIds.forEach((elId) => { 562 const div = window.document.getElementById(elId); 563 if (div) { 564 div.remove(); 565 } 566 }); 567 selectedAnnoteEl = undefined; 568 }; 569 // Handle positioning of the toggle 570 window.addEventListener( 571 "resize", 572 throttle(() => { 573 elRect = undefined; 574 if (selectedAnnoteEl) { 575 selectCodeLines(selectedAnnoteEl); 576 } 577 }, 10) 578 ); 579 function throttle(fn, ms) { 580 let throttle = false;
581 let timer; 582 return (...args) => { 583 if(!throttle) { // first call gets through 584 fn.apply(this, args); 585 throttle = true; 586 } else { // all the others get throttled 587 if(timer) clearTimeout(timer); // cancel #2 588 timer = setTimeout(() => { 589 fn.apply(this, args); 590 timer = throttle = false; 591 }, ms); 592 } 593 }; 594 } 595 // Attach click handler to the DT 596 const annoteDls = window.document.querySelectorAll('dt[data-target-cell]'); 597 for (const annoteDlNode of annoteDls) { 598 annoteDlNode.addEventListener('click', (event) => { 599 const clickedEl = event.target; 600 if (clickedEl !== selectedAnnoteEl) { 601 unselectCodeLines(); 602 const activeEl = window.document.querySelector('dt[data-target-cell].code-annotation-active'); 603 if (activeEl) { 604 activeEl.classList.remove('code-annotation-active'); 605 } 606 selectCodeLines(clickedEl); 607 clickedEl.classList.add('code-annotation-active'); 608 } else { 609 // Unselect the line 610 unselectCodeLines(); 611 clickedEl.classList.remove('code-annotation-active'); 612 } 613 }); 614 } 615 const findCites = (el) => { 616 const parentEl = el.parentElement; 617 if (parentEl) { 618 const cites = parentEl.dataset.cites; 619 if (cites) { 620 return { 621 el, 622 cites: cites.split(' ') 623 }; 624 } else { 625 return findCites(el.parentElement) 626 } 627 } else { 628 return undefined; 629 } 630 }; 631 var bibliorefs = window.document.querySelectorAll('a[role="doc-biblioref"]'); 632 for (var i=0; i<bibliorefs.length; i++) { 633 const ref = bibliorefs[i]; 634 const citeInfo = findCites(ref); 635 if (citeInfo) { 636 tippyHover(citeInfo.el, function() { 637 var popup = window.document.createElement('div'); 638 citeInfo.cites.forEach(function(cite) { 639 var citeDiv = window.document.createElement('div'); 640 citeDiv.classList.add('hanging-indent'); 641 citeDiv.classList.add('csl-entry'); 642 var biblioDiv = window.document.getElementById('ref-' + cite); 643 if (biblioDiv) { 644 citeDiv.innerHTML = biblioDiv.innerHTML; 645 } 646 popup.appendChild(citeDiv); 647 }); 648 return popup.innerHTML; 649 }); 650 } 651 } 652 }); 653 </script>
653 654</div> <!-- /content --> 655 656 657 658 659</body></html>
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.