Pasting LATEX Content from LyX Editor to Forum Posts

  • Context: LaTeX 
  • Thread starter Thread starter vijay_singh
  • Start date Start date
  • Tags Tags
    Forum Latex
Click For Summary

Discussion Overview

The discussion revolves around the challenges of pasting LaTeX content from the LyX editor into forum posts. Participants explore various methods for formatting LaTeX code correctly for use in the forum, including the use of specific tags and scripts.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Exploratory

Main Points Raised

  • One participant expresses difficulty in finding a clear method to paste LaTeX content from LyX into forum posts.
  • Some participants suggest using [ tex ] and [ /tex ] tags to format LaTeX code for the forum.
  • A Perl script is proposed by one participant as a tool to convert valid LaTeX files into the forum's LaTeX format, although it comes with a disclaimer about potential issues.
  • Several participants note that LyX does not generate the correct source code automatically, requiring manual adjustments such as adding spaces and dollar signs.
  • One participant mentions using the "Go Advanced" button to access a LaTeX menu in the forum, although this feature is not available in all sub-forums.
  • Another participant indicates they use Texmaker as an IDE for LaTeX, emphasizing the need to know TeX language for effective use.
  • There is clarification that dollar signs are not necessary in forum posts, as the forum uses specific tags to interpret LaTeX code.

Areas of Agreement / Disagreement

Participants express a range of experiences and methods for handling LaTeX in the forum, with no clear consensus on the best approach. Some agree on the use of tags, while others highlight issues with LyX's output.

Contextual Notes

Participants mention limitations with LyX's generated source and the availability of LaTeX features in different sub-forums, indicating variability in user experience.

vijay_singh
Messages
28
Reaction score
0
Hi

I am first time user of LATEX. I have LyX editor where I am able to create LATEX documents. But I couldn't find any clear solution for pasting that LATEX content into my posts in the forum. Is there any simple way to copy LATEX document from the editor to forum posts?
 
Physics news on Phys.org
You can put latex code in between [ tex ] and [ /tex] tags (without the spaces inside the square brackets):

i.e. y=7x
 
[noparse]

cristo said:
You can put latex code in between [ tex ] and [ /tex] tags (without the spaces inside the square brackets)

Hi cristo! :smile:

You can type [noparse]and (without any spaces!) by surrounding them with [noparse] and [/noparse][/noparse]. :smile:
 
here's a perl script that turns valid LaTeX files* into forum LaTeX.

This script comes with no warranties, etc. If you hose your machine that's your fault.

usage: save file to script.pl, chmod it to executable, then do ./script.pl file

#!/usr/bin/perl -i
$_=@ARGV[0];
while(<>){
s/\$\$([^\$]*)\$\$/\[tex\]$1\[\/tex\]/g;
s/\$([^\$]*)\$/\[itex\]$1\[\/itex\]/g;
print;
}* this assumes that you use $ $ to denote inline LaTeX and $$ $$ for display math. Although the usage of $$ $$ should be discouraged (in favour of \[ \]) I chose to do it this way for no good reason. Change the regexps if you want.
 
Just testing

$ V_{bw} $ = $ V_{b} $ - $ V_{w} $

*********************************************

Thanks guys. But Seems like LyX doesn't generate correct source. I had to put spaces and some dollars my self. What do you people use to generate latex source.
 
vijay_singh said:
Just testing

$ V_{bw} $ = $ V_{b} $ - $ V_{w} $

*********************************************

Thanks guys. But Seems like LyX doesn't generate correct source. I had to put spaces and some dollars my self. What do you people use to generate latex source.

Hi vijay! :smile:

I've copied what you typed, and left out the spaces and dollars, and it works fine:

V_{bw}=V_{b}-V_{w}

Click "QUOTE" to see what I typed.

(and generally click "QUOTE" to see other people's LaTeX typing, and just steal it! :smile:)
 
vijay_singh said:
What do you people use to generate latex source.

I only use Latex in here, and either type it in by hand or use the menu available when you click the "Go Advanced" button under the Quick Reply window.

Click the capital Sigma icon in advanced mode to get the Latex menu. Unfortunately, this feature is not enabled in every sub-forum (like this one). Not sure why that is.
 
I use Texmaker as IDE (Interactive developmend environment), you must know the language of TeX to use it.
 
vijay_singh said:
Just testing

$ V_{bw} $ = $ V_{b} $ - $ V_{w} $

*********************************************

Thanks guys. But Seems like LyX doesn't generate correct source. I had to put spaces and some dollars my self. What do you people use to generate latex source.

You don't put the dollar signs in. They're the things that would tell the LaTeX program to interpret the contained text as mathematics if you were compiling the source on your machine at home. That isn't what happens in the forum. In this forum's implementation the $ and $$ are are replaced by the tex and itex tags.
 

Similar threads

  • · Replies 23 ·
Replies
23
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 23 ·
Replies
23
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K