mirror of
https://github.com/benjaminion/upgrading-ethereum-book.git
synced 2026-01-08 22:17:59 -05:00
Introduce spans for wrapping long strings
This commit is contained in:
@@ -15,3 +15,17 @@ function RawInline (el)
|
||||
end
|
||||
return el
|
||||
end
|
||||
|
||||
-- We now support <span class="wrap">...</span>
|
||||
-- These spans must contain only raw text (or backquoted code), with no nested elements
|
||||
function Span (span)
|
||||
if span.classes:includes('wrap') then
|
||||
if (span.content[1].t == 'Str') then
|
||||
return pandoc.RawInline('latex', '\\seqsplit{' .. span.content[1].text .. '}')
|
||||
end
|
||||
if (span.content[1].t == 'Code') then
|
||||
return pandoc.RawInline('latex', '\\texttt{\\seqsplit{' .. span.content[1].text .. '}}')
|
||||
end
|
||||
end
|
||||
return span
|
||||
end
|
||||
|
||||
@@ -154,3 +154,8 @@
|
||||
\let\prevsubparagraph\subparagraph
|
||||
\renewcommand{\subparagraph}[1]{\prevsubparagraph{#1}\nopagebreak}
|
||||
\fi
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Used by linebreaks.lua to split long hexadecimal strings
|
||||
|
||||
\usepackage{seqsplit}
|
||||
|
||||
Reference in New Issue
Block a user