Marvin Gülker <[email protected]> writes:
> But then they require that in these cases of subsequently equal authors
> that there is a “tab stop” between the colon (:) and that title of the
> work at 4mm so that the title aligns with the hanging indent length. I
> am at a loss at how to achieve this, and whether this can be done via
> org options, or by modifying the CSL style, or by postprocessing the
> generated LaTeX code in some way.

Nevermind, I found a way. It is rather crude, but it works. I
post-process the generated LaTeX code with a custom function that
replaces all occurences of “\textit{—}: ” in the bibliography with
“\makebox[4mm][l]{\textit{—}: }”:

    (defun my-hangalign-bib-indent ()
      "Turn \\textit{—}: into a makebox construction"
      (with-current-buffer (find-file-noselect "thesis.tex")
        ;; Find the bibliography and narrow to it
        (save-excursion
          (goto-char (point-min))
          (search-forward "\\begin{cslbibliography}")
          (forward-line)
          (let ((startpos (point))
                (endpos (progn
                          (search-forward "\\end{cslbibliography}")
                          (forward-line -1)
                          (point))))
            (save-restriction
              (narrow-to-region startpos endpos)
              (goto-char (point-min))
              (while (search-forward "\\textit{—}: " nil t)
                (replace-match "\\\\makebox[4mm][l]{\\\\textit{—}: }")))))
        (save-buffer)))

Since the requirement may not be too unusual, it might be useful to add
an option to org that achieves this. If not: There is always a way in
Emacs. What would I do without it!

-- 
Dipl.-Jur. M. Gülker | https://mg.guelker.eu | PGP: Siehe Webseite
Stade, Deutschland   | [email protected]    | O<

Reply via email to