
Dear Haskell users, I just released a new version of haskintex, the program that runs Haskell code inside LaTeX documents. http://hackage.haskell.org/package/haskintex # More about haskintex For those who don't know the program yet, _haskintex_ is a tool that executes Haskell code inside LaTeX documents, creating a new LaTeX document where each Haskell expression has been replaced by its result. Furthermore, since haskintex has a special command for using the HaTeX library, you will be able to write Haskell code that generates LaTeX code. Find more details in the haskintex documentation page: http://daniel-diaz.github.io/projects/haskintex # What's new? One of the main issues when evaluating Haskell code with haskintex was that haskintex was not aware of sandbox environments, so it had to rely on user or global package databases. From version 0.6.0.0, haskintex can now detect and use sandbox package databases, with no additional effort required from you. The -nosandbox flag has been added in case you still want the old behavior. Another addition is the -autotexy flag. Without the flag, every expression contained in a \hatex command is required to have type LaTeX. When the flag is enabled, this restriction is relaxed to any type that is an instance of the Texy typeclass. This typeclass contains instances for types that can be rendered to LaTeX syntax. Could be some text, numbers, or even matrices. You can create your own instances too. Suggestions, bugs, questions? Head to the haskintex issue tracker: https://github.com/Daniel-Diaz/haskintex/issues Happy texing, Daniel Díaz.

Daniel, Can this be used in conjunction with the `diagrams` package to generate diagrams in LaTeX instead of suffering through Tikz? Is it possible to include a Haskell source file instead of inlining it in the tex file? On 10/09/2015 12:33 PM, Daniel Díaz Casanueva wrote:
Dear Haskell users,
I just released a new version of haskintex, the program that runs Haskell code inside LaTeX documents.
http://hackage.haskell.org/package/haskintex
# More about haskintex
For those who don't know the program yet, _haskintex_ is a tool that executes Haskell code inside LaTeX documents, creating a new LaTeX document where each Haskell expression has been replaced by its result. Furthermore, since haskintex has a special command for using the HaTeX library, you will be able to write Haskell code that generates LaTeX code. Find more details in the haskintex documentation page:
http://daniel-diaz.github.io/projects/haskintex
# What's new?
One of the main issues when evaluating Haskell code with haskintex was that haskintex was not aware of sandbox environments, so it had to rely on user or global package databases. From version 0.6.0.0, haskintex can now detect and use sandbox package databases, with no additional effort required from you. The -nosandbox flag has been added in case you still want the old behavior.
Another addition is the -autotexy flag. Without the flag, every expression contained in a \hatex command is required to have type LaTeX. When the flag is enabled, this restriction is relaxed to any type that is an instance of the Texy typeclass. This typeclass contains instances for types that can be rendered to LaTeX syntax. Could be some text, numbers, or even matrices. You can create your own instances too.
Suggestions, bugs, questions? Head to the haskintex issue tracker:
https://github.com/Daniel-Diaz/haskintex/issues
Happy texing, Daniel Díaz.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe

Can this be used in conjunction with the `diagrams` package to generate diagrams in LaTeX instead of suffering through Tikz?
Is it possible to include a Haskell source file instead of inlining it in
There is no way of using haskintex combined with diagrams at the moment.
But using the HaTeX library you don't have to write the tikz code! Let the
library generate the tikz code for you:
http://hackage.haskell.org/package/HaTeX-3.16.1.1/docs/Text-LaTeX-Packages-T...
Unfortunately, it doesn't have most of the features diagrams offer.
the tex file?
You can write the source file and then use the Haskell import. You can also
open a ticket requesting a feature to include source files with a special
command. In any case, I take note of the suggestion. ;)
Best regards,
Daniel Díaz.
On Fri, Oct 9, 2015 at 3:32 PM, Andrey Chudnov
Daniel, Can this be used in conjunction with the `diagrams` package to generate diagrams in LaTeX instead of suffering through Tikz? Is it possible to include a Haskell source file instead of inlining it in the tex file?
On 10/09/2015 12:33 PM, Daniel Díaz Casanueva wrote:
Dear Haskell users,
I just released a new version of haskintex, the program that runs Haskell code inside LaTeX documents.
http://hackage.haskell.org/package/haskintex
# More about haskintex
For those who don't know the program yet, _haskintex_ is a tool that executes Haskell code inside LaTeX documents, creating a new LaTeX document where each Haskell expression has been replaced by its result. Furthermore, since haskintex has a special command for using the HaTeX library, you will be able to write Haskell code that generates LaTeX code. Find more details in the haskintex documentation page:
http://daniel-diaz.github.io/projects/haskintex
# What's new?
One of the main issues when evaluating Haskell code with haskintex was that haskintex was not aware of sandbox environments, so it had to rely on user or global package databases. From version 0.6.0.0, haskintex can now detect and use sandbox package databases, with no additional effort required from you. The -nosandbox flag has been added in case you still want the old behavior.
Another addition is the -autotexy flag. Without the flag, every expression contained in a \hatex command is required to have type LaTeX. When the flag is enabled, this restriction is relaxed to any type that is an instance of the Texy typeclass. This typeclass contains instances for types that can be rendered to LaTeX syntax. Could be some text, numbers, or even matrices. You can create your own instances too.
Suggestions, bugs, questions? Head to the haskintex issue tracker:
https://github.com/Daniel-Diaz/haskintex/issues
Happy texing, Daniel Díaz.
_______________________________________________ Haskell-Cafe mailing listHaskell-Cafe@haskell.orghttp://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe

You can incorporate diagrams from the `diagrams` package inline in LaTeX
using diagrams-builder. We have a tutorial written up here:
http://projects.haskell.org/diagrams/doc/latex.html
I imagine haskintex has a more sophisticated technique and it would be
interesting to integrate diagrams with that approach too.
Ryan
On Fri, Oct 9, 2015 at 3:32 PM, Andrey Chudnov
Daniel, Can this be used in conjunction with the `diagrams` package to generate diagrams in LaTeX instead of suffering through Tikz? Is it possible to include a Haskell source file instead of inlining it in the tex file?
On 10/09/2015 12:33 PM, Daniel Díaz Casanueva wrote:
Dear Haskell users,
I just released a new version of haskintex, the program that runs Haskell code inside LaTeX documents.
http://hackage.haskell.org/package/haskintex
# More about haskintex
For those who don't know the program yet, _haskintex_ is a tool that executes Haskell code inside LaTeX documents, creating a new LaTeX document where each Haskell expression has been replaced by its result. Furthermore, since haskintex has a special command for using the HaTeX library, you will be able to write Haskell code that generates LaTeX code. Find more details in the haskintex documentation page:
http://daniel-diaz.github.io/projects/haskintex
# What's new?
One of the main issues when evaluating Haskell code with haskintex was that haskintex was not aware of sandbox environments, so it had to rely on user or global package databases. From version 0.6.0.0, haskintex can now detect and use sandbox package databases, with no additional effort required from you. The -nosandbox flag has been added in case you still want the old behavior.
Another addition is the -autotexy flag. Without the flag, every expression contained in a \hatex command is required to have type LaTeX. When the flag is enabled, this restriction is relaxed to any type that is an instance of the Texy typeclass. This typeclass contains instances for types that can be rendered to LaTeX syntax. Could be some text, numbers, or even matrices. You can create your own instances too.
Suggestions, bugs, questions? Head to the haskintex issue tracker:
https://github.com/Daniel-Diaz/haskintex/issues
Happy texing, Daniel Díaz.
_______________________________________________ Haskell-Cafe mailing listHaskell-Cafe@haskell.orghttp://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe

Thanks, Ryan. The tutorial is really good and to-the-point. By the way, it looks like haskintex has a more general approach to integrating Haskell in LaTeX. It seems that in principle it could just use that to enable including diagrams in latex, without `diagrams-latex`. And the same question about including a Haskell source instead of inlining applies. To me, having a standalone Haskell file is superior since I can get syntax highlighting, typechecking and even quick REPL debugging of diagrams that way. While with the inlined one needs to re-pdflatex the whole thing to get type errors (do they even show up in the latex output?) and reflect the changes. I guess, that could be done with the PGF backend for diagrams and a suitable Makefile, though. On 10/09/2015 07:48 PM, Ryan Yates wrote:
You can incorporate diagrams from the `diagrams` package inline in LaTeX using diagrams-builder. We have a tutorial written up here:
http://projects.haskell.org/diagrams/doc/latex.html
I imagine haskintex has a more sophisticated technique and it would be interesting to integrate diagrams with that approach too.
Ryan
On Fri, Oct 9, 2015 at 3:32 PM, Andrey Chudnov
mailto:achudnov@gmail.com> wrote: Daniel, Can this be used in conjunction with the `diagrams` package to generate diagrams in LaTeX instead of suffering through Tikz? Is it possible to include a Haskell source file instead of inlining it in the tex file?
On 10/09/2015 12:33 PM, Daniel Díaz Casanueva wrote:
Dear Haskell users,
I just released a new version of haskintex, the program that runs Haskell code inside LaTeX documents.
http://hackage.haskell.org/package/haskintex
# More about haskintex
For those who don't know the program yet, _haskintex_ is a tool that executes Haskell code inside LaTeX documents, creating a new LaTeX document where each Haskell expression has been replaced by its result. Furthermore, since haskintex has a special command for using the HaTeX library, you will be able to write Haskell code that generates LaTeX code. Find more details in the haskintex documentation page:
http://daniel-diaz.github.io/projects/haskintex
# What's new?
One of the main issues when evaluating Haskell code with haskintex was that haskintex was not aware of sandbox environments, so it had to rely on user or global package databases. From version 0.6.0.0, haskintex can now detect and use sandbox package databases, with no additional effort required from you. The -nosandbox flag has been added in case you still want the old behavior.
Another addition is the -autotexy flag. Without the flag, every expression contained in a \hatex command is required to have type LaTeX. When the flag is enabled, this restriction is relaxed to any type that is an instance of the Texy typeclass. This typeclass contains instances for types that can be rendered to LaTeX syntax. Could be some text, numbers, or even matrices. You can create your own instances too.
Suggestions, bugs, questions? Head to the haskintex issue tracker:
https://github.com/Daniel-Diaz/haskintex/issues
Happy texing, Daniel Díaz.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org mailto:Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org mailto:Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe

You can easily have a standalone Haskell file when using `diagrams-latex`.
All you have to do is
\begin{diagram}[width=100]
import StandaloneHaskellFile
dia = someDiagramDefinedThere
\end{diagram}
-Brent
On Fri, Oct 9, 2015 at 7:25 PM Andrey Chudnov
Thanks, Ryan. The tutorial is really good and to-the-point.
By the way, it looks like haskintex has a more general approach to integrating Haskell in LaTeX. It seems that in principle it could just use that to enable including diagrams in latex, without `diagrams-latex`.
And the same question about including a Haskell source instead of inlining applies. To me, having a standalone Haskell file is superior since I can get syntax highlighting, typechecking and even quick REPL debugging of diagrams that way. While with the inlined one needs to re-pdflatex the whole thing to get type errors (do they even show up in the latex output?) and reflect the changes. I guess, that could be done with the PGF backend for diagrams and a suitable Makefile, though.
On 10/09/2015 07:48 PM, Ryan Yates wrote:
You can incorporate diagrams from the `diagrams` package inline in LaTeX using diagrams-builder. We have a tutorial written up here:
http://projects.haskell.org/diagrams/doc/latex.html
I imagine haskintex has a more sophisticated technique and it would be interesting to integrate diagrams with that approach too.
Ryan
On Fri, Oct 9, 2015 at 3:32 PM, Andrey Chudnov
wrote: Daniel, Can this be used in conjunction with the `diagrams` package to generate diagrams in LaTeX instead of suffering through Tikz? Is it possible to include a Haskell source file instead of inlining it in the tex file?
On 10/09/2015 12:33 PM, Daniel Díaz Casanueva wrote:
Dear Haskell users,
I just released a new version of haskintex, the program that runs Haskell code inside LaTeX documents.
http://hackage.haskell.org/package/haskintex
# More about haskintex
For those who don't know the program yet, _haskintex_ is a tool that executes Haskell code inside LaTeX documents, creating a new LaTeX document where each Haskell expression has been replaced by its result. Furthermore, since haskintex has a special command for using the HaTeX library, you will be able to write Haskell code that generates LaTeX code. Find more details in the haskintex documentation page:
http://daniel-diaz.github.io/projects/haskintex
# What's new?
One of the main issues when evaluating Haskell code with haskintex was that haskintex was not aware of sandbox environments, so it had to rely on user or global package databases. From version 0.6.0.0, haskintex can now detect and use sandbox package databases, with no additional effort required from you. The -nosandbox flag has been added in case you still want the old behavior.
Another addition is the -autotexy flag. Without the flag, every expression contained in a \hatex command is required to have type LaTeX. When the flag is enabled, this restriction is relaxed to any type that is an instance of the Texy typeclass. This typeclass contains instances for types that can be rendered to LaTeX syntax. Could be some text, numbers, or even matrices. You can create your own instances too.
Suggestions, bugs, questions? Head to the haskintex issue tracker:
https://github.com/Daniel-Diaz/haskintex/issues
Happy texing, Daniel Díaz.
_______________________________________________ Haskell-Cafe mailing listHaskell-Cafe@haskell.orghttp://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
participants (4)
-
Andrey Chudnov
-
Brent Yorgey
-
Daniel Díaz Casanueva
-
Ryan Yates