Closed bsnresearcher closed 4 years ago
Please explain what you mean "cannot work." What command did you try with this input? What output did you get? What did you expect? What version of pandoc?
Can you try without pandoc-crossref? Is it only when using luatex?
Pandoc-crossref, Pandoc-citeproc and so on are in requirement. The unexpected result occurred at upLatex too. I tried without the crossref filter but the result was same. Thank you.
OK, reproduced this with simply
pandoc 6018.md --number-sections -o 6018.pdf
where 6018.md is
### Level3 or higher{-}
The {-} of this section work well.
#### Level4 or lower{-}
\
This {-} of this section did not work.
With level-3 headers, we use latex \subsection
, or for unnumbered subsections the variant \subsection*
. But it seems that with level-4 sections, \paragraph
is used for both numbered and unnumbered. Looks like there actually is a \paragraph*
command which we should use.
Thank you, jgm. If you have any method to change a command \paragraph
of LaTeX to \paragraph*
inside Markdown file, tell me please.
@jgm
block-headings: true
seems to break paragraph and subparagraph. The star ends up in the wrong place. --number-sections
is implied.
---
secnumdepth: 5
block-headings: true
...
# numbered section
fine
# unnumbered section {-}
fine too
#### numbered paragraph
right
#### unnumbered paragraph {-}
star ending up in wrong place
@T-o-m-H-u is indeed true.
A temporary solution to this problem is set block-headings
to false
and add the following code snippet to the header section (use include-in-header
):
% Make \paragraph and \subparagraph free-standing
\let\oldparagraph\paragraph
\let\oldsubparagraph\subparagraph
\makeatletter
\renewcommand{\paragraph}{
\@ifstar
\xxxParagraphStar
\xxxParagraphNoStar
}
\renewcommand{\subparagraph}{
\@ifstar
\xxxSubParagraphStar
\xxxSubParagraphNoStar
}
\newcommand{\xxxParagraphStar}[1]{\oldparagraph*{#1}\mbox{}}
\newcommand{\xxxParagraphNoStar}[1]{\oldparagraph{#1}\mbox{}}
\newcommand{\xxxSubParagraphStar}[1]{\oldsubparagraph*{#1}\mbox{}}
\newcommand{\xxxSubParagraphNoStar}[1]{\oldsubparagraph{#1}\mbox{}}
\makeatother
@T-o-m-H-u or @ofabel
block-headings: true seems to break paragraph and subparagraph.
Please create a new issue for this.
Do you have any idea to solve this?
I want to disappear the section number on the level4 of headline.
The un-numbering command {-} or {.unnumberd} can work expectedly as follows below figures.
However the number on the level4- of headline did not disappear unexpectedly.
Level4 or lower{-}
\ This {-} of this section did not work.