Van Abel
Forum Replies Created
-
Forum: Plugins
In reply to: [LaTeX2HTML] How to use templateMay I divide your question into the following two direction:
1. Journal class=>Blog
2. Blog=>Journal classIn case 1. The best practical is to use the template which I included in the Plugin, see the Plugin setting page>Support & Credit>A latex template. The following block
\usepackage[backrefs, msc-links, lite, abbrev, alphabetic]{amsrefs} \newtheorem{thm}{Theorem} \newtheorem{lem}[thm]{Lemma} \newtheorem{prop}[thm]{Proposition} \newtheorem{cor}[thm]{Corollary} \newtheorem{claim}{Claim} \theoremstyle{definition} \newtheorem{defn}[thm]{Definition} \newtheorem{examp}{Example} \newtheorem{excs}[examp]{Exercise} \theoremstyle{remark} \newtheorem{rmk}[thm]{Remark} \newtheorem{answer}{Answer} \renewcommand{\theanswer}{\arabic{examp}.\arabic{answer}}
are where I defined the theorem like environments, and the citation style (which is based on
amsrefs
).So, if you want to post a blog by copy the raw latex code from a tex file, which is based on another journal style (the template of plugin is based on
amsart
), you should just replace your theorem names in the raw source by the theorem names I defined above. e.g.%in the journal submitted version of latex raw source \begin{theorem} The theorem content... \end{theorem}
which should be replace by
%in the blog post \begin{thm} The theorem content... \end{thm}
The
amsrefs
is almost compatible withbibtex
, you may ignore it at first.In the case 2. If you write a blog post based on the template of Plugin, and you want to submit to a journal, then just change the class will work:
\documentclass{amsart}
to\documentclass{journalclassname}
Forum: Plugins
In reply to: [LaTeX2HTML] How to use templateSorry for the delay.
I don’t know what’s the template you were using. May I suggest you to use a template actually, and show me the problem you were facing?
The Plugin LaTeX2HTML is designed to minic copy the
amsart
class style. I believe that it will work also for most the other LaTeX template. If not, please show me the problem.To use the plugin, just copy and paste your LaTeX source code into wordpress (the new version of wordpress is kind of inconvenient, since you need to past the raw code in HTML TEXT mode other than the Visual mode, so please use the older/classical WP editor).
Forum: Plugins
In reply to: [LaTeX2HTML] macros for environmentsWell, this is MathJax related issue. May I suggest you to have a search or question on stackoverflow?
As a quick search, MathJax support
\def
,\let
,\newcommand
,\renewcommand
,\newenvironment
,\renewenvironment
; However, your definion of equation environment seems not support by MathJax, thus LaTeX2HTML not support too.The work way to define the equation environment could be
$\newenvironment{eq}{\begin{equation}}{\end{equation}}$
then you can use it as
\begin{eq} \int xdx=x^2/2. \end{eq}
Of course you can put your definiton of this newenvironment into the LaTeX2HTML config block, where some sample example of
\newcommand
is given, then it will work in all post.Forum: Plugins
In reply to: [LaTeX2HTML] NewCommand EnvironmentOf course, just go to the LaTeX3html setting page and in the settings table>Latex settings section, put your definition in the Latex Preamble box.
You can also see the default setting in the following screenshot:
https://ps.w.org/latex2html/assets/screenshot-2.png?rev=1544950Forum: Plugins
In reply to: [LaTeX2HTML] ??? with align/split environment1. The LaTeX2HTML plugin of version newer than v2.0.0 do nothing to the labeling/referencing stuff, which is done by MathJax.
So your problem is related to MathJax, and the
bug
seems has a workaround as mentioned here, Referring to labels defined in an expression with “split” or “aligned” environments seems broken:which is simple, just move your label at the bottom of split:
\begin{equation} \begin{split} P_{induced} &= Np \\ &= -Nex \\ &= \frac{Ne^2}{m_0}\frac{1}{(\omega_0^2-\omega^2 - i \gamma \omega)} \mathrm{E} \end{split} \label{eq:Polarization} \end{equation} \eqref{eq:Polarization}
2. Furthermore, is it normal that Latex comments starting with % are displayed as they are on the output?
Of course not, the lines start with
%
should understand as comment out, thus% this is comment out % This is comment out too
will be hidden completely on the output. This is what LaTeX2HTML expect and actually do.
Forum: Plugins
In reply to: [LaTeX2HTML] \qed not supported?Thanks for your feedback.
This can be archived by adding the following css into the LaTeX2HTML settings in the (LaTeX styles configuration):
.latex_proof::after { content: "\220E"; color: gray; text-align: right; display: block; font-size: 1.2em; }
of course you can change the color to
black
instead ofgray
.Forum: Plugins
In reply to: [LaTeX2HTML] Figure sizeYes, currently, latex2html not support set size of figure, since in practical, I find the best way is set the width of figure to be the same as the content.
But, if you want to set it manually, there is the code:
<div style="width:50%; margin: auto;"> \begin{figure}[!htpb] \label{fig:1} \includegraphics[width=0.5\columnwidth]{myfig.fig} \caption{Hello world} \end{figure} </div>
Which I just add a div warp to the figure.
Another way to modify all the figure width of you blog, is to append the following style in LaTeX styles setting:
.latex_fig{ width:75%; }
Hope that solves your issue.
Forum: Plugins
In reply to: [LaTeX2HTML] 与buddypress有一点点冲突I have test with buddypress (defaut installation) and latex2htm, can’t repeat your issue, maybe you can disable all other plugin, and debug it again.
Forum: Plugins
In reply to: [LaTeX2HTML] latex2html \cite not finding databaseIn fact, LaTeX2HTML support insert page number in citation. See the manual:
https://lttt.vanabel.cn/2016/12/03/the-users-manual-of-latex2html-2-0-0.html#sec:9.2
An example:
\cite{EinsteinInfeldHoffmann1938Gravitational}*{p.1}
will produce
[1,p.1]
The format for cite is adopted byamsrefs
.Forum: Reviews
In reply to: [LaTeX2HTML] 真的很棒的一个插件!谢谢支持!理论上所有的latex插件都支持
$
与\(\)
写行内公式的.Forum: Reviews
In reply to: [LaTeX2HTML] Some suggestions for improvmentHi, Thanks for your suggestions.
1. The reference (bibtex data) can be download at the configuration tabs (BibTeX->bibtex backup).
2. functions for preview latex code? No, I have not develop such function. In fact, render latex is totally based on MathJax, which support preview latex raw code by right clicking on the formula.
3. A blank line for new line. Currently, Latex2HTML will remove duplicated blank lines and replace then with line break<br />
, I don’t use<p>...</p>
tag, since it will mess up the html code (probably has non closed tags).Forum: Plugins
In reply to: [LaTeX2HTML] Plugin could not be activated because it triggered a fatal errorNo, this can’t be changed at current stage. The shared counter scheme of theorem like environments is in fact a feature of this plugin and I believe that it is a convention in mathematical scientific writing.
But if you persist to use independent numbering, then you should consider to change the core code of the plugin, which on the other hand, I strongly do not recommend.
- This reply was modified 8 years ago by Van Abel.
Forum: Plugins
In reply to: [LaTeX2HTML] Plugin could not be activated because it triggered a fatal errorThis question has been discussed a few days ago on the manual page (Chinese), so I know that it can be solved by updating your php to version at least 5.4.
The main issue is that the shorthand for array in php is not supported in the older version. As the official doc says:
As of PHP 5.4 you can also use the short array syntax, which replaces array() with [].
- This reply was modified 8 years ago by Van Abel.
Forum: Plugins
In reply to: [LaTeX2HTML] Figures environmentYes, the current path for figures are the relative path, which is more reasonable. Since the users hardly need to change the code of LaTeX to make this work, they only need to upload the figures file when the post are created.
I can’t imagine any situation to change it to absolute url, but if there is, then I can set it as a new option.
Forum: Plugins
In reply to: [LaTeX2HTML] Figures environmentI have added the new feature of supporting figure environments, you can have a test as:
\begin{figure}[!htbp]
\centering
\includegraphics{myfig.png}
\caption{Just a test}
\label{myfig}
\end{figure}
From the \autoref{myfig} we can see…Welcome to feedback!