|
Warning: this is an htmlized version!
The original is here, and the conversion rules are here. |
-- This file:
-- https://anggtwu.net/LUA/CodePdfFiles1.lua.html
-- https://anggtwu.net/LUA/CodePdfFiles1.lua
-- (find-angg "LUA/CodePdfFiles1.lua")
-- Author: Eduardo Ochs <eduardoochs@gmail.com>
--
-- (defun e () (interactive) (find-angg "LUA/CodePdfFiles1.lua"))
--
-- «.get-listing» (to "get-listing")
-- «.make-zip» (to "make-zip")
pat_cp = '^%(code%-pdf%-page +"(.-)" +"~/books/__analysis/(.-)"%)'
pat_cp = '^%(code%-pdf%-page +"(.-)" +"(.-)"%)'
pat_b = '^;; %(find%-LATEX "education.bib" "bib%-(.-)"%)'
m = function (pat) PP(li,pat); return li:match(pat) end
m = function (pat) return li:match(pat) end
mb = function () return m(pat_b) end
mcp = function () return m(pat_cp) end
getcites = function (fname)
local pat1 = "\\cite{(.-)}"
local pat2 = "\\cite%[.-%]{(.-)}"
local cites = Set.new()
for id in ee_readfile(fname):gmatch(pat1) do cites:add(id) end
for id in ee_readfile(fname):gmatch(pat2) do cites:add(id) end
return cites
end
-- (find-fline "~/LATEX/2026logica-para-pessoas.tex")
-- (find-fline "~/LATEX/2026bad-foundations.tex")
cites1 = getcites("~/LATEX/2026logica-para-pessoas.tex")
cites2 = getcites("~/LATEX/2026bad-foundations.tex")
cites = cites1 + cites2
bs = VTable
getbibpdfs = function (fname)
local L = VTable {}
local collect = function (b,p) print(b,p) end
local collect = function (b,p) table.insert(L,{b=b,p=p}) end
for _,li_ in ipairs(splitlines(ee_readfile(fname))) do
li = li_
if mb() then table.insert(bs,mb()) end
if mcp() then
lastc,lastp = mcp()
for _,b in ipairs(bs) do collect(b,lastp) end
end
if li=="" then bs = VTable {} end
-- if li=="" then
-- if lastb and lastp then collect(lastb, lastp) end
-- lastb,lastc,lastp = nil,nil,nil
-- end
end
return L
end
bibpdfs = Set.new()
for _,bp in ipairs(getbibpdfs("~/books/__analysis/__analysis.el")) do
local b,p = bp.b,bp.p
-- PP(bp)
bibpdfs:add(b,p)
end
-- «get-listing» (to ".get-listing")
--[[
* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
dofile "CodePdfFiles1.lua"
= bibpdfs
= bibpdfs:ksc(" ")
= (bibpdfs - cites):ksc(" ")
= (cites - bibpdfs):ksc(" ")
= cites1
= cites2
= cites
cites3 = bibpdfs * cites
= cites3
= cites1:ksc" "
= cites1:ksc"\n"
= cites2:ksc"\n"
= cites3:ksc"\n"
bigstr
)
for b,p in (cites * bibpdfs):gen() do print(b,p) end
for b,p in (bibpdfs * cites):gen() do print(b,p) end
pdfs = Set.new()
for b,p in (bibpdfs * cites):gen() do pdfs:add(p) end
= pdfs:ksc("\n")
--]]
-- «make-zip» (to ".make-zip")
-- See: (ajua "2026-forumppg-baf-la")
--[[
# (find-fline "/tmp/pdfs/")
rm -Rv /tmp/pdfs/
mkdir /tmp/pdfs/
cd /tmp/pdfs/
f () { cp -iv $1 /tmp/pdfs/; }
f $S/http/www.apexcalculus.com/APEX_Calculus_Version_4_BW.pdf
f $S/https/staff.fnwi.uva.nl/a.j.p.heck/research/art/girep2001.pdf
f ~/books/__analysis/berry__developing_mathematical_modelling_skills_the_role_of_cas.pdf
f ~/books/__analysis/boaler__experiencing_school_mathematics.pdf
f ~/books/__analysis/boaler__mathematical_mindsets_2nd_ed.pdf
f ~/books/__analysis/bottoni_cattaneo_sacikara__teaching_foundations_of_mathematics_with_the_lean_theorem_prover.pdf
f ~/books/__analysis/buchberger__should_students_learn_integration_rules.pdf
f ~/books/__analysis/chang_beilock__the_math_anxiety-math_performance_link_and_its_relation_to_individual_and_environmental_factors_a_review_of_current_behavioral_and_psychophysiological_research.pdf
f ~/books/__analysis/cobb_yackel_mcclain__symbolizing_and_communicating_in_mathematics_classrooms.pdf
f ~/books/__analysis/cohen__a_revolution_in_one_classroom_the_case_of_mrs_oublier.pdf
f ~/books/__analysis/drijvers__learning_mathematics_in_a_computer_algebra_environment_obstacles_are_opportunities.pdf
f ~/books/__analysis/drijvers__secondary_algebra_education_revisiting_topics_and_themes_and_exploring_the_unknown.pdf
f ~/books/__analysis/duckworth__either_we_re_too_early_and_they_cant_learn_it_or_we_re_too_late_and_they_know_it_already_the_dilemma_of_applying_piaget.pdf
f ~/books/__analysis/egerton-pumt-27.pdf
f ~/books/__analysis/engelbrecht__conceptual_and_procedural_approaches_to_mathematics_in_the_engineering_curriculum_student_conceptions_and_performance.pdf
f ~/books/__analysis/ferreiro__com_todas_as_letras.pdf
f ~/books/__analysis/ferreiro_teberosky__literacy_before_schooling.pdf
f ~/books/__analysis/feynman__so_pode_ser_brincadeira_sr_feynman.pdf
f ~/books/__analysis/feynman__surely_you_re_joking_mr_feynman.pdf
f ~/books/__analysis/filloy_rojano__solving_equations_the_transition_from_arithmetic_to_algebra.pdf
f ~/books/__analysis/fischbein__tacit_models_and_mathematical_reasoning.pdf
f ~/books/__analysis/freudenthal__didactical_phenomenology_of_mathematical_structures.pdf
f ~/books/__analysis/freudenthal__revisiting_mathematics_education_china_lectures.pdf
f ~/books/__analysis/gray_tall__duality_ambiguity_and_flexibility_a_proceptual_view_of_simple_arithmetic.pdf
f ~/books/__analysis/gutierrez_jaime_fortuny__an_alternative_paradigm_to_evaluate_the_acquisition_of_the_van_hiele_levels.pdf
f ~/books/__analysis/guzdial_morrison__growing_computer_science_education_into_a_stem_education_discipline.pdf
f ~/books/__analysis/hewitt__arbitrary_and_necessary_part_1_a_way_of_viewing_the_mathematics_curriculum.pdf
f ~/books/__analysis/hewitt__arbitrary_and_necessary_part_2_assisting_memory.pdf
f ~/books/__analysis/hewitt__arbitrary_and_necessary_part_3_educating_awareness.pdf
f ~/books/__analysis/jonassen_rohrer_murphy__activity_theory_as_a_framework_for_designing_constructivist_learning_environments.pdf
f ~/books/__analysis/lehtinen__cultivating_mathematical_skills_from_drill-and-practice_to_deliberate_practice.pdf
f ~/books/__analysis/lemle__guia_teorico_do_alfabetizador.pdf
f ~/books/__analysis/ma__knowing_and_teaching_elementary_mathematics_teachers_understanding_of_fundamental_mathematics_in_china_and_the_united_states.pdf
f ~/books/__analysis/maria_laura_magalhaes_gomes__algebra_e_funcoes_na_educacao_basica.pdf
f ~/books/__analysis/mason__mathematical_abstraction_as_the_result_of_a_delicate_shift_of_attention.pdf
f ~/books/__analysis/mendonca_mendonca__psicogenese_da_lingua_escrita_contribuicoes_equivocos_e_consequencias_para_a_alfabetizacao.pdf
f ~/books/__analysis/ng__can_we_teach_digital_natives_digital_literacy.pdf
f ~/books/__analysis/schoenfeld__making_sense_of_teaching.pdf
f ~/books/__analysis/schoenfeld__what_counts_in_mathematics_and_other_classrooms_a_framework_for_looking_at_what_matters_and_thoughts_about_how_one_might_use_these_ideas_for_professional_development.pdf
f ~/books/__analysis/schoenfeld__when_good_teaching_leads_to_bad_results_the_disasters_of_well-taught_mathematics_courses.pdf
f ~/books/__analysis/schoenfeld_arcavi__on_the_meaning_of_variable.pdf
f ~/books/__analysis/sfard__on_the_dual_nature_of_mathematical_conceptions_reflections_on_processes_and_objects_as_different_sides_of_the_same_coin.pdf
f ~/books/__analysis/sfard__thinking_as_communicating_human_development_the_growth_of_discourses_and_mathematizing.pdf
f ~/books/__analysis/sfard_linchevski__between_arithmetic_and_algebra_in_the_search_of_a_missing_link_the_case_of_equations_and_inequalities.pdf
f ~/books/__analysis/sfard_linchevski__the_gains_and_the_pitfalls_of_reification_the_case_of_algebra.pdf
f ~/books/__analysis/sierpinska__understanding_in_mathematics.pdf
f ~/books/__analysis/stacey_chick__the_future_of_the_teaching_and_learning_of_algebra.pdf
f ~/books/__analysis/steen__calculus_for_a_new_century_a_pump_not_a_filter.pdf
f ~/books/__analysis/steffe_nesher_cobb__theories_of_mathematical_learning.pdf
f ~/books/__analysis/stewart__and_the_rest_is_just_algebra.pdf
f ~/books/__analysis/stewart__calculo_7a_ed_vol_1.pdf
f ~/books/__analysis/stewart__calculus_8th_ed.pdf
f ~/books/__analysis/tall__advanced_mathematical_thinking.pdf
f ~/books/__analysis/tall_thomas__encouraging_versatile_thinking_in_algebra_using_the_computer.pdf
f ~/books/__analysis/van_hiele__structure_and_insight_a_theory_of_mathematics_education.pdf
f ~/books/__analysis/wheeler__mathmatisation_as_a_pedagogical_tool.pdf
f ~/books/__analysis/zaslavsky__proceedings_pme_23_haifa.pdf
f ~/books/__phil/krantz__how_to_teach_mathematics.pdf
f ~/tmp/AI_is_Destroying_the_University_and_Learning_Itself.pdf
f ~/tmp/steinmetz__raciocinio_logico_na_aprendizagem_da_matematica.pdf
# (find-fline "/tmp/pdfs/")
du -h /tmp/pdfs/
cd /tmp/pdfs/
rm -fv /tmp/bad-foundations-bib.zip
zip /tmp/bad-foundations-bib.zip *
A=(
= ee_readfile "~/books/__analysis/__analysis.el"
for _,li_ in ipairs(splitlines(bigstr)) do
li = li_
if mb() then lastb = mb() end
-- if mb() then print(mb()) end
if mcp() and lastb then
lastc,lastp = mcp()
end
if li=="" then
if lastb and lastp then print(lastb, lastp) end
lastb,lastc,lastp = nil,nil,nil
end
end
= pat_b
= li
= mb()
= li
= pat_b
= li:match(pat_b)
= mb()
= ("abcd"):match"bc"
= cites1
= cites2
= cites1
for _,li in ipairs(splitlines(pel.bigstr)) do
pel:setbib(li)
print(pel:getbibfname(li))
end
for a,b in pel:genbibpdfs() do print(a,b) end
for _,li in pel:genlines() do print(pel:parse_code(li)) end
for _,li in pel:genlines() do print(pel:parse_shortfname(li)) end
for _,li in pel:genlines() do print(pel:parse_bib(li)) end
for _,li in ipairs(
for _,li in ipairs(splitlines(bigstr)) do
local c,d = li:match(pat)
if c then
A1:add(c,d)
local fname0 = d:match(pat2)
if fname0 then
print(c,fname0)
A2:add(c,fname0)
end
end
end
print(c,d) end
end
--]]
-- Local Variables:
-- coding: utf-8-unix
-- End: