Page 1 sur 1
Landscape option
Publié : ven. juil. 04, 2025 6:16 am
par GermanXG
In general configuration the Landscape option don't seems to work, the generated postscript is always vertical. If I understand correctly this option indicates the orientation of the generated postscript.
Re: Landscape option
Publié : ven. juil. 04, 2025 5:45 pm
par XcasEngGuy
in the latex (.tex) file try changing:
\documentclass{article}
to
\documentclass[landscape]{article}
Re: Landscape option
Publié : sam. juil. 05, 2025 4:30 am
par GermanXG
Thanks for your reply. Searching in french documentation the menu option I'm talking is "Fisch -> Imprimer -> Pre-visualisation". With this option I don't see any tex file generated, just the .ps file.
Re: Landscape option
Publié : sam. juil. 05, 2025 8:14 pm
par XcasEngGuy
In the file menu I use "Latex/Latex Preview". A ".tex" file is produced. I use Cygwin software to create the ps or pdf file from that. If you feel ambitious I can sent you the scripts I use.
A simple example:
Code : Tout sélectionner
if [ $# -eq 0 ]
then
echo 'Convert tex file to PDF - no mods'
echo 'Usage: latex_pdf <tex file>'
exit
fi
fn=$(cygpath -u $1 | sed -e 's/.[Tt][Ee][Xx]$//') # -e 's?.*/??g') # keep dir
latex $fn.tex
dvips $fn.dvi
ps2pdf $fn.ps $fn.pdf
rm $fn.aux
rm $fn.dvi
cygstart $fn.pdf
I have others for enhanced styles.
Re: Landscape option
Publié : dim. juil. 06, 2025 6:34 am
par GermanXG
Thanks, but I'm on linux. Supposedly the tool pdflatex convert tex files to pdf, but it returns some errors. Strange because GNU Texmacs works perfectly. Anyway, the generations of postcript works, not in landscape orientation but works.
Regards.
Re: Landscape option
Publié : dim. juil. 06, 2025 6:14 pm
par XcasEngGuy
For what it's worth, Cygwin is "linux" as an emulator. I am basically using bash scripts. Also sed, perl, and gawk on the more complicated ones.
In the script I provided, cygpath converts a Windows path to linux format.
Re: Landscape option
Publié : dim. juil. 06, 2025 6:17 pm
par parisse
I looked at the source code, Landscape applies only to a variant of the GUI library FLTK, when FL_DEVICE is defined. This is not the case for the stock FLTK library now. I should probably remove this option from the configuration...
Re: Landscape option
Publié : mar. juil. 08, 2025 11:10 pm
par XcasEngGuy
This will do landscape:
Code : Tout sélectionner
if [ $# -eq 0 ]
then
echo 'Convert tex file to PDF - no mods'
echo 'Usage: latex_pdf <tex file>'
exit
fi
fn=$(cygpath -u $1 | sed -e 's/.[Tt][Ee][Xx]$//') # -e 's?.*/??g') # keep dir
sed -i -e 's/\\documentclass{article}/\\documentclass[landscape]{article}\n\\usepackage{fullpage}\n\\usepackage{amsmath}\n\\usepackage{geometry}\n\\geometry{letterpaper, landscape, total={254mm,190mm} }\n\\usepackage{breqn}\n\\usepackage{moresize}/' $fn.tex
latex $fn.tex
dvips $fn.dvi
ps2pdf $fn.ps $fn.pdf
rm $fn.aux
rm $fn.dvi
cygstart $fn.pdf