-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: makeindex index cannot locate at chapter name's tail #4762
Comments
You are saying that in
the markdown attribute is not being picked up? Try the following, which uses a raw attribute:
Not saying the latex in markdown parser could not be improved, but I this is a reasonable workaround. |
it seems that it cannot show in contents. The output is \hypertarget{chap:pandoc}{%
\section{\texorpdfstring{Test pandoc\index{pandoc}}{}}\label{chap:pandoc}} I think it should be \hypertarget{chap:pandoc}{%
\section{\texorpdfstring{Test pandoc\index{pandoc}}{Test pandoc}}\label{chap:pandoc}} |
I decide use another bad method, put index in the front of text, such as
now it can works well. |
This is the right approach. In trying to determine
what is part of raw LaTeX, pandoc assumes that
`{id="chap:pandoc"}` is a further argument to
the `\index` command. You could disrupt this
by inserting, say, a blank HTML comment between
them, or (better) use the raw attribute as suggested,
to make it explicit where the raw latex ends.
Mauro Bieg <notifications@github.com> writes:
… You are saying that in
echo '# Test pandoc\index{pandoc} {id="chap:pandoc"}' | pandoc -t latex
the markdown attribute is not being picked up?
Try the following, which uses a [raw attribute](http://pandoc.org/MANUAL.html#generic-raw-attribute):
echo '# `Test pandoc\index{pandoc}`{=latex} {id="chap:pandoc"}' | pandoc -t latex
Not saying the latex in markdown parser could not be improved, but I this is a reasonable workaround.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#4762 (comment)
|
Thank you. I think changeing the |
Thank you,
pandoc version
exact command
exact input
here two files, one
test.md
, onetemplate.tex
This is test.md,
here is template.tex
the output received, it is result.tex
the output I expected instead
If \index located at the end of chapter name, it cannot produce as expected. Thank you.
The text was updated successfully, but these errors were encountered: