' + sub + '';
b.addEventListener('click', function(){ show(id); history.replaceState(null,'','#'+id); main.scrollIntoView(); });
tabs.appendChild(b);
});
function show(id){
Object.keys(articles).forEach(function(k){ if (k===id) articles[k].setAttribute('data-active',''); else articles[k].removeAttribute('data-active'); });
Array.prototype.forEach.call(tabs.children, function(b){ b.setAttribute('aria-selected', b.dataset.id===id ? 'true' : 'false'); });
toc.innerHTML = '