I am using QuickLatex plugin and it works great. But when I tried to cite some references using cite{paper1}, it did not seem work.
[latexpage]
Here is a citation cite{example}.
begin{thebibliography}
bibitem{example}
Robert C. Merton, On the Pricing of Corporate Debt: The Risk Structure of Interest Rates. textit{Journal of Finance} 1974; textbf{2}:449–470.
end{thebibliography}
Any help?
Outside of using other plugins, as mentioned in the comments, you would need to essentially parse the LaTeX yourself by filtering
the_content
.Here is a very rough example of how you might capture and transform the post content to parse a bibliography. Please note that I don’t know LaTeX, and this is just string parsing. Also, I’m tracking citations and references in the arrays
$citations
and$citation_refs
in case that is useful to you, but it may not be.Uncomment the line at the top (
#add_filter...
) and remove the last lineecho ...
to use this as a filter onthe_content
, but the code as-is above can be run inside of a standalone PHP file to see how it works. The output of the above is: