vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   BB Code Enhancements - vLaTeX - Math parsing with LaTeX (https://vborg.vbsupport.ru/showthread.php?t=230589)

oxide11 09-21-2013 04:35 PM

ok great thing this plugin thanks :)

john7911 12-06-2013 05:31 AM

Good job , thank you ;)

Ptah 04-10-2014 02:51 PM

Hi. I've installed it on my forum and it works great!

I have a concern though, which becomes a suggestion/request of sorts.

My understanding is that each expression rendered results in a new PNG file in /pics. Makes sense, if so. So with that understanding...

/pics files accumulating when users iteratvely tweak TEX expressions in preview/edit?
Let's say someone is using the preview-edit-preview in a loop whilst developing a post, and tweaking the latex expression each time, hence generating however many intermediate PNG files (per latex expression tweak), only the last of which is really useful (the one they wind up posting). This results in a pile of images sitting around under /pics that are effectively wasted space. I don't think this is too unrealistic of a scenario, being that people may see a problem with their (say, nontrivial) latex in preview, so then tweak it, iteratively, until they see what the want.

Concern of "waste" /pics accumulation
Now my concern. Over time this can become a problem, lots of wasted space.

For instance, anticipating this may be a problem, I have asked the users of my forum to consider using one of the freely available online, interactive LaTeX renderers to "draft" their expressions before posting them on my forum, hoping to head off useless PNG file accumulations.

Extent suggestions/workarounds...
So. I understand that you can purge the post cache and rebuild, but that seems to be long-term unfeasible as the forum ages, and accumulates many posts, right? Just to purge unused /pic files, you have to drop and rebuild the whole post cache? Seems like hitting it with a hammer, unless I've misunderstood?

Suggestion/Question?

I'd consider making the suggestion, "Hey, can we disable the TEX tag from rendering in preview mode?", but that would just encourage people to post, then edit their post. They can iteratively tweak the TEX expressions anyhow, which does not head off the accumulation problem.

So, instead I make the suggestion (or ask for the clarification): is there a way to either prevent or periodically cleanup the long-term accumulation of effectively no-longer-used/intermediately-generated PNG files?

Such as through some "smarts" to drop any net-unused, intermediately generated /pics images during preview-edit-preview loops?

OR

Such as through a cron or somesuch? I'm not sure what the effort would be, imagining something that has to effectively sweep recent posts against the /pics folder, and weed out those which are deemed unused, etc, although I admit I can imagine it being a headache...

Perhaps my understanding is off to begin with?

Any insight here would be great. This mod is a great addition to my forum, it offers a great value to my membership!

Pod 04-10-2014 04:45 PM

Quote:

Originally Posted by Ptah (Post 2492453)
Hi. I've installed it on my forum and it works great!

I have a concern though, which becomes a suggestion/request of sorts.

My understanding is that each expression rendered results in a new PNG file in /pics. Makes sense, if so. So with that understanding...

/pics files accumulating when users iteratvely tweak TEX expressions in preview/edit?
Let's say someone is using the preview-edit-preview in a loop whilst developing a post, and tweaking the latex expression each time, hence generating however many intermediate PNG files (per latex expression tweak), only the last of which is really useful (the one they wind up posting). This results in a pile of images sitting around under /pics that are effectively wasted space. I don't think this is too unrealistic of a scenario, being that people may see a problem with their (say, nontrivial) latex in preview, so then tweak it, iteratively, until they see what the want.

Concern of "waste" /pics accumulation
Now my concern. Over time this can become a problem, lots of wasted space.

For instance, anticipating this may be a problem, I have asked the users of my forum to consider using one of the freely available online, interactive LaTeX renderers to "draft" their expressions before posting them on my forum, hoping to head off useless PNG file accumulations.

Extent suggestions/workarounds...
So. I understand that you can purge the post cache and rebuild, but that seems to be long-term unfeasible as the forum ages, and accumulates many posts, right? Just to purge unused /pic files, you have to drop and rebuild the whole post cache? Seems like hitting it with a hammer, unless I've misunderstood?

Suggestion/Question?

I'd consider making the suggestion, "Hey, can we disable the TEX tag from rendering in preview mode?", but that would just encourage people to post, then edit their post. They can iteratively tweak the TEX expressions anyhow, which does not head off the accumulation problem.

So, instead I make the suggestion (or ask for the clarification): is there a way to either prevent or periodically cleanup the long-term accumulation of effectively no-longer-used/intermediately-generated PNG files?

Such as through some "smarts" to drop any net-unused, intermediately generated /pics images during preview-edit-preview loops?

OR

Such as through a cron or somesuch? I'm not sure what the effort would be, imagining something that has to effectively sweep recent posts against the /pics folder, and weed out those which are deemed unused, etc, although I admit I can imagine it being a headache...

Perhaps my understanding is off to begin with?

Any insight here would be great. This mod is a great addition to my forum, it offers a great value to my membership!


What I do myself is to add this line in a crontab:

50 4 * * * find PATH_TO_FORUM/vlatex/pics -atime +35 -name "*_*" | xargs rm -f

This removes every morning (at 4:50) all files from the directory that were not accessed in the last 35 days. You can tune this command as you wish.

It is important that the number of days is slightly larger than the duration of your post cache (it's an option somewhere in vb's admincp), because if the post is cached, then bbcodes are not reprocessed.

If you ever empty the pics folder, then also clear or rebuild the post cache (which can be done in the admincp as well). Doing so, png's will be rebuilt the first time every post is visited by someone (I suggest doing this with the forum closed and visit yourself the posting page, 'cause the large number of formulas in the quick-menu take a while to be processed).

Ptah 04-10-2014 04:58 PM

Pod, thanks for the quick reply. I'll play around with your suggested cron-based (and rather pragmatic) approach and see how that works.

Thanks again.

oxide11 05-20-2014 05:45 AM

After update to latest Vbulletin 4.2.2 and php 5.4 on server this function doesn't work

\begin{align} (formula) \end{align}
\begin{gather} (formula) \end{gather}
\begin{eqnarray} (formula) \end{eqnarray}

Does anyone know what can cause this problem.

Pod 05-20-2014 05:19 PM

Quote:

Originally Posted by oxide11 (Post 2498539)
After update to latest Vbulletin 4.2.2 and php 5.4 on server this function doesn't work

\begin{align} (formula) \end{align}
\begin{gather} (formula) \end{gather}
\begin{eqnarray} (formula) \end{eqnarray}

Does anyone know what can cause this problem.


I don't think the update should affect the mod. You could try to reinstall the mod.

tn5421 05-23-2014 01:46 AM

You should include mimetex in your install, for people who's servers don't have LaTeX installed.

Pod 05-23-2014 05:18 AM

Quote:

Originally Posted by tn5421 (Post 2499050)
You should include mimetex in your install, for people who's servers don't have LaTeX installed.

mimeTeX can be easily integrated with VB using the built in bbcode editor, no need for a mod if you're going with mimeTeX ;)

Daniel 01-04-2015 10:11 PM

1 Attachment(s)
Any suggestions for something like this? I'm on GoDaddy shared hosting (linux)


All times are GMT. The time now is 09:13 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01438 seconds
  • Memory Usage 1,753KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete