Can we see the latex source code for each post?

  • Context: LaTeX 
  • Thread starter Thread starter yucheng
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around the ability to access and copy LaTeX source code from posts on Physics Forums, particularly focusing on methods to retrieve the raw code rather than the rendered equations. Participants explore various approaches and share experiences related to copying LaTeX from both entire posts and individual equations.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant suggests a method used on Stackexchange to toggle the edit page for copying source code, expressing a desire for a similar feature on Physics Forums.
  • Another participant mentions that using the BB toggle and replying to a post allows them to see the raw LaTeX code.
  • Several participants discuss methods for copying LaTeX for individual equations, including right-clicking on rendered equations to access options for displaying or copying the code.
  • Concerns are raised about potential hidden code that MathJax may execute but not display, with examples of LaTeX code provided to illustrate this point.
  • Some participants acknowledge the existence of hidden code and express curiosity about its implications for copying LaTeX.

Areas of Agreement / Disagreement

Participants express varying opinions on the methods available for accessing LaTeX code, with some agreeing on certain techniques while others highlight limitations or concerns about hidden code. The discussion does not reach a consensus on the best approach.

Contextual Notes

Participants note issues such as the behavior of line breaks when copying text and the potential for hidden LaTeX code that may not be visible in the rendered output.

yucheng
Messages
232
Reaction score
57
I was hoping to copy whole posts, along with the LATEX code (not the rendered equations). One way I did it in the Stackexchange network is to toggle the edit page and copy the source code there.

Apparently posts by others in PF, even your own posts after some time, cannot be edited. It would be great if we could at least copy the source code, perhaps by toggling a page where the source code of the post can be copied, but not edited?

Thanks in advance! ##;))##

P.S. it appears that for every line break copied from the text in the PF post editor (press the enter key), it is multiplied by two when pasted into, for instance Geany. Why is there such a behaviour?
1663892645289.png
 
  • Like
Likes   Reactions: Passerby
Physics news on Phys.org
If you have the BB toggle set so the icons are red and you "Reply" to the post, do you see the raw LaTeX? I usually do...
 
  • Like
Likes   Reactions: yucheng
Yes I just realized that haha quick work around... Thanks!
 
  • Like
Likes   Reactions: berkeman
$$v(t)~=~L\frac{di(t)}{dt}$$
 
berkeman said:
1663893278646.png
$$v(t)~=~L\frac{di(t)}{dt}$$
 
  • Like
Likes   Reactions: yucheng
By the way, if you just want to copy the LaTeX for a single equation rather than an entire post, just right-click on the rendered equation and select either "Show Math As >" or "Copy to Clipboard >" as appropriate.

1663967071695.png
 
  • Like
  • Informative
Likes   Reactions: berkeman, Office_Shredder and Wrichik Basu
DrGreg said:
By the way, if you just want to copy the LaTeX for a single equation rather than an entire post, just right-click on the rendered equation and select either "Show Math As >" or "Copy to Clipboard >" as appropriate.
That's a good way, unless the ##\LaTeX## code has some “hidden” code that MathJax executes but doesn't display. ##\require{physics} \require{newcommand} \def\jjmm{{j_1 j_2; m_1 m_2}} \def\jjjm{{j_1 j_2; j m}}##

But once you see the code, you will probably be able to guess that there is some more code hidden elsewhere in the post.
$$\begin{equation}
\ip{\jjmm}{\jjjm} = (-1)^{j_1 - j_2 + m} \sqrt{2j + 1} \begin{pmatrix}
j_1 & j_2 & j \\
m_1 & m_2 & -m
\end{pmatrix}.
\end{equation}$$
 
  • Informative
Likes   Reactions: DrGreg
Wrichik Basu said:
That's a good way, unless the ##\LaTeX## code has some “hidden” code that MathJax executes but doesn't display. ##[/color]\require{physics} \require{newcommand} \def\jjmm{{j_1 j_2; m_1 m_2}} \def\jjjm{{j_1 j_2; j m}}##[/color]

But once you see the code, you will probably be able to guess that there is some more code hidden elsewhere in the post.
$$[/color]\ip{\jjmm}{\jjjm} = ...$$[/color]
That's technically possible, but almost never used in actual posts.
 
mfb said:
That's technically possible, but almost never used in actual posts.
Now I see the hidden code >u<
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 1 ·
Replies
1
Views
13K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 2 ·
Replies
2
Views
6K
  • · Replies 3 ·
Replies
3
Views
11K
  • · Replies 4 ·
Replies
4
Views
3K
Replies
3
Views
5K