patchare campo edition in philosophy-verbose

  • Creatore
    Topic
  • #115527
    samiel
    Partecipante
      Up
      0
      Down
      ::


      Tutto nacque quando mi resi conto che era impossibile realizzare il kerning fra i numeri in apice e il testo con LaTeX,
      ad es nelle note, perché i numeri sono collocati in una scatola. Con un codice a sé è invece possibile realizzare questo obiettivo,
      ma c’è un caso, fra quelli che mi si sono presentati, un cui la compilazione fallisce. Il codice sottostante
      ` \begin{filecontents*}{\jobname.bib}
      @book{ stegmuller:1976,
      author = “Stegmüller, Wolfgang”,
      title = “The Structure and Dynamics of Theories”,
      publisher = “Springer”,
      location = “New-York Heidelberg Berlin”,
      year = “1976”,
      edition = “2”,
      }
      \end{filecontents*}

      \documentclass{article}

      \directlua {
      fonts.handlers.otf.addfeature {
      name = “supkern”,
      type = “kern”,
      data = {
      [“¹”] = { [“.”] = -180,
      [“,”] = -180 },
      [“²”] = { [“.”] = -180,
      [“,”] = -180 },
      [“³”] = { [“.”] = -180,
      [“,”] = -180 },
      [“⁴”] = { [“.”] = -180,
      [“,”] = -180 },
      },
      }
      }

      \usepackage{realscripts}
      \usepackage[english]{babel}
      \usepackage[babel]{csquotes}
      \babelfont[english]{rm}[Ligatures=TeX,Language=Default,Numbers={Proportional,OldStyle},RawFeature=+supkern]{Source Serif Pro}

      \ExplSyntaxOn
      \cs_new_protected:Nn \__realscripts_numtosup:n
      {
      \str_set:Nn \l_tmpa_str {#1}
      \str_map_inline:Nn \l_tmpa_str
      {
      \str_if_in:nnTF {0123456789} {##1}
      {
      \int_set:Nn \l_tmpa_int {##1}
      \if_case:w \l_tmpa_int ⁰
      \or: ¹
      \or: ²
      \or: ³
      \or: ⁴
      \or: ⁵
      \or: ⁶
      \or: ⁷
      \or: ⁸
      \or: ⁹
      \fi:
      }
      { { \addfontfeature {VerticalPosition=Superior} ##1 } }
      }
      }
      \cs_generate_variant:Nn \__realscripts_numtosup:n { x }
      \DeclareDocumentCommand \realsuperscript { m }
      {
      \fontspec_if_fontspec_font:TF
      {
      \fontspec_if_opentype:TF
      {
      \fontspec_if_feature:nTF { +sups }
      { \__realscripts_numtosup:x {#1} }
      { \fakesuperscript {#1} }
      }
      {
      \fontspec_if_aat_feature:nnTF {10} {1}
      { \__realscripts_numtosup:x {#1} }
      { \fakesuperscript {#1} }
      }
      }
      { \fakesuperscript {#1} }
      }
      \ExplSyntaxOff

      \usepackage{endnotes}
      \usepackage{etoolbox}
      \preto{\theendnotes}{%
      \renewcommand{\makeenmark}{\textsuperscript{\theenmark}\enspace}%
      }
      \makeatletter
      \def\@makeenmark{\unpenalty{\footnotemarkfont\textsuperscript{\@theenmark}}}
      \makeatother
      \let\footnote\endnote

      \usepackage[style=philosophy-verbose, scauthors=all, lowscauthors=true,
      giveninits, classical=true, volnumformat=strings, volumeformat=romansc,
      sorting=nyt, commacit=true, citepages=omit, editionformat=superscript,
      indexing]{biblatex}
      \addbibresource{\jobname.bib}
      \nocite{*}

      \begin{document}

      A\footnote{Footnote text}.

      A\footnote{Footnote text},

      A\footnote{Footnote text};

      A\footcite[53]{stegmuller:1976}.

      \theendnotes

      \printbibliography
      \end{document}`
      produce il seguente errore:
      `! Illegal parameter number in definition of \l__exp_internal_tl.

      1
      l.17 {footcite}{}{53}{stegmuller:1976}{}}}`
      Ciò accade a causa del modo in cui \superscript è stampato, in quanto
      il suo argomento non è espandibile. È possibile modificare con una piccola patch
      quel driver per renderlo compatibile col mio codice?
      Grazie mille, pur rendendomi conto che la mia richiesta è molto soggettiva….

      m

    • Devi essere connesso per rispondere a questo topic.

    Go to top