Re: New feature provides support for pdf for mat(OSPP)

Darcy Shen via Texmacs-dev <[email protected]> Sun, 15 Oct 2023 20:24:02 +0800
Newsgroups gmane.editors.texmacs.devel
Message-ID <[email protected]>
--===============1219415615085951689==
Content-Type: multipart/alternative; 
	boundary="----=_Part_68690_59233941.1697372642958"

------=_Part_68690_59233941.1697372642958
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Try Mogan Research v1.2.0-beta25:=C2=A0https://github.com/XmacsLabs/mogan/r=
eleases/tag/v1.2.0-beta25



The verbose logging has been fixed. And it works fine with images as far as=
 I know.



There are three cases:

1. embedded images in the tm document

2. included image in the folder

3. included image in other folders



Both of them should work, but for the case 3, there are known defects. Plea=
se report bugs to=C2=A0https://github.com/XmacsLabs/mogan/issues=C2=A0if th=
ere are bugs.






---- On Tue, 10 Oct 2023 02:18:41 +0800 Hammer Hu <[email protected]> w=
rote ---



Looks good. But it doesn't work with images so far, right?

Best,
Hammer

---------------------------------------------
From: Darcy Shen via Texmacs-dev <mailto:[email protected]>
Sent: 09.10.2023 22:12
To: TeXmacs developer mailing list <mailto:[email protected]>
Subject: Re: [Texmacs-dev] New feature provides support for pdf format=EF=
=BC=88OSPP=EF=BC=89

tangdouer had done a great job on the PDF project.



I just released Mogan Research 1.2.0-beta23:=C2=A0https://github.com/XmacsL=
abs/mogan/releases/tag/v1.2.0-beta23



Enable `Export PDF with tm attachment` in Edit-Preferences->Others, and the=
n you can export a tm document as a PDF with this tm document attached.



The produced PDF could be used to share with other people, and edit it via =
Mogan Research 1.2.0-beta23.



I think Max's idea is really awesome! And tangdouer's impl is relatively ro=
bust.



Report one bug here:

I use Mogan Research 1.2.0 beta23, and find that if I try to export sicp_fu=
ll.tm to pdf.=C2=A0=C2=A0https://github.com/XmacsLabs/interactive-sicp/blob=
/main/sicp_full.tm

The console logs is very verbose even debug_convert is not enabled.



The root cause is that `debug_convert` is not guarded. Here is right way to=
 avoid verbose logs:

```

if (DEBUG_CONVERT) debug_convert << blablabla

```



https://github.com/XmacsLabs/mogan/blob/v1.2.0-beta23/src/Plugins/Pdf/pdf_h=
ummus_extract_attachment.cpp#L205-L220







---- On Mon, 09 Oct 2023 20:36:41 +0800 tjh via Texmacs-dev <mailto:texmacs=
[email protected]> wrote ---



Hello everyone, I am tangdouer, from China. I have contributed to mogan som=
e code as a OSPP participant.

My project is http://forum.texmacs.cn/t/proposal-mechanism-to-append-docume=
nts-to-and-augment-the-generated-pdf/1386. My mentor is Max. I have contrib=
uted some code to https://github.com/XmacsLabs/mogan. The main work is to a=
dd a new feature to mogan: attach tm doc to exported pdf when exporting the=
 pdf.And supports mogan to open, modify, and save this kind of pdf.I think =
it is very convenient to operate on a pdf file instead of a tm file.

Now I have almost completed this feature. And the latest beta version of mo=
gan already provides support for this feature. However, this feature has no=
t been fully tested at present, there may still be bugs. I would like to in=
vite everyone to experience this feature and review the code I wrote, so th=
at this code can be fed back to TeXmacs.


_______________________________________________

Texmacs-dev mailing list

mailto:[email protected]

https://lists.gnu.org/mailman/listinfo/texmacs-dev

_______________________________________________
Texmacs-dev mailing list
mailto:[email protected]
https://lists.gnu.org/mailman/listinfo/texmacs-dev


_______________________________________________
Texmacs-dev mailing list
mailto:[email protected]
https://lists.gnu.org/mailman/listinfo/texmacs-dev
------=_Part_68690_59233941.1697372642958
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head>=
<meta content=3D"text/html;charset=3DUTF-8" http-equiv=3D"Content-Type"></h=
ead><body ><div style=3D"font-family: Verdana, Arial, Helvetica, sans-serif=
; font-size: 10pt;"><div>Try Mogan Research v1.2.0-beta25:&nbsp;<a target=
=3D"_blank" data-zeanchor=3D"true" href=3D"https://github.com/XmacsLabs/mog=
an/releases/tag/v1.2.0-beta25">https://github.com/XmacsLabs/mogan/releases/=
tag/v1.2.0-beta25</a><br></div><div><br></div><div>The verbose logging has =
been fixed. And it works fine with images as far as I know.<br></div><div><=
br></div><div>There are three cases:<br></div><div>1. embedded images in th=
e tm document<br></div><div>2. included image in the folder<br></div><div>3=
. included image in other folders<br></div><div><br></div><div>Both of them=
 should work, but for the case 3, there are known defects. Please report bu=
gs to&nbsp;<a target=3D"_blank" data-zeanchor=3D"true" href=3D"https://gith=
ub.com/XmacsLabs/mogan/issues">https://github.com/XmacsLabs/mogan/issues</a=
>&nbsp;if there are bugs.</div><div><br></div><div class=3D"zmail_extra_hr"=
 style=3D"border-top: 1px solid rgb(204, 204, 204); height: 0px; margin-top=
: 10px; margin-bottom: 10px; line-height: 0px;"><br></div><div class=3D"zma=
il_extra" data-zbluepencil-ignore=3D"true"><div><br></div><div id=3D"Zm-_Id=
_-Sgn1">---- On Tue, 10 Oct 2023 02:18:41 +0800 <b>Hammer Hu &lt;hammer401@=
foxmail.com&gt;</b> wrote ---<br></div><div><br></div><blockquote id=3D"blo=
ckquote_zmail" style=3D"margin: 0px;"><div>Looks good. But it doesn't work =
with images so far, right?<br><br>Best,<br>Hammer<br><br>------------------=
---------------------------<br>From: Darcy Shen via Texmacs-dev &lt;<a href=
=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>&g=
t;<br>Sent: 09.10.2023 22:12<br>To: TeXmacs developer mailing list &lt;<a h=
ref=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a=
>&gt;<br>Subject: Re: [Texmacs-dev] New feature provides support for pdf fo=
rmat=EF=BC=88OSPP=EF=BC=89<br><br>tangdouer had done a great job on the PDF=
 project.<br><br><br><br>I just released Mogan Research 1.2.0-beta23:&nbsp;=
<a href=3D"https://github.com/XmacsLabs/mogan/releases/tag/v1.2.0-beta23" t=
arget=3D"_blank">https://github.com/XmacsLabs/mogan/releases/tag/v1.2.0-bet=
a23</a><br><br><br><br>Enable `Export PDF with tm attachment` in Edit-Prefe=
rences-&gt;Others, and then you can export a tm document as a PDF with this=
 tm document attached.<br><br><br><br>The produced PDF could be used to sha=
re with other people, and edit it via Mogan Research 1.2.0-beta23.<br><br><=
br><br>I think Max's idea is really awesome! And tangdouer's impl is relati=
vely robust.<br><br><br><br>Report one bug here:<br><br>I use Mogan Researc=
h 1.2.0 beta23, and find that if I try to export sicp_full.tm to pdf.&nbsp;=
&nbsp;<a href=3D"https://github.com/XmacsLabs/interactive-sicp/blob/main/si=
cp_full.tm" target=3D"_blank">https://github.com/XmacsLabs/interactive-sicp=
/blob/main/sicp_full.tm</a><br><br>The console logs is very verbose even de=
bug_convert is not enabled.<br><br><br><br>The root cause is that `debug_co=
nvert` is not guarded. Here is right way to avoid verbose logs:<br><br>```<=
br><br>if (DEBUG_CONVERT) debug_convert &lt;&lt; blablabla<br><br>```<br><b=
r><br><br><a href=3D"https://github.com/XmacsLabs/mogan/blob/v1.2.0-beta23/=
src/Plugins/Pdf/pdf_hummus_extract_attachment.cpp#L205-L220" target=3D"_bla=
nk">https://github.com/XmacsLabs/mogan/blob/v1.2.0-beta23/src/Plugins/Pdf/p=
df_hummus_extract_attachment.cpp#L205-L220</a><br><br><br><br><br><br><br><=
br>---- On Mon, 09 Oct 2023 20:36:41 +0800 tjh via Texmacs-dev &lt;<a href=
=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>&g=
t; wrote ---<br><br><br><br>Hello everyone, I am tangdouer, from China. I h=
ave contributed to mogan some code as a OSPP participant.<br><br>My project=
 is <a href=3D"http://forum.texmacs.cn/t/proposal-mechanism-to-append-docum=
ents-to-and-augment-the-generated-pdf/1386" target=3D"_blank">http://forum.=
texmacs.cn/t/proposal-mechanism-to-append-documents-to-and-augment-the-gene=
rated-pdf/1386</a>. My mentor is Max. I have contributed some code to <a hr=
ef=3D"https://github.com/XmacsLabs/mogan" target=3D"_blank">https://github.=
com/XmacsLabs/mogan</a>. The main work is to add a new feature to mogan: at=
tach tm doc to exported pdf when exporting the pdf.And supports mogan to op=
en, modify, and save this kind of pdf.I think it is very convenient to oper=
ate on a pdf file instead of a tm file.<br><br>Now I have almost completed =
this feature. And the latest beta version of mogan already provides support=
 for this feature. However, this feature has not been fully tested at prese=
nt, there may still be bugs. I would like to invite everyone to experience =
this feature and review the code I wrote, so that this code can be fed back=
 to TeXmacs.<br><br><br>_______________________________________________<br>=
<br>Texmacs-dev mailing list<br><br><a href=3D"mailto:[email protected]" =
target=3D"_blank">[email protected]</a><br><br><a href=3D"https://lists.g=
nu.org/mailman/listinfo/texmacs-dev" target=3D"_blank">https://lists.gnu.or=
g/mailman/listinfo/texmacs-dev</a><br><br>_________________________________=
______________<br>Texmacs-dev mailing list<br><a href=3D"mailto:Texmacs-dev=
@gnu.org" target=3D"_blank">[email protected]</a><br><a href=3D"https://l=
ists.gnu.org/mailman/listinfo/texmacs-dev" target=3D"_blank">https://lists.=
gnu.org/mailman/listinfo/texmacs-dev</a><br><br><br>_______________________=
________________________<br>Texmacs-dev mailing list<br><a href=3D"mailto:T=
[email protected]" target=3D"_blank">[email protected]</a><br><a href=3D=
"https://lists.gnu.org/mailman/listinfo/texmacs-dev" target=3D"_blank">http=
s://lists.gnu.org/mailman/listinfo/texmacs-dev</a><br></div></blockquote></=
div><div><br></div></div><br></body></html>
------=_Part_68690_59233941.1697372642958--



--===============1219415615085951689==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KVGV4bWFjcy1k
ZXYgbWFpbGluZyBsaXN0ClRleG1hY3MtZGV2QGdudS5vcmcKaHR0cHM6Ly9saXN0cy5nbnUub3Jn
L21haWxtYW4vbGlzdGluZm8vdGV4bWFjcy1kZXYK

--===============1219415615085951689==--